:root {
  --canvas: #070b13;
  --surface: #101827;
  --surface-soft: #0c1421;
  --surface-blue: #101f35;
  --text: #f3f7ff;
  --muted: #8d9bb0;
  --line: rgba(126, 162, 204, 0.16);
  --line-strong: rgba(126, 162, 204, 0.3);
  --blue: #1473e6;
  --blue-dark: #80baff;
  --blue-soft: rgba(47, 140, 255, 0.14);
  --amber: #f4a53b;
  --amber-soft: rgba(244, 165, 59, 0.13);
  --red: #ff696f;
  --red-soft: rgba(255, 86, 96, 0.13);
  --shadow: 0 18px 56px rgba(0, 0, 0, 0.26);
  --shadow-high: 0 28px 80px rgba(0, 0, 0, 0.5);
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --sidebar: 250px;
}

* { box-sizing: border-box; }

html { overflow-x: clip; scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(circle at 84% -8%, rgba(47, 140, 255, 0.14), transparent 32%), linear-gradient(180deg, #070b13 0%, #0a101b 100%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

.password-visibility-field {
  position: relative;
  display: block;
}

.password-visibility-field > input {
  width: 100%;
  padding-right: 48px;
  box-sizing: border-box;
}

.password-visibility-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: currentColor;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-visibility-toggle:hover,
.password-visibility-toggle:focus-visible,
.password-visibility-toggle.is-visible {
  background: rgba(0, 113, 227, 0.12);
}

.password-visibility-glyph {
  position: relative;
  display: block;
  width: 17px;
  height: 11px;
  border: 1.7px solid currentColor;
  border-radius: 100% 0;
  transform: rotate(45deg);
}

.password-visibility-glyph::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  content: '';
  transform: translate(-50%, -50%) rotate(-45deg);
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, summary, [role="button"] { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  color: #fff;
  background: var(--blue);
  box-shadow: var(--shadow);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

:where(button, summary, [role="button"], [tabindex="0"]):focus-visible {
  outline: 2px solid var(--blue-dark);
  outline-offset: 2px;
}

.page-heading h1:focus { outline: none; }
.page-heading h1:focus-visible { text-decoration: underline; text-decoration-color: var(--blue); text-underline-offset: 4px; }

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  padding: 24px 14px 18px;
  background: rgba(7, 12, 21, 0.96);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(24px);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 10px 18px;
}

.brand-block > div { display: grid; line-height: 1.15; }
.brand-block strong { font-size: 16px; letter-spacing: -0.02em; }
.brand-block span:not(.brand-mark) { margin-top: 4px; color: var(--muted); font-size: 12px; }

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #2f8cff, #1457bd);
  box-shadow: 0 0 24px rgba(47, 140, 255, 0.28);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: -0.04em;
}

.business-nav {
  display: grid;
  gap: 4px;
  overflow: auto;
  padding: 6px 0 20px;
  scrollbar-width: none;
}
.business-nav::-webkit-scrollbar { display: none; }

.nav-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: 8px 10px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}
.nav-item:hover { background: rgba(120, 170, 228, 0.08); }
.nav-item:active { transform: scale(0.985); }
.nav-item.is-active { background: var(--blue-soft); color: var(--blue-dark); }
.nav-item > span:last-child { display: grid; min-width: 0; }
.nav-item strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.nav-item small { overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.nav-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  color: var(--muted);
  background: rgba(120, 170, 228, 0.08);
  font-size: 12px;
  font-weight: 700;
}
.nav-item.is-active .nav-icon { color: #fff; background: var(--blue); }

.status-entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: auto;
  padding: 12px;
  border: 0;
  border-radius: 14px;
  background: var(--surface-soft);
  text-align: left;
  cursor: pointer;
}
.status-entry > span:nth-child(2) { display: grid; }
.status-entry strong { font-size: 13px; }
.status-entry small { color: var(--muted); font-size: 11px; }
.status-symbol { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }

.content-shell { min-height: 100vh; margin-left: var(--sidebar); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(20px, 4vw, 54px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 19, 0.84);
  backdrop-filter: blur(22px);
}

