@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/variable/pretendardvariable-dynamic-subset.css");

:root {
  font-family: "Pretendard Variable", Pretendard, SUIT, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #12355b;
  background: #f4f7fb;
  --ink: #12355b;
  --muted: #71839b;
  --line: #dce7f4;
  --paper: #fff;
  --deep: #102f61;
  --blue: #2f6fd3;
  --soft: #e7f0ff;
  --coral: #f07863;
  --yellow: #f4c95d;
  --shadow: 0 16px 40px rgba(18, 53, 91, .11);
}
* { box-sizing: border-box; }
img, svg, canvas, video { max-width: 100%; }
html, body { max-width: 100%; overflow-x: hidden; }
body { margin: 0; background: radial-gradient(circle at 85% 0, #e7f0ff 0, transparent 32%), #f4f7fb; font-weight: 600; letter-spacing: 0; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
body, button, input, select, textarea { overflow-wrap: anywhere; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, strong, b, .primary, .primary-button, .nav, .connection, .state, .text-button { font-weight: 900; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 520px; min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 28px; padding: 42px; box-shadow: 0 24px 60px rgba(18, 53, 91, .14); }
.login-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 15px; background: var(--deep); color: #fff; font-weight: 900; font-size: 27px; }
.brand-logo { display: block; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 13px; object-fit: cover; box-shadow: 0 7px 18px rgba(25, 103, 192, .22); }
.brand strong { display: block; font-size: 19px; letter-spacing: 0; }
.brand small { display: block; margin-top: 3px; color: #8294ab; font-size: 11px; }
.eyebrow { margin: 0 0 9px; color: var(--blue); font-size: 11px; font-weight: 900; letter-spacing: 0; }
.eyebrow.coral { color: var(--coral); }
.login-card h1 { margin: 54px 0 14px; color: #071f3f; font-size: 35px; line-height: 1.17; letter-spacing: 0; }
.security-stage { margin-top: 48px; }
.security-stage > .eyebrow { margin-bottom: 0; }
.security-stage h1 { margin-top: 12px; }
.password-rule { margin: 22px 0; padding: 13px 15px; border: 1px solid #cfe0f5; border-radius: 12px; background: #f5f9ff; color: #4d6684; font-size: 11px; line-height: 1.6; font-weight: 800; }
.login-back { border: 0; background: transparent; color: #71839b; padding: 4px; font-size: 11px; font-weight: 800; }
.security-steps { display: grid; gap: 8px; margin: 21px 0; padding-left: 22px; color: #4d6684; font-size: 12px; line-height: 1.55; }
.qr-box { display: grid; place-items: center; width: 100%; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.qr-box img { width: 220px; height: 220px; object-fit: contain; }
.manual-secret { margin: 12px 0 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #f8fbff; color: #4d6684; font-size: 11px; }
.manual-secret summary { cursor: pointer; font-weight: 900; }
.manual-secret span, .manual-secret code { display: block; margin-top: 10px; }
.manual-secret code { overflow-wrap: anywhere; color: var(--ink); font-size: 12px; font-weight: 900; letter-spacing: 0; }
.otp-input { text-align: center; font-size: 25px; font-weight: 900; letter-spacing: 8px; font-variant-numeric: tabular-nums; }
.security-dialog { width: min(440px, calc(100vw - 32px)); border: 0; border-radius: 20px; padding: 0; color: var(--ink); box-shadow: 0 30px 80px rgba(7, 31, 63, .28); }
.security-dialog::backdrop { background: rgba(7, 31, 63, .58); backdrop-filter: blur(3px); }
.security-dialog form { padding: 28px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dialog-head h2 { margin: 0; font-size: 22px; }
.dialog-head .icon-button { position: static; }
.muted, .top-note { color: #5f728b; line-height: 1.65; font-weight: 700; }
.login-scope { display: grid; gap: 5px; margin: 28px 0 24px; padding: 15px 16px; border-left: 3px solid var(--blue); background: #eef5ff; border-radius: 0 13px 13px 0; color: #4d6684; font-size: 12px; }
.login-scope b { color: var(--ink); }
.login-scope small { color: #8294ab; }
.resource-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: -8px 0 22px; }
.resource-links a { display: grid; place-items: center; min-height: 38px; border: 1px solid var(--line); border-radius: 10px; background: #f8fbff; color: var(--ink); font-size: 11px; font-weight: 900; text-decoration: none; text-align: center; }
.resource-links a:hover { border-color: var(--blue); color: var(--blue); }
form { display: grid; gap: 14px; }
label { display: grid; gap: 7px; color: #4d6684; font-size: 12px; font-weight: 800; }
input, select, textarea { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 12px 13px; color: var(--ink); outline: none; }
textarea { min-height: 86px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 111, 211, .14); }
.primary, .primary-button, .primary-link { border: 0; border-radius: 12px; background: var(--deep); color: #fff; padding: 13px 16px; font-weight: 900; text-decoration: none; text-align: center; }
.danger-button { border: 1px solid #f1c6bd; border-radius: 10px; background: #fff5f2; color: #ad4f42; padding: 9px 12px; font-size: 11px; font-weight: 900; }
.danger-button:disabled { opacity: .55; cursor: progress; }
.message { min-height: 18px; margin: 0; color: #be4f3d; font-size: 12px; }
.message.ok { color: #22775d; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { position: sticky; top: 0; height: 100vh; width: 248px; flex: 0 0 248px; padding: 27px 17px; background: var(--deep); color: #d7e8ff; display: flex; flex-direction: column; gap: 25px; }
.sidebar .brand strong { color: #fff; }
.sidebar .brand small { color: #b0c8e6; }
.scope-badge { display: flex; gap: 10px; align-items: center; padding: 12px; border: 1px solid #31598d; border-radius: 14px; background: #183d78; }
.scope-badge b, .scope-badge small { display: block; }
.scope-badge b { font-size: 12px; color: #fff; }
.scope-badge small { margin-top: 3px; color: #b0c8e6; font-size: 10px; }
.signal, .connection i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: #55d9a2; box-shadow: 0 0 0 4px rgba(85, 217, 162, .1); }
.sidebar nav { display: grid; gap: 4px; }
.nav { display: flex; align-items: center; gap: 12px; border: 0; background: transparent; color: #b0c8e6; text-align: left; padding: 13px 12px; border-radius: 11px; font-size: 12px; font-weight: 800; }
.nav span { width: 22px; color: #8eb1df; font-size: 10px; }
.nav.active, .nav:hover { background: #255da8; color: #fff; }
.nav.active span { color: #d4e7ff; }
.sidebar-foot { display: grid; gap: 15px; margin-top: auto; }
.sidebar-foot a, .quiet { border: 0; background: transparent; color: #b0c8e6; text-decoration: none; text-align: left; font-size: 11px; padding: 0; }
.quiet:hover, .sidebar-foot a:hover { color: #fff; }
.content { width: 100%; max-width: 1440px; min-width: 0; padding: 34px 48px 60px; }
.topbar { display: flex; justify-content: space-between; gap: 25px; align-items: flex-start; margin-bottom: 29px; }
.topbar h1 { margin: 0 0 7px; font-size: 33px; letter-spacing: 0; }
.top-note { margin: 0; font-size: 13px; }
.top-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
.theme-switcher { display: inline-grid; grid-template-columns: repeat(3, auto); gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.theme-switcher button { min-height: 29px; border: 0; border-radius: 7px; padding: 5px 8px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 900; white-space: nowrap; }
.theme-switcher button.active { background: var(--deep); color: #fff; }
.connection { display: inline-flex; align-items: center; gap: 8px; border-radius: 30px; padding: 10px 13px; background: #e8f1ff; color: #245da9; font-size: 11px; font-weight: 900; white-space: nowrap; }
.connection.checking { background: #f6efd9; color: #967122; }
.connection.error { background: #fde5df; color: #ad4f42; }
.refresh { border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); padding: 9px 12px; font-size: 16px; }
.refresh span { font-size: 11px; font-weight: 800; }
.view { display: grid; gap: 20px; }
.hero-strip { display: flex; align-items: center; justify-content: space-between; overflow: hidden; min-width: 0; min-height: 222px; padding: 32px 40px; border-radius: 24px; background: var(--deep); color: #e7f6ff; box-shadow: var(--shadow); }
.hero-strip h2 { margin: 0; font-size: 32px; line-height: 1.25; letter-spacing: 0; }
.hero-strip h2 em { color: #a8d1ff; font-style: normal; }
.hero-strip p:not(.eyebrow) { color: #d0def0; font-size: 13px; font-weight: 700; }
.hero-orbit { position: relative; flex: 0 0 160px; width: 160px; height: 160px; display: grid; place-items: center; margin-right: 22px; border: 1px solid #6b95d0; border-radius: 50%; background: radial-gradient(circle, #2c5fa9 0 28%, transparent 29%); }
.hero-orbit:before, .hero-orbit:after { content: ""; position: absolute; border: 1px solid #6b95d0; border-radius: 50%; inset: 19px; transform: rotate(35deg); }
.hero-orbit:after { inset: 35px; transform: rotate(-35deg); }
.hero-orbit b { font-size: 38px; color: #fff; z-index: 1; }
.hero-orbit span, .hero-orbit i { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--coral); top: 19px; left: 67px; z-index: 2; }
.hero-orbit i { background: var(--yellow); top: auto; left: auto; right: 8px; bottom: 43px; }
.kpis, .stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-strip { grid-template-columns: repeat(5, 1fr); gap: 10px; }
.kpi, .stat-item { min-width: 0; min-height: 128px; padding: 19px; background: #fff; border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow); }
.stat-item { min-height: auto; padding: 14px 15px; background: #f8fbff; border-radius: 13px; }
.kpi small, .kpi span, .stat-item span, .stat-item small { display: block; color: #5f728b; font-size: 12px; font-weight: 700; }
.stat-item span, .stat-item small { font-size: 11px; }
.kpi strong { display: block; margin: 12px 0 8px; color: var(--ink); font-size: 29px; letter-spacing: 0; }
.stat-item strong { display: block; margin: 7px 0 4px; color: var(--ink); font-size: 22px; letter-spacing: 0; }
.kpi em { font-style: normal; color: var(--blue); font-size: 11px; font-weight: 900; }
.dashboard-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 20px; }
.solo-work-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.solo-work-grid button { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 11px; min-width: 0; min-height: 82px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #f8fbff; color: var(--ink); text-align: left; }
.solo-work-grid button:hover { border-color: var(--blue); background: var(--soft); }
.solo-work-grid button > .work-step { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--deep); color: #fff; font-size: 12px; font-weight: 900; }
.solo-work-grid b, .solo-work-grid small { display: block; }
.solo-work-grid b { font-size: 13px; }
.solo-work-grid small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.solo-work-grid strong { color: var(--blue); font-size: 22px; }
.panel { min-width: 0; padding: 23px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.operational-panel { padding-bottom: 18px; }
.panel-head, .guardian-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; margin-bottom: 20px; min-width: 0; }
.panel-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.panel h2, .section-intro h2 { margin: 0; font-size: 20px; letter-spacing: 0; }
.panel-description { margin: 8px 0 0; color: #5f728b; font-size: 12px; line-height: 1.6; font-weight: 700; }
.panel-meta, .read-only { color: #91a2b8; font-size: 10px; font-weight: 800; }
.flow { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 29px 0 17px; }
.flow div { display: grid; gap: 4px; min-width: 0; }
.flow b { color: var(--coral); font-size: 10px; }
.flow strong { font-size: 13px; }
.flow small { color: var(--muted); font-size: 10px; }
.flow > span { color: #b1c1bb; }
.quick-signals, .summary-list, .table-list, .timeline, .admin-list { display: grid; gap: 11px; }
.admin-list { gap: 0; margin-top: 12px; border-top: 1px solid #edf2ef; }
.signal-row, .summary-row, .timeline-row, .admin-record { display: flex; justify-content: space-between; gap: 15px; align-items: center; min-width: 0; padding: 11px 0; border-bottom: 1px solid #edf2ef; font-size: 12px; }
.admin-record { gap: 16px; padding: 13px 0; }
.signal-row:last-child, .summary-row:last-child, .timeline-row:last-child, .admin-record:last-child { border-bottom: 0; }
.signal-row small, .summary-row small, .timeline-row small, .admin-record small { display: block; margin-top: 4px; color: #5f728b; font-size: 11px; line-height: 1.5; font-weight: 700; }
.admin-record b { display: block; font-size: 11px; line-height: 1.4; }
.state { font-size: 10px; font-weight: 900; color: var(--blue); white-space: nowrap; }
.state.warn { color: #bd7d1e; }
.text-button { border: 0; background: transparent; color: var(--blue); padding: 0; font-size: 11px; font-weight: 900; text-decoration: none; }
.section-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding: 7px 2px 9px; }
.section-intro p:not(.eyebrow) { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.card-grid, .region-grid, .guardian-grid, .playbook-grid, .slot-board, .inquiry-board, .spec-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.guardian-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
.playbook-grid, .slot-board { grid-template-columns: repeat(4, 1fr); gap: 10px; }
.inquiry-board { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.spec-board { gap: 10px; }
.review-card, .region-card, .playbook-grid div, .slot-board div, .inquiry-board div, .spec-board div { min-width: 0; padding: 19px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.review-card .card-label { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10px; }
.review-card h3 { margin: 24px 0 8px; font-size: 16px; letter-spacing: 0; }
.review-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.badge { display: inline-block; padding: 5px 8px; border-radius: 20px; background: #e9f2ff; color: #245da9; font-size: 10px; font-weight: 900; }
.badge.warn { background: #fff2d7; color: #9a731e; }
.badge.off { background: #edf1ef; color: #73817c; }
.region-card h3 { margin: 0 0 16px; font-size: 16px; }
.region-card.empty { border-color: #f2c7bd; background: #fffafa; }
.region-card.empty h3 { color: #8f372b; }
.region-meter { height: 9px; border-radius: 20px; background: #e5ece8; overflow: hidden; margin: 12px 0; }
.region-meter i { display: block; width: 56%; height: 100%; background: var(--blue); border-radius: 20px; }
.region-card.empty .region-meter i { background: var(--coral); width: 12%; }
.region-numbers { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }
.region-numbers b { color: var(--ink); font-size: 18px; }
.notice-panel { padding: 19px 22px; background: #fff7e6; border: 1px solid #f1dfb1; border-radius: 16px; color: #876b2e; }
.notice-panel b { font-size: 12px; }
.notice-panel p { margin: 7px 0 0; font-size: 11px; line-height: 1.7; }
.paid-mark { padding: 8px 10px; background: #fff0d5; color: #9b731c; border-radius: 20px; font-size: 10px; font-weight: 900; }
.timeline-row { align-items: flex-start; }
.timeline-row time { color: #98a8a1; font-size: 10px; white-space: nowrap; }
.timeline-row b { font-size: 12px; }
.timeline-row p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.guardian-panel { background: var(--deep); color: #e5f3ff; }
.guardian-panel .eyebrow { color: #a8d1ff; }
.guardian-panel .panel-meta { color: #b0c8e6; }
.guardian-item { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 16px; border: 1px solid #31598d; border-radius: 14px; background: #183d78; }
.guardian-item small { display: block; color: #b0c8e6; font-size: 10px; margin-top: 4px; }
.guardian-status { display: inline-flex; align-items: center; gap: 7px; color: #9cd4ff; font-size: 11px; font-weight: 900; white-space: nowrap; }
.guardian-status.warn { color: #f0ba68; }
.guardian-status.error { color: #f28b78; }
.guardian-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.error-panel { min-height: 100px; }
.empty-state { color: var(--muted); font-size: 12px; }
.error-item { padding: 13px; border-radius: 12px; background: #fff0ec; color: #9d4d40; font-size: 11px; }
.error-item b { display: block; margin-bottom: 5px; }
.item-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 4px; }
.item-form .wide-field { grid-column: 1 / -1; }
.item-form small { color: #9aa9a3; font-weight: 600; }
.item-form .primary-button { align-self: end; }
.scope-note { color: #b0c8e6; font-size: 10px; line-height: 1.5; }
.inline-control { display: block; min-width: 108px; }
.inline-control select, .inline-control input { display: block; width: 100%; margin-top: 4px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-size: 10px; font-weight: 800; }
.module-controls { display: grid; grid-template-columns: repeat(2, minmax(88px, 1fr)); gap: 6px; min-width: 190px; }
.module-controls select { padding: 8px 7px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-size: 10px; font-weight: 800; }
.playbook-panel { background: #fff; }
.playbook-grid div { min-height: 118px; border-left: 4px solid var(--blue); background: #f8fbff; padding: 15px; }
.playbook-grid b, .slot-board b, .inquiry-board b, .spec-board b { display: block; color: var(--ink); font-size: 13px; }
.playbook-grid span, .slot-board span, .inquiry-board span, .spec-board span { display: block; margin-top: 8px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.playbook-grid span { margin-top: 14px; font-size: 11px; line-height: 1.65; }
.ad-slot-program { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ad-slot-card { min-height: 152px; display: flex; flex-direction: column; }
.ad-slot-card .ad-tag { margin: 0 0 10px; color: var(--coral); font-size: 10px; font-weight: 900; letter-spacing: 0; }
.ad-slot-card small { display: block; margin-top: 10px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.ad-slot-card code { display: inline-block; width: fit-content; margin-top: auto; padding: 4px 6px; border-radius: 6px; background: #e8f1ff; color: var(--blue); font-size: 9px; font-weight: 900; }
.ad-placeholder-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ad-placeholder { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-width: 0; padding: 16px 18px; border: 1px dashed #a8bfde; border-radius: 15px; background: linear-gradient(135deg, #f8fbff, #eef5ff); color: var(--ink); }
.ad-placeholder span { display: inline-block; margin-bottom: 8px; padding: 5px 8px; border-radius: 999px; background: #fff; color: var(--blue); font-size: 10px; font-weight: 900; }
.ad-placeholder b, .ad-placeholder small { display: block; }
.ad-placeholder small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.ad-placeholder em { flex: 0 0 auto; font-style: normal; color: #91a2b8; font-size: 10px; font-weight: 900; }
.ad-placeholder.filled { border-style: solid; border-color: #b7dfcc; background: linear-gradient(135deg, #f8fffb, #eaf8f0); }
.ad-placeholder.filled span { color: #22775d; }
.approval-automation-panel {
  border-left: 4px solid var(--blue);
}
.automation-grid {
  display: grid;
  grid-template-columns: minmax(260px, .45fr) minmax(0, .55fr);
  gap: 14px;
  align-items: start;
}
.automation-counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.automation-counts div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}
.automation-counts span,
.automation-counts strong {
  display: block;
}
.automation-counts span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.automation-counts strong {
  margin-top: 5px;
  color: var(--ink);
  font-size: 22px;
}
.automation-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.automation-form .wide-field {
  grid-column: 1 / -1;
}
.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  color: var(--ink);
}
.checkline input {
  width: 16px;
  height: 16px;
  padding: 0;
}
.automation-queues {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.automation-queues section {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.automation-queues h3 {
  margin: 0 0 9px;
  color: var(--ink);
  font-size: 12px;
}
.automation-queues p {
  margin: 0;
  padding: 7px 0;
  border-top: 1px solid #e8edef;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}
.muted-line {
  color: #91a2b8 !important;
}
.data-lock-board div { border-left: 4px solid var(--blue); background: #f8fbff; }
.media-spec-board div { border-left: 4px solid var(--coral); background: #fffdfb; }
.room-hero { display: flex; justify-content: space-between; gap: 24px; align-items: center; min-height: 138px; padding: 24px 26px; border-radius: 18px; background: #102f61; color: #fff; box-shadow: var(--shadow); }
.room-hero b { display: block; font-size: 24px; letter-spacing: 0; }
.room-hero p { margin: 8px 0 0; color: #b8cae2; font-size: 12px; line-height: 1.65; }
.room-hero span { white-space: nowrap; background: #e9f2ff; color: #245da9; border-radius: 20px; padding: 8px 10px; font-size: 10px; font-weight: 900; }
.room-label { margin: 0 0 4px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.room-updated { display: block; margin-top: 10px; color: #91a2b8; font-size: 10px; }
.room-admin-panel { border-left: 4px solid var(--blue); }
.room-admin-panel .primary-button { background: #1f66c2; }
.lead-panel { border-left: 4px solid var(--coral); }
.lead-panel .primary-button { background: #12355b; }
html[data-theme="comfort"] {
  --ink: #173c45;
  --muted: #637b78;
  --line: #d5e1dc;
  --paper: #fbfcfa;
  --deep: #174c5b;
  --blue: #287d82;
  --soft: #e4f0ec;
  --coral: #c86e5d;
  --shadow: 0 14px 34px rgba(23, 60, 69, .09);
  color: var(--ink);
  background: #edf3ef;
}
html[data-theme="comfort"] body { background: #edf3ef; }
html[data-theme="comfort"] .login-scope,
html[data-theme="comfort"] .stat-item,
html[data-theme="comfort"] .playbook-grid div,
html[data-theme="comfort"] .data-lock-board div { background: #edf5f1; }
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e7eef8;
  --muted: #9eb0c7;
  --line: #2a3b52;
  --paper: #142235;
  --deep: #0a2d58;
  --blue: #69a7ff;
  --soft: #1c3552;
  --coral: #ff927e;
  --yellow: #e7c36b;
  --shadow: 0 16px 40px rgba(0, 0, 0, .28);
  color: var(--ink);
  background: #0c1624;
}
html[data-theme="dark"] body { background: #0c1624; color: var(--ink); }
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .kpi,
html[data-theme="dark"] .stat-item,
html[data-theme="dark"] .review-card,
html[data-theme="dark"] .region-card,
html[data-theme="dark"] .playbook-grid div,
html[data-theme="dark"] .slot-board div,
html[data-theme="dark"] .inquiry-board div,
html[data-theme="dark"] .spec-board div,
html[data-theme="dark"] .theme-switcher,
html[data-theme="dark"] .refresh { background: var(--paper); border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea { background: #0e1a2a; border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] .login-card h1,
html[data-theme="dark"] .kpi strong,
html[data-theme="dark"] .stat-item strong,
html[data-theme="dark"] .panel h2,
html[data-theme="dark"] .section-intro h2,
html[data-theme="dark"] .playbook-grid b,
html[data-theme="dark"] .slot-board b,
html[data-theme="dark"] .inquiry-board b,
html[data-theme="dark"] .spec-board b { color: var(--ink); }
html[data-theme="dark"] .login-scope,
html[data-theme="dark"] .password-rule,
html[data-theme="dark"] .manual-secret,
html[data-theme="dark"] .stat-item,
html[data-theme="dark"] .playbook-grid div,
html[data-theme="dark"] .data-lock-board div { background: #172a41; border-color: var(--line); color: #b9c9dc; }
html[data-theme="dark"] .signal-row,
html[data-theme="dark"] .summary-row,
html[data-theme="dark"] .timeline-row,
html[data-theme="dark"] .admin-record,
html[data-theme="dark"] .admin-list { border-color: #26384d; }
html[data-theme="dark"] .security-dialog { background: var(--paper); color: var(--ink); }
html[data-theme="dark"] .automation-counts div,
html[data-theme="dark"] .automation-queues section,
html[data-theme="dark"] .checkline { background: #172a41; border-color: var(--line); }
@media (max-width: 1050px) {
  .content { padding: 28px 25px; }
  .top-actions { flex-wrap: wrap; justify-content: flex-end; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .card-grid, .region-grid, .playbook-grid, .slot-board, .spec-board, .ad-slot-program, .ad-placeholder-board { grid-template-columns: repeat(2, 1fr); }
  .stat-strip { grid-template-columns: repeat(3, 1fr); }
  .automation-grid { grid-template-columns: 1fr; }
  .automation-queues { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-orbit { margin-right: 0; }
}
@media (max-width: 720px) {
  .login-shell { display: block; padding: 24px; }
  .login-card { width: 100%; max-width: 374px; margin: 0 auto; padding: 32px 28px; border-radius: 24px; overflow: hidden; }
  .login-card h1 { margin-top: 48px; font-size: 32px; }
  .login-head { display: grid; }
  .theme-switcher { width: 100%; grid-template-columns: repeat(3, 1fr); }
  .resource-links { grid-template-columns: 1fr; }
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 18px; }
  .sidebar nav { display: flex; overflow-x: auto; }
  .nav { white-space: nowrap; }
  .sidebar-foot { display: flex; justify-content: space-between; margin-top: 0; }
  .content { padding: 22px 16px 42px; }
  .topbar { display: block; }
  .top-actions { margin-top: 15px; justify-content: space-between; flex-wrap: wrap; }
  .connection { white-space: normal; }
  .hero-strip { display: block; padding: 27px 24px; min-height: 205px; }
  .hero-strip h2 { font-size: 26px; }
  .hero-orbit { width: 110px; height: 110px; flex-basis: 110px; margin: 20px auto 0; }
  .hero-orbit b { font-size: 27px; }
  .kpis, .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .kpi strong { font-size: 24px; }
  .flow { align-items: flex-start; flex-direction: column; }
  .flow > span { transform: rotate(90deg); margin-left: 14px; }
  .card-grid, .region-grid, .guardian-grid, .playbook-grid, .slot-board, .inquiry-board, .spec-board, .ad-slot-program, .ad-placeholder-board { grid-template-columns: 1fr; }
  .automation-counts, .automation-form, .automation-queues { grid-template-columns: 1fr; }
  .automation-form .wide-field { grid-column: auto; }
  .section-intro, .panel-head, .guardian-head { display: block; }
  .read-only, .paid-mark { display: inline-block; margin-top: 12px; }
  .item-form { grid-template-columns: 1fr; }
  .item-form .wide-field { grid-column: auto; }
  .admin-record, .signal-row, .summary-row, .timeline-row { align-items: flex-start; flex-direction: column; }
  .inline-control, .module-controls { width: 100%; min-width: 0; }
  .room-hero { display: block; }
  .room-hero span { display: inline-block; margin-top: 16px; white-space: normal; }
}
@media (max-width: 520px) {
  .login-shell { padding: 16px; }
  .login-card { max-width: 360px; padding: 28px 24px; }
  .kpis, .stat-strip { grid-template-columns: 1fr; }
}

/* 2026 unified headquarters control room */
:root {
  color: #172b32;
  background: #f5f7f8;
  --ink: #172b32;
  --muted: #667980;
  --line: #d9e1e4;
  --paper: #fff;
  --deep: #173c45;
  --blue: #176f86;
  --soft: #edf5f6;
  --coral: #c84f44;
  --yellow: #d49222;
  --success: #27845f;
  --warning: #b77919;
  --danger: #c84f44;
  --shadow: 0 8px 24px rgba(23, 43, 50, .06);
}

body { background: #f5f7f8; color: var(--ink); font-weight: 500; }
h1, h2, h3, strong, b, .primary, .primary-button, .nav, .connection, .state, .text-button { font-weight: 800; }
.login-card, .panel, .review-card, .region-card, .playbook-grid div, .slot-board div, .inquiry-board div, .spec-board div,
.kpi, .stat-item, .resource-links a, input, select, textarea, .primary, .primary-button, .primary-link, .danger-button,
.scope-badge, .nav, .refresh, .connection, .notice-panel, .room-hero, .ad-placeholder { border-radius: 8px; }

.app-shell { background: #f5f7f8; }
.sidebar {
  width: 224px;
  flex-basis: 224px;
  padding: 24px 16px;
  gap: 22px;
  background: #fff;
  color: var(--ink);
  border-right: 1px solid var(--line);
}
.sidebar .brand strong { color: var(--ink); }
.sidebar .brand small, .sidebar-foot a, .quiet { color: var(--muted); }
.brand-mark { border-radius: 8px; background: var(--deep); }
.scope-badge { border-color: #cfe0dd; background: #f1f8f5; }
.scope-badge b { color: #245e49; }
.scope-badge small { color: #71867e; }
.nav { color: #52666d; padding: 12px 11px; }
.nav span { color: #94a4aa; }
.nav.active, .nav:hover { background: #eaf3f4; color: #174f5d; }
.nav.active { box-shadow: inset 3px 0 #176f86; }
.nav.active span { color: #176f86; }
.quiet:hover, .sidebar-foot a:hover { color: var(--ink); }

.content { max-width: none; padding: 28px 34px 56px; }
.topbar { margin-bottom: 22px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 28px; }
.top-note { font-size: 12px; }
.top-actions { align-self: center; }
.update-stamp { display: grid; gap: 2px; min-width: 94px; padding-right: 12px; border-right: 1px solid var(--line); }
.update-stamp span { color: var(--muted); font-size: 10px; }
.update-stamp strong { font-size: 11px; }
.connection { border: 1px solid #cfe0dd; background: #edf7f2; color: #257253; }
.connection.checking { border-color: #efdfbd; background: #fff8e9; color: #946719; }
.connection.error { border-color: #efc9c4; background: #fff2f0; color: var(--danger); }
.connection.checking i { background: var(--warning); }
.connection.error i { background: var(--danger); }
.refresh { border-color: var(--line); box-shadow: none; }

.view { gap: 16px; }
.command-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  border: 1px solid #cbdadd;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #fff;
}
.command-strip h2 { margin: 0; font-size: 23px; }
.command-strip p:not(.eyebrow) { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.command-legend { display: flex; align-items: center; gap: 13px; white-space: nowrap; }
.command-legend span { display: inline-flex; align-items: center; gap: 6px; color: #52666d; font-size: 10px; font-weight: 700; }
.command-legend i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.legend-danger { color: var(--danger) !important; }
.legend-warning { color: var(--warning) !important; }
.legend-success { color: var(--success) !important; }

.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.kpi { min-height: 104px; padding: 16px 17px; box-shadow: none; }
.kpi strong { margin: 9px 0 5px; font-size: 25px; }
.kpi em { color: var(--muted); font-weight: 700; }
.kpi[data-tone="danger"] { border-top: 3px solid var(--danger); }
.kpi[data-tone="warning"] { border-top: 3px solid var(--warning); }
.kpi[data-tone="success"] { border-top: 3px solid var(--success); }

.control-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .7fr); gap: 14px; }
.panel { padding: 20px; border-color: var(--line); box-shadow: none; }
.panel-head, .guardian-head { margin-bottom: 14px; }
.panel h2, .section-intro h2 { font-size: 18px; }
.priority-list { display: grid; border-top: 1px solid var(--line); }
.priority-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 10px 4px;
  border-bottom: 1px solid #e8edef;
  background: #fff;
  text-align: left;
}
.priority-row:last-child { border-bottom: 0; }
.priority-row button { justify-self: end; }
.priority-level { display: inline-flex; align-items: center; gap: 6px; width: fit-content; font-size: 10px; font-weight: 800; }
.priority-level i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.priority-level.danger { color: var(--danger); }
.priority-level.warning { color: var(--warning); }
.priority-level.success { color: var(--success); }
.priority-copy b, .priority-copy small { display: block; }
.priority-copy b { font-size: 12px; }
.priority-copy small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.priority-move { border: 0; background: transparent; color: var(--blue); padding: 8px; font-size: 10px; font-weight: 800; }

.stat-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.stat-item { border: 0; border-right: 1px solid var(--line); border-radius: 0; background: #fbfcfc; }
.stat-item:last-child { border-right: 0; }
.dashboard-grid { gap: 14px; }
.summary-row, .signal-row, .timeline-row, .admin-record { padding: 12px 4px; }
.summary-row, .signal-row, .timeline-row, .admin-record, .data-card, .region-card { transition: background .15s ease, border-color .15s ease; }
.summary-row[data-detail-ready], .signal-row[data-detail-ready], .timeline-row[data-detail-ready], .admin-record[data-detail-ready], .data-card[data-detail-ready], .region-card[data-detail-ready] { cursor: pointer; }
.summary-row[data-detail-ready]:hover, .signal-row[data-detail-ready]:hover, .timeline-row[data-detail-ready]:hover, .admin-record[data-detail-ready]:hover { background: #f5f9f9; }
.data-card[data-detail-ready]:hover, .region-card[data-detail-ready]:hover { border-color: #91b4bb; }

.section-intro { align-items: center; margin-top: 3px; padding: 15px 2px 8px; border-top: 1px solid var(--line); }
.section-intro:first-child { margin-top: 0; border-top: 0; }
.card-grid, .region-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.data-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.data-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.data-card h3 { margin: 13px 0 7px; font-size: 14px; }
.data-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.data-card-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; padding-top: 10px; border-top: 1px solid #e8edef; color: var(--muted); font-size: 10px; }
.status-chip { padding: 4px 7px; border-radius: 999px; background: #fff4df; color: #996714; font-size: 9px; font-weight: 800; }
.region-card { padding: 16px; box-shadow: none; }
.room-hero { min-height: 112px; padding: 20px 22px; background: #173c45; box-shadow: none; }
.room-hero b { font-size: 20px; }
.room-hero span { background: #fff; color: #174f5d; }
.guardian-panel { background: #173c45; }
.guardian-item { border-radius: 8px; border-color: #42636b; background: #214a54; }
.guardian-status { color: #77d7ad; }

.register-panel { padding: 0; overflow: hidden; }
.register-panel summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 20px; cursor: pointer; list-style: none; }
.register-panel summary::-webkit-details-marker { display: none; }
.register-panel summary span { display: grid; gap: 4px; }
.register-panel summary small { color: var(--blue); font-size: 9px; font-weight: 800; }
.register-panel summary strong { font-size: 14px; }
.register-panel summary em { color: var(--muted); font-size: 10px; font-style: normal; }
.register-panel[open] summary { border-bottom: 1px solid var(--line); background: #f8fafb; }
.details-body { padding: 20px; }

.detail-panel {
  position: fixed;
  z-index: 30;
  top: 0;
  right: 0;
  width: min(390px, 92vw);
  height: 100vh;
  padding: 24px;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: #fff;
  box-shadow: -16px 0 40px rgba(23, 43, 50, .13);
}
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.detail-head h2 { margin: 0; font-size: 21px; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); font-size: 24px; line-height: 1; }
.detail-status { display: inline-flex; margin-top: 20px; padding: 6px 9px; border-radius: 999px; background: #edf7f2; color: #267454; font-size: 10px; font-weight: 800; }
.detail-body { margin: 18px 0; color: #3f555d; font-size: 13px; line-height: 1.75; white-space: pre-line; }
.detail-meta { display: grid; gap: 0; margin: 0 0 22px; border-top: 1px solid var(--line); }
.detail-meta span { padding: 11px 0; border-bottom: 1px solid #e8edef; color: var(--muted); font-size: 11px; }
.detail-form-grid { display: grid; gap: 8px; margin-top: 14px; }
.detail-field { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid #e8edef; }
.detail-field span { padding: 0; border: 0; color: #6e8196; font-size: 10px; font-weight: 900; }
.detail-field strong { min-width: 0; color: var(--ink); font-size: 12px; line-height: 1.55; word-break: break-word; white-space: pre-wrap; }
.detail-action-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.detail-action-bar button, .detail-action-bar a, .detail-action-bar input { position: relative; z-index: 2; pointer-events: auto; }
.intake-record { align-items: flex-start; }

@media (max-width: 1100px) {
  .content { padding: 26px 24px 48px; }
  .control-layout, .dashboard-grid { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-item:nth-child(3) { border-right: 0; }
  .stat-item:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar nav { padding-bottom: 3px; }
  .nav.active { box-shadow: inset 0 -3px #176f86; }
  .topbar { display: block; }
  .top-actions { margin-top: 15px; }
  .command-strip { display: grid; padding: 19px; }
  .command-legend { white-space: normal; flex-wrap: wrap; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-item, .stat-item:nth-child(3) { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .stat-item:nth-child(2n) { border-right: 0; }
  .stat-item:last-child { border-bottom: 0; }
  .priority-row { grid-template-columns: 80px minmax(0, 1fr); }
  .priority-row button { grid-column: 2; justify-self: start; padding-left: 0; }
  .card-grid, .region-grid { grid-template-columns: 1fr; }
  .detail-panel { top: auto; bottom: 0; width: 100%; height: min(72vh, 620px); border-top: 1px solid var(--line); border-left: 0; box-shadow: 0 -14px 36px rgba(23, 43, 50, .16); }
}

@media (max-width: 460px) {
  .content { padding: 20px 14px 40px; }
  .top-actions { display: grid; grid-template-columns: 1fr auto; }
  .update-stamp { grid-column: 1 / -1; border-right: 0; }
  .kpis, .stat-strip { grid-template-columns: 1fr; }
  .stat-item, .stat-item:nth-child(3), .stat-item:nth-child(2n) { border-right: 0; border-bottom: 1px solid var(--line); }
  .priority-row { grid-template-columns: 1fr; }
  .priority-row button { grid-column: 1; }
}

.credential-box {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--soft);
}
.credential-box div { display: grid; gap: 4px; }
.credential-box span, .credential-box small { color: var(--muted); font-size: 11px; }
.credential-box strong { color: var(--navy); font-size: 14px; overflow-wrap: anywhere; }
.credential-box small { grid-column: 1 / -1; }
@media (max-width: 720px) { .credential-box { grid-template-columns: 1fr; } .credential-box small { grid-column: 1; } }
.service-directory{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.service-directory a{display:grid;gap:5px;min-height:90px;padding:16px;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--navy);text-decoration:none}.service-directory a:hover{border-color:var(--navy);background:#f5f9f9}.service-directory span{color:var(--muted);font-size:11px;line-height:1.5}.partner-account-editor{display:grid;gap:13px;padding:18px 4px;border-bottom:1px solid var(--line)}.partner-account-editor:last-child{border-bottom:0}.account-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.account-heading small{display:block;margin-top:4px;color:var(--muted);font-size:11px}.account-fields{display:grid;grid-template-columns:1.5fr 1fr 1fr .7fr .8fr;gap:8px}.account-fields label{font-size:10px}.account-fields input,.account-fields select{min-width:0}.partner-account-editor .panel-actions{justify-content:flex-start}.partner-account-editor .message{margin:0}@media(max-width:1100px){.service-directory{grid-template-columns:repeat(2,minmax(0,1fr))}.account-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.service-directory,.account-fields{grid-template-columns:1fr}.account-heading{align-items:flex-start;flex-direction:column}}
.profile-review-columns{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:16px}.profile-review-columns h3{font-size:14px}.profile-review-record>img{width:72px;height:72px;flex:0 0 72px;object-fit:cover;border:1px solid var(--line);border-radius:6px;background:#f4f7f8}.profile-review-record>div:first-of-type{min-width:0;flex:1}.partner-link-hospital-id{width:138px}@media(max-width:900px){.profile-review-columns{grid-template-columns:1fr}}@media(max-width:600px){.profile-review-record>img{width:64px;height:64px;flex-basis:64px}.partner-link-hospital-id{width:100%}}
html[data-theme="dark"] .profile-review-record>img{background:#1e2c3d;border-color:var(--line)}
.approval-checklist{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.approval-card{display:grid;gap:8px;min-width:0;padding:14px;border:1px solid var(--line);border-radius:8px;background:#f8fbff}.approval-card.ready{border-color:#b7dfcc;background:#f7fffa}.approval-card.review{border-color:#f0ddaa;background:#fffaf0}.approval-card.blocked{border-color:#f1c6bd;background:#fff6f3}.approval-card b,.approval-card small{display:block}.approval-card b{margin-top:8px;font-size:12px}.approval-card small,.approval-card p{color:var(--muted);font-size:10px;line-height:1.55}.approval-card p{margin:0}.partner-record{display:block}.partner-record summary{display:flex;justify-content:space-between;gap:15px;align-items:center;list-style:none;cursor:pointer}.partner-record summary::-webkit-details-marker{display:none}.partner-detail-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:12px;padding:12px;border-radius:8px;background:#f8fbff}.partner-detail-grid div{min-width:0}.partner-detail-grid b,.partner-detail-grid span{display:block;font-size:10px;line-height:1.45}.partner-detail-grid b{color:var(--muted)}.partner-detail-grid span{margin-top:4px;color:var(--ink);font-weight:800}@media(max-width:900px){.approval-checklist{grid-template-columns:repeat(2,minmax(0,1fr))}.partner-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.approval-checklist,.partner-detail-grid{grid-template-columns:1fr}.partner-record summary{align-items:flex-start;flex-direction:column}.partner-record .panel-actions{justify-content:flex-start;width:100%}}
html[data-theme="dark"] .approval-card,html[data-theme="dark"] .partner-detail-grid{background:#2a3943;border-color:var(--line)}

.erp-panel{padding:0;overflow:hidden}.erp-panel>.panel-head{padding:20px 22px;border-bottom:1px solid var(--line)}.erp-workspace{display:grid;grid-template-columns:220px minmax(0,1fr);min-height:720px}.erp-menu{display:flex;flex-direction:column;gap:5px;padding:14px;border-right:1px solid var(--line);background:#f7fafb}.erp-menu-button,.erp-external-link{display:grid;gap:4px;width:100%;padding:13px 12px;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--ink);text-align:left;text-decoration:none}.erp-menu-button b,.erp-external-link b{font-size:12px}.erp-menu-button span,.erp-external-link span{color:var(--muted);font-size:10px;line-height:1.45}.erp-menu-button:hover,.erp-menu-button.active,.erp-external-link:hover{border-color:#c9dce1;background:#fff}.erp-menu-button.active{box-shadow:inset 3px 0 #176f86;color:#174f5d}.erp-external-link{margin-top:auto}.erp-stage{display:grid;grid-template-rows:auto minmax(0,1fr);min-width:0;background:#eef3f5}.erp-stage-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line);background:#fff}.erp-stage-head div{display:flex;align-items:center;gap:8px}.erp-stage-head span,.erp-stage-head small{color:var(--muted);font-size:10px}.erp-stage-head b{font-size:12px}.erp-stage iframe{width:100%;height:100%;min-height:670px;border:0;background:#fff}@media(max-width:900px){.erp-workspace{grid-template-columns:1fr;min-height:0}.erp-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border-right:0;border-bottom:1px solid var(--line)}.erp-external-link{margin-top:0}.erp-stage iframe{min-height:720px}}@media(max-width:560px){.erp-menu{grid-template-columns:1fr}.erp-stage-head{align-items:flex-start;flex-direction:column}.erp-stage iframe{min-height:760px}}

/* Soft dark mode: keep the entire control room on one low-contrast surface. */
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #d5dfe2;
  --muted: #9babb1;
  --line: #3a4852;
  --paper: #25313a;
  --deep: #315f69;
  --blue: #79aeba;
  --soft: #2b3a44;
  --coral: #d88980;
  --yellow: #d1aa6d;
  --success: #78b79a;
  --warning: #d1aa6d;
  --danger: #d88980;
  --shadow: 0 8px 22px rgba(9, 15, 20, .16);
  background: #1b252e;
  color: var(--ink);
}
html[data-theme="dark"] body,
html[data-theme="dark"] .app-shell { background: #1b252e; color: var(--ink); }
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .kpi,
html[data-theme="dark"] .review-card,
html[data-theme="dark"] .region-card,
html[data-theme="dark"] .data-card,
html[data-theme="dark"] .command-strip,
html[data-theme="dark"] .priority-row,
html[data-theme="dark"] .stat-item,
html[data-theme="dark"] .playbook-grid div,
html[data-theme="dark"] .slot-board div,
html[data-theme="dark"] .inquiry-board div,
html[data-theme="dark"] .spec-board div,
html[data-theme="dark"] .service-directory a,
html[data-theme="dark"] .theme-switcher,
html[data-theme="dark"] .refresh,
html[data-theme="dark"] .detail-panel,
html[data-theme="dark"] .erp-stage-head { background: var(--paper); border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .section-intro { border-color: var(--line); }
html[data-theme="dark"] .sidebar .brand strong,
html[data-theme="dark"] .command-strip h2,
html[data-theme="dark"] .panel h2,
html[data-theme="dark"] .section-intro h2,
html[data-theme="dark"] .kpi strong,
html[data-theme="dark"] .stat-item strong,
html[data-theme="dark"] .data-card h3,
html[data-theme="dark"] .service-directory a,
html[data-theme="dark"] .credential-box strong { color: var(--ink); }
html[data-theme="dark"] .scope-badge,
html[data-theme="dark"] .connection { background: #293b3b; border-color: #3f5752; color: #91bea8; }
html[data-theme="dark"] .connection.checking { background: #3b352a; border-color: #5a4b34; color: #d1b178; }
html[data-theme="dark"] .connection.error { background: #41302f; border-color: #62423f; color: #dda098; }
html[data-theme="dark"] .nav { color: #aab8bd; }
html[data-theme="dark"] .nav span { color: #7f9299; }
html[data-theme="dark"] .nav.active,
html[data-theme="dark"] .nav:hover,
html[data-theme="dark"] .summary-row[data-detail-ready]:hover,
html[data-theme="dark"] .signal-row[data-detail-ready]:hover,
html[data-theme="dark"] .timeline-row[data-detail-ready]:hover,
html[data-theme="dark"] .admin-record[data-detail-ready]:hover,
html[data-theme="dark"] .service-directory a:hover,
html[data-theme="dark"] .erp-menu-button:hover,
html[data-theme="dark"] .erp-menu-button.active,
html[data-theme="dark"] .erp-external-link:hover { background: #2e3d47; color: #c9dadd; border-color: #4b626b; }
html[data-theme="dark"] .priority-row,
html[data-theme="dark"] .data-card-meta,
html[data-theme="dark"] .detail-meta span,
html[data-theme="dark"] .detail-field,
html[data-theme="dark"] .signal-row,
html[data-theme="dark"] .summary-row,
html[data-theme="dark"] .timeline-row,
html[data-theme="dark"] .admin-record,
html[data-theme="dark"] .admin-list { border-color: var(--line); }
html[data-theme="dark"] .detail-field span { color: #9eb0c7; }
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .icon-button { background: #202b34; border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] .login-scope,
html[data-theme="dark"] .password-rule,
html[data-theme="dark"] .manual-secret,
html[data-theme="dark"] .data-lock-board div,
html[data-theme="dark"] .credential-box { background: #2a3943; border-color: var(--line); color: #b7c5c9; }
html[data-theme="dark"] .guardian-panel,
html[data-theme="dark"] .room-hero { background: #2a3a43; }
html[data-theme="dark"] .guardian-item { background: #314750; border-color: #4e6972; }
html[data-theme="dark"] .register-panel[open] summary,
html[data-theme="dark"] .erp-menu { background: #202c35; border-color: var(--line); }
html[data-theme="dark"] .erp-stage { background: #1f2a32; }
.partner-intake-section { display: grid; gap: 10px; margin-top: 18px; }
.partner-intake-section + .partner-intake-section { padding-top: 18px; border-top: 1px solid var(--line); }
.partner-intake-section h3, .subsection-title { margin: 0; color: var(--ink); font-size: 13px; }
.subsection-title { padding: 14px 0 8px; border-top: 1px solid var(--line); }
.subsection-title:first-of-type { border-top: 0; padding-top: 4px; }
html[data-theme="dark"] .solo-work-grid button { background: #202b34; border-color: var(--line); color: var(--ink); }
@media (max-width: 1050px) { .solo-work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .solo-work-grid { grid-template-columns: 1fr; } .solo-work-grid button { min-height: 72px; } }

/* High-priority operational queues need to remain legible at a glance. */
#unifiedIntakeQueue .admin-record,
#fullOptionRequestsList .admin-record,
#adminAdsList .admin-record,
#partnerApplicationsList .admin-record,
#servicePartnerApplicationsList .admin-record {
  padding: 18px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  margin-bottom: 10px;
}
#unifiedIntakeQueue .admin-record b,
#fullOptionRequestsList .admin-record b,
#adminAdsList .admin-record b,
#partnerApplicationsList .admin-record b,
#servicePartnerApplicationsList .admin-record b {
  font-size: 16px;
  line-height: 1.45;
}
#unifiedIntakeQueue .admin-record small,
#fullOptionRequestsList .admin-record small,
#adminAdsList .admin-record small,
#partnerApplicationsList .admin-record small,
#servicePartnerApplicationsList .admin-record small {
  font-size: 13px;
  line-height: 1.55;
}
#unifiedIntakeQueue .badge,
#fullOptionRequestsList .badge,
#adminAdsList .badge,
#partnerApplicationsList .badge,
#servicePartnerApplicationsList .badge {
  font-size: 12px;
  padding: 7px 10px;
}
#unifiedIntakeQueue .primary-button,
#fullOptionRequestsList .primary-button,
#adminAdsList .primary-button,
#partnerApplicationsList .primary-button,
#servicePartnerApplicationsList .primary-button {
  min-height: 42px;
  padding: 0 15px;
  font-size: 13px;
}
.priority-copy b { font-size: 16px; line-height: 1.4; }
.priority-copy small { font-size: 12px; line-height: 1.55; }
@media (max-width: 720px) {
  #unifiedIntakeQueue .admin-record b,
  #fullOptionRequestsList .admin-record b,
  #adminAdsList .admin-record b,
  #partnerApplicationsList .admin-record b,
  #servicePartnerApplicationsList .admin-record b { font-size: 15px; }
}

/* 2026-09-08 ERP readability pass: visual structure only, no workflow changes. */
body { font-size: 16px; }
.sidebar { width: 264px; flex-basis: 264px; padding: 28px 20px; }
.sidebar .brand strong { font-size: 21px; }
.sidebar .brand small { font-size: 13px; }
.scope-badge { padding: 14px 12px; }
.scope-badge b { font-size: 14px; }
.scope-badge small { font-size: 12px; }
.sidebar nav { gap: 7px; }
.nav { min-height: 48px; padding: 13px 14px; font-size: 15px; line-height: 1.25; }
.nav span { width: 24px; font-size: 12px; }
.sidebar-foot a, .quiet { min-height: 28px; font-size: 13px; }
.content { padding: 34px 42px 64px; }
.topbar h1 { font-size: 32px; }
.top-note { font-size: 14px; }
.eyebrow { font-size: 12px; }
.view { gap: 24px; }
.command-strip { padding: 25px 28px; border-right: 0; border-top: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.command-strip h2 { font-size: 25px; }
.command-strip p:not(.eyebrow) { font-size: 14px; }
.command-legend span { font-size: 12px; }

.solo-operations { padding: 0; border: 0; background: transparent; }
.solo-operations > .panel-head { align-items: flex-end; padding: 0 2px 14px; margin: 0; border-bottom: 2px solid #cfdadd; }
.solo-operations > .panel-head h2 { font-size: 24px; }
.solo-work-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-bottom: 1px solid var(--line); }
.solo-work-grid button { position: relative; grid-template-columns: 38px minmax(0, 1fr); gap: 13px; min-height: 116px; padding: 20px 58px 20px 18px; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: transparent; }
.solo-work-grid button:last-child { border-right: 0; }
.solo-work-grid button:hover, .solo-work-grid button:focus-visible { background: #edf5f6; outline: none; }
.solo-work-grid .work-step { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #174f5d; color: #fff; font-size: 15px; }
.solo-work-grid .work-copy { min-width: 0; }
.solo-work-grid .work-copy b { font-size: 16px; line-height: 1.35; }
.solo-work-grid .work-copy small { margin-top: 7px; font-size: 12px; line-height: 1.5; }
.solo-work-grid .work-count { position: absolute; right: 16px; bottom: 18px; display: flex; align-items: baseline; gap: 3px; color: var(--blue); white-space: nowrap; }
.solo-work-grid .work-count strong { font-size: 25px; }
.solo-work-grid .work-count small { margin: 0; color: var(--muted); font-size: 11px; }
.sample-cleanup-dialog { width: min(760px, calc(100vw - 32px)); max-height: 85vh; overflow: auto; box-sizing: border-box; padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel, #fff); color: var(--ink); font-size: 16px; }
.sample-cleanup-dialog::backdrop { background: #0008; }
.sample-cleanup-dialog h2 { font-size: 24px; }
.sample-cleanup-dialog p { line-height: 1.6; }
.cleanup-list { max-height: 42vh; overflow: auto; border-block: 1px solid var(--line); margin-bottom: 18px; }
.cleanup-row { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 14px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.cleanup-row small { font-size: 14px; }
.cleanup-confirm { display: block; width: 100%; box-sizing: border-box; min-height: 44px; margin: 8px 0 18px; }
.cleanup-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.kpis { gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kpi { min-height: 112px; padding: 18px 22px; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: transparent; }
.kpi:last-child { border-right: 0; }
.kpi[data-tone] { border-top: 0; }
.kpi small, .kpi span { font-size: 13px; }
.kpi strong { font-size: 29px; }
.kpi em { font-size: 12px; }

.panel { padding: 26px 28px; border-radius: 6px; }
.control-layout > .panel, .operational-panel, .dashboard-grid > .panel { border-width: 0 0 1px; background: transparent; }
.panel-head, .guardian-head { margin-bottom: 18px; }
.panel-head h2, .panel-title h2 { display: inline-block; }
.panel h2, .section-intro h2 { font-size: 22px; }
.panel-description, .section-intro p:not(.eyebrow) { font-size: 14px; }
.panel-meta, .read-only { font-size: 12px; }
.summary-row, .signal-row, .timeline-row, .admin-record { min-height: 52px; font-size: 14px; }
.summary-row small, .signal-row small, .timeline-row small, .admin-record small { font-size: 12px; }
.admin-record b { font-size: 14px; }
.state, .text-button { font-size: 13px; }
.priority-row { min-height: 68px; grid-template-columns: 104px minmax(0, 1fr) auto; }
.priority-level { font-size: 12px; }
.priority-move { font-size: 13px; }
.stat-item span, .stat-item small { font-size: 12px; }
.stat-item strong { font-size: 25px; }

.help-tip { display: inline-grid; place-items: center; width: 24px; height: 24px; margin: 7px 0 0 7px; padding: 0; border: 1px solid #b9cbd0; border-radius: 50%; background: transparent; color: #526a72; font-size: 13px; font-weight: 800; vertical-align: top; }
.help-tip:hover, .help-tip:focus-visible { border-color: var(--blue); background: #eaf3f4; color: var(--blue); outline: none; }
.context-tooltip { position: fixed; z-index: 100; padding: 11px 13px; border-radius: 6px; background: #142d35; color: #fff; box-shadow: 0 8px 24px rgba(20,45,53,.18); font-size: 13px; line-height: 1.5; pointer-events: none; }

@media (max-width: 1180px) {
  .solo-work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .solo-work-grid button:nth-child(2) { border-right: 0; }
  .solo-work-grid button:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .sidebar { width: 100%; padding: 18px; }
  .nav { min-height: 44px; font-size: 14px; }
  .content { padding: 24px 18px 48px; }
  .solo-work-grid { grid-template-columns: 1fr; }
  .solo-work-grid button, .solo-work-grid button:nth-child(2) { min-height: 96px; border-right: 0; border-bottom: 1px solid var(--line); }
  .solo-work-grid button:last-child { border-bottom: 0; }
  .kpi { border-right: 0; border-bottom: 1px solid var(--line); }
  .kpi:last-child { border-bottom: 0; }
}

/* Shared typography for all operations views. */
#appView { font-size: 16px; line-height: 1.5; }
#appView h1 { font-size: 30px; line-height: 1.35; }
#appView h2 { font-size: 24px; line-height: 1.4; }
#appView h3, #appView .admin-record b, #appView .priority-copy b,
#appView .work-copy b { font-size: 18px; line-height: 1.5; }
#appView p, #appView small, #appView label, #appView input,
#appView select, #appView textarea, #appView button, #appView td,
#appView th, #appView .summary-row, #appView .signal-row,
#appView .timeline-row, #appView .admin-record, #appView .state,
#appView .status-chip, #appView .guardian-status, #appView .read-only,
#appView .panel-meta, #appView .priority-level, #appView .stat-item span,
#appView .kpi span, #appView .kpi em, #appView .nav span {
  font-family: inherit; font-size: 16px; line-height: 1.5;
}
#appView .stat-item strong, #appView .kpi strong,
#appView .work-count strong { font-size: 28px; line-height: 1.3; }
#appView input, #appView select, #appView button { min-height: 44px; }
#appView .help-tip { min-height: 32px; width: 32px; height: 32px; }
#appView .panel-head, #appView .panel-actions { flex-wrap: wrap; }
#appView .work-copy, #appView .admin-record > div { min-width: 0; overflow-wrap: anywhere; }
#appView .work-count { position: static; grid-column: 2; justify-self: end; }
#appView .solo-work-grid button { padding-right: 18px; }
