:root {
  color-scheme: light;
  --ink: #152429;
  --muted: #617176;
  --paper: #f3f0e9;
  --card: #fffefb;
  --line: #d8ddd9;
  --teal: #0b706b;
  --teal-dark: #07524f;
  --teal-soft: #dff1ed;
  --amber: #d58b2a;
  --amber-soft: #fff0d5;
  --red: #b6403b;
  --red-soft: #fae7e3;
  --shadow: 0 16px 50px rgba(26, 53, 54, 0.09);
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
}

/* Author styles such as `.field { display: grid }` must never override the
   native hidden attribute. Login-only and first-run-only controls depend on
   this rule, otherwise a normal login misleadingly shows Owner setup fields. */
[hidden] { display: none !important; }

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 10% 0%, #fff9e9 0, transparent 34%), var(--paper); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.shell { width: min(1440px, calc(100% - 48px)); margin: 0 auto; padding: 42px 0 64px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 8px; color: var(--teal); font-size: 12px; font-weight: 800; letter-spacing: .18em; }
h1 { margin: 0; font-size: clamp(32px, 4vw, 50px); line-height: 1; letter-spacing: -.035em; }
.subtitle { margin: 12px 0 0; color: var(--muted); font-size: 16px; }
.status-pill { display: inline-flex; align-items: center; gap: 10px; padding: 10px 15px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.7); color: var(--muted); font-weight: 700; white-space: nowrap; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #9ba6a5; box-shadow: 0 0 0 5px rgba(155,166,165,.14); }
.status-pill.running .status-dot, .status-pill.waiting_login .status-dot { background: var(--amber); box-shadow: 0 0 0 5px rgba(213,139,42,.14); animation: pulse 1.3s infinite; }
.status-pill.waiting_review .status-dot { background: var(--teal); box-shadow: 0 0 0 5px rgba(11,112,107,.14); }
.status-pill.failed .status-dot { background: var(--red); box-shadow: 0 0 0 5px rgba(182,64,59,.14); }

.console-tabs { display: flex; gap: 8px; margin: -8px 0 22px; }
.console-tabs a { padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.72); color: var(--muted); font-size: 13px; font-weight: 800; text-decoration: none; }
.console-tabs a:hover, .console-tabs a.active { border-color: var(--teal); background: var(--teal); color: white; }