.page-heading { display: grid; }
.page-heading span { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.page-heading h1 { margin: 2px 0 0; font-size: 18px; letter-spacing: -0.02em; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.snapshot-label { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.snapshot-label i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }

.icon-button, .quiet-button, .primary-button, .secondary-button, .danger-button {
  min-height: 40px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, opacity 150ms ease;
}
.icon-button:active, .quiet-button:active, .primary-button:active, .secondary-button:active { transform: scale(0.97); }
.icon-button { display: grid; width: 40px; padding: 0; place-items: center; border: 1px solid var(--line); background: var(--surface); font-size: 20px; }
.quiet-button, .secondary-button { padding: 0 15px; border: 1px solid var(--line); background: var(--surface); font-weight: 650; }
.primary-button { padding: 0 17px; border: 0; color: #fff; background: var(--blue); font-weight: 680; }
.primary-button:hover { background: var(--blue-dark); }
.danger-button { padding: 0 16px; border: 0; color: var(--red); background: var(--red-soft); font-weight: 650; }
.menu-button { display: none; }

.page-view { width: min(1480px, 100%); margin: 0 auto; padding: clamp(24px, 4vw, 54px); }
.product-page, .module-page, .page-section { display: grid; gap: 22px; }

.business-module { display: grid; gap: 20px; }
.module-header, .module-heading {
  display: flex;
  min-height: 164px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid rgba(10, 102, 216, 0.08);
  border-radius: var(--radius-lg);
  background: linear-gradient(115deg, rgba(47, 140, 255, 0.14), transparent 44%), linear-gradient(135deg, #101a2a 0%, #0d1522 100%);
  box-shadow: var(--shadow);
}
.module-header > div:first-child, .module-heading > div:first-child { max-width: 800px; }
.module-header h2, .module-heading h2 { margin: 3px 0 6px; font-size: clamp(30px, 4vw, 50px); line-height: 1.05; letter-spacing: -0.045em; }
.module-header p, .module-heading p { margin: 0; color: var(--muted); }
.module-kicker { color: var(--blue) !important; font-size: 12px; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; }

.work-panel, .action-section, .detail-section, .audit-section, .asset-section, .decision-detail, .functional-split {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: clamp(18px, 2.5vw, 26px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.panel-header h3, .section-title h3, .panel-heading h3, .workspace-header h3, .dialog-heading h3 { margin: 0; font-size: 20px; letter-spacing: -0.025em; }
.panel-header p, .section-title p, .panel-heading p, .workspace-header p { margin: 4px 0 0; color: var(--muted); }
.section-title, .panel-heading, .workspace-header, .dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.content-split, .functional-split, .decision-layout, .asset-layout, .result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 16px;
  min-width: 0;
}
.detail-panel, .form-panel, .result-panel, .ranking-panel, .permission-panel, .tool-panel {
  min-width: 0;
  padding: 20px;
  border-radius: 16px;
  background: var(--surface-soft);
}
.detail-panel > span:first-child { color: var(--blue); font-size: 11px; font-weight: 750; }
.detail-panel h3 { margin: 7px 0; }
.detail-panel p { color: var(--muted); }

.segmented-control, .segmented, .module-tabs {
  display: inline-flex;
  gap: 4px;
  max-width: 100%;
  padding: 4px;
  overflow: auto;
  border-radius: 12px;
  background: #09111d;
}
.segmented-control button, .segmented button, .module-tabs button, .filter-button {
  min-height: 36px;
  padding: 7px 13px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.segmented-control button.is-active, .segmented button.is-active, .module-tabs button.is-active, .filter-button.is-active {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);
}

.search-control, .field-control { display: grid; gap: 6px; min-width: min(220px, 100%); }
.search-control > span, .field-control > span { color: var(--muted); font-size: 11px; font-weight: 700; }
.data-table small { display: inline-flex; margin-left: 7px; }
.data-state, .status-chip, .data-tag {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: #172235;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.data-state.is-verified, .status-chip.is-verified, .data-tag-snapshot { color: var(--blue-dark); background: var(--blue-soft); }
.data-state.is-running, .status-chip.is-running { color: var(--blue-dark); background: var(--blue-soft); }
.data-state.is-pending, .status-chip.is-pending { color: var(--amber); background: var(--amber-soft); }
.data-state.is-blocked, .status-chip.is-blocked { color: var(--red); background: var(--red-soft); }
.data-state.is-draft, .data-tag-draft { color: #c4a7ff; background: rgba(148, 105, 255, 0.13); }
.data-tag-input { color: #ffd27c; background: rgba(244, 165, 59, 0.13); }
.data-tag-calculated { color: #f6cc6b; background: rgba(246, 204, 107, 0.13); }
.data-labels, .source-status { display: flex; flex-wrap: wrap; gap: 7px; }

.summary-card {
  display: grid;
  align-content: space-between;
  min-height: 145px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.summary-card span, .summary-card small { color: var(--muted); }
.summary-card strong { margin: 10px 0; font-size: clamp(26px, 3vw, 38px); line-height: 1; letter-spacing: -0.04em; }
.summary-card-primary { background: var(--surface-blue); border-color: rgba(10, 102, 216, 0.13); }
.summary-card-warning { background: var(--amber-soft); border-color: rgba(168, 93, 0, 0.12); }

.business-form, .exam-form { display: grid; gap: 16px; }
.business-form label, .exam-form label { display: grid; gap: 7px; }
.business-form label > span, .exam-form label > span { color: var(--muted); font-size: 12px; font-weight: 650; }
.full-field { display: grid; gap: 7px; }
.form-actions, .operation-bar, .record-actions, .confirmation-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.primary-action, .secondary-action, .text-action, .table-action {
  min-height: 40px;
  padding: 9px 15px;
  border-radius: 11px;
  font-weight: 700;
  cursor: pointer;
}
.primary-action { border: 0; color: #fff; background: var(--blue); }
.secondary-action, .table-action { border: 1px solid var(--line-strong); background: var(--surface); }
.text-action { border: 0; color: var(--blue); background: transparent; }
.confirm-control { display: inline-flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 8px !important; color: var(--muted); font-size: 12px; }
.confirm-control input { width: 17px; min-height: 17px; }
.inline-notice, .boundary-note, .governance-note, .success-note {
  margin: 0;
  padding: 13px 15px;
  border-radius: 12px;
  color: var(--muted);
  background: var(--surface-soft);
}
.inline-notice[data-tone="error"], .error-message { color: var(--red); background: var(--red-soft); }
.inline-notice[data-tone="success"], .success-note { color: var(--blue-dark); background: var(--blue-soft); }
.form-feedback { min-height: 20px; margin: 0; color: var(--muted); font-size: 12px; }

.business-data-table { width: 100%; }
.table-scroll, .table-shell { width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 14px; }
.detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.detail-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 16px; }
.detail-card h4 { margin: 0 0 12px; }
progress { width: 100%; accent-color: var(--blue); }

.audit-list { margin: 0; padding: 0; list-style: none; }
.audit-item { display: grid; grid-template-columns: 140px minmax(120px, 0.55fr) 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.audit-item time, .audit-item span { color: var(--muted); font-size: 12px; }

.capability-strip, .metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.capability-strip article, .metric-strip article { display: grid; min-height: 112px; align-content: space-between; padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.capability-strip span, .capability-strip small, .metric-strip span, .metric-strip small { color: var(--muted); }
.capability-strip strong, .metric-strip strong { margin: 7px 0; font-size: 27px; letter-spacing: -0.035em; }
.question-list { display: grid; gap: 14px; }
.question-card { margin: 0; padding: 20px; border: 1px solid var(--line); border-radius: 16px; }
.question-card legend { padding: 0 6px; font-weight: 720; }
.question-card legend span { margin-right: 8px; color: var(--blue); }
.question-meta { color: var(--muted); font-size: 12px; }
.answer-list { display: grid; gap: 8px; }
.answer-option { display: grid !important; grid-template-columns: auto 1fr; align-items: center; gap: 10px !important; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.answer-option:has(input:checked) { border-color: rgba(10, 102, 216, 0.5); background: var(--blue-soft); }
.answer-option input { width: 17px; min-height: 17px; }
.dimension-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.result-card { padding: 14px; border-radius: 12px; background: var(--surface); }
.ranking-list, .record-list { display: grid; gap: 9px; }
.record-card { padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }

.decision-toolbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.opportunity-list { display: grid; gap: 10px; }
.opportunity-card, .task-card, .selection-card, .risk-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}
.opportunity-card.is-selected, .selection-card.is-selected { border-color: rgba(10, 102, 216, 0.42); background: var(--surface-blue); }
.selection-grid, .task-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.asset-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.asset-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.asset-card img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--surface-soft); }
.asset-card > div { padding: 13px; }
.asset-preview { min-height: 300px; overflow: hidden; border-radius: 16px; background: var(--surface-soft); }
.asset-preview img { display: block; width: 100%; max-height: 480px; object-fit: contain; }
.decision-brief, .task-brief { min-height: 180px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); white-space: pre-wrap; }

.hero, .page-hero, .module-hero {
  position: relative;
  display: grid;
  gap: 14px;
  padding: clamp(24px, 4vw, 44px);
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: var(--text);
  background: linear-gradient(135deg, #101a2a 0%, #0d1522 62%, #12213a 100%);
  box-shadow: var(--shadow);
}
.hero::after, .page-hero::after, .module-hero::after {
  position: absolute;
  width: 260px;
  height: 260px;
  right: -120px;
  top: -140px;
  border-radius: 50%;
  background: rgba(47, 140, 255, 0.12);
  content: '';
}
.hero h1, .page-hero h1, .module-hero h1 { max-width: 820px; margin: 0; font-size: clamp(30px, 4.2vw, 54px); line-height: 1.05; letter-spacing: -0.045em; }
.hero p, .page-hero p, .module-hero p { max-width: 760px; margin: 0; color: var(--muted); font-size: clamp(15px, 1.5vw, 18px); }
.section-kicker, .eyebrow { color: var(--blue); font-size: 12px; font-weight: 730; letter-spacing: 0.08em; text-transform: uppercase; }

.metric-grid, .metrics-grid, .kpi-grid, .card-grid, .summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card, .kpi-card, .card, .panel, .content-card, .chart-card, .form-card, .table-card, .audit-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.2);
}
.metric-card, .kpi-card { display: grid; align-content: space-between; min-height: 148px; padding: 20px; }
.metric-card span, .metric-card small, .kpi-card span, .kpi-card small { color: var(--muted); }
.metric-card strong, .kpi-card strong { margin: 10px 0 6px; font-size: clamp(28px, 3vw, 40px); line-height: 1; letter-spacing: -0.04em; }
.card, .panel, .content-card, .chart-card, .form-card, .table-card, .audit-card { padding: 22px; }
.card h2, .card h3, .panel h2, .panel h3, .content-card h2, .content-card h3 { margin: 0; letter-spacing: -0.025em; }
.card p, .panel p, .content-card p { color: var(--muted); }

.section-heading, .panel-head, .card-head, .toolbar, .filter-bar, .action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.section-heading h2, .section-heading h3, .panel-head h2, .panel-head h3 { margin: 0; }
.section-heading > span, .panel-head > span { color: var(--muted); font-size: 13px; }

.source-badge, .data-badge, .status-badge, .tag, .pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.source-live, .badge-live { color: var(--blue-dark); background: var(--blue-soft); }
.source-snapshot, .badge-snapshot { color: #b5c2d4; background: #172235; }
.source-input, .badge-input { color: #ffd27c; background: rgba(244, 165, 59, 0.13); }
.source-calculated, .badge-calculated { color: #f6cc6b; background: rgba(246, 204, 107, 0.13); }
.source-draft, .badge-draft { color: #c4a7ff; background: rgba(148, 105, 255, 0.13); }
.status-running { color: var(--blue-dark); background: var(--blue-soft); }
.status-complete { color: #c0ccdc; background: #172235; }
.status-standby { color: var(--muted); background: #172235; }
.status-blocked, .badge-risk { color: var(--red); background: var(--red-soft); }
.status-warning { color: var(--amber); background: var(--amber-soft); }

.control-group, .field, .form-field { display: grid; gap: 7px; min-width: 160px; }
.control-group label, .field label, .form-field label { color: var(--muted); font-size: 12px; font-weight: 650; }
input, select, textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  outline: none;
  color: var(--text);
  background: var(--surface);
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: rgba(10, 102, 216, 0.62); box-shadow: 0 0 0 4px rgba(10, 102, 216, 0.1); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.table-wrap { width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { min-width: 110px; padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { position: sticky; top: 0; z-index: 1; color: var(--muted); background: var(--surface-soft); font-size: 12px; font-weight: 700; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(47, 140, 255, 0.055); }

.split-grid, .two-column, .detail-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr); gap: 16px; }
.three-column { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stack { display: grid; gap: 14px; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.muted { color: var(--muted); }
.empty-value { color: var(--muted); font-weight: 650; }

.progress-track, .bar-track { height: 8px; overflow: hidden; border-radius: 999px; background: #182236; }
.progress-track > span, .bar-track > span { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.bar-row { display: grid; grid-template-columns: minmax(90px, 160px) minmax(120px, 1fr) auto; gap: 12px; align-items: center; }

.list, .record-list, .audit-list, .task-list { display: grid; gap: 10px; }
.list-row, .record-row, .audit-row { display: flex; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child, .record-row:last-child, .audit-row:last-child { border-bottom: 0; }

dialog {
  width: min(640px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-high);
}
dialog::backdrop { background: rgba(2, 6, 12, 0.78); backdrop-filter: blur(4px); }
dialog .form-panel { display: grid; gap: 16px; padding: 24px; background: var(--surface); }
dialog [data-close-opportunity] {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface-soft);
  font-weight: 700;
  cursor: pointer;
}

.backdrop { position: fixed; inset: 0; z-index: 49; background: rgba(0, 0, 0, 0.2); backdrop-filter: blur(3px); }
#navBackdrop { z-index: 19; }
.backdrop[hidden] { display: none; }
.status-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 50;
  width: min(560px, 100%);
  overflow: auto;
  padding: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-high);
  transform: translateX(104%);
  visibility: hidden;
  transition: transform 220ms cubic-bezier(.2,.8,.2,1);
}
.status-drawer.is-open { transform: translateX(0); visibility: visible; }
.drawer-open { overflow: hidden; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 20px; }
.drawer-head h2 { margin: 4px 0 0; font-size: 28px; letter-spacing: -0.035em; }
.drawer-content { display: grid; gap: 24px; }
.status-summary { padding: 24px; border-radius: var(--radius); background: var(--surface-blue); }
.status-summary h3 { margin: 14px 0 4px; font-size: 22px; }
.status-summary p { color: var(--muted); }
.status-facts { display: grid; gap: 12px; margin: 20px 0 0; }
.status-facts div { display: grid; grid-template-columns: 86px 1fr; gap: 12px; }
.status-facts dt { color: var(--muted); font-size: 12px; }
.status-facts dd { margin: 0; font-size: 13px; font-weight: 620; }
.drawer-section { display: grid; gap: 14px; }
.task-row { padding: 15px 0; border-bottom: 1px solid var(--line); }
.task-row summary { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; cursor: pointer; list-style: none; }
.task-row summary::-webkit-details-marker { display: none; }
.task-row summary > span:last-child { display: grid; }
.task-row small { color: var(--muted); }
.task-row p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.task-facts { display: grid; gap: 8px; margin: 12px 0 0 76px; padding: 14px; border-radius: 12px; background: var(--surface-soft); }
.task-facts div { display: grid; grid-template-columns: 64px 1fr; gap: 10px; }
.task-facts dt { color: var(--muted); font-size: 11px; }
.task-facts dd { margin: 0; font-size: 12px; }
.governance-panel { border: 1px solid var(--line); border-radius: var(--radius); }
.governance-panel summary { padding: 17px 18px; cursor: pointer; font-weight: 700; }
.governance-list { display: grid; padding: 0 18px 18px; }
.governance-list div { display: grid; grid-template-columns: 28px 100px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 12px; }
.governance-list b { color: var(--blue); }
.governance-list span { color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 80; max-width: calc(100% - 32px); padding: 11px 16px; border-radius: 12px; color: #fff; background: rgba(4, 8, 14, 0.94); box-shadow: var(--shadow-high); opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: 180ms ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.empty-state { display: grid; min-height: 60vh; place-items: center; align-content: center; gap: 10px; padding: 30px; text-align: center; }
.empty-state p { max-width: 520px; margin: 0 0 10px; color: var(--muted); }
.state-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; color: var(--red); background: var(--red-soft); font-size: 24px; font-weight: 700; }

@media (max-width: 1160px) {
  .metric-grid, .metrics-grid, .kpi-grid, .card-grid, .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .three-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .capability-strip, .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .sidebar { width: min(310px, 88vw); box-shadow: var(--shadow-high); transform: translateX(-104%); transition: transform 220ms cubic-bezier(.2,.8,.2,1); }
  .sidebar.is-open { transform: translateX(0); }
  .content-shell { margin-left: 0; }
  .menu-button { display: grid; }
  .topbar { min-height: 66px; padding: 10px 16px; gap: 12px; }
  .topbar-actions .snapshot-label { display: none; }
  .quiet-button { min-height: 38px; padding: 0 11px; font-size: 12px; }
  .page-heading span { display: none; }
  .page-heading h1 { font-size: 16px; }
  .page-view { padding: 20px 16px 42px; }
  .split-grid, .two-column, .detail-grid { grid-template-columns: 1fr; }
  .content-split, .functional-split, .decision-layout, .asset-layout, .result-layout { grid-template-columns: 1fr; }
  .module-header, .module-heading { min-height: 0; align-items: flex-start; flex-direction: column; }
  .audit-item { grid-template-columns: 1fr; gap: 3px; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 14px; }
  button, summary, input:not([type="checkbox"]):not([type="radio"]), select { min-height: 44px !important; }
  .metric-grid, .metrics-grid, .kpi-grid, .card-grid, .summary-grid, .three-column { grid-template-columns: 1fr; }
  .capability-strip, .metric-strip, .selection-grid, .task-board, .asset-grid, .dimension-grid { grid-template-columns: 1fr; }
  .metric-card, .kpi-card { min-height: 128px; }
  .hero, .page-hero, .module-hero { padding: 24px 20px; border-radius: 22px; }
  .hero h1, .page-hero h1, .module-hero h1 { font-size: 32px; }
  .card, .panel, .content-card, .chart-card, .form-card, .table-card, .audit-card { padding: 18px; }
  .topbar-actions .quiet-button { width: 38px; overflow: hidden; padding: 0; color: transparent; }
  .topbar-actions .quiet-button::after { display: grid; color: var(--text); content: '状态'; }
  .status-drawer { padding: 18px 16px; }
  .status-facts div { grid-template-columns: 1fr; gap: 2px; }
  .task-facts { margin-left: 0; }
  .governance-list div { grid-template-columns: 24px 88px 1fr; }
  .bar-row { grid-template-columns: 1fr auto; }
  .bar-row .bar-track { grid-column: 1 / -1; }
}

.games-login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 12%, rgba(0, 113, 227, 0.12), transparent 34%),
    linear-gradient(180deg, #f5f5f7, #ffffff);
}

.games-login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  width: min(880px, 100%);
  overflow: hidden;
  border: 1px solid #d2d2d7;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 28px 80px rgba(29, 29, 31, 0.12);
}

.games-login-brand,
.games-login-form {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: clamp(32px, 6vw, 64px);
}

.games-login-brand {
  color: #f5f5f7;
  background: linear-gradient(145deg, #1d1d1f, #303036);
}

.games-login-brand .brand-mark { width: 48px; height: 48px; }
.games-login-brand p { margin: 8px 0 0; color: #a1a1a6; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.games-login-brand h1 { margin: 0; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.04em; }
.games-login-brand > span:last-child { color: #d2d2d7; line-height: 1.7; }
.games-login-form { color: #1d1d1f; }
.games-login-form label { display: grid; gap: 7px; color: #6e6e73; font-size: 13px; }
.games-login-form input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #c7c7cc; border-radius: 10px; color: #1d1d1f; background: #fff; }
.games-login-form input:focus { border-color: #0071e3; outline: 3px solid rgba(0, 113, 227, 0.16); }
.games-login-form .primary-action { min-height: 46px; }
.games-login-form #loginError { min-height: 22px; margin: 0; color: #b42318; font-size: 13px; }

@media (max-width: 680px) {
  .games-login-shell { grid-template-columns: minmax(0, 1fr); }
  .games-login-brand, .games-login-form { padding: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Dashboard-only light overview. Other business modules keep the dark system theme. */
#pageView:has(.dashboard-overview) {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: #f5f6f8;
}

.dashboard-overview {
  display: grid;
  min-width: 0;
  min-height: calc(100vh - 76px);
  align-content: start;
  gap: 64px;
  padding: clamp(48px, 5.2vw, 84px) clamp(24px, 5vw, 96px) clamp(64px, 6vw, 104px);
  color: #1d1e22;
  background: #f5f6f8;
}

.dashboard-overview > * {
  width: min(1600px, 100%);
  margin-inline: auto;
}

.dashboard-overview-header {
  display: grid;
  gap: 18px;
}

.dashboard-overview-header h2 {
  margin: 0;
  color: #17181b;
  font-size: clamp(38px, 3.2vw, 56px);
  font-weight: 760;
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.dashboard-overview-header p {
  max-width: 1240px;
  margin: 0;
  color: #72757b;
  font-size: clamp(17px, 1.35vw, 24px);
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.dashboard-overview-snapshot {
  color: #8a8d93;
  font-size: 13px;
  line-height: 1.5;
}

.dashboard-overview-section {
  display: grid;
  min-width: 0;
  gap: 28px;
}

.dashboard-overview-section > h3 {
  margin: 0;
  color: #1b1c20;
  font-size: clamp(24px, 1.9vw, 32px);
  font-weight: 740;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.dashboard-ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.dashboard-ecosystem-card {
  display: grid;
  min-width: 0;
  min-height: 176px;
  align-content: center;
  gap: 8px;
  padding: 30px 30px 28px;
  border: 1px solid #dfe2e7;
  border-radius: 28px;
  color: #202126;
  background: #fff;
  box-shadow: 0 1px 2px rgba(19, 27, 38, 0.03);
  font: inherit;
  text-align: left;
}

button.dashboard-ecosystem-card {
  width: 100%;
  appearance: none;
  cursor: pointer;
}

button.dashboard-ecosystem-card:hover {
  border-color: #b9c4d2;
  box-shadow: 0 8px 22px rgba(29, 29, 31, 0.07);
}

button.dashboard-ecosystem-card:focus-visible {
  outline: 3px solid rgba(10, 123, 234, 0.26);
  outline-offset: 3px;
}

.dashboard-ecosystem-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-ecosystem-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: #8b8d93;
}

.dashboard-ecosystem-card.is-running .dashboard-ecosystem-dot,
.dashboard-ecosystem-card.is-verified .dashboard-ecosystem-dot { background: #0a7bea; }

.dashboard-ecosystem-heading h4 {
  min-width: 0;
  margin: 0;
  font-size: clamp(22px, 1.65vw, 29px);
  font-weight: 680;
  line-height: 1.25;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.dashboard-ecosystem-heading .data-state {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 3px 11px;
  border: 1px solid #d9dde3;
  border-radius: 7px;
  color: #777b84;
  background: #fafbfc;
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
}

.dashboard-ecosystem-heading .data-state.is-running {
  border-color: #add2fb;
  color: #0876e5;
  background: #f2f8ff;
}

.dashboard-ecosystem-card > p,
.dashboard-ecosystem-card > small {
  margin: 0 0 0 22px;
  color: #777a81;
  font-size: clamp(16px, 1.22vw, 21px);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.dashboard-ecosystem-card > small { color: #92959b; }

.dashboard-ecosystem-meta {
  display: flex;
  gap: 5px 14px;
  flex-wrap: wrap;
  margin: auto 0 0 22px;
  padding-top: 12px;
  color: #92959b;
  font-size: 12px;
  line-height: 1.45;
}

.dashboard-collaboration-panel {
  min-width: 0;
  padding: 42px 44px;
  border: 1px solid #dfe2e7;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(19, 27, 38, 0.03);
}

.dashboard-collaboration-flow {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dashboard-collaboration-item {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.dashboard-collaboration-step {
  display: grid;
  width: 164px;
  min-width: 0;
  min-height: 120px;
  flex: 0 0 164px;
  place-content: center;
  gap: 2px;
  padding: 14px 12px;
  border-radius: 20px;
  color: #222329;
  background: #f7f8fa;
  text-align: center;
}

.dashboard-collaboration-step span,
.dashboard-collaboration-step p {
  color: #8a8d93;
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.dashboard-collaboration-step p { margin: 0; }

.dashboard-collaboration-step strong {
  font-size: 20px;
  font-weight: 690;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.dashboard-collaboration-arrow {
  display: grid;
  width: 36px;
  height: 30px;
  flex: 0 0 36px;
  place-items: center;
  color: #8a8d93;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}

@media (max-width: 1160px) {
  .dashboard-overview { padding-inline: clamp(22px, 4vw, 48px); }
  .dashboard-overview { gap: 52px; }
  .dashboard-ecosystem-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-collaboration-panel { padding: 32px; }
}

@media (max-width: 820px) {
  .dashboard-overview { min-height: calc(100vh - 66px); padding-block: 40px 56px; }
  .dashboard-overview { gap: 44px; }
  .dashboard-overview-header { gap: 14px; }
  .dashboard-overview-section { gap: 22px; }
  .dashboard-ecosystem-grid { gap: 18px; }
  .dashboard-ecosystem-card { min-height: 164px; padding: 24px; border-radius: 22px; }
  .dashboard-collaboration-panel { padding: 26px; border-radius: 22px; overflow-x: auto; }
  .dashboard-collaboration-flow { width: max-content; max-width: none; flex-wrap: nowrap; }
}

@media (max-width: 640px) {
  .dashboard-overview { padding: 32px 16px 48px; }
  .dashboard-overview-header h2 { font-size: 38px; }
  .dashboard-overview-header p { font-size: 16px; line-height: 1.7; }
  .dashboard-ecosystem-grid { grid-template-columns: 1fr; }
  .dashboard-ecosystem-card { min-height: 0; padding: 23px 20px; }
  .dashboard-ecosystem-heading { gap: 10px; }
  .dashboard-ecosystem-heading h4 { font-size: 23px; }
  .dashboard-ecosystem-heading .data-state { min-height: 30px; padding-inline: 9px; font-size: 14px; }
  .dashboard-ecosystem-card > p,
  .dashboard-ecosystem-card > small { margin-left: 20px; font-size: 16px; }
  .dashboard-ecosystem-meta { margin-left: 20px; font-size: 12px; }
  .dashboard-collaboration-panel { padding: 20px; }
  .dashboard-collaboration-step { width: 148px; min-height: 112px; flex-basis: 148px; }
  .dashboard-collaboration-arrow { width: 26px; flex-basis: 26px; }
}

/* Coze light system: visual overrides only, with existing markup and behavior intact. */
:root {
  --canvas: #f5f5f7;
  --surface: #ffffff;
  --surface-soft: #f5f5f7;
  --surface-blue: #f0f7ff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #e5e5e7;
  --line-strong: #d2d2d7;
  --blue: #0071e3;
  --blue-dark: #0071e3;
  --blue-soft: #f0f7ff;
  --amber: #9a6700;
  --amber-soft: #fff8e5;
  --red: #c9343a;
  --red-soft: #fff1f1;
  --shadow: 0 2px 8px rgba(29, 29, 31, 0.06);
  --shadow-high: 0 16px 40px rgba(29, 29, 31, 0.14);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 12px;
  --sidebar: 240px;
}

body {
  color: var(--text);
  background: var(--canvas);
  font-family: Inter, "Noto Sans SC", -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Helvetica Neue", sans-serif;
  font-size: 15px;
}

.sidebar {
  width: var(--sidebar);
  padding: 24px 16px 18px;
  color: var(--text);
  background: #fff;
  border-right: 1px solid var(--line);
  box-shadow: none;
  backdrop-filter: none;
}

.brand-block { padding: 0 8px 20px; }
.brand-block strong { font-size: 15px; }
.brand-block span:not(.brand-mark) { color: var(--muted); font-size: 11px; }
.brand-mark { display: none; }
.business-nav { gap: 2px; padding: 6px 0 20px; }
.nav-item {
  display: flex;
  gap: 8px;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text);
}
.nav-item:hover { background: #f5f5f7; }
.nav-item.is-active { color: #fff; background: var(--text); }
.nav-item strong { font-size: 14px; font-weight: 600; }
.nav-item small { display: none; }
.nav-icon {
  width: auto;
  height: auto;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
}
.nav-item.is-active .nav-icon { color: rgba(255, 255, 255, 0.6); background: transparent; }
.status-entry { padding: 10px; border-radius: 8px; color: var(--text); background: #f5f5f7; }
.status-entry strong { font-size: 12px; }
.status-entry small { color: var(--muted); font-size: 11px; }
.status-symbol { background: var(--blue); box-shadow: 0 0 0 4px #eaf3ff; }

.content-shell { margin-left: var(--sidebar); background: var(--canvas); }
.topbar { display: none; }
.page-view {
  width: min(960px, 100%);
  max-width: 960px;
  padding: 40px;
  background: transparent;
}
.business-module { gap: 16px; }
.module-header, .module-heading {
  min-height: 0;
  align-items: flex-start;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}
.module-header h2, .module-heading h2 { margin: 0 0 6px; font-size: 28px; line-height: 1.25; letter-spacing: -0.025em; }
.module-header p, .module-heading p { color: var(--muted); font-size: 15px; line-height: 1.6; }
.module-kicker, .section-kicker, .eyebrow { color: var(--blue) !important; font-size: 12px; }

.work-panel, .action-section, .detail-section, .audit-section, .asset-section, .decision-detail, .functional-split,
.detail-panel, .form-panel, .result-panel, .ranking-panel, .permission-panel, .tool-panel,
.card, .panel, .content-card, .chart-card, .form-card, .table-card, .audit-card {
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}
.work-panel, .action-section, .detail-section, .audit-section, .asset-section, .decision-detail, .functional-split { padding: 20px; }
.detail-panel, .form-panel, .result-panel, .ranking-panel, .permission-panel, .tool-panel { padding: 16px; background: #fff; }
.card, .panel, .content-card, .chart-card, .form-card, .table-card, .audit-card { padding: 16px; }
.panel-header h3, .section-title h3, .panel-heading h3, .workspace-header h3, .dialog-heading h3,
.card h2, .card h3, .panel h2, .panel h3, .content-card h2, .content-card h3 { font-size: 17px; }
.panel-header p, .section-title p, .panel-heading p, .workspace-header p, .card p, .panel p, .content-card p { color: var(--muted); }

.metric-grid, .metrics-grid, .kpi-grid, .card-grid, .summary-grid { gap: 12px; }
.metric-card, .kpi-card, .summary-card { min-height: 116px; padding: 16px; border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.metric-card strong, .kpi-card strong, .summary-card strong { margin: 8px 0 4px; font-size: 28px; }
.metric-card span, .metric-card small, .kpi-card span, .kpi-card small, .summary-card span, .summary-card small { color: var(--muted); font-size: 13px; }
.summary-card-primary { background: #f0f7ff; border-color: #cfe5ff; }
.summary-card-warning { background: #fff8e5; border-color: #f2dfac; }

.data-state, .status-chip, .data-tag, .source-badge, .data-badge, .status-badge, .tag, .pill {
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: #f5f5f7;
  font-size: 12px;
  font-weight: 500;
}
.data-state.is-verified, .status-chip.is-verified, .data-tag-snapshot,
.data-state.is-running, .status-chip.is-running, .source-live, .badge-live, .status-running {
  color: var(--blue);
  background: #f0f7ff;
  border-color: #b9d9ff;
}
.data-state.is-pending, .status-chip.is-pending, .status-standby { color: var(--muted); background: #f5f5f7; border-color: var(--line); }
.data-state.is-blocked, .status-chip.is-blocked, .status-blocked, .badge-risk { color: var(--red); background: var(--red-soft); border-color: #f0c4c6; }
.data-state.is-draft, .data-tag-draft, .source-draft, .badge-draft { color: #6f42a1; background: #f8f1ff; border-color: #e3cff5; }
.data-labels, .source-status { gap: 6px; }

.segmented-control, .segmented, .module-tabs { padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: #f5f5f7; }
.segmented-control button, .segmented button, .module-tabs button, .filter-button { min-height: 32px; padding: 5px 10px; color: var(--muted); border-radius: 6px; font-size: 12px; }
.segmented-control button.is-active, .segmented button.is-active, .module-tabs button.is-active, .filter-button.is-active { color: var(--text); background: #fff; box-shadow: var(--shadow); }

.business-form, .exam-form { gap: 14px; }
.business-form label > span, .exam-form label > span, .search-control > span, .field-control > span { color: var(--muted); font-size: 12px; }
input, select, textarea {
  min-height: 40px;
  padding: 8px 10px;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
}
textarea { min-height: 96px; }
input::placeholder, textarea::placeholder { color: #86868b; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.14); }
.primary-button, .primary-action { color: #fff; border: 0; background: var(--blue); }
.primary-button:hover, .primary-action:hover { background: #0066cc; }
.quiet-button, .secondary-button, .secondary-action, .table-action { color: var(--text); border: 1px solid var(--line-strong); background: #fff; }
.text-action { color: var(--blue); }
.danger-button { color: var(--red); background: var(--red-soft); }
.inline-notice, .boundary-note, .governance-note, .success-note { padding: 12px 14px; color: var(--muted); background: #f5f5f7; }
.inline-notice[data-tone="error"], .error-message { color: var(--red); background: var(--red-soft); }
.inline-notice[data-tone="success"], .success-note { color: var(--blue); background: #f0f7ff; }

.table-scroll, .table-shell, .table-wrap { border-color: var(--line); border-radius: 10px; }
table { background: #fff; }
th, td { padding: 11px 12px; border-color: var(--line); }
th { color: var(--muted); background: #f5f5f7; font-size: 12px; font-weight: 600; }
td { color: var(--text); font-size: 13px; }
tr:last-child td { border-bottom: 0; }

.hero, .page-hero, .module-hero { padding: 24px; color: var(--text); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.hero::after, .page-hero::after, .module-hero::after { display: none; }
.hero h1, .page-hero h1, .module-hero h1 { font-size: 28px; }
.hero p, .page-hero p, .module-hero p { color: var(--muted); font-size: 15px; }

dialog { color: var(--text); border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow-high); }
dialog::backdrop { background: rgba(29, 29, 31, 0.28); backdrop-filter: blur(3px); }
dialog .form-panel { background: #fff; }
.backdrop { background: rgba(29, 29, 31, 0.18); }
.status-drawer { color: var(--text); border-left: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-high); }
.drawer-head h2 { font-size: 24px; }
.status-summary { background: #f0f7ff; }
.status-summary p, .status-facts div span, .governance-list div span { color: var(--muted); }
.toast { color: #fff; background: var(--text); box-shadow: var(--shadow-high); }

#pageView:has(.dashboard-overview) {
  width: min(960px, 100%);
  max-width: 960px;
  margin: 0 auto;
  padding: 40px;
  background: transparent;
}
.dashboard-overview { min-height: 0; padding: 0; gap: 40px; }
.dashboard-overview-header { gap: 12px; }
.dashboard-overview-header h2 { color: var(--text); font-size: 28px; font-weight: 700; letter-spacing: -0.025em; }
.dashboard-overview-header p { max-width: 760px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.dashboard-overview-section { gap: 16px; }
.dashboard-overview-section > h3 { color: var(--text); font-size: 17px; font-weight: 650; letter-spacing: -0.015em; }
.dashboard-ecosystem-grid { gap: 12px; }
.dashboard-ecosystem-card { min-height: 0; gap: 6px; padding: 16px; border-radius: 12px; border-color: var(--line); background: #fff; box-shadow: var(--shadow); }
.dashboard-ecosystem-heading { gap: 8px; }
.dashboard-ecosystem-dot { width: 8px; height: 8px; flex-basis: 8px; }
.dashboard-ecosystem-card.is-running .dashboard-ecosystem-dot { background: var(--blue); }
.dashboard-ecosystem-heading h4 { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.dashboard-ecosystem-heading .data-state { min-height: 24px; padding: 3px 8px; font-size: 12px; }
.dashboard-ecosystem-card > p, .dashboard-ecosystem-card > small { margin-left: 16px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.dashboard-ecosystem-card > small { color: var(--muted); font-size: 12px; }
.dashboard-collaboration-panel { padding: 24px; border-radius: 12px; border-color: var(--line); background: #fff; box-shadow: var(--shadow); }
.dashboard-collaboration-flow { gap: 8px; }
.dashboard-collaboration-item { gap: 8px; }
.dashboard-collaboration-step { width: 104px; min-height: 92px; flex-basis: 104px; gap: 2px; padding: 10px 8px; border-radius: 10px; background: #f5f5f7; }
.dashboard-collaboration-step span, .dashboard-collaboration-step p { color: var(--muted); font-size: 11px; line-height: 1.35; }
.dashboard-collaboration-step strong { color: var(--text); font-size: 13px; line-height: 1.3; }
.dashboard-collaboration-arrow { width: 20px; height: 24px; flex-basis: 20px; color: #86868b; font-size: 20px; }

@media (max-width: 820px) {
  .sidebar { width: min(240px, 88vw); background: #fff; box-shadow: var(--shadow-high); }
  .topbar { display: flex; min-height: 48px; padding: 6px 12px; color: var(--text); border-bottom: 1px solid rgba(229, 229, 231, 0.9); background: rgba(255, 255, 255, 0.86); backdrop-filter: blur(18px); }
  .menu-button { display: grid; }
  .page-view, #pageView:has(.dashboard-overview) { width: 100%; max-width: none; padding: 24px 16px 40px; }
  .dashboard-overview { gap: 36px; }
  .dashboard-collaboration-panel { overflow-x: auto; }
  .dashboard-collaboration-flow { width: max-content; max-width: none; flex-wrap: nowrap; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .module-header, .module-heading, .work-panel, .action-section, .detail-section, .audit-section, .asset-section, .decision-detail, .functional-split { padding: 16px; }
  .module-header h2, .module-heading h2, .hero h1, .page-hero h1, .module-hero h1 { font-size: 24px; }
  .dashboard-overview-header h2 { font-size: 28px; }
  .dashboard-overview-header p { font-size: 15px; }
  .dashboard-ecosystem-card { min-height: 0; }
  .dashboard-ecosystem-heading h4 { font-size: 15px; }
  .dashboard-ecosystem-card > p { margin-left: 16px; font-size: 13px; }
  .dashboard-ecosystem-card > small { margin-left: 16px; font-size: 12px; }
  .dashboard-ecosystem-heading .data-state { font-size: 11px; }
}

/* Dashboard business overview uses the existing light shell without old-site chrome. */
#pageView:has(.dashboard-overview) {
  width: min(1240px, 100%);
  max-width: 1240px;
}

.dashboard-operations-overview {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
}

.dashboard-operations-section {
  grid-column: 1 / -1;
}

.dashboard-operations-section[data-dashboard-operations-section="alarms"] {
  grid-column: 1;
}

.dashboard-operations-section[data-dashboard-operations-section="urgent"] {
  grid-column: 2;
}

.dashboard-operations-section[data-dashboard-operations-section="alarms"] .dashboard-operations-grid,
.dashboard-operations-section[data-dashboard-operations-section="urgent"] .dashboard-operations-grid {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-operations-section[data-dashboard-operations-section="areaOccupancy"] {
  grid-column: 1 / -1;
}

.dashboard-operations-section[data-dashboard-operations-section="areaOccupancy"] .dashboard-operations-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-operations-section[data-dashboard-operations-section="areaOccupancy"] .dashboard-operations-card {
  overflow: visible;
}

.dashboard-operations-section[data-dashboard-operations-section="areaOccupancy"] .dashboard-operations-area-card > header {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.dashboard-operations-section[data-dashboard-operations-section="areaOccupancy"] .dashboard-operations-area-card > header h4 {
  font-size: 16px;
  line-height: 1.35;
}

.dashboard-operations-section[data-dashboard-operations-section="areaOccupancy"] .dashboard-operations-area-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.dashboard-operations-section[data-dashboard-operations-section="areaOccupancy"] .dashboard-operations-area-list li {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-content: center;
}

.dashboard-operations-section[data-dashboard-operations-section="areaOccupancy"] .dashboard-operations-area-list li span {
  grid-column: 1;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.dashboard-operations-section[data-dashboard-operations-section="areaOccupancy"] .dashboard-operations-area-list li small {
  grid-column: 2;
  white-space: nowrap;
}

.dashboard-operations-section[data-dashboard-operations-section="areaOccupancy"] .dashboard-operations-area-list li strong {
  grid-column: 3;
  white-space: nowrap;
}

.dashboard-operations-section,
.dashboard-operations-heading,
.dashboard-operations-grid,
.dashboard-operations-card {
  min-width: 0;
}

.dashboard-operations-heading {
  display: grid;
  gap: 5px;
}

.dashboard-operations-heading h3,
.dashboard-operations-heading p {
  margin: 0;
}

.dashboard-operations-heading h3 {
  color: var(--text);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.dashboard-operations-heading p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.dashboard-operations-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.dashboard-operations-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-operations-two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-operations-card {
  display: grid;
  width: 100%;
  min-height: 164px;
  align-content: start;
  gap: 10px;
  padding: 16px;
  overflow: hidden;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: left;
  overflow-wrap: anywhere;
}

button.dashboard-operations-card {
  appearance: none;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

button.dashboard-operations-card:hover {
  border-color: #b9d9ff;
  box-shadow: 0 8px 26px rgba(29, 29, 31, 0.09);
  transform: translateY(-1px);
}

button.dashboard-operations-card:active {
  transform: translateY(0);
}

.dashboard-operations-card h4,
.dashboard-operations-card p,
.dashboard-operations-card ul,
.dashboard-operations-card ol {
  margin: 0;
}

.dashboard-operations-card h4 {
  color: var(--text);
  font-size: 15px;
  line-height: 1.4;
}

.dashboard-operations-card p,
.dashboard-operations-label {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.dashboard-operations-kpi {
  min-height: 184px;
}

.dashboard-operations-kpi > strong {
  font-size: clamp(25px, 2.8vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.dashboard-operations-meta {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  margin-top: auto;
  padding-top: 10px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.dashboard-operations-meta .data-state {
  min-height: 22px;
  padding: 2px 7px;
  font-size: 11px;
}

.dashboard-operations-empty {
  min-height: 164px;
  place-content: center;
  text-align: center;
  border-style: dashed;
  box-shadow: none;
}

.dashboard-operations-empty strong {
  font-size: 18px;
}

.dashboard-operations-occupancy-card > header,
.dashboard-operations-issue-card > header,
.dashboard-operations-store-card > header,
.dashboard-operations-game-card > header {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-operations-occupancy-card > header > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.dashboard-operations-occupancy-card > header span,
.dashboard-operations-game-card > header > span {
  color: var(--muted);
  font-size: 11px;
}

.dashboard-operations-occupancy-card > header > strong,
.dashboard-operations-issue-card > header > strong {
  flex: 0 0 auto;
  font-size: 22px;
  line-height: 1.2;
}

.dashboard-operations-area-list,
.dashboard-operations-game-list {
  display: grid;
  min-width: 0;
  gap: 6px;
  padding: 0;
  list-style: none;
}

.dashboard-operations-area-list li,
.dashboard-operations-game-list li {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f5f5f7;
  font-size: 12px;
}

.dashboard-operations-game-list li {
  grid-template-columns: minmax(0, 1fr) auto;
}

.dashboard-operations-area-list li span,
.dashboard-operations-game-list li span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-operations-area-list li small {
  color: var(--muted);
}

.dashboard-operations-area-list .dashboard-operations-placeholder,
.dashboard-operations-game-list .dashboard-operations-placeholder {
  display: block;
  color: var(--muted);
  text-align: center;
}

.dashboard-operations-issue-card h4 {
  font-size: 16px;
}

.dashboard-operations-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-operations-metrics > div {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 10px;
  border-radius: 8px;
  background: #f5f5f7;
}

.dashboard-operations-metrics span {
  color: var(--muted);
  font-size: 11px;
}

.dashboard-operations-metrics strong {
  font-size: 18px;
}

@media (max-width: 980px) {
  .dashboard-operations-grid,
  .dashboard-operations-kpi-grid,
  .dashboard-operations-game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .dashboard-operations-overview {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .dashboard-operations-section,
  .dashboard-operations-section[data-dashboard-operations-section="alarms"],
  .dashboard-operations-section[data-dashboard-operations-section="urgent"],
  .dashboard-operations-section[data-dashboard-operations-section="areaOccupancy"] {
    grid-column: 1;
  }

  .dashboard-operations-grid,
  .dashboard-operations-kpi-grid,
  .dashboard-operations-two-column,
  .dashboard-operations-game-grid,
  .dashboard-operations-section[data-dashboard-operations-section="areaOccupancy"] .dashboard-operations-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-operations-section[data-dashboard-operations-section="areaOccupancy"] .dashboard-operations-area-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-operations-card,
  .dashboard-operations-kpi,
  .dashboard-operations-empty {
    min-height: 148px;
  }

  .dashboard-operations-section[data-dashboard-operations-section="areaOccupancy"] .dashboard-operations-area-list li {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
}

/* People / AICOS only: align the migrated talent experience without changing other modules. */
.business-module:has(#people-panel-exam) {
  gap: 18px;
}

.business-module:has(#people-panel-exam) .module-heading {
  border-top: 3px solid #0f766e;
}

.business-module:has(#people-panel-exam) .module-kicker {
  color: #0f766e !important;
  letter-spacing: 0.04em;
}

.business-module:has(#people-panel-exam) .capability-strip article {
  min-height: 104px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faf9 100%);
  box-shadow: 0 8px 24px rgba(29, 29, 31, 0.05);
}

.business-module:has(#people-panel-exam) .module-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(620px, 100%);
  padding: 4px;
  border-radius: 10px;
}

.business-module:has(#people-panel-exam) .module-tabs button {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 650;
}

.business-module:has(#people-panel-exam) .module-tabs button.is-active {
  color: #0f5f59;
  box-shadow: 0 2px 10px rgba(29, 29, 31, 0.08);
}

.business-module:has(#people-panel-exam) .module-tabs button:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.28);
  outline-offset: 2px;
}

#people-panel-exam:not([hidden]),
#people-panel-records:not([hidden]),
#people-panel-opportunities:not([hidden]) {
  display: grid;
  min-width: 0;
  gap: 16px;
}

#people-panel-exam .operation-bar {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7faf9;
}

#people-panel-exam .question-card {
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(29, 29, 31, 0.045);
}

#people-panel-exam .answer-option {
  min-height: 44px;
  border-radius: 9px;
  background: #fbfcfc;
  transition: border-color 160ms ease, background-color 160ms ease;
}

#people-panel-exam .answer-option:hover,
#people-panel-exam .answer-option:focus-within {
  border-color: rgba(15, 118, 110, 0.4);
  background: #f1f8f6;
}

#people-panel-exam .answer-option:has(input:checked) {
  border-color: rgba(15, 118, 110, 0.58);
  background: #eaf6f3;
}

#people-panel-exam .answer-option input:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.3);
  outline-offset: 2px;
}

#people-panel-exam .result-panel,
#people-panel-exam .ranking-panel,
#people-panel-records .record-card,
#people-panel-records .governance-note,
#people-panel-opportunities .record-card,
#people-panel-opportunities .governance-note {
  border-radius: 12px;
}

#people-panel-exam .result-panel,
#people-panel-exam .ranking-panel {
  min-height: 180px;
}

#people-panel-exam .result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

#people-panel-exam .result-head span {
  color: var(--muted);
  font-size: 12px;
}

#people-panel-exam .result-head h3 {
  margin: 4px 0 0;
  color: #0f5f59;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

#people-panel-exam .result-head > strong {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid #b9d8d3;
  border-radius: 8px;
  background: #eef8f5;
  color: #0f5f59;
  font-size: 12px;
}

#people-panel-exam .dimension-grid > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfc;
}

#people-panel-exam .dimension-grid label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

#people-panel-exam .dimension-grid label span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

#people-panel-exam .dimension-grid label strong {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 14px;
}

#people-panel-exam .dimension-unknown {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

#people-panel-exam .result-guidance {
  margin: 0;
  padding: 13px 14px;
  border-left: 3px solid #0f766e;
  border-radius: 0 10px 10px 0;
  background: #f4f9f8;
  color: var(--text);
  line-height: 1.65;
}

#people-panel-exam .audit-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

#people-panel-exam .audit-summary > div {
  min-width: 0;
  padding: 10px;
  border-radius: 9px;
  background: #f5f5f7;
}

#people-panel-exam .audit-summary dt,
#people-panel-exam .audit-summary dd {
  margin: 0;
  overflow-wrap: anywhere;
}

#people-panel-exam .audit-summary dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

#people-panel-exam .audit-summary dd {
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
}

#people-panel-exam .ranking-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

#people-panel-exam .ranking-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  min-width: 0;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

#people-panel-exam .ranking-list li:last-child {
  border-bottom: 0;
}

#people-panel-exam .ranking-list span,
#people-panel-exam .ranking-list small,
#people-panel-records .record-card *,
#people-panel-opportunities .record-card * {
  min-width: 0;
  overflow-wrap: anywhere;
}

#people-panel-exam .ranking-list small {
  grid-column: 1 / -1;
  color: var(--muted);
}

#people-panel-records .record-card,
#people-panel-opportunities .record-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

#people-panel-exam .empty-state,
#people-panel-records .empty-state,
#people-panel-opportunities .empty-state {
  min-height: 156px;
  padding: 28px 20px;
  border: 1px dashed #cfd8d6;
  border-radius: 12px;
  background: #f7faf9;
  color: var(--muted);
  line-height: 1.6;
}

#people-panel-records .record-card,
#people-panel-opportunities .record-card {
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(29, 29, 31, 0.04);
}

@media (max-width: 560px) {
  .business-module:has(#people-panel-exam) .module-tabs {
    display: flex;
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }

  .business-module:has(#people-panel-exam) .module-tabs button {
    flex: 0 0 148px;
    min-height: 44px;
    padding-inline: 10px;
    font-size: 13px;
    white-space: nowrap;
  }

  #people-panel-exam .question-card {
    padding: 16px;
  }

  #people-panel-exam .operation-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  #people-panel-exam .result-head,
  #people-panel-records .record-card,
  #people-panel-opportunities .record-card {
    align-items: flex-start;
    flex-direction: column;
  }

  #people-panel-exam .result-head h3 {
    font-size: 28px;
  }

  #people-panel-exam .audit-summary {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Migrated business views share the existing Apple light shell. */
.commerce-module,
.result-list,
.result-form,
.detail-heading,
.business-data-table,
:where(.content-split, .functional-split, .decision-layout, .asset-layout, .result-layout, .detail-grid, .form-grid) > * {
  min-width: 0;
}

.dashboard-overview-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-overview-actions .secondary-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.dashboard-operations-store-rate {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-operations-store-rate strong,
.dashboard-operations-area-rate {
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.dashboard-operations-area-name {
  min-width: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.dashboard-operations-area-count {
  color: var(--muted);
  font-size: 11px;
}

[data-owner-workspace],
[data-owner-panel],
[data-aicos-invite-list],
[data-aicos-server-records] {
  min-width: 0;
}

[data-owner-panel]:not([hidden]) {
  display: grid;
  gap: 14px;
}

.business-module .empty-state {
  min-height: 120px;
  padding: 24px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
  background: #f5f5f7;
  font-size: 13px;
  line-height: 1.6;
}

.business-data-table .empty-state {
  min-height: 96px;
}

.business-module :where(.result-list, .record-list, .opportunity-list, .audit-list) {
  max-height: none;
  overflow-y: visible;
}

.business-module :where(.data-state, .status-chip, .data-tag) {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.dashboard-operations-card {
  overflow: visible;
}

.dashboard-operations-area-list li span,
.dashboard-operations-game-list li span {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

#people-panel-exam [data-aicos-invite-form] > .action-bar {
  grid-column: 1 / -1;
}

#people-panel-exam [data-aicos-invite-list] .record-card,
#people-panel-records [data-aicos-server-records] .record-card {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

#people-panel-exam [data-aicos-invite-list] .record-card > div,
#people-panel-records [data-aicos-server-records] .record-card > div {
  display: grid;
  min-width: 0;
  gap: 5px;
}

#people-panel-exam [data-aicos-invite-list] .record-card > div:last-child,
#people-panel-records [data-aicos-server-records] .record-card > div:last-child {
  justify-items: end;
  text-align: right;
}

#people-panel-records [data-aicos-review-form] {
  justify-content: flex-end;
}

.aicos-review-panel {
  display: grid;
  gap: 14px;
}

.aicos-review-panel [data-review-question-list] {
  display: grid;
  gap: 10px;
}

.aicos-review-panel .question-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.aicos-review-panel .question-card legend {
  max-width: 100%;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
}

.aicos-review-panel .question-meta {
  color: var(--muted);
  font-size: 12px;
}

.aicos-review-panel .answer-option:has(input:checked) {
  border-color: var(--blue);
  background: #f0f7ff;
}

@media (max-width: 560px) {
  .aicos-review-panel .question-card {
    padding: 12px;
  }
}

.segmented[role="tablist"],
.module-tabs[role="tablist"] {
  display: flex;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

:where(.segmented, .module-tabs, .segmented-control) button {
  flex: 0 0 auto;
}

:where(.segmented, .module-tabs, .segmented-control) button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

:where(.table-scroll, .table-shell, .table-wrap) {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

:where(.table-scroll, .table-shell, .table-wrap):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.business-data-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: #ffffff;
}

.business-data-table :where(th, td) {
  min-width: 112px;
  max-width: 320px;
  overflow-wrap: anywhere;
  word-break: normal;
}

.business-data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f5f5f7;
}

.business-data-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.empty-row td {
  padding-block: 28px;
  color: var(--muted);
  text-align: center;
  white-space: normal;
}

dialog {
  width: min(640px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

dialog :where(p, label, dd, td) {
  min-width: 0;
  overflow-wrap: anywhere;
}

dialog [data-close-opportunity]:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.result-list {
  display: grid;
  align-content: start;
  gap: 10px;
}

.result-form {
  align-content: start;
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.detail-heading > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.business-status,
.action-complete,
.risk-level {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: #f5f5f7;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.business-status[data-status="已完成"],
.business-status[data-status="已记录"],
.action-complete {
  color: var(--blue);
  border-color: #b9d9ff;
  background: #f0f7ff;
}

.risk-level {
  color: var(--red);
  border-color: #f0c4c6;
  background: var(--red-soft);
}

:where(.detail-card, .record-card, .risk-card, .opportunity-card, .task-card) {
  min-width: 0;
  overflow-wrap: anywhere;
}

:where(.detail-card, .record-card, .risk-card, .opportunity-card, .task-card) :where(h3, h4, p, span, strong, small, dt, dd) {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 820px) {
  :where(.content-split, .functional-split, .decision-layout, .asset-layout, .result-layout, .detail-grid, .form-grid) {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-title,
  .panel-heading,
  .workspace-header,
  .dialog-heading {
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .dashboard-overview-actions,
  #people-panel-exam [data-aicos-invite-list] .record-card,
  #people-panel-records [data-aicos-server-records] .record-card {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-overview-actions .secondary-button {
    width: 100%;
  }

  #people-panel-exam [data-aicos-invite-list] .record-card > div:last-child,
  #people-panel-records [data-aicos-server-records] .record-card > div:last-child {
    justify-items: start;
    text-align: left;
  }

  #people-panel-records [data-aicos-review-form] {
    justify-content: flex-start;
  }

  :where(.segmented, .module-tabs, .segmented-control) button {
    min-height: 44px;
    padding-inline: 12px;
  }

  .business-data-table {
    min-width: 680px;
  }

  dialog {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 10px;
  }

  dialog .form-panel {
    padding: 18px 16px;
  }

  .detail-heading {
    flex-direction: column;
  }
}

.dashboard-big-screen:fullscreen {
  overflow: auto;
  background: var(--canvas);
  padding: clamp(20px, 3vw, 48px);
}

.dashboard-big-screen-toolbar {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--surface-soft);
  color: var(--muted);
}

.dashboard-big-screen-toolbar strong {
  color: var(--text);
  font-size: clamp(24px, 3vw, 38px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

@media (max-width: 820px) {
  .dashboard-big-screen-toolbar {
    grid-template-columns: 1fr auto;
  }
}

@media (max-width: 560px) {
  .dashboard-big-screen-toolbar {
    grid-template-columns: 1fr;
    align-items: start;
  }
}
