:root {
  color-scheme: light;
  --bg: #eef2f6;
  --surface: #ffffff;
  --surface-alt: #f7f9fc;
  --surface-strong: #e8edf4;
  --line: #d8e0ea;
  --line-strong: #b9c5d3;
  --text: #122033;
  --muted: #5f7084;
  --blue: #2358b8;
  --blue-soft: #eaf1ff;
  --green: #147a56;
  --green-soft: #e8f6ef;
  --amber: #b56e15;
  --amber-soft: #fff4e5;
  --red: #bf4343;
  --red-soft: #fdeeed;
  --ink-soft: #edf2f8;
  --shadow: 0 18px 40px rgba(18, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.app-shell {
  width: 100%;
  padding: 18px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
}

.hidden {
  display: none !important;
}

.main-shell {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.screen {
  min-width: 0;
}

.sidebar-shell,
.workspace-stage,
.jobs-stage,
.hero-band,
.list-panel,
.detail-panel,
.summary-card,
.action-card,
.policy-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.sidebar-shell {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 18px;
  display: grid;
  gap: 16px;
  align-content: start;
}

.sidebar-brand {
  min-width: 0;
}

.brand-meta-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.brand-meta-chip {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
}

.brand-meta-chip strong,
.brand-meta-chip span,
.brand-meta-chip small {
  display: block;
}

.brand-meta-chip strong {
  font-size: 20px;
  line-height: 1;
}

.brand-meta-chip span {
  margin-top: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.brand-meta-chip small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.sidebar-status {
  display: grid;
  gap: 12px;
}

.sidebar-section + .sidebar-section {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.app-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-content: start;
}

.nav-btn {
  min-height: 66px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  display: grid;
  gap: 6px;
}

.nav-btn strong {
  font-size: 14px;
  line-height: 1.3;
}

.nav-btn span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.nav-btn.active {
  border-color: #9fb9e9;
  background: var(--blue-soft);
  color: var(--blue);
}

.nav-btn.active span {
  color: var(--blue);
}

.nav-btn:hover {
  border-color: #b6c8e7;
  box-shadow: 0 10px 22px rgba(18, 32, 51, 0.08);
  transform: translateY(-1px);
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  padding: 22px 24px;
}

.hero-copy {
  display: grid;
  gap: 16px;
  align-content: start;
}

.hero-band h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.08;
}

.subcopy {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  max-width: 860px;
}

.overview-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.overview-shortcut {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  display: grid;
  gap: 6px;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.overview-shortcut span,
.overview-shortcut small {
  color: var(--muted);
  line-height: 1.5;
}

.overview-shortcut span {
  font-size: 12px;
  font-weight: 700;
}

.overview-shortcut strong {
  font-size: 18px;
  line-height: 1.3;
}

.overview-shortcut small {
  font-size: 12px;
}

.overview-shortcut:hover {
  border-color: #b6c8e7;
  box-shadow: 0 10px 22px rgba(18, 32, 51, 0.08);
  transform: translateY(-1px);
}

.hero-side {
  display: grid;
  gap: 12px;
  align-content: start;
}

.hero-side-overview {
  grid-template-rows: repeat(3, minmax(0, auto));
}

.hero-callout {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
}

.hero-callout strong,
.meta-chip strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}

.hero-callout span,
.meta-chip span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.sync-badge {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.sync-badge.online {
  color: var(--green);
  background: var(--green-soft);
  border-color: #c7e4d6;
}

.sync-badge.offline {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: #f1deb2;
}

.policy-panel {
  padding: 16px;
}

.policy-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.policy-title {
  margin-bottom: 8px !important;
  color: var(--text) !important;
  font-weight: 700;
}

.summary-grid,
.action-grid,
.ops-grid,
.jobs-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.action-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.summary-card,
.action-card,
.ops-card {
  padding: 16px;
}

.jobs-grid {
  grid-template-columns: minmax(320px, 0.9fr) minmax(560px, 1.1fr);
}

.ops-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.summary-card strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
  line-height: 1;
}

.summary-card small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.summary-card.interactive {
  width: 100%;
  cursor: pointer;
  text-align: left;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.summary-card.interactive:hover {
  border-color: #b6c8e7;
  box-shadow: 0 10px 22px rgba(18, 32, 51, 0.08);
  transform: translateY(-1px);
}

.summary-card.good {
  background: linear-gradient(180deg, #ffffff 0%, #f5fbf8 100%);
}

.summary-card.danger {
  background: linear-gradient(180deg, #ffffff 0%, #fff7f6 100%);
}

.summary-card.info {
  background: linear-gradient(180deg, #ffffff 0%, #f5f8ff 100%);
}

.summary-card.accent {
  background: linear-gradient(180deg, #ffffff 0%, #f9f8ff 100%);
}

.action-head h2,
.section-head h2,
.panel-header h2,
.section-title-row h3,
.empty-state h3 {
  margin: 0;
  font-size: 18px;
}

.action-head p,
.section-head p,
.panel-header p,
.detail-subline,
.detail-copy,
.empty-state p,
.helper-note {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.action-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.card-footer {
  margin-top: 14px;
}

.ops-actions,
.ops-status {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.ops-btn {
  min-height: 54px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-alt);
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 4px;
  text-align: left;
}

.ops-btn small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.ops-btn.primary {
  border-color: #a6bfe8;
  background: var(--blue-soft);
  color: var(--blue);
}

.ops-btn[disabled] {
  cursor: wait;
  opacity: 0.72;
}

.ops-tip,
.ops-empty {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
}

.ops-tip p,
.ops-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.job-stack {
  display: grid;
  gap: 10px;
}

.job-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
}

.job-mini strong {
  font-size: 13px;
}

.job-detail {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
}

.job-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.job-detail p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.job-log {
  margin: 10px 0 0;
  min-height: 92px;
  max-height: 220px;
  overflow: auto;
  padding: 10px 12px;
  border-radius: 8px;
  background: #0f1727;
  color: #eef2f8;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.job-log.danger {
  background: #2a1316;
  color: #ffe4e4;
}

.job-log.empty {
  background: var(--surface-strong);
  color: var(--muted);
}

.action-row-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
}

.action-row-card strong {
  font-size: 13px;
}

.action-row-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.ghost-btn {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.ghost-btn:hover {
  border-color: #b6c8e7;
  box-shadow: 0 10px 22px rgba(18, 32, 51, 0.08);
  transform: translateY(-1px);
}

.workspace-stage,
.jobs-stage {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
}

.workspace-stage-copy {
  min-width: 0;
}

.workspace-stage-meta {
  width: min(460px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.meta-chip {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
}

.workspace-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.25fr) repeat(3, minmax(150px, 0.75fr));
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  align-items: end;
}

.field-search {
  min-width: 0;
}

.toolbar-toggle-group {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 2px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(520px, 0.96fr) minmax(420px, 0.88fr);
  gap: 16px;
  align-items: start;
}

.list-panel,
.detail-panel {
  min-height: 820px;
}

.feature-stack,
.bulk-panel {
  display: grid;
  gap: 12px;
}

.feature-card,
.bulk-summary,
.bulk-empty {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
}

.feature-card span,
.bulk-summary span,
.bulk-empty p,
.feature-block small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.feature-card strong,
.bulk-summary strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  line-height: 1.3;
}

.feature-card small,
.bulk-summary small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.feature-card-hero {
  background: linear-gradient(180deg, #ffffff 0%, #f2f7ff 100%);
  border-color: #cfe0ff;
}

.feature-block-grid,
.bulk-copy-grid {
  display: grid;
  gap: 10px;
}

.bulk-copy-grid .ghost-btn,
.feature-mini-actions .ghost-btn {
  width: 100%;
}

.feature-block {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.feature-block span,
.feature-block small {
  grid-column: 1;
}

.feature-block strong {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 20px;
  line-height: 1;
}

.feature-block span {
  font-size: 13px;
  font-weight: 700;
}

.feature-block.active,
.feature-block:hover {
  border-color: #a6bfe8;
  background: var(--blue-soft);
  box-shadow: 0 10px 22px rgba(18, 32, 51, 0.08);
  transform: translateY(-1px);
}

.feature-mini-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.bulk-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tab-strip {
  display: grid;
  gap: 8px;
}

.tab-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.tab-btn strong {
  min-width: 30px;
  text-align: right;
}

.tab-btn.active {
  border-color: #a6bfe8;
  background: var(--blue-soft);
  color: var(--blue);
}

.field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.field span {
  color: var(--muted);
  font-size: 12px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.field input,
.field select {
  height: 42px;
  padding: 0 12px;
}

.field textarea {
  padding: 12px;
  resize: vertical;
}

.toggle-stack {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.toggle-row,
.toggle-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.rule-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.rule-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
}

.rule-list strong {
  font-size: 13px;
}

.rule-list span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.list-panel,
.detail-panel {
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.segment-strip-wrap {
  padding: 12px 14px 0;
}

.segment-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.segment-btn {
  min-height: 52px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  display: grid;
  gap: 2px;
}

.segment-btn strong {
  font-size: 13px;
  line-height: 1.3;
}

.segment-btn span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.segment-btn.active {
  border-color: #a6bfe8;
  background: var(--blue-soft);
  color: var(--blue);
}

.segment-btn.active span {
  color: var(--blue);
}

.tab-btn:hover,
.segment-btn:hover,
.list-card:hover,
.ops-btn:hover {
  border-color: #b6c8e7;
  box-shadow: 0 10px 22px rgba(18, 32, 51, 0.08);
}

.list-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  max-height: 940px;
  overflow: auto;
}

.list-card {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
  cursor: pointer;
  text-align: left;
}

.list-card.active {
  border-color: #9fb9e9;
  background: #f4f8ff;
  box-shadow: inset 0 0 0 1px rgba(35, 88, 184, 0.12);
}

.list-card.bulk-selected {
  border-color: #7fb39f;
  box-shadow: inset 0 0 0 1px rgba(20, 122, 86, 0.16);
}

.list-card.no-thumb {
  grid-template-columns: minmax(0, 1fr);
}

.selectable-card {
  padding-top: 46px;
}

.list-card-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  z-index: 1;
}

.list-card-toggle.active {
  border-color: #a2d4bf;
  background: var(--green-soft);
  color: var(--green);
}

.card-thumb,
.hero-image,
.image-trigger img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--ink-soft);
}

.card-thumb.placeholder,
.hero-image.placeholder {
  background:
    linear-gradient(135deg, #f2f5fb 0%, #e2e8f3 100%);
}

.card-body {
  min-width: 0;
}

.card-topline,
.detail-topline,
.action-row,
.metric-row,
.metric-strip,
.section-title-row,
.image-actions,
.modal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.card-title,
.detail-title {
  margin: 0;
}

.card-title {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.45;
}

.card-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.metric-row {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.card-excerpt {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--ink-soft);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.pill.strong {
  background: var(--blue-soft);
  color: var(--blue);
}

.pill.muted {
  color: var(--muted);
}

.pill.ready_now {
  background: var(--green-soft);
  color: var(--green);
}

.pill.formal_candidate {
  background: var(--blue-soft);
  color: var(--blue);
}

.pill.candidate_only {
  background: var(--amber-soft);
  color: var(--amber);
}

.pill.blocked {
  background: var(--red-soft);
  color: var(--red);
}

.pill.unknown {
  background: #eef1f5;
  color: #6a7687;
}

.detail-panel {
  padding: 18px;
  overflow: auto;
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
}

.detail-section + .detail-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.action-board {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}

.action-board h3 {
  margin: 0;
  font-size: 18px;
}

.action-board p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.action-grid-compact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.action-chip {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.action-chip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.action-chip strong {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
}

.detail-actions-primary {
  margin-top: 14px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 18px;
}

.detail-title {
  font-size: 26px;
  line-height: 1.25;
}

.metric-strip {
  margin-top: 14px;
}

.metric-strip div {
  min-width: 92px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
}

.metric-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric-strip strong {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.4;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.info-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
}

.info-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.info-card strong {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.image-card {
  display: grid;
  gap: 8px;
}

.image-trigger {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.image-actions a {
  flex: 1 1 auto;
}

.text-block {
  white-space: pre-wrap;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
  line-height: 1.68;
  font-size: 14px;
}

.workflow-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field-full {
  grid-column: 1 / -1;
}

.link-btn,
.copy-btn,
.action-btn,
.modal-close,
.modal-nav {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.copy-btn.primary,
.action-btn.primary {
  border-color: #a6bfe8;
  background: var(--blue-soft);
  color: var(--blue);
}

.helper-note {
  font-size: 12px;
}

.empty-state {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.image-failed {
  opacity: 0.35;
}

.disabled-link {
  pointer-events: none;
  opacity: 0.45;
}

.image-modal.hidden {
  display: none;
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.image-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 15, 26, 0.78);
}

.image-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100vw - 32px));
  margin: 24px auto;
  padding: 16px;
  border-radius: 8px;
  background: #10192a;
  color: #f5f7fb;
}

.modal-close,
.modal-nav {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #f5f7fb;
}

.modal-close {
  margin-left: auto;
  display: block;
}

.modal-stage {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.modal-stage img {
  width: 100%;
  max-height: calc(100vh - 220px);
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
}

.modal-footer p {
  margin: 0;
  color: rgba(245, 247, 251, 0.82);
  font-size: 13px;
}

@media (max-width: 1480px) {
  .app-shell {
    grid-template-columns: 290px minmax(0, 1fr);
  }
}

@media (max-width: 1240px) {
  .app-shell,
  .hero-band,
  .workspace-grid,
  .workspace-stage,
  .jobs-stage,
  .jobs-grid,
  .workspace-toolbar {
    grid-template-columns: 1fr;
  }

  .app-shell,
  .workspace-stage,
  .jobs-stage {
    display: grid;
  }

  .sidebar-shell {
    position: static;
    max-height: none;
  }

  .workspace-stage-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-quick-grid {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .action-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .app-shell {
    padding: 16px;
  }

  .workspace-stage-meta,
  .brand-meta-strip,
  .overview-quick-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .feature-mini-actions,
  .bulk-form {
    grid-template-columns: 1fr;
  }

  .list-card,
  .detail-hero,
  .info-grid,
  .workflow-form,
  .gallery-grid,
  .action-grid-compact {
    grid-template-columns: 1fr;
  }

  .modal-stage {
    grid-template-columns: 1fr;
  }

  .modal-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* UI refresh: clearer hierarchy, calmer surfaces, and decision-first visualizations. */
:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-alt: #f8f8fc;
  --surface-strong: #efeff8;
  --line: #e4e5ee;
  --line-strong: #cdd0df;
  --text: #1e1d2d;
  --muted: #777789;
  --blue: #635bdf;
  --blue-soft: #eeecff;
  --green: #1f9d73;
  --green-soft: #e8f8f1;
  --amber: #d88b32;
  --amber-soft: #fff5e8;
  --red: #db646e;
  --red-soft: #fff0f1;
  --ink-soft: #f0f0f7;
  --shadow: 0 14px 40px rgba(35, 32, 72, 0.06);
}

body {
  background: radial-gradient(circle at top right, #efedff 0, #f5f6fa 34rem, #f5f6fa 100%);
  color: var(--text);
}

.app-shell {
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px;
  grid-template-columns: 254px minmax(0, 1fr);
  gap: 24px;
}

.sidebar-shell {
  top: 24px;
  max-height: calc(100vh - 48px);
  padding: 20px;
  gap: 20px;
  border: 1px solid rgba(228, 229, 238, 0.9);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(35, 32, 72, 0.08);
}

.sidebar-brand h1 {
  font-size: 24px;
  letter-spacing: -0.04em;
}

.sidebar-brand .subcopy {
  font-size: 12px;
  line-height: 1.55;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--blue);
  letter-spacing: 0.08em;
}

.brand-meta-strip { gap: 8px; }
.brand-meta-chip {
  padding: 11px 12px;
  border: 0;
  border-radius: 14px;
  background: var(--surface-alt);
}
.brand-meta-chip strong { font-size: 19px; }
.brand-meta-chip span { margin-top: 6px; font-size: 11px; }
.brand-meta-chip small { font-size: 10px; }

.sync-badge {
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.policy-panel {
  padding: 14px;
  border-radius: 14px;
  box-shadow: none;
  background: #fbfbfd;
}

.sidebar-section + .sidebar-section {
  padding-top: 18px;
  border-top-color: #ededf3;
}

.section-head.compact { margin-bottom: 10px; }
.section-head.compact h2 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.section-head.compact p { font-size: 11px; }
.app-nav { gap: 4px; }
.nav-btn {
  min-height: 52px;
  padding: 10px 12px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  box-shadow: none;
}
.nav-btn strong { font-size: 13px; }
.nav-btn span { font-size: 11px; }
.nav-btn.active {
  border: 0;
  background: var(--blue-soft);
  color: var(--blue);
  box-shadow: inset 3px 0 0 var(--blue);
}
.nav-btn:hover { transform: none; box-shadow: inset 3px 0 0 #b9b3ff; }

.main-shell { gap: 20px; }
.hero-band,
.workspace-stage,
.jobs-stage,
.list-panel,
.detail-panel,
.summary-card,
.action-card,
.policy-panel {
  border-color: rgba(228, 229, 238, 0.9);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.hero-band {
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  padding: 32px;
}
.hero-copy { gap: 14px; }
.hero-band h2 { max-width: 700px; font-size: 36px; letter-spacing: -0.05em; }
.hero-band .subcopy { max-width: 680px; font-size: 14px; }
.overview-quick-grid { gap: 10px; }
.overview-shortcut {
  min-height: 104px;
  padding: 14px 16px;
  border: 1px solid #e4e2fa;
  border-radius: 15px;
  background: #fbfaff;
}
.overview-shortcut:hover { border-color: #bdb7ff; box-shadow: 0 10px 24px rgba(99, 91, 223, 0.1); }
.overview-shortcut strong { font-size: 18px; }
.hero-side { gap: 10px; }
.hero-callout {
  padding: 15px 16px;
  border: 0;
  border-left: 3px solid #b4adff;
  border-radius: 0 14px 14px 0;
  background: #fafaff;
}
.hero-callout strong { font-size: 13px; }
.hero-callout span { font-size: 11px; }

.summary-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.summary-card {
  min-height: 128px;
  padding: 17px;
  border: 0;
  border-top: 3px solid transparent;
  border-radius: 17px;
  box-shadow: 0 10px 24px rgba(35, 32, 72, 0.05);
}
.summary-card:hover { transform: translateY(-2px); box-shadow: 0 16px 28px rgba(35, 32, 72, 0.09); }
.summary-card.good { border-top-color: var(--green); }
.summary-card.danger { border-top-color: var(--red); }
.summary-card.info { border-top-color: var(--blue); }
.summary-card.accent { border-top-color: var(--amber); }
.summary-card.neutral { border-top-color: #aeb1c4; }
.summary-card span { font-size: 11px; }
.summary-card strong { margin: 10px 0 7px; font-size: 30px; letter-spacing: -0.06em; }
.summary-card small { font-size: 11px; line-height: 1.45; }

.overview-analytics {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 16px;
}
.analytics-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid rgba(228, 229, 238, 0.9);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.analytics-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.analytics-card h2 { margin: 0; font-size: 18px; letter-spacing: -0.03em; }
.analytics-card .eyebrow { margin-bottom: 6px; }
.chart-note { color: var(--muted); font-size: 11px; text-align: right; }
.freshness-chart, .direction-chart { display: grid; gap: 16px; }
.chart-row { display: grid; gap: 8px; }
.chart-row-label, .direction-row-head { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
.chart-row-label strong, .direction-row-head strong { color: var(--text); font-size: 12px; }
.bar-track, .direction-track { height: 10px; overflow: hidden; border-radius: 999px; background: #f0f0f5; }
.bar-fill { display: block; height: 100%; border-radius: inherit; }
.bar-fill.fresh { background: linear-gradient(90deg, #74d1af, #23a87c); }
.bar-fill.candidate { background: linear-gradient(90deg, #aca6ff, #7369e8); }
.bar-fill.aging { background: linear-gradient(90deg, #f3c77f, #dd9a3e); }
.bar-fill.blocked { background: linear-gradient(90deg, #f2a3aa, #db646e); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px; color: var(--muted); font-size: 11px; }
.legend-dot { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; }
.legend-dot.fresh { background: var(--green); }
.legend-dot.candidate { background: var(--blue); }
.legend-dot.blocked { background: var(--red); }
.direction-row { display: grid; gap: 8px; }
.direction-track { height: 8px; }
.direction-fill { display: block; height: 100%; border-radius: inherit; background: #ebeaf6; }
.direction-fill i { display: block; height: 100%; border-radius: inherit; background: var(--blue); }

.action-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.action-card { padding: 22px; }
.action-head h2 { font-size: 17px; letter-spacing: -0.03em; }
.action-head p { font-size: 12px; }
.action-list { gap: 0; }
.action-row-card { padding: 13px 0; border-bottom-color: #efeff4; }
.action-row-card strong { min-width: 72px; color: var(--blue); font-size: 11px; }
.action-row-card span { font-size: 12px; line-height: 1.5; }
.ghost-btn, .link-btn, .copy-btn, .action-btn, .ops-btn { border-radius: 10px; }

.workspace-stage, .jobs-stage { padding: 26px 30px; }
.workspace-stage-copy h2, .jobs-stage h2 { font-size: 28px; letter-spacing: -0.05em; }
.workspace-toolbar {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 20px rgba(35, 32, 72, 0.04);
}
.field input, .field select { border-radius: 10px; border-color: var(--line); background: #fbfbfd; }
.workspace-grid { grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr); gap: 16px; }
.list-panel, .detail-panel { overflow: hidden; }
.panel-header { padding: 22px 24px 14px; }
.panel-header h2 { font-size: 20px; }
.segment-strip-wrap { padding: 0 24px 14px; }
.segment-strip { padding: 4px; border-radius: 12px; background: #f4f3fa; }
.segment-btn { border-radius: 9px; }
.list-wrap { padding: 0 14px 14px; }
.list-card {
  margin: 8px 0;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: #fbfbfd;
  box-shadow: none;
}
.list-card:hover, .list-card.active { border-color: #c7c2ff; background: #f8f7ff; box-shadow: 0 8px 18px rgba(99, 91, 223, 0.08); }
.card-thumb { width: 76px; min-height: 82px; border-radius: 11px; }
.card-title { font-size: 14px; line-height: 1.45; }
.card-subtitle, .metric-row, .card-excerpt { font-size: 11px; }
.pill { border-radius: 999px; font-size: 10px; }
.detail-panel { padding: 0; }
.detail-hero { padding: 24px; }
.detail-title { font-size: 24px; letter-spacing: -0.04em; }
.detail-section { padding: 20px 24px; border-top-color: #efeff4; }
.info-card { border-radius: 13px; background: #fafaff; }
.image-modal-dialog { border-radius: 20px; }

@media (max-width: 1180px) {
  .summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .action-grid { grid-template-columns: 1fr; }
}

@media (max-width: 920px) {
  .app-shell { grid-template-columns: 1fr; padding: 14px; }
  .sidebar-shell { position: static; max-height: none; }
  .app-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .overview-analytics, .hero-band { grid-template-columns: 1fr; }
  .workspace-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .app-nav, .summary-grid, .overview-quick-grid { grid-template-columns: 1fr 1fr; }
  .brand-meta-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .brand-meta-chip { padding: 9px 7px; }
  .brand-meta-chip strong { font-size: 16px; }
  .brand-meta-chip span { font-size: 9px; white-space: nowrap; }
  .brand-meta-chip small, .policy-panel { display: none; }
  .sidebar-shell { gap: 14px; padding: 16px; }
  .sidebar-section { padding-top: 2px; }
  .section-head.compact p { display: none; }
  .hero-band { padding: 22px; }
  .hero-band h2 { font-size: 28px; }
  .analytics-card, .action-card { padding: 18px; }
}

/* v2 UI refresh */
:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --line: #e3e7ef;
  --line-strong: #cbd3e1;
  --text: #182235;
  --muted: #6d788b;
  --blue: #4169e1;
  --green: #35a77a;
  --amber: #e3a33c;
  --red: #e66b67;
  --shadow: 0 14px 32px rgba(31, 43, 70, 0.07);
  --fresh: #35a77a;
  --formal: #6d8ff2;
  --aging: #e3a33c;
  --stale: #e66b67;
}

body {
  background: radial-gradient(circle at 92% 0%, rgba(92, 124, 232, 0.08), transparent 26rem), var(--bg);
}

.app-shell {
  max-width: 1920px;
  margin: 0 auto;
  padding: 20px;
  grid-template-columns: 276px minmax(0, 1fr);
  gap: 20px;
}

.sidebar-shell {
  top: 20px;
  max-height: calc(100vh - 40px);
  padding: 20px 16px;
  gap: 18px;
  border: 0;
  border-radius: 20px;
  background: linear-gradient(180deg, #18233a 0%, #10192c 100%);
  color: #f5f7ff;
  box-shadow: 0 20px 42px rgba(20, 30, 52, 0.18);
}

.sidebar-brand { padding: 4px 6px 2px; }
.sidebar-brand h1 { font-size: 25px; letter-spacing: -0.03em; }
.sidebar-brand .eyebrow, .sidebar-shell .eyebrow { color: #95aefc; }
.sidebar-brand .subcopy, .sidebar-shell .section-head p, .sidebar-shell .brand-meta-chip small, .sidebar-shell .nav-btn span, .sidebar-shell .bulk-empty p, .sidebar-shell .feature-card small { color: #9aa8c2; }
.brand-meta-strip { gap: 8px; }
.brand-meta-chip { padding: 11px 10px; border-color: rgba(255,255,255,0.1); border-radius: 12px; background: rgba(255,255,255,0.06); }
.brand-meta-chip strong, .brand-meta-chip span { color: #fff; }
.sidebar-section + .sidebar-section { border-top-color: rgba(255,255,255,0.1); }
.nav-btn { min-height: 58px; padding: 11px 12px; border-color: rgba(255,255,255,0.08); border-radius: 12px; background: transparent; color: #f1f4ff; }
.nav-btn.active { border-color: rgba(143,168,255,0.42); background: linear-gradient(100deg, rgba(90,119,229,0.42), rgba(90,119,229,0.16)); color: #fff; box-shadow: inset 3px 0 0 #91a9ff; }
.nav-btn.active span { color: #cbd6ff; }
.nav-btn:hover { border-color: rgba(143,168,255,0.34); background: rgba(255,255,255,0.07); box-shadow: none; transform: translateX(2px); }
.sync-badge, .policy-panel, .feature-card, .bulk-summary, .bulk-empty { border-color: rgba(255,255,255,0.1); background: rgba(255,255,255,0.06); }
.sync-badge.offline { color: #ffd58a; background: rgba(225,164,62,0.13); border-color: rgba(225,164,62,0.28); }
.policy-panel p.policy-title, .feature-card strong, .bulk-summary strong { color: #fff !important; }

.topbar { min-height: 52px; padding: 0 4px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar-context, .topbar-actions { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; }
.topbar-context strong { color: var(--text); }
.topbar-dot { width: 9px; height: 9px; border-radius: 50%; background: #5f7ce8; box-shadow: 0 0 0 5px rgba(95,124,232,0.12); }
.topbar-divider { color: #b7bfcc; }
.today-label { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,0.7); color: var(--text); font-size: 12px; }
.topbar-hint, .analytics-note { color: #98a2b2; font-size: 12px; }

.hero-band, .workspace-stage, .jobs-stage, .list-panel, .detail-panel, .summary-card, .action-card, .policy-panel { border-radius: 18px; box-shadow: var(--shadow); }
.hero-band { grid-template-columns: minmax(0,1fr) 310px; gap: 28px; padding: 28px; background: linear-gradient(135deg,#fff 0%,#f7f9ff 100%); }
.hero-band h2 { max-width: 720px; font-size: clamp(28px,3vw,42px); letter-spacing: -0.045em; }
.hero-copy { gap: 18px; }
.hero-callout { padding: 15px 16px; border-radius: 14px; background: rgba(255,255,255,0.75); }
.overview-shortcut { min-height: 112px; padding: 15px 16px; border-radius: 14px; background: rgba(255,255,255,0.74); }
.overview-shortcut strong { color: #273c86; }

.summary-card { min-height: 136px; padding: 16px; position: relative; overflow: hidden; border-radius: 16px; }
.summary-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: #8b9bb9; }
.summary-card.good::before { background: var(--green); }
.summary-card.danger::before { background: var(--red); }
.summary-card.info::before { background: var(--blue); }
.summary-card.accent::before { background: #8d70e8; }
.summary-card strong { margin-top: 13px; font-size: 34px; letter-spacing: -0.04em; }

.overview-analytics { grid-template-columns: 1.05fr 1fr 1fr; gap: 12px; margin-top: 18px; }
.analytics-card { min-height: 278px; padding: 20px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.analytics-card-head { margin-bottom: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.analytics-card-head .eyebrow { margin-bottom: 6px; color: #8090af; font-size: 10px; letter-spacing: 0.08em; }
.analytics-card h2 { font-size: 17px; letter-spacing: -0.025em; }
.analytics-card-head > strong { color: var(--text); font-size: 16px; }
.freshness-chart-row { min-height: 176px; display: flex; align-items: center; gap: 18px; }
.freshness-donut { width: 142px; height: 142px; flex: 0 0 142px; display: grid; place-items: center; border-radius: 50%; background: var(--donut-gradient,conic-gradient(var(--fresh) 0 47%,var(--formal) 47% 70%,var(--aging) 70% 78%,var(--stale) 78% 100%)); transform: rotate(-18deg); }
.donut-hole { width: 94px; height: 94px; display: grid; place-content: center; text-align: center; border-radius: 50%; background: var(--surface); transform: rotate(18deg); }
.donut-hole strong, .donut-hole span { display: block; }
.donut-hole strong { font-size: 25px; letter-spacing: -0.05em; }
.donut-hole span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.chart-legend { min-width: 0; width: 100%; display: grid; gap: 11px; margin-top: 0; }
.legend-item { display: grid; grid-template-columns: 9px minmax(0,1fr) auto; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.legend-item strong { color: var(--text); font-size: 12px; }
.legend-swatch { width: 8px; height: 8px; border-radius: 50%; }
.legend-swatch.fresh { background: var(--fresh); } .legend-swatch.formal { background: var(--formal); } .legend-swatch.aging { background: var(--aging); } .legend-swatch.stale { background: var(--stale); }
.analytics-link { width: 100%; padding: 10px 0 0; display: flex; justify-content: space-between; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--blue); cursor: pointer; font-size: 12px; text-align: left; }
.analytics-link span { font-size: 17px; }
.pipeline-bars, .direction-bars { display: grid; gap: 13px; margin: 25px 0 22px; }
.pipeline-row { display: grid; grid-template-columns: 56px minmax(0,1fr) 32px; align-items: center; gap: 10px; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; text-align: left; }
.pipeline-label, .pipeline-row > strong, .direction-row { font-size: 11px; }
.pipeline-row > strong, .direction-row strong { color: var(--text); text-align: right; }
.pipeline-track, .direction-track { height: 9px; overflow: hidden; border-radius: 999px; background: #edf0f5; }
.pipeline-fill, .direction-track span { height: 100%; display: block; border-radius: inherit; }
.pipeline-fill.coral { background: #e9817d; } .pipeline-fill.blue { background: #6886e7; } .pipeline-fill.violet { background: #9a82dc; } .pipeline-fill.green { background: #5dbb91; }
.direction-row { display: grid; grid-template-columns: 88px minmax(0,1fr) 20px; align-items: center; gap: 9px; color: var(--muted); }
.direction-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.direction-track span { min-width: 10%; background: linear-gradient(90deg,#f0b36a,#e37e77); }

@media (max-width: 1500px) { .summary-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } .overview-analytics { grid-template-columns: repeat(2,minmax(0,1fr)); } .direction-analytics-card { grid-column: 1 / -1; } }
@media (max-width: 1240px) { .app-shell { grid-template-columns: 1fr; } .sidebar-shell { position: static; max-height: none; } .app-nav { grid-template-columns: repeat(3,minmax(0,1fr)); } .sidebar-section-dynamic { display: none; } }
@media (max-width: 820px) { .app-shell { padding: 12px; } .topbar { align-items: flex-start; flex-direction: column; gap: 8px; } .topbar-hint { display: none; } .app-nav, .summary-grid, .overview-analytics { grid-template-columns: 1fr; } .direction-analytics-card { grid-column: auto; } .hero-band { padding: 18px; } .freshness-chart-row { justify-content: center; } }

.auth-locked { overflow: hidden; }
.topbar-auth-logout { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); cursor: pointer; font-size: 12px; }
.auth-gate { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(10, 17, 32, .72); backdrop-filter: blur(10px); }
.auth-card { width: min(420px, 100%); padding: 30px; border-radius: 22px; background: #fff; box-shadow: 0 28px 80px rgba(5, 12, 26, .3); }
.auth-card h2 { margin: 0; font-size: 25px; letter-spacing: -.04em; }
.auth-card > p:not(.eyebrow) { margin: 10px 0 22px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.auth-field { display: grid; gap: 8px; color: var(--text); font-size: 12px; font-weight: 700; }
.auth-field input { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fbfcfe; outline: none; }
.auth-field input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(65, 105, 225, .12); }
.auth-submit { width: 100%; min-height: 44px; margin-top: 14px; border: 0; border-radius: 10px; background: var(--blue); color: #fff; cursor: pointer; font-weight: 700; }
.auth-submit:disabled { opacity: .65; cursor: wait; }
.auth-error { min-height: 18px; margin: 10px 0 0; color: var(--red); font-size: 12px; }

.research-stage, .research-toolbar, .research-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.research-stage { padding: 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.research-stage h2 { margin: 0; font-size: 30px; }
.research-flow { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.research-flow span { padding: 8px 10px; border-radius: 999px; background: var(--surface-alt); border: 1px solid var(--line); }
.research-flow span.active { color: var(--blue); background: var(--blue-soft); border-color: #9fb9e9; }
.research-flow i { font-style: normal; color: var(--line-strong); }
.research-toolbar { margin-top: 16px; padding: 16px; }
.research-form { display: grid; grid-template-columns: minmax(240px, 1.6fr) minmax(160px, 1fr) 190px auto; gap: 12px; align-items: end; }
.research-query input { min-height: 44px; font-size: 15px; }
.research-submit { min-height: 44px; white-space: nowrap; }
.research-message { min-height: 20px; margin: 10px 2px 0; color: var(--muted); font-size: 12px; }
.research-message.error { color: var(--red); }
.research-grid { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .85fr); gap: 16px; align-items: start; }
.research-panel { min-width: 0; padding: 18px; }
.research-panel-header { align-items: flex-start; gap: 14px; }
.research-panel-header h2, .research-stored-panel h2 { margin: 0; font-size: 18px; }
.research-panel-header p, .research-stored-panel p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.research-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.research-results, .research-stored { display: grid; gap: 10px; margin-top: 14px; }
.research-result, .research-stored-card { display: flex; gap: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 13px; background: var(--surface-alt); }
.research-result.selected { border-color: #9fb9e9; background: var(--blue-soft); }
.research-check { flex: 0 0 20px; padding-top: 2px; cursor: pointer; }
.research-check input { width: 17px; height: 17px; accent-color: var(--blue); }
.research-result-body, .research-stored-card > div:first-child { min-width: 0; flex: 1; }
.research-result-topline { display: flex; gap: 6px; flex-wrap: wrap; }
.research-result h3, .research-stored-card h3 { margin: 8px 0 5px; font-size: 15px; line-height: 1.4; }
.research-result p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.research-result-meta, .research-stored-card p { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 9px; color: var(--muted); font-size: 12px; }
.research-result-meta a { color: var(--blue); text-decoration: none; }
.research-card-actions { flex: 0 0 auto; display: flex; flex-direction: column; gap: 7px; justify-content: center; }
.research-empty { min-height: 150px; display: grid; place-content: center; gap: 6px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 8px; padding: 24px; }
.research-empty strong { color: var(--text); }
.research-empty.compact { min-height: 100px; font-size: 12px; }
@media (max-width: 1180px) { .research-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } .research-submit { width: 100%; } .research-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .research-stage { display: grid; padding: 18px; } .research-flow { overflow-x: auto; padding-bottom: 2px; } .research-form { grid-template-columns: 1fr; } .research-panel-header { display: grid; } .research-actions { justify-content: flex-start; } .research-stored-card { display: grid; } .research-card-actions { flex-direction: row; } }

.collector-stage, .collector-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.collector-stage { padding: 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.collector-stage h2 { margin: 0; font-size: 30px; }
.collector-flow { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.collector-flow span { padding: 8px 10px; border-radius: 999px; background: var(--surface-alt); border: 1px solid var(--line); }
.collector-flow span.active { color: var(--blue); background: var(--blue-soft); border-color: #9fb9e9; }
.collector-flow i { font-style: normal; color: var(--line-strong); }
.collector-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, .95fr); gap: 16px; margin-top: 16px; align-items: start; }
.collector-panel { min-width: 0; padding: 18px; }
.collector-panel h2 { margin: 0; font-size: 18px; }
.collector-panel .panel-header p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.collector-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; margin-top: 16px; }
.collector-job-form { grid-template-columns: 1fr 1.4fr 1fr; }
.collector-job-options { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; grid-column: span 2; }
.collector-form > button { min-height: 42px; white-space: nowrap; }
.collector-message { min-height: 20px; margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.collector-token { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; align-items: center; margin-top: 12px; padding: 13px; border: 1px solid #e8c56a; border-radius: 8px; background: #fff9e8; }
.collector-token p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.collector-token > code { grid-column: 1 / -1; display: block; padding: 10px; overflow-wrap: anywhere; color: var(--text); background: #fff; border: 1px dashed #d8b34e; border-radius: 6px; font-size: 12px; }
.collector-devices, .collector-jobs { display: grid; gap: 9px; margin-top: 16px; }
.collector-device-card, .collector-job-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; background: var(--surface-alt); border: 1px solid var(--line); border-radius: 8px; }
.collector-card-topline { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 13px; }
.collector-device-card p, .collector-job-card p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.collector-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.collector-dot.online { background: #2fa36b; box-shadow: 0 0 0 3px #e3f5eb; }
.collector-dot.offline { background: #b9bec8; }
.collector-empty { padding: 24px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 8px; font-size: 12px; line-height: 1.6; }
.collector-error { display: block; margin-top: 5px; color: var(--red); font-size: 11px; }
.app-nav-secondary { display: grid; gap: 4px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.nav-secondary-label { margin: 0 10px 2px; color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.app-nav-secondary .nav-btn-compact { min-height: 38px; padding: 8px 10px; border-radius: 7px; }
.app-nav-secondary .nav-btn-compact strong { font-size: 12px; }
.app-nav-secondary .nav-btn-compact span { font-size: 11px; }
.sidebar-feature-section, .sidebar-section:has(#sidebar-feature-blocks), .sidebar-section-dynamic:has(+ .sidebar-feature-section) { display: none !important; }
.guide-link { color: var(--blue); font-size: 12px; text-decoration: none; white-space: nowrap; }
.guide-link:hover { text-decoration: underline; }
@media (max-width: 1180px) { .collector-grid { grid-template-columns: 1fr; } .collector-job-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } .collector-job-form > button { grid-column: span 2; } }
@media (max-width: 720px) { .collector-stage { display: grid; padding: 18px; } .collector-flow { overflow-x: auto; padding-bottom: 2px; } .collector-form, .collector-job-form, .collector-job-options { grid-template-columns: 1fr; } .collector-job-form > button, .collector-job-options { grid-column: auto; } .collector-token { grid-template-columns: 1fr; } .collector-token > code { grid-column: auto; } .collector-device-card, .collector-job-card { align-items: flex-start; } }