.topbar-actions { display: flex; align-items: center; gap: 10px; }
.account-chip { display: inline-flex; align-items: center; gap: 10px; padding: 7px 8px 7px 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.78); color: var(--ink); font-size: 12px; font-weight: 800; }
.account-chip button { padding: 5px 9px; border: 0; border-radius: 999px; background: #e9efec; color: var(--muted); font-size: 11px; font-weight: 800; }
.account-chip button:hover { background: var(--red-soft); color: var(--red); }
.overview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 22px; }
.overview-card { min-height: 118px; padding: 18px; border: 1px solid #31494d; border-radius: 17px; background: linear-gradient(145deg, #12262d, #18343b); box-shadow: 0 15px 34px rgba(21,36,41,.12); color: #f1f8f5; }
.overview-card small, .overview-card strong, .overview-card span { display: block; }
.overview-card small { color: #9fb7b8; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.overview-card strong { margin-top: 13px; font-size: 23px; line-height: 1.1; overflow-wrap: anywhere; }
.overview-card span { margin-top: 9px; color: #adbfbe; font-size: 10px; line-height: 1.45; }
.overview-card.alert { border-color: #7f3735; background: linear-gradient(145deg, #3c2427, #552a2c); }
.overview-card.alert strong { color: #ffb0a8; }
.pipeline-safety-copy { display: block; margin: 10px 2px 0; color: var(--muted); font-size: 10px; line-height: 1.55; }

.login-page { min-height: 100vh; background: radial-gradient(circle at 18% 14%, #194e56 0, transparent 33%), linear-gradient(135deg, #08161c, #11292f 55%, #071319); color: #eff8f5; }
.login-shell { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr); align-items: center; gap: clamp(40px, 8vw, 120px); width: min(1120px, calc(100% - 48px)); min-height: 100vh; margin: 0 auto; padding: 50px 0; }
.login-brand h1 { max-width: 660px; font-size: clamp(42px, 6vw, 76px); }
.login-brand > p:not(.eyebrow) { max-width: 620px; margin: 22px 0; color: #aac1c0; font-size: 18px; line-height: 1.7; }
.login-brand ul { display: grid; gap: 12px; padding: 0; list-style: none; color: #c9d8d5; }
.login-brand li::before { content: "✓"; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 10px; border-radius: 7px; background: #1c8d7e; color: white; font-size: 11px; font-weight: 900; }
.login-card { padding: 32px; color: var(--ink); }
.login-card h2 { margin: 20px 0 8px; font-size: 27px; }
.login-card > p { margin: 0 0 18px; color: var(--muted); }
.login-card form { display: grid; gap: 13px; }
.login-card > small { display: block; margin-top: 15px; color: var(--muted); font-size: 10px; line-height: 1.5; }

.workspace { display: grid; grid-template-columns: minmax(390px, .82fr) minmax(520px, 1.18fr); gap: 22px; align-items: start; }
.card { border: 1px solid rgba(171,181,177,.55); border-radius: 22px; background: rgba(255,254,251,.94); box-shadow: var(--shadow); }
.control-panel, .progress-card { padding: 26px; }
.monitor-panel { display: grid; gap: 18px; }
.section-heading, .mini-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.section-heading > div { display: flex; align-items: center; gap: 10px; }
.section-heading h2 { margin: 0; font-size: 20px; }
.section-index { color: var(--teal); font-size: 12px; font-weight: 900; letter-spacing: .1em; }
.local-badge, .policy-badge { padding: 6px 10px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-dark); font-size: 12px; font-weight: 800; }

fieldset { margin: 25px 0 0; padding: 0; border: 0; }
legend, .form-header h3 { margin: 0 0 10px; color: #3e5054; font-size: 13px; font-weight: 800; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice-card, .mode-card { position: relative; display: flex; align-items: center; gap: 12px; min-height: 70px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: .18s ease; }
.choice-card:hover, .mode-card:hover { border-color: #83aaa6; transform: translateY(-1px); }
.choice-card input, .mode-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card:has(input:checked), .mode-card:has(input:checked) { border-color: var(--teal); background: #f3fbf8; box-shadow: 0 0 0 3px rgba(11,112,107,.08); }
.browser-mark { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: 50%; color: white; font-weight: 900; }
.browser-mark.chrome { background: conic-gradient(#df4b3f 0 33%, #eab13d 0 66%, #43965a 0); }
.browser-mark.edge { background: linear-gradient(145deg, #0da6d4, #087669); }
.browser-mark.brave { background: linear-gradient(145deg, #ff6b35, #d73b14); }
.browser-mark.chromium { background: linear-gradient(145deg, #5c8df6, #315cb5); }
.browser-mark.custom { background: linear-gradient(145deg, #66798f, #34475d); }
.browser-choice-status { margin: 8px 2px 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.browser-choice-status.error { color: var(--danger); font-weight: 800; }
.browser-selection-fieldset { margin-bottom: 20px; }
.choice-card strong, .choice-card small, .mode-card strong, .mode-card small { display: block; }
.choice-card strong, .mode-card strong { font-size: 14px; }
.choice-card small, .mode-card small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.checkmark { margin-left: auto; color: var(--teal); opacity: 0; font-weight: 900; }
.choice-card:has(input:checked) .checkmark { opacity: 1; }
.operation-window-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 11px 12px; border: 1px solid #c8dcd7; border-radius: 12px; background: #f3fbf8; }
.operation-window-note strong, .operation-window-note small { display: block; }
.operation-window-note strong { color: var(--teal-dark); font-size: 12px; }
.operation-window-note small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.operation-window-note button { flex: 0 0 auto; min-height: 34px; padding: 0 12px; border: 1px solid var(--teal); border-radius: 9px; background: white; color: var(--teal); font-size: 11px; font-weight: 800; }
.operation-window-note button:hover:not(:disabled) { background: var(--teal); color: white; }
.mode-stack { display: grid; gap: 9px; }
.mode-card { min-height: 64px; }
.mode-number { display: grid; place-items: center; flex: 0 0 32px; height: 32px; border-radius: 9px; background: #edf0ee; color: #596967; font-weight: 900; }
.mode-card:has(input:checked) .mode-number { background: var(--teal); color: white; }

.form-header { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; }
.form-header h3 { margin-bottom: 0; }
.profit-preview { color: var(--teal); font-size: 12px; font-weight: 800; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.field { display: grid; gap: 6px; }
.field.wide, .dimensions.wide { grid-column: 1 / -1; }
.field > span, .dimensions > span { color: var(--muted); font-size: 11px; font-weight: 700; }
.field input, .field select, .field textarea, .dimension-inputs input { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); padding: 0 11px; outline: none; }
.field input, .field select, .dimension-inputs input { height: 41px; }
.field textarea { min-height: 112px; padding: 10px 11px; resize: vertical; line-height: 1.5; }
.field #sourceId { min-height: 74px; font-variant-numeric: tabular-nums; }
.batch-progress { padding: 10px 12px; border: 1px solid #b9d7d2; border-radius: 10px; background: #eef9f6; color: var(--teal-dark); font-size: 12px; font-weight: 800; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus, .dimension-inputs input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(11,112,107,.1); }
.checkbox-field > span { display: flex; align-items: center; gap: 8px; }
.field.checkbox-field input[type="checkbox"] { flex: 0 0 16px; width: 16px; height: 16px; padding: 0; accent-color: var(--teal); }
.checkbox-field > small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.confirmed-rules { padding: 11px 12px; border: 1px solid #c8dcd7; border-radius: 12px; background: #f3fbf8; }
.confirmed-rules span, .confirmed-rules p, .confirmed-rules small { display: block; margin: 0; }
.confirmed-rules span { color: var(--teal-dark); font-size: 11px; font-weight: 800; }
.confirmed-rules p { margin-top: 4px; font-size: 12px; font-weight: 700; }
.confirmed-rules small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.copy-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.copy-actions strong, .copy-actions small { display: block; }
.copy-actions strong { font-size: 12px; }
.copy-actions small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.copy-actions button { min-height: 34px; padding: 0 12px; border: 1px solid var(--teal); border-radius: 9px; background: white; color: var(--teal); font-size: 11px; font-weight: 800; }
.copy-actions button:hover:not(:disabled) { background: var(--teal); color: white; }
.automatic-source-data { padding: 12px 14px; border: 1px solid #9dc8c3; border-radius: 12px; background: #edf8f6; color: #255b57; }
.automatic-source-data strong, .automatic-source-data p, .automatic-source-data small { display: block; margin: 0; }
.automatic-source-data p { margin-top: 5px; font-size: 12px; line-height: 1.55; }
.automatic-source-data small { margin-top: 4px; color: #627d79; font-size: 11px; }
.dimension-inputs { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: end; gap: 7px; margin-top: 6px; }
.dimension-inputs label { position: relative; }
.dimension-inputs small { position: absolute; z-index: 1; left: 10px; top: 13px; color: var(--muted); }
.dimension-inputs input { padding-left: 28px; }
.dimension-inputs > span { padding-bottom: 11px; color: #899794; }

.safety-note { display: flex; align-items: center; gap: 12px; margin: 20px 0 14px; padding: 12px 14px; border-radius: 13px; background: var(--amber-soft); color: #6b4a1c; }
.lock-icon { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border: 1px solid rgba(107,74,28,.24); border-radius: 50%; font-size: 20px; }
.safety-note strong, .safety-note p { display: block; margin: 0; font-size: 12px; }
.safety-note p { margin-top: 2px; opacity: .78; }
.primary-button, .secondary-button { width: 100%; min-height: 48px; border-radius: 12px; font-weight: 800; transition: .18s ease; }
.primary-button { display: flex; align-items: center; justify-content: space-between; border: 0; background: var(--teal); color: white; padding: 0 18px; }
.primary-button:hover:not(:disabled) { background: var(--teal-dark); transform: translateY(-1px); }
.secondary-button { margin-top: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
button:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.form-error { min-height: 18px; margin: 9px 0 0; color: var(--red); font-size: 12px; font-weight: 700; }
.field small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.saved-request { margin-top: 12px; padding: 13px 14px; border: 1px solid #9dc8c3; border-radius: 12px; background: #edf8f6; overflow-wrap: anywhere; }
.saved-request strong, .saved-request p, .saved-request small { display: block; margin: 0; }
.saved-request p { margin-top: 5px; font-size: 12px; }
.saved-request small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.saved-request details { margin-top: 9px; font-size: 11px; }
.saved-request summary { cursor: pointer; font-weight: 800; }
.validation-list { margin: 8px 0 0; padding-left: 18px; font-size: 11px; line-height: 1.6; }
.failed-list { color: var(--red); }
.policy-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 20px; }
.policy-item { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.policy-item span, .policy-item strong { display: block; }
.policy-item span { color: var(--muted); font-size: 10px; font-weight: 700; }
.policy-item strong { margin-top: 5px; font-size: 13px; }
.dimension-policy { display: grid; gap: 10px; margin-top: 20px; }
.dimension-role, .dimension-warning { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.dimension-role strong, .dimension-role p, .dimension-role small, .dimension-warning strong, .dimension-warning p { display: block; margin: 0; }
.dimension-role p, .dimension-warning p { margin-top: 5px; font-size: 12px; line-height: 1.5; }
.dimension-role small { margin-top: 4px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.dimension-role.muted { opacity: .68; }
.dimension-warning { border-color: #e8c68d; background: var(--amber-soft); color: #6b4a1c; }
.status-copy { margin: 18px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.category-picker-field { position: relative; }
.category-picker-button { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 46px; padding: 10px 13px; border: 1px solid #8caeaa; border-radius: 11px; background: #fff; color: var(--ink); text-align: left; }
.category-picker-button:hover, .category-picker-button[aria-expanded="true"] { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(21,126,116,.09); }
.category-picker-meta { display: flex; align-items: center; gap: 9px; color: var(--teal-dark); white-space: nowrap; }
.category-picker-meta strong { padding: 4px 8px; border-radius: 999px; background: var(--mint); font-size: 10px; }
.category-picker-panel { position: absolute; z-index: 30; top: 66px; right: 0; left: 0; padding: 12px; border: 1px solid #9fb7b2; border-radius: 13px; background: #fff; box-shadow: 0 18px 45px rgba(38,52,49,.18); }
.category-picker-search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; margin-bottom: 9px; }
.category-picker-search-row input { width: 100%; min-height: 38px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; outline: none; background: #fff; color: var(--ink); }
.category-picker-search-row input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(21,126,116,.09); }
.category-picker-breadcrumb { min-height: 30px; padding: 6px 8px 9px; border-bottom: 1px solid var(--line); color: var(--teal-dark); font-size: 11px; font-weight: 800; }
.category-picker-help { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 2px 10px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.category-picker-breadcrumb + .category-picker-help { padding-top: 9px; }
.category-picker-filter-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 8px; border-bottom: 1px solid var(--line); }
.category-availability-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: 10px; font-weight: 700; }
.category-availability-legend span, .category-availability-filter { display: inline-flex; align-items: center; gap: 6px; }
.availability-dot { width: 9px; height: 9px; border-radius: 50%; background: #9ca3af; }
.availability-dot.available { background: #111827; }
.category-availability-filter { flex: 0 0 auto; color: var(--ink); font-size: 10px; font-weight: 900; cursor: pointer; }
.category-availability-filter input { width: 14px; height: 14px; margin: 0; accent-color: var(--teal); }
.category-picker-filter-row + .category-picker-help { padding-top: 9px; }
.category-cascade { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); max-height: 390px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.category-cascade-column { min-width: 210px; padding: 6px; border-right: 1px solid var(--line); overflow-y: auto; }
.category-cascade-column:last-child { border-right: 0; }
.category-cascade-column-title { padding: 7px 8px; color: var(--muted); font-size: 10px; font-weight: 800; }
.category-cascade-option { min-height: 36px; border: 1px solid transparent; border-radius: 7px; color: #465552; }
.category-cascade-parent { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 8px 9px; background: transparent; text-align: left; cursor: pointer; }
.category-cascade-expand { flex: 0 0 auto; margin-left: 8px; font-size: 11px; color: var(--muted); }
.category-cascade-parent:hover, .category-cascade-parent.active { border-color: #b8d5d0; background: #edf7f5; color: var(--teal-dark); }
.category-cascade-leaf { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: stretch; }
.category-cascade-leaf:hover, .category-cascade-leaf.current { border-color: #b8d5d0; background: #f0f8f6; }
.category-cascade-leaf.current { border-color: var(--teal); }
.category-cascade-leaf > input { align-self: center; width: 14px; height: 14px; margin: 0 0 0 7px; accent-color: var(--teal); }
.category-cascade-leaf > input:disabled { cursor: not-allowed; opacity: .45; }
.category-cascade-leaf > input:disabled + button { cursor: pointer; opacity: .72; }
.category-cascade-leaf > input:disabled + button small { color: #879795; }
.category-cascade-leaf > button { display: grid; gap: 2px; align-content: center; min-width: 0; padding: 7px 8px 7px 3px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.category-cascade-leaf > button span {
  overflow: visible;
  color: inherit;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}
.category-cascade-leaf > button small {
  overflow: visible;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}
.category-cascade-leaf.category-available { color: #111827; background: #fff; }
.category-cascade-leaf.category-available > button span { color: #111827; font-weight: 900; }
.category-cascade-leaf.category-available .category-state-label { color: #0f766e; }
.category-cascade-leaf.category-unavailable { color: #9ca3af; background: #f5f6f7; }
.category-cascade-leaf.category-unavailable:hover { border-color: #e2e5e9; background: #f5f6f7; }
.category-cascade-leaf.category-unavailable > button span,
.category-cascade-leaf.category-unavailable > button small,
.category-cascade-leaf.category-unavailable .category-state-label { color: #9ca3af; }
.category-search-results { grid-column: 1 / -1; min-width: 100%; }
.category-tree { display: grid; gap: 8px; max-height: 390px; overflow: auto; }
.category-tree-domain { border: 1px solid var(--line); border-radius: 11px; background: #fbfcfa; }
.category-tree-domain > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; cursor: pointer; color: var(--ink); font-size: 12px; font-weight: 900; list-style: none; }
.category-tree-domain > summary::-webkit-details-marker { display: none; }
.category-tree-domain > summary::after { content: "›"; color: var(--teal); font-size: 18px; transform: rotate(0); transition: transform .15s ease; }
.category-tree-domain[open] > summary::after { transform: rotate(90deg); }
.category-tree-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 8px; padding: 0 10px 11px; }
.category-tree-option { display: grid; grid-template-columns: 16px 1fr; align-items: center; gap: 7px; min-width: 0; padding: 7px 8px; border: 1px solid transparent; border-radius: 8px; color: #465552; cursor: pointer; font-size: 10px; line-height: 1.35; }
.category-tree-option:hover { border-color: #b8d5d0; background: #f0f8f6; }
.category-tree-option.current { border-color: var(--teal); background: var(--mint); color: var(--teal-dark); font-weight: 800; }
.category-tree-option input { width: 14px; height: 14px; margin: 0; accent-color: var(--teal); }
.category-tree-option span { overflow: visible; overflow-wrap: anywhere; text-overflow: clip; white-space: normal; }
.category-tree-empty { padding: 8px 10px 12px; color: var(--muted); font-size: 10px; }
.multi-category-panel { margin-top: 14px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.multi-category-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.multi-category-heading strong { color: var(--teal-dark); font-size: 13px; }
.multi-category-heading p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.multi-category-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.multi-category-actions strong { margin-left: auto; color: var(--teal-dark); font-size: 11px; }
.compact-button { min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-size: 11px; font-weight: 800; }
.compact-button:hover:not(:disabled) { border-color: var(--teal); color: var(--teal); }
.multi-category-grid { display: grid; gap: 9px; max-height: 330px; margin-bottom: 12px; overflow: auto; }
.multi-category-group { padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfa; }
.multi-category-group h4 { margin: 0 0 8px; font-size: 12px; }
.multi-category-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; }
.multi-category-option { display: flex; align-items: flex-start; gap: 7px; color: #465552; font-size: 10px; line-height: 1.35; }
.multi-category-option input { flex: 0 0 auto; width: 14px; height: 14px; margin: 0; accent-color: var(--teal); }
.multi-category-result-list { margin: 8px 0 0; padding-left: 18px; font-size: 11px; line-height: 1.6; }
.supplier-evidence-panel { display: grid; gap: 9px; }
.supplier-evidence-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.supplier-evidence-actions .primary-button,
.supplier-evidence-actions .secondary-button { margin: 0; }
.supplier-evidence-list { margin: 8px 0 0; padding-left: 18px; font-size: 11px; line-height: 1.65; }
.supplier-evidence-list strong { color: var(--ink); }
.supplier-evidence-list small { color: var(--muted); }

.task-center-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(330px, .55fr); gap: 22px; align-items: start; }
.task-launcher-card, .active-tasks-card, .account-admin-card { padding: 26px; }
.task-launcher-card { grid-row: span 2; }
.task-type-grid { display: grid; gap: 12px; margin-top: 20px; }
.task-type-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 15px; padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.task-type-card.featured { border-color: #8fc8bf; background: linear-gradient(135deg, #f3fbf8, #fff); }
.task-type-card h3, .task-type-card p { margin: 0; }
.task-type-card h3 { font-size: 16px; }
.task-type-card p { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.task-type-icon, .task-row-type { display: grid; place-items: center; border-radius: 13px; background: #ddf1ec; color: var(--teal-dark); font-weight: 900; }
.task-type-icon { width: 48px; height: 48px; font-size: 17px; }
.task-type-icon.editing { background: #e9edf8; color: #425a87; }
.task-type-icon.combined { background: #fff0d9; color: #8a5a16; }
.task-action { min-width: 100px; padding: 10px 13px; border-radius: 10px; background: var(--teal); color: #fff; text-align: center; text-decoration: none; font-size: 11px; font-weight: 900; }
.task-action:hover { background: var(--teal-dark); }
.task-action.disabled { cursor: not-allowed; background: #c8cfcd; pointer-events: none; }
.worker-explanation { margin-top: 17px; padding: 15px 17px; border: 1px solid #c3ddd8; border-radius: 14px; background: #f0f8f6; }
.worker-explanation strong { color: var(--teal-dark); font-size: 12px; }
.worker-explanation p { margin: 6px 0 0; color: #526966; font-size: 11px; line-height: 1.6; }
.active-task-list { display: grid; gap: 9px; margin-top: 18px; }
.active-task-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.task-row-type { width: 34px; height: 34px; }
.active-task-row strong, .active-task-row small { display: block; }
.active-task-row strong { font-size: 12px; }
.active-task-row small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.active-task-row > a { grid-column: 2 / -1; color: var(--teal); font-size: 10px; font-weight: 800; text-decoration: none; }
.task-row-status { padding: 4px 7px; border-radius: 999px; background: #edf0ee; color: #65716f; font-size: 9px; font-weight: 900; }
.task-row-status.running, .task-row-status.starting, .task-row-status.busy { background: var(--amber-soft); color: #80571e; }
.task-row-status.completed { background: var(--teal-soft); color: var(--teal-dark); }
.task-row-status.failed, .task-row-status.completed_with_errors { background: var(--red-soft); color: var(--red); }
.empty-state { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.account-create-form { display: grid; gap: 10px; margin-top: 18px; }
.account-create-form .primary-button { margin-top: 2px; }
.user-list { display: grid; gap: 8px; margin-top: 13px; }
.user-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.user-row strong, .user-row small { display: block; }
.user-row strong { font-size: 12px; }
.user-row small, .user-row > span { margin-top: 2px; color: var(--muted); font-size: 9px; }

.timeline { display: grid; gap: 0; margin: 22px 0 0; padding: 0; list-style: none; }
.timeline li { position: relative; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; min-height: 61px; padding: 8px 0; }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 16px; top: 47px; width: 1px; height: 29px; background: var(--line); }
.step-icon { display: grid; place-items: center; z-index: 1; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: #869290; font-size: 12px; font-weight: 900; }
.timeline strong, .timeline small { display: block; }
.timeline strong { font-size: 14px; }
.timeline small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.step-state { min-width: 48px; text-align: right; color: #899593; font-size: 11px; font-weight: 800; }
.timeline li.running .step-icon { border-color: var(--amber); background: var(--amber-soft); color: #83581f; animation: pulse 1.3s infinite; }
.timeline li.running .step-state { color: var(--amber); }
.timeline li.success .step-icon { border-color: var(--teal); background: var(--teal); color: white; }
.timeline li.success .step-icon::before { content: "✓"; }
.timeline li.success .step-icon { font-size: 0; }
.timeline li.success .step-icon::before { font-size: 14px; }
.timeline li.success .step-state { color: var(--teal); }
.timeline li.warning .step-icon { border-color: var(--amber); background: var(--amber-soft); color: #83581f; }
.timeline li.warning .step-state { color: var(--amber); }
.timeline li.failed .step-icon { border-color: var(--red); background: var(--red); color: white; }
.timeline li.failed .step-state { color: var(--red); }
.timeline li.skipped { opacity: .46; }

.error-card { padding: 20px; border-color: #e3aaa5; background: var(--red-soft); }
.error-heading { display: flex; align-items: center; gap: 12px; }
.error-heading > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--red); color: white; font-size: 20px; font-weight: 900; }
.error-heading p, .error-heading h2 { margin: 0; }
.error-heading p { color: #744642; font-size: 11px; font-weight: 800; }
.error-heading h2 { margin-top: 2px; color: #762b27; font-size: 18px; }
#errorMessage { margin: 14px 0 0; font-weight: 700; }
#errorCause { margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: #fff4e5; color: #6f4514; font-size: 12px; font-weight: 700; line-height: 1.5; }
.error-help { margin: 8px 0 0; color: #744642; font-size: 12px; }
.screenshot-card { padding: 16px; }
.mini-heading h3 { margin: 0; font-size: 14px; }
.mini-heading span { color: var(--muted); font-size: 11px; }
.screenshot-card img { display: block; width: 100%; max-height: 430px; object-fit: contain; margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; background: #edf0ee; }
.console-card { overflow: hidden; }
.console-card summary { display: flex; align-items: center; justify-content: space-between; padding: 16px 19px; cursor: pointer; font-weight: 800; }
.console-card summary small { color: var(--muted); font-weight: 500; }
.console-output { max-height: 270px; overflow: auto; padding: 14px 18px; background: #152429; color: #d7e5df; font: 12px/1.65 Consolas, monospace; }
.console-line { padding: 2px 0; border-bottom: 1px solid rgba(255,255,255,.04); overflow-wrap: anywhere; }
.console-line.error { color: #ffaaa2; }

@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(213,139,42,.06); } }
@media (max-width: 980px) {
  .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-shell { grid-template-columns: 1fr; align-content: center; }
  .login-brand { display: none; }
  .workspace { grid-template-columns: 1fr; }
  .task-center-layout { grid-template-columns: 1fr; }
  .task-launcher-card { grid-row: auto; }
  .monitor-panel { grid-row: 1; }
  .control-panel { grid-row: 2; }
}
@media (max-width: 620px) {
  .shell { width: min(100% - 24px, 1440px); padding-top: 24px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .topbar-actions { align-items: stretch; flex-direction: column; width: 100%; }
  .overview-grid { grid-template-columns: 1fr; }
  .choice-grid, .field-grid { grid-template-columns: 1fr; }
  .operation-window-note { align-items: stretch; flex-direction: column; }
  .field.wide, .dimensions.wide { grid-column: auto; }
  .control-panel, .progress-card { padding: 19px; }
  .multi-category-options { grid-template-columns: 1fr; }
  .supplier-evidence-actions { grid-template-columns: 1fr; }
  .category-tree-options { grid-template-columns: 1fr; }
  .category-picker-help, .multi-category-heading { align-items: stretch; flex-direction: column; }
  .task-type-card { grid-template-columns: 42px 1fr; }
  .task-type-icon { width: 42px; height: 42px; }
  .task-action { grid-column: 1 / -1; }
}

/* Automation OS task center ------------------------------------------------ */
.dashboard-page {
  --os-bg: #07111f;
  --os-panel: #0e1b2c;
  --os-panel-2: #122238;
  --os-border: rgba(133, 168, 216, .16);
  --os-text: #ecf5ff;
  --os-muted: #8295ad;
  --os-blue: #548dff;
  --os-green: #29d6a0;
  --os-amber: #f0a442;
  --os-red: #ff5f6d;
  --os-cyan: #21c7d9;
  margin: 0;
  min-width: 320px;
  color: var(--os-text);
  background:
    radial-gradient(circle at 58% -15%, rgba(36, 91, 176, .2), transparent 34rem),
    linear-gradient(145deg, #07111f, #081321 55%, #06101c);
}
.dashboard-page * { box-sizing: border-box; }
.dashboard-page a { color: inherit; }
.os-shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.os-sidebar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 22px 15px 18px;
  border-right: 1px solid var(--os-border);
  background: rgba(7, 17, 31, .96);
  box-shadow: 10px 0 32px rgba(0, 0, 0, .16);
}
.os-brand { display: flex; gap: 11px; align-items: center; padding: 3px 7px 25px; text-decoration: none; }
.os-brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(93, 141, 255, .55);
  border-radius: 13px;
  color: #dce9ff;
  background: linear-gradient(145deg, #224682, #132950);
  box-shadow: 0 10px 28px rgba(40, 90, 180, .28);
  font-weight: 800;
}
.os-brand strong, .os-brand small { display: block; }
.os-brand strong { font-size: 15px; letter-spacing: .02em; }
.os-brand small { margin-top: 3px; color: var(--os-muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.os-nav { display: grid; gap: 5px; }
.os-nav a {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 9px;
  align-items: center;
  min-height: 41px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #93a6bf;
  text-decoration: none;
  font-size: 13px;
  transition: .18s ease;
}
.os-nav a:hover { color: #dce9ff; background: rgba(85, 125, 185, .09); }
.os-nav a.active { color: #f6f9ff; border-color: rgba(86, 132, 255, .28); background: linear-gradient(90deg, rgba(57, 99, 204, .32), rgba(35, 68, 139, .14)); box-shadow: inset 3px 0 0 #5d91ff; }
.os-nav a span { color: #7595c8; text-align: center; font-size: 15px; }
.os-sidebar-runtime, .os-sidebar-account { display: flex; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--os-border); border-radius: 11px; background: rgba(17, 32, 52, .65); }
.os-sidebar-runtime { margin-top: auto; }
.os-sidebar-account { margin-top: 9px; }
.os-sidebar-runtime strong, .os-sidebar-runtime small, .os-sidebar-account strong, .os-sidebar-account small { display: block; }
.os-sidebar-runtime strong, .os-sidebar-account strong { font-size: 12px; }
.os-sidebar-runtime small, .os-sidebar-account small { margin-top: 2px; color: var(--os-muted); font-size: 10px; }
.runtime-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--os-green); box-shadow: 0 0 0 5px rgba(41, 214, 160, .08), 0 0 14px rgba(41, 214, 160, .5); }
.os-avatar { display: grid; width: 33px; height: 33px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #07111f; background: linear-gradient(145deg, #d9e8ff, #6c9eff); font-weight: 800; }
.os-content { min-width: 0; }
.os-topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 13px 24px;
  border-bottom: 1px solid var(--os-border);
  background: rgba(7, 17, 31, .88);
  backdrop-filter: blur(14px);
}
.os-search { display: flex; gap: 10px; align-items: center; width: min(550px, 48vw); padding: 0 12px; border: 1px solid var(--os-border); border-radius: 10px; background: rgba(14, 27, 44, .78); }
.os-search input { width: 100%; min-height: 40px; color: var(--os-text); border: 0; outline: 0; background: transparent; }
.os-search input::placeholder { color: #657a95; }
.os-search kbd { padding: 3px 6px; border: 1px solid rgba(148, 175, 210, .18); border-radius: 5px; color: var(--os-muted); font-size: 10px; white-space: nowrap; }
.os-topbar-actions { display: flex; gap: 10px; align-items: center; }
.dashboard-page .status-pill, .dashboard-page .account-chip, .dashboard-page .policy-badge { border-color: var(--os-border); color: #c7d7eb; background: rgba(14, 27, 44, .82); }
.dashboard-page .account-chip button { color: #93a7c0; }
.os-main { width: min(1480px, 100%); margin: 0 auto; padding: 24px; }
.os-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 145px;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 28px 32px;
  border: 1px solid rgba(84, 141, 255, .25);
  border-radius: 15px;
  background: linear-gradient(115deg, rgba(22, 48, 94, .92), rgba(11, 28, 50, .92) 48%, rgba(15, 47, 78, .78));
  box-shadow: 0 25px 60px rgba(0, 0, 0, .2);
}
.os-hero::before, .os-hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(1px); }
.os-hero::before { width: 380px; height: 380px; right: 18%; top: -265px; border: 55px solid rgba(68, 127, 225, .15); }
.os-hero::after { width: 240px; height: 240px; right: 2%; bottom: -165px; border: 40px solid rgba(37, 199, 217, .1); }
.os-hero .eyebrow { margin: 0 0 8px; color: #7ea9ff; font-size: 10px; letter-spacing: .22em; }
.os-hero h1 { margin: 0; font-size: clamp(26px, 3vw, 40px); }
.os-hero p { max-width: 720px; margin: 10px 0 0; color: #a7bad1; line-height: 1.7; }
.os-hero-copy { display: grid; gap: 6px; min-width: 235px; text-align: right; }
.os-hero-copy strong { color: #dce8fa; }
.os-hero-copy span { color: #7890ad; font-size: 12px; }
.os-metric-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.os-metric-card { display: flex; gap: 13px; align-items: center; min-height: 105px; padding: 18px; border: 1px solid var(--os-border); border-radius: 12px; background: linear-gradient(145deg, rgba(18, 34, 56, .96), rgba(11, 24, 40, .96)); box-shadow: 0 15px 35px rgba(0, 0, 0, .12); }
.metric-icon { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 11px; background: rgba(84, 141, 255, .18); color: #83a9ff; font-weight: 900; }
.metric-amber .metric-icon { color: #ffc061; background: rgba(240, 164, 66, .15); }
.metric-green .metric-icon { color: #5ce1b6; background: rgba(41, 214, 160, .14); }
.metric-cyan .metric-icon { color: #4adddf; background: rgba(33, 199, 217, .14); }
.metric-red { border-color: rgba(255, 95, 109, .24); }
.metric-red .metric-icon { color: #ff8390; background: rgba(255, 95, 109, .14); }
.os-metric-card div { min-width: 0; }
.os-metric-card small, .os-metric-card strong, .os-metric-card span { display: block; }
.os-metric-card small { color: #8ca0ba; font-size: 11px; }
.os-metric-card strong { margin-top: 5px; color: #f3f8ff; font-size: 25px; line-height: 1; }
.os-metric-card div > span { overflow: hidden; margin-top: 8px; color: #6f849e; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.os-system-guard { display: grid; grid-template-columns: 42px 1fr auto auto; gap: 14px; align-items: center; margin-top: 14px; padding: 15px 18px; border: 1px solid rgba(41, 214, 160, .25); border-radius: 12px; background: linear-gradient(90deg, rgba(13, 90, 74, .34), rgba(10, 42, 43, .2)); }
.os-system-guard.guarded { border-color: rgba(240, 164, 66, .36); background: linear-gradient(90deg, rgba(119, 74, 18, .38), rgba(70, 41, 12, .18)); }
.os-system-guard.frozen { border-color: rgba(255, 95, 109, .4); background: linear-gradient(90deg, rgba(126, 30, 44, .42), rgba(68, 17, 27, .2)); }
.guard-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 11px; color: var(--os-green); background: rgba(41, 214, 160, .12); }
.guarded .guard-icon { color: var(--os-amber); background: rgba(240, 164, 66, .13); }
.frozen .guard-icon { color: var(--os-red); background: rgba(255, 95, 109, .13); }
.os-system-guard strong { font-size: 13px; }
.os-system-guard p { margin: 4px 0 0; color: #8da1ba; font-size: 11px; }
.os-system-guard time, .os-system-guard a { color: #7890aa; font-size: 11px; text-decoration: none; }
.os-primary-grid, .os-secondary-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(330px, .75fr); gap: 14px; margin-top: 14px; }
.os-secondary-grid { grid-template-columns: minmax(0, 1.35fr) minmax(380px, .85fr); }
.os-panel { border: 1px solid var(--os-border); border-radius: 13px; background: linear-gradient(145deg, rgba(14, 27, 44, .96), rgba(10, 22, 37, .96)); box-shadow: 0 18px 44px rgba(0, 0, 0, .14); }
.os-task-panel, .os-health-panel, .os-current-tasks, .os-mode-panel, .os-roadmap-panel, .dashboard-page .account-admin-card, .dashboard-page .worker-explanation { padding: 20px; }
.os-panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; }
.os-panel-heading > div { display: flex; gap: 9px; align-items: center; }
.os-panel-heading small { color: #4fd6c0; font-weight: 800; }
.os-panel-heading h2 { margin: 0; font-size: 15px; }
.os-panel-heading > span, .os-panel-heading a { color: #6f849e; font-size: 10px; text-decoration: none; }
.os-quick-task-grid { display: grid; gap: 9px; }
.os-quick-task { display: grid; grid-template-columns: 42px 1fr 20px; gap: 12px; align-items: center; padding: 13px; border: 1px solid rgba(134, 166, 207, .14); border-radius: 10px; background: rgba(18, 35, 57, .62); text-decoration: none; transition: .18s ease; }
.os-quick-task:hover { border-color: rgba(84, 141, 255, .42); transform: translateY(-1px); }
.os-quick-task.featured { border-color: rgba(41, 214, 160, .26); background: linear-gradient(90deg, rgba(21, 90, 82, .28), rgba(16, 41, 59, .55)); }
.os-quick-task > span { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 10px; color: #a9c3ff; background: rgba(84, 141, 255, .17); font-weight: 800; }
.os-quick-task.featured > span { color: #69e5bd; background: rgba(41, 214, 160, .16); }
.os-quick-task strong, .os-quick-task small { display: block; }
.os-quick-task strong { font-size: 13px; }
.os-quick-task small { margin-top: 4px; color: #7489a3; font-size: 10px; }
.os-quick-task b { color: #637c9c; }
.os-quick-task.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.os-platform-roadmap { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--os-border); }
.os-platform-roadmap strong { margin-right: 4px; color: #8fa4bd; font-size: 10px; }
.os-platform-roadmap span { padding: 5px 8px; border: 1px solid rgba(134, 166, 207, .13); border-radius: 999px; color: #647a94; font-size: 9px; }
.os-platform-roadmap span.live { color: #61dcb5; border-color: rgba(41, 214, 160, .25); background: rgba(41, 214, 160, .07); }
.os-health-body { display: grid; grid-template-columns: 115px 1fr; gap: 17px; align-items: center; }
.os-health-ring { display: grid; width: 112px; height: 112px; place-content: center; border-radius: 50%; background: radial-gradient(circle at center, #0e1b2c 56%, transparent 57%), conic-gradient(var(--os-green) 0 78%, rgba(78, 107, 142, .18) 78% 100%); text-align: center; }
.os-health-ring span { font-size: 18px; font-weight: 800; }
.os-health-ring small { margin-top: 3px; color: #71859e; font-size: 9px; }
.os-health-body ul, .os-safety-list { margin: 0; padding: 0; list-style: none; }
.os-health-body li, .os-safety-list li { display: flex; gap: 12px; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid rgba(134, 166, 207, .09); color: #7187a1; font-size: 10px; }
.os-health-body li strong, .os-safety-list li strong { color: #bed0e4; font-weight: 600; }
.os-health-meta { margin: 12px 0 0; color: #6f849e; font-size: 10px; text-align: center; }
.os-state-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.os-state-summary > div { padding: 10px 12px; border: 1px solid rgba(134, 166, 207, .12); border-radius: 9px; background: rgba(17, 33, 54, .58); }
.os-state-summary span, .os-state-summary strong, .os-state-summary small { display: block; }
.os-state-summary span { color: #7187a1; font-size: 9px; }
.os-state-summary strong { margin-top: 4px; font-size: 13px; }
.os-state-summary small { margin-top: 3px; color: #637993; font-size: 9px; }
.dashboard-page .active-task-list { display: grid; gap: 7px; }
.dashboard-page .active-task-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 11px; border: 1px solid rgba(134, 166, 207, .12); border-radius: 9px; background: rgba(17, 33, 54, .58); }
.dashboard-page .active-task-row[hidden] { display: none; }
.dashboard-page .task-row-type { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; color: #72e0bd; background: rgba(41, 214, 160, .12); font-weight: 800; }
.dashboard-page .active-task-row strong, .dashboard-page .active-task-row small { display: block; }
.dashboard-page .active-task-row strong { font-size: 11px; }
.dashboard-page .active-task-row small { margin-top: 3px; color: #6e849e; font-size: 9px; }
.dashboard-page .task-row-status { padding: 4px 7px; border-radius: 999px; color: #8ca2bc; background: rgba(109, 135, 168, .11); font-size: 9px; }
.dashboard-page .task-row-status.running, .dashboard-page .task-row-status.completed { color: #62dcb6; background: rgba(41, 214, 160, .11); }
.dashboard-page .task-row-status.failed, .dashboard-page .task-row-status.completed_with_errors { color: #ff8995; background: rgba(255, 95, 109, .11); }
.dashboard-page .active-task-row > a { color: #6f98ec; font-size: 9px; text-decoration: none; }
.dashboard-page .empty-state { margin: 0; padding: 24px; border: 1px dashed rgba(134, 166, 207, .16); border-radius: 9px; color: #60758e; text-align: center; }
.dashboard-page .compact-button { color: #94aac4; border-color: var(--os-border); background: rgba(17, 33, 54, .7); }
.os-mode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.os-mode { padding: 13px; border: 1px solid rgba(134, 166, 207, .14); border-radius: 9px; color: #748aa4; background: rgba(17, 33, 54, .45); }
.os-mode strong, .os-mode small { display: block; }
.os-mode strong { font-size: 10px; letter-spacing: .06em; }
.os-mode small { margin-top: 5px; font-size: 9px; }
.os-mode.active { color: #57dfb3; border-color: rgba(41, 214, 160, .38); background: rgba(23, 106, 88, .18); box-shadow: inset 0 0 25px rgba(41, 214, 160, .04); }
.os-mode.locked { color: #ff7c89; border-color: rgba(255, 95, 109, .28); background: rgba(109, 25, 40, .17); }
.os-safety-list { margin-top: 12px; }
.os-roadmap-panel { margin-top: 14px; }
.os-roadmap-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.os-roadmap-grid > div { padding: 13px; border: 1px solid rgba(134, 166, 207, .12); border-radius: 9px; background: rgba(17, 33, 54, .54); }
.os-roadmap-grid strong { color: #b8cbe2; font-size: 11px; }
.os-roadmap-grid p { margin: 7px 0 0; color: #6c819b; font-size: 9px; line-height: 1.65; }
.dashboard-page .account-admin-card { margin-top: 14px; }
.dashboard-page .account-create-form { grid-template-columns: 1fr 1fr 1fr auto; }
.dashboard-page .field span { color: #7e93ad; }
.dashboard-page .field input, .dashboard-page .field select { color: #d9e6f5; border-color: var(--os-border); background: rgba(8, 19, 33, .78); }
.dashboard-page .primary-button { background: linear-gradient(135deg, #168b7a, #126c78); }
.dashboard-page .user-row { border-color: rgba(134, 166, 207, .12); background: rgba(17, 33, 54, .5); }
.dashboard-page .user-row small, .dashboard-page .user-row > span { color: #71869f; }
.dashboard-page .worker-explanation { margin-top: 14px; color: #8297b0; }
.dashboard-page .worker-explanation strong { color: #c0d2e6; }
.dashboard-page .worker-explanation p { margin: 8px 0 0; font-size: 10px; line-height: 1.7; }

@media (max-width: 1240px) {
  .os-metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .os-roadmap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .os-shell { grid-template-columns: 78px minmax(0, 1fr); }
  .os-sidebar { padding-inline: 10px; }
  .os-brand { justify-content: center; padding-inline: 0; }
  .os-brand > span:last-child, .os-nav a:not(.active) { font-size: 0; }
  .os-nav a { grid-template-columns: 1fr; padding: 0; text-align: center; }
  .os-nav a span { font-size: 17px; }
  .os-sidebar-runtime span:last-child, .os-sidebar-account span:last-child { display: none; }
  .os-sidebar-runtime, .os-sidebar-account { justify-content: center; padding: 10px; }
  .os-primary-grid, .os-secondary-grid { grid-template-columns: 1fr; }
  .os-hero-copy { display: none; }
  .os-topbar-actions .policy-badge { display: none; }
}
@media (max-width: 720px) {
  .os-shell { display: block; }
  .os-sidebar { position: relative; min-height: auto; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--os-border); }
  .os-brand, .os-sidebar-runtime, .os-sidebar-account { display: none; }
  .os-nav { display: flex; overflow-x: auto; }
  .os-nav a, .os-nav a:not(.active) { min-width: 48px; font-size: 0; }
  .os-topbar { padding: 10px 12px; }
  .os-search { width: 100%; }
  .os-search kbd, .os-topbar-actions .status-pill, .os-topbar-actions .account-chip span { display: none; }
  .os-main { padding: 12px; }
  .os-hero { min-height: 128px; padding: 22px; }
  .os-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .os-system-guard { grid-template-columns: 35px 1fr; }
  .os-system-guard time, .os-system-guard a { display: none; }
  .os-roadmap-grid, .dashboard-page .account-create-form { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .os-metric-grid { grid-template-columns: 1fr; }
  .os-state-summary, .os-mode-grid { grid-template-columns: 1fr; }
  .os-health-body { grid-template-columns: 1fr; justify-items: center; }
  .os-health-body ul { width: 100%; }
  .dashboard-page .active-task-row { grid-template-columns: 32px 1fr auto; }
  .dashboard-page .active-task-row > a { grid-column: 2 / -1; }
}

/* Shared Automation OS shell for every independent module ---------------- */
.os-content { min-width: 0; }
.os-module-heading { display: grid; gap: 2px; }
.os-module-heading small { color: #5c79a2; font-size: 8px; font-weight: 900; letter-spacing: .18em; }
.os-module-heading strong { color: var(--os-text); font-size: 15px; }
.os-theme-toggle {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--os-border);
  border-radius: 9px;
  color: #c7d7eb;
  background: rgba(14, 27, 44, .82);
  font-size: 11px;
  font-weight: 800;
}
.os-theme-toggle:hover { border-color: rgba(84, 141, 255, .45); }
.os-workspace-main { width: min(1580px, 100%); }
.os-module-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
  padding: 22px 25px;
  border: 1px solid rgba(84, 141, 255, .2);
  border-radius: 14px;
  background: linear-gradient(115deg, rgba(22, 48, 94, .8), rgba(11, 28, 50, .94) 55%, rgba(15, 47, 78, .72));
}
.os-module-hero .eyebrow { color: #74a2ff; font-size: 9px; }
.os-module-hero h1 { color: var(--os-text); font-size: clamp(24px, 3vw, 34px); }
.os-module-hero p { margin: 8px 0 0; color: #8fa4bd; font-size: 12px; }
.os-module-hero > a { color: #8cb1ff; font-size: 11px; text-decoration: none; white-space: nowrap; }
.os-module-page .overview-grid { margin-bottom: 14px; }
.os-module-page .workspace {
  display: grid;
  grid-template-columns: minmax(390px, .82fr) minmax(520px, 1.18fr);
  gap: 14px;
  width: 100%;
  align-items: start;
}
.os-module-page .workspace.sourcing-workspace { grid-template-columns: minmax(430px, .9fr) minmax(560px, 1.1fr); }
.os-module-page .card,
.os-module-page .system-module-root {
  color: var(--os-text);
  border-color: var(--os-border);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(14, 27, 44, .98), rgba(10, 22, 37, .98));
  box-shadow: 0 18px 44px rgba(0, 0, 0, .15);
}
.os-module-page .section-heading h2,
.os-module-page .mini-heading h3,
.os-module-page legend,
.os-module-page .form-header h3 { color: #dce8f6; }
.os-module-page .section-index { color: var(--os-green); }
.os-module-page .local-badge { color: #65dcb8; background: rgba(41, 214, 160, .11); }
.os-module-page .choice-card,
.os-module-page .mode-card,
.os-module-page .copy-actions,
.os-module-page .policy-item,
.os-module-page .dimension-role,
.os-module-page .multi-category-panel,
.os-module-page .category-tree-domain,
.os-module-page .multi-category-group {
  color: #dce8f6;
  border-color: var(--os-border);
  background: rgba(17, 33, 54, .72);
}
.os-module-page .choice-card:has(input:checked),
.os-module-page .mode-card:has(input:checked),
.os-module-page .category-tree-option.current {
  border-color: rgba(41, 214, 160, .5);
  background: rgba(24, 105, 89, .22);
  box-shadow: 0 0 0 3px rgba(41, 214, 160, .05);
}
.os-module-page .choice-card small,
.os-module-page .mode-card small,
.os-module-page .field > span,
.os-module-page .dimensions > span,
.os-module-page .field small,
.os-module-page .status-copy,
.os-module-page .category-picker-help,
.os-module-page .multi-category-heading p,
.os-module-page .saved-request small { color: #8297b0; }
.os-module-page .field input,
.os-module-page .field select,
.os-module-page .field textarea,
.os-module-page .dimension-inputs input,
.os-module-page .category-picker-button,
.os-module-page .compact-button,
.os-module-page .secondary-button,
.os-module-page .operation-window-note button {
  color: #dce8f6;
  border-color: var(--os-border);
  background: rgba(8, 19, 33, .84);
}
.os-module-page .category-picker-panel { color: #dce8f6; border-color: var(--os-border); background: #0e1b2c; }
.os-module-page .category-picker-search-row input,
.os-module-page .category-cascade { color: #dce8f6; border-color: var(--os-border); background: #0a1728; }
.os-module-page .category-picker-breadcrumb,
.os-module-page .category-cascade-column { border-color: var(--os-border); }
.os-module-page .category-cascade-option { color: #b9cae0; }
.os-module-page .category-cascade-parent:hover,
.os-module-page .category-cascade-parent.active,
.os-module-page .category-cascade-leaf:hover,
.os-module-page .category-cascade-leaf.current { border-color: rgba(41,214,160,.44); background: rgba(24,105,89,.22); color: #e7fff8; }
.os-module-page .category-cascade-leaf.category-available { color: #f7fbff; background: rgba(9,25,43,.9); }
.os-module-page .category-cascade-leaf.category-available > button span { color: #f7fbff; }
.os-module-page .category-cascade-leaf.category-unavailable { color: #65758a; background: rgba(18,31,48,.66); }
.os-module-page .category-cascade-leaf.category-unavailable > button span,
.os-module-page .category-cascade-leaf.category-unavailable > button small,
.os-module-page .category-cascade-leaf.category-unavailable .category-state-label { color: #65758a; }
.os-module-page .category-tree-domain > summary,
.os-module-page .category-tree-option { color: #b9cae0; }
.os-module-page .operation-window-note,
.os-module-page .confirmed-rules,
.os-module-page .automatic-source-data,
.os-module-page .saved-request,
.os-module-page .batch-progress {
  color: #a9ddcf;
  border-color: rgba(41, 214, 160, .23);
  background: rgba(22, 89, 76, .16);
}
.os-module-page .safety-note,
.os-module-page .dimension-warning { color: #e7c283; background: rgba(122, 77, 21, .22); }
.os-module-page .console-card,
.os-module-page .progress-card { overflow: hidden; }
.execution-mode-selector { padding: 14px; border: 1px solid rgba(84, 141, 255, .2); border-radius: 12px; background: rgba(9, 22, 38, .42); }
.execution-mode-selector > small { display: block; margin-top: 9px; color: #7f95af; font-size: 10px; line-height: 1.5; }

/* Independent API/worker/monitor/security/account pages. */
.module-workspace { display: block !important; }
.system-module-root { min-height: 510px; padding: 22px; }
.system-module-root > .os-panel-heading > div { display: block; }
.system-module-root > .os-panel-heading h2 { margin-top: 5px; font-size: 19px; }
.agent-workbench { display: grid; grid-template-columns: minmax(300px, .72fr) minmax(440px, 1.28fr); gap: 14px; }
.agent-list { display: grid; gap: 8px; align-content: start; }
.agent-card { display: grid; grid-template-columns: 38px 1fr 18px; gap: 11px; align-items: center; padding: 13px; border: 1px solid var(--os-border); border-radius: 10px; background: rgba(17, 33, 54, .58); text-decoration: none; }
.agent-card > span { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 9px; color: #87aaff; background: rgba(84, 141, 255, .13); }
.agent-card strong, .agent-card small { display: block; }
.agent-card small { margin-top: 4px; color: #7187a1; font-size: 10px; line-height: 1.45; }
.agent-card b { color: #5f7898; }
.agent-card.active { border-color: rgba(41, 214, 160, .36); background: rgba(24, 105, 89, .19); }
.agent-card.active > span { color: #68e1ba; background: rgba(41, 214, 160, .13); }
.agent-detail { padding: 22px; border: 1px solid var(--os-border); border-radius: 11px; background: rgba(8, 19, 33, .68); }
.agent-detail h2 { margin: 8px 0; }
.agent-detail > p:not(.eyebrow) { color: #8da1ba; line-height: 1.65; }
.agent-detail dl { display: grid; gap: 8px; margin: 18px 0; }
.agent-detail dl > div { padding: 12px; border: 1px solid rgba(134, 166, 207, .11); border-radius: 9px; background: rgba(17, 33, 54, .52); }
.agent-detail dt { color: #7392ba; font-size: 10px; font-weight: 800; }
.agent-detail dd { margin: 5px 0 0; color: #bed0e4; font-size: 11px; line-height: 1.6; }
.agent-callout, .module-note, .permission-empty { padding: 15px; border: 1px solid rgba(41, 214, 160, .2); border-radius: 10px; background: rgba(24, 105, 89, .13); }
.agent-callout p, .module-note, .permission-empty p { margin: 5px 0 0; color: #7f96af; font-size: 11px; line-height: 1.6; }
.system-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.system-detail-grid.five-levels { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.system-detail-grid article { min-height: 142px; padding: 16px; border: 1px solid var(--os-border); border-radius: 10px; background: rgba(17, 33, 54, .58); }
.system-detail-grid article small, .system-detail-grid article strong { display: block; }
.system-detail-grid article small { color: #5ea5d8; font-size: 9px; letter-spacing: .09em; }
.system-detail-grid article strong { margin-top: 12px; font-size: 17px; }
.system-detail-grid article p { color: #788ea7; font-size: 10px; line-height: 1.65; }
.system-error-summary { overflow: auto; margin: 14px 0 0; padding: 15px; border: 1px solid rgba(255, 95, 109, .24); border-radius: 10px; color: #ff9da7; background: rgba(88, 19, 31, .22); }
.task-center-module-grid { display: grid; gap: 10px; margin-bottom: 14px; }
.task-center-module-card { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; min-height: 92px; padding: 16px; border: 1px solid var(--os-border); border-radius: 11px; background: rgba(17, 33, 54, .58); text-decoration: none; }
.task-center-module-card > span { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 10px; color: #a9c3ff; background: rgba(84, 141, 255, .17); font-weight: 900; }
.task-center-module-card strong { font-size: 14px; }
.task-center-module-card p { margin: 5px 0 0; color: #788ea7; font-size: 10px; line-height: 1.55; }
.task-center-module-card b { color: #7296cd; font-size: 10px; }
.task-center-module-card.featured { border-color: rgba(41, 214, 160, .3); background: rgba(24, 105, 89, .17); }
.task-center-module-card.featured > span { color: #68e1ba; background: rgba(41, 214, 160, .13); }

/* Real task control plane -------------------------------------------------- */
.task-center-heading { display: grid; gap: 2px; }
.task-center-heading .eyebrow { color: #5c79a2; font-size: 8px; font-weight: 900; letter-spacing: .18em; }
.task-center-heading h1 { margin: 0; color: var(--os-text); font-size: 15px; }
.task-center-main { width: min(1680px, 100%); }
.task-center-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  margin-bottom: 14px;
  padding: 22px 25px;
  border: 1px solid rgba(84, 141, 255, .2);
  border-radius: 14px;
  background: linear-gradient(115deg, rgba(22, 48, 94, .8), rgba(11, 28, 50, .94) 55%, rgba(15, 47, 78, .72));
}
.task-center-intro h2 { margin: 5px 0 0; color: var(--os-text); font-size: clamp(21px, 2.5vw, 30px); }
.task-center-intro p:not(.eyebrow) { max-width: 780px; margin: 8px 0 0; color: #8fa4bd; font-size: 11px; line-height: 1.7; }
.task-center-heartbeat { display: grid; grid-template-columns: 9px 1fr; gap: 10px; align-items: center; min-width: 210px; padding: 12px 14px; border: 1px solid rgba(41, 214, 160, .2); border-radius: 10px; background: rgba(8, 19, 33, .54); }
.task-center-heartbeat strong, .task-center-heartbeat small { display: block; }
.task-center-heartbeat strong { color: #bfeede; font-size: 11px; }
.task-center-heartbeat small { margin-top: 4px; color: #6f92a4; font-size: 9px; }
.task-center-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.task-center-metrics article { min-height: 104px; padding: 15px 17px; border: 1px solid var(--os-border); border-radius: 11px; background: linear-gradient(145deg, rgba(17, 33, 54, .92), rgba(10, 22, 37, .95)); }
.task-center-metrics small, .task-center-metrics strong, .task-center-metrics span { display: block; }
.task-center-metrics small { color: #7890ac; font-size: 9px; font-weight: 800; }
.task-center-metrics strong { margin-top: 10px; color: #e5edf8; font-size: 26px; line-height: 1; }
.task-center-metrics span { margin-top: 10px; color: #667d97; font-size: 9px; }
.task-center-metrics .metric-blue strong { color: #78a5ff; }
.task-center-metrics .metric-amber strong { color: #f5ba61; }
.task-center-metrics .metric-red { border-color: rgba(255, 95, 109, .2); }
.task-center-metrics .metric-red strong { color: #ff7583; }
.task-center-metrics .metric-green strong { color: #55d9b2; }
.task-center-board { padding: 0; overflow: hidden; }
.task-center-toolbar { display: grid; grid-template-columns: minmax(270px, 1fr) 155px 165px auto; gap: 10px; align-items: end; padding: 13px; border-bottom: 1px solid var(--os-border); }
.task-center-toolbar > label { display: grid; gap: 5px; color: #6e86a1; font-size: 9px; font-weight: 800; }
.task-center-toolbar select, .task-center-toolbar .compact-button { min-height: 38px; color: #c4d2e4; border: 1px solid var(--os-border); border-radius: 8px; background: rgba(8, 19, 33, .78); }
.task-center-toolbar select { padding: 0 10px; }
.task-center-toolbar .compact-button { padding: 0 15px; cursor: pointer; }
.task-center-search { width: 100%; min-height: 38px; }
.task-center-search input { width: 100%; }
.task-control-layout { display: grid; grid-template-columns: minmax(700px, 1.45fr) minmax(330px, .55fr); min-height: 540px; }
.task-table-wrap { min-width: 0; overflow: auto; border-right: 1px solid var(--os-border); }
.task-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.task-table th { padding: 11px 13px; color: #657f9f; background: rgba(8, 19, 33, .42); font-size: 9px; text-align: left; white-space: nowrap; }
.task-table th:nth-child(1) { width: 28%; }
.task-table th:nth-child(2) { width: 11%; }
.task-table th:nth-child(3) { width: 16%; }
.task-table th:nth-child(4) { width: 23%; }
.task-table th:nth-child(5) { width: 15%; }
.task-table th:nth-child(6) { width: 7%; }
.task-table td { padding: 12px 13px; border-top: 1px solid rgba(134, 166, 207, .1); color: #aebfd2; font-size: 10px; vertical-align: middle; }
.task-table-row { transition: background .16s ease; }
.task-table-row:hover, .task-table-row.selected { background: rgba(84, 141, 255, .07); }
.task-table-row.selected { box-shadow: inset 3px 0 #548dff; }
.task-identity strong, .task-identity small, .task-step strong, .task-step small { display: block; }
.task-identity strong { margin-top: 7px; color: #d9e5f3; font-size: 11px; line-height: 1.45; }
.task-identity small { overflow: hidden; margin-top: 5px; color: #667e99; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.task-kind, .task-state { display: inline-flex; align-items: center; min-height: 20px; padding: 0 8px; border: 1px solid transparent; border-radius: 999px; font-size: 8px; font-weight: 900; white-space: nowrap; }
.task-kind.kind-sourcing { color: #81aaff; border-color: rgba(84, 141, 255, .22); background: rgba(84, 141, 255, .11); }
.task-kind.kind-editing { color: #d5a7ff; border-color: rgba(176, 108, 255, .22); background: rgba(176, 108, 255, .1); }
.task-kind.kind-combined { color: #65dbb7; border-color: rgba(41, 214, 160, .23); background: rgba(41, 214, 160, .1); }
.task-state.state-active { color: #83aaff; border-color: rgba(84, 141, 255, .24); background: rgba(84, 141, 255, .11); }
.task-state.state-waiting { color: #f4bf71; border-color: rgba(245, 186, 97, .22); background: rgba(245, 186, 97, .1); }
.task-state.state-failed { color: #ff8792; border-color: rgba(255, 95, 109, .24); background: rgba(255, 95, 109, .1); }
.task-state.state-completed { color: #63ddb8; border-color: rgba(41, 214, 160, .24); background: rgba(41, 214, 160, .1); }
.task-state.state-idle { color: #91a3b7; border-color: rgba(134, 166, 207, .18); background: rgba(134, 166, 207, .07); }
.task-progress { display: grid; gap: 5px; min-width: 86px; }
.task-progress > span { display: block; height: 4px; overflow: hidden; border-radius: 999px; background: rgba(134, 166, 207, .12); }
.task-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #548dff, #29d6a0); }
.task-progress small { color: #6f86a1; font-size: 8px; }
.task-step strong { color: #aebfd2; font-size: 9px; line-height: 1.45; }
.task-step small { margin-top: 5px; color: #ff7c88; font-size: 8px; }
.task-table time { color: #7187a0; font-size: 9px; }
.task-open-button { min-height: 27px; padding: 0 9px; border: 1px solid rgba(84, 141, 255, .22); border-radius: 7px; color: #89adf7; background: rgba(84, 141, 255, .08); cursor: pointer; }
.task-detail { min-width: 0; padding: 18px; background: rgba(8, 19, 33, .34); }
.task-detail-empty { display: grid; min-height: 250px; place-content: center; text-align: center; }
.task-detail-empty strong { color: #bdcbdd; }
.task-detail-empty p { max-width: 250px; color: #657c97; font-size: 10px; line-height: 1.6; }
.task-detail-empty.error strong, .empty-state.error { color: #ff8792; }
.task-detail-header { display: flex; justify-content: space-between; gap: 14px; align-items: start; }
.task-detail-header h2 { margin: 8px 0 0; color: #dce8f6; font-size: 17px; line-height: 1.4; }
.task-detail-header p { margin: 5px 0 0; color: #627a96; font-size: 8px; word-break: break-all; }
.task-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.task-facts > div { padding: 10px; border: 1px solid rgba(134, 166, 207, .11); border-radius: 8px; background: rgba(17, 33, 54, .52); }
.task-facts dt { color: #627d9f; font-size: 8px; font-weight: 800; }
.task-facts dd { margin: 5px 0 0; color: #b9cadc; font-size: 9px; line-height: 1.45; word-break: break-word; }
.task-error-box { margin: 13px 0; padding: 12px; border: 1px solid rgba(255, 95, 109, .25); border-radius: 9px; background: rgba(88, 19, 31, .22); }
.task-error-box strong { color: #ff8792; font-size: 10px; }
.task-error-box p { margin: 6px 0 0; color: #d9989e; font-size: 9px; line-height: 1.55; }
.task-detail-section { padding: 14px 0; border-top: 1px solid rgba(134, 166, 207, .1); }
.task-detail-section h3 { margin: 0 0 10px; color: #aebfd2; font-size: 10px; }
.task-detail-section h3 small { color: #647b96; font-weight: 500; }
.task-acceptance { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.task-acceptance li { display: flex; justify-content: space-between; gap: 12px; color: #8196ae; font-size: 9px; }
.task-acceptance strong.pass { color: #58d6b0; }
.task-acceptance strong.blocked { color: #ff7f8b; }
.task-acceptance strong.unknown { color: #71869e; }
.task-recovery-button { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border: 1px solid rgba(41, 214, 160, .26); border-radius: 8px; color: #6adfbb; background: rgba(24, 105, 89, .18); font-size: 9px; font-weight: 900; text-decoration: none; cursor: pointer; }
.task-recovery-button:disabled { opacity: .45; cursor: wait; }
.task-no-action, .task-action-feedback { margin: 6px 0 0; color: #6f849e; font-size: 9px; line-height: 1.5; }
.task-timeline { display: grid; gap: 0; max-height: 330px; overflow: auto; margin: 0; padding: 0; list-style: none; }
.task-timeline li { display: grid; grid-template-columns: 8px 1fr auto; gap: 8px; padding: 8px 0; border-bottom: 1px solid rgba(134, 166, 207, .08); }
.timeline-dot { width: 6px; height: 6px; margin-top: 3px; border-radius: 50%; background: #548dff; box-shadow: 0 0 0 3px rgba(84, 141, 255, .1); }
.task-timeline strong, .task-timeline small { display: block; }
.task-timeline strong { color: #9fb2c8; font-size: 9px; }
.task-timeline small { margin-top: 4px; color: #687f99; font-size: 8px; line-height: 1.45; }
.task-timeline time { color: #5e7590; font-size: 8px; }
.task-center-board .empty-state { padding: 34px 14px; color: #657c97; font-size: 10px; text-align: center; }

/* Persisted light theme keeps the same shell and route structure. */
[data-theme="light"] .dashboard-page {
  --os-bg: #eef3f8;
  --os-panel: #ffffff;
  --os-panel-2: #f7f9fc;
  --os-border: rgba(55, 78, 105, .16);
  --os-text: #162438;
  --os-muted: #60748b;
  color: var(--os-text);
  background: radial-gradient(circle at 60% -20%, rgba(85, 142, 239, .15), transparent 34rem), #eef3f8;
}
[data-theme="light"] .os-sidebar { background: rgba(246, 249, 252, .98); box-shadow: 8px 0 28px rgba(43, 67, 96, .07); }
[data-theme="light"] .os-brand-mark { color: #fff; }
[data-theme="light"] .os-nav a { color: #566d87; }
[data-theme="light"] .os-nav a:hover { color: #1d3552; background: rgba(62, 111, 189, .08); }
[data-theme="light"] .os-nav a.active { color: #15365e; background: linear-gradient(90deg, rgba(82, 134, 228, .18), rgba(75, 124, 209, .07)); }
[data-theme="light"] .os-topbar { background: rgba(248, 251, 254, .9); }
[data-theme="light"] .os-module-heading strong { color: #162438; }
[data-theme="light"] .os-theme-toggle,
[data-theme="light"] .dashboard-page .status-pill,
[data-theme="light"] .dashboard-page .account-chip,
[data-theme="light"] .dashboard-page .policy-badge { color: #425a73; background: rgba(255, 255, 255, .9); }
[data-theme="light"] .os-panel,
[data-theme="light"] .os-module-page .card,
[data-theme="light"] .os-module-page .system-module-root { color: #162438; background: linear-gradient(145deg, #fff, #f8fafc); box-shadow: 0 14px 38px rgba(43, 67, 96, .08); }
[data-theme="light"] .os-metric-card { background: linear-gradient(145deg, #fff, #f7f9fc); }
[data-theme="light"] .os-metric-card strong,
[data-theme="light"] .os-module-page .section-heading h2,
[data-theme="light"] .os-module-page .mini-heading h3,
[data-theme="light"] .os-module-page legend,
[data-theme="light"] .os-module-page .form-header h3 { color: #162438; }
[data-theme="light"] .os-quick-task,
[data-theme="light"] .dashboard-page .active-task-row,
[data-theme="light"] .os-state-summary > div,
[data-theme="light"] .agent-card,
[data-theme="light"] .agent-detail,
[data-theme="light"] .agent-detail dl > div,
[data-theme="light"] .system-detail-grid article,
[data-theme="light"] .task-center-module-card,
[data-theme="light"] .os-module-page .choice-card,
[data-theme="light"] .os-module-page .mode-card,
[data-theme="light"] .os-module-page .copy-actions,
[data-theme="light"] .os-module-page .policy-item,
[data-theme="light"] .os-module-page .dimension-role,
[data-theme="light"] .os-module-page .multi-category-panel,
[data-theme="light"] .os-module-page .category-tree-domain,
[data-theme="light"] .os-module-page .multi-category-group { color: #22344a; background: #fff; }
[data-theme="light"] .os-module-page .field input,
[data-theme="light"] .os-module-page .field select,
[data-theme="light"] .os-module-page .field textarea,
[data-theme="light"] .os-module-page .dimension-inputs input,
[data-theme="light"] .os-module-page .category-picker-button,
[data-theme="light"] .os-module-page .compact-button,
[data-theme="light"] .os-module-page .secondary-button,
[data-theme="light"] .os-module-page .operation-window-note button { color: #22344a; background: #fff; }
[data-theme="light"] .os-module-page .category-picker-panel { color: #22344a; background: #fff; }
[data-theme="light"] .os-module-page .category-picker-search-row input,
[data-theme="light"] .os-module-page .category-cascade { color: #22344a; background: #fff; }
[data-theme="light"] .os-module-page .category-cascade-option { color: #42566d; }
[data-theme="light"] .os-module-page .category-cascade-leaf.category-available { color: #111827; background: #fff; }
[data-theme="light"] .os-module-page .category-cascade-leaf.category-available > button span { color: #111827; }
[data-theme="light"] .os-module-page .category-cascade-leaf.category-unavailable { color: #9ca3af; background: #f5f6f7; }
[data-theme="light"] .os-module-page .category-cascade-leaf.category-unavailable > button span,
[data-theme="light"] .os-module-page .category-cascade-leaf.category-unavailable > button small,
[data-theme="light"] .os-module-page .category-cascade-leaf.category-unavailable .category-state-label { color: #9ca3af; }
[data-theme="light"] .os-module-page .category-tree-domain > summary,
[data-theme="light"] .os-module-page .category-tree-option { color: #42566d; }
[data-theme="light"] .os-health-ring { background: radial-gradient(circle at center, #fff 56%, transparent 57%), conic-gradient(var(--os-green) 0 78%, rgba(78, 107, 142, .15) 78% 100%); }
[data-theme="light"] .task-center-intro { background: linear-gradient(115deg, #eaf2ff, #f8fbff 58%, #e9f7f3); }
[data-theme="light"] .task-center-intro h2,
[data-theme="light"] .task-center-heading h1,
[data-theme="light"] .task-center-metrics strong,
[data-theme="light"] .task-identity strong,
[data-theme="light"] .task-detail-header h2 { color: #162438; }
[data-theme="light"] .task-center-heartbeat,
[data-theme="light"] .task-center-metrics article,
[data-theme="light"] .task-facts > div { background: #fff; }
[data-theme="light"] .task-center-toolbar select,
[data-theme="light"] .task-center-toolbar .compact-button { color: #304760; background: #fff; }
[data-theme="light"] .task-table th { background: #f4f7fb; }
[data-theme="light"] .task-table td,
[data-theme="light"] .task-step strong { color: #435a73; }
[data-theme="light"] .task-detail { background: #f8fafc; }
[data-theme="light"] .task-facts dd { color: #344a62; }

@media (max-width: 1100px) {
  .os-module-page .workspace,
  .os-module-page .workspace.sourcing-workspace { grid-template-columns: 1fr; }
  .system-detail-grid.five-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-center-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .task-control-layout { grid-template-columns: 1fr; }
  .task-table-wrap { border-right: 0; border-bottom: 1px solid var(--os-border); }
}
@media (max-width: 820px) {
  .agent-workbench, .system-detail-grid { grid-template-columns: 1fr; }
  .os-module-hero > a { display: none; }
  .task-center-intro { align-items: start; flex-direction: column; }
  .task-center-heartbeat { width: 100%; }
  .task-center-toolbar { grid-template-columns: 1fr 1fr; }
  .task-center-search { grid-column: 1 / -1; }
  .task-center-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-table-wrap { max-width: 100%; }
  .task-table { min-width: 820px; }
}
@media (max-width: 520px) {
  .task-center-toolbar, .task-center-metrics, .task-facts { grid-template-columns: 1fr; }
  .task-center-search { grid-column: auto; }
}
