:root {
  --canvas: #f5f7fa;
  --canvas-deep: #eef2f6;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #18263d;
  --muted: #5d6d84;
  --muted-light: #71809a;
  --ink-soft: #3f516b;
  --line: #dce3eb;
  --line-strong: #cbd6e2;
  --navy: #081a31;
  --blue: #356df3;
  --blue-soft: #eaf0ff;
  --green: #19836a;
  --green-soft: #e8f6f1;
  --amber: #a86a21;
  --amber-soft: #fff3df;
  --coral: #c96055;
  --shadow: 0 16px 45px rgba(18, 38, 67, .08);
  font-family: "Noto Sans SC", "PingFang SC", "Helvetica Neue", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; min-width: 320px; overflow-x: hidden; background: var(--canvas); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 258px; padding: 26px 17px 20px; color: #d9e3ee; background: var(--navy); display: flex; flex-direction: column; flex: 0 0 258px; }
.brand-block { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.16); color: #fff; background: var(--blue); font-weight: 900; letter-spacing: -.08em; font-size: 16px; }
.brand-name { font-weight: 800; font-size: 13px; letter-spacing: .12em; }
.brand-subtitle { margin-top: 4px; color: #8fa2b8; font-size: 9px; letter-spacing: .19em; }
.sidebar-rule { height: 1px; margin: 29px 8px 25px; background: rgba(214, 226, 240, .14); }
.nav-label, .eyebrow { margin: 0; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.nav-label { padding: 0 10px; color: #7187a1; margin-bottom: 9px; }
.nav-label-spaced { margin-top: 26px; }
.nav-list { display: grid; gap: 3px; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 11px; border: 1px solid transparent; border-radius: 7px; color: #aabbd0; background: transparent; text-align: left; font-size: 13px; transition: .18s ease; }
.nav-item:hover { color: #f4f8ff; background: rgba(117, 151, 194, .12); }
.nav-item.active { color: #fff; border-color: rgba(93, 135, 224, .44); background: #173762; box-shadow: inset 3px 0 var(--blue); }
.nav-index { width: 25px; color: #7e95b0; font-size: 10px; font-variant-numeric: tabular-nums; opacity: .85; }
.nav-item.active .nav-index { color: #9fbbff; }
.sidebar-bottom { margin-top: auto; }
.version-stamp { margin: 21px 10px 0; color: #627993; font-size: 9px; line-height: 1.65; letter-spacing: .12em; }

.main-content { flex: 1; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; min-height: 70px; padding: 0 42px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
.topbar-context { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(25, 131, 106, .12); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.role-hint { color: var(--muted-light); font-size: 10px; }
.role-switch { display: inline-flex; padding: 2px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); }
.role-option { min-height: 30px; padding: 0 10px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 800; }
.role-option:hover { color: var(--blue); }
.role-option.active { color: var(--blue); background: var(--blue-soft); box-shadow: 0 1px 4px rgba(53,109,243,.12); }
.role-member-select { min-height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--surface); font-size: 11px; }
.role-member-select:disabled { color: var(--blue); background: var(--blue-soft); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 13px; border: 1px solid transparent; border-radius: 6px; font-size: 12px; font-weight: 700; letter-spacing: .01em; transition: background .18s ease, border .18s ease, color .18s ease; }
.button-primary { color: #fff; background: var(--blue); border-color: var(--blue); box-shadow: 0 4px 12px rgba(53,109,243,.18); }
.button-primary:hover { background: #2d5fdc; border-color: #2d5fdc; }
.button-secondary { color: var(--blue); border-color: #b8c9f4; background: var(--blue-soft); }
.button-secondary:hover { color: #fff; border-color: var(--blue); background: var(--blue); }
.button-ghost { color: var(--ink); border-color: var(--line-strong); background: var(--surface); }
.button-ghost:hover { color: var(--blue); border-color: #9bb5f4; background: var(--blue-soft); }

.page { max-width: 1480px; margin: 0 auto; padding: 31px 42px 64px; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 27px; }
.page-heading h1 { max-width: 690px; margin: 7px 0 8px; font-size: clamp(34px, 3.15vw, 44px); line-height: 1.1; letter-spacing: -.055em; font-weight: 800; }
.page-heading p { max-width: 620px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.eyebrow { color: var(--blue); }
.heading-meta { min-width: 190px; padding: 10px 0 10px 16px; border-left: 1px solid var(--blue); color: var(--muted); font-size: 11px; line-height: 1.7; }
.heading-meta strong { display: block; color: var(--ink); font-size: 22px; letter-spacing: -.04em; }
.data-status-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: -9px 0 14px; padding: 10px 13px; border: 1px solid #ead8bb; border-left: 1px solid var(--amber); border-radius: 7px; color: #7f602d; background: #fffaf1; font-size: 11px; }
.data-status-bar > div { display: flex; align-items: center; gap: 9px; }
.data-status-bar strong { color: var(--ink); font-size: 11px; }
.data-status-bar span { color: var(--muted); }
.status-pill { display: inline-flex; align-items: center; min-height: 22px; padding: 0 7px; border-radius: 4px; color: #8d5f1f !important; background: var(--amber-soft); font-size: 10px; font-weight: 800; }
.account-table td { vertical-align: top; }
.account-table { min-width: 720px; table-layout: fixed; }
.account-table th:nth-child(1), .account-table td:nth-child(1) { width: 24%; }
.account-table th:nth-child(2), .account-table td:nth-child(2) { width: 22%; }
.account-table th:nth-child(3), .account-table td:nth-child(3) { width: 19%; }
.account-table th:nth-child(4), .account-table td:nth-child(4) { width: 17%; }
.account-table th:nth-child(5), .account-table td:nth-child(5) { width: 18%; }
.account-table td { overflow-wrap: anywhere; }
.account-link { color: var(--blue); font-weight: 700; text-decoration: none; }
.account-link:hover { text-decoration: underline; }
.stat-date { font-size: 23px !important; letter-spacing: -0.02em; }
.table-footnote { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }

.day-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 16px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 3px 10px rgba(18,38,67,.03); }
.day-tabs { display: flex; gap: 3px; flex-wrap: wrap; }
.day-tabs button { min-height: 31px; padding: 0 12px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 700; }
.day-tabs button:hover { color: var(--blue); background: var(--blue-soft); }
.day-tabs button.active { color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 -2px var(--blue); }
.date-control { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.date-control label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.date-control select, .date-control input { min-height: 31px; padding: 0 8px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: var(--surface-soft); font-size: 11px; }
.scope-note { color: var(--muted-light); font-size: 10px; }
.scope-readout { display: inline-flex; align-items: center; min-height: 31px; padding: 0 9px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: var(--surface-soft); font-size: 11px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
.stat-card { min-height: 108px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 3px 10px rgba(18,38,67,.025); }
.stat-card .stat-label { color: var(--muted); font-size: 11px; }
.stat-card .stat-number { margin-top: 11px; color: var(--ink); font-size: 30px; font-weight: 800; letter-spacing: -.07em; line-height: 1; }
.stat-card .stat-note { margin-top: 8px; color: var(--muted-light); font-size: 10px; }
.stat-card.accent { border-color: #173762; color: #f4f8ff; background: var(--navy); }
.stat-card.accent .stat-label, .stat-card.accent .stat-note { color: #9eb2cb; }
.stat-card.accent .stat-number { color: #fff; }

.grid-two { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 16px; }
.panel { border: 1px solid var(--line); border-radius: 9px; background: var(--surface); box-shadow: 0 4px 15px rgba(18,38,67,.025); }
.panel-head { display: flex; align-items: start; justify-content: space-between; gap: 15px; padding: 17px 19px; border-bottom: 1px solid var(--line); }
.panel-title { margin: 0; font-size: 14px; letter-spacing: -.02em; }
.panel-subtitle { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.panel-body { padding: 19px; }
.empty-state { display: grid; place-items: center; min-height: 174px; padding: 20px; text-align: center; }
.empty-state.compact { min-height: 142px; }
.empty-glyph { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 13px; border: 1px solid #b9c9e9; border-radius: 50%; color: var(--blue); background: var(--blue-soft); font-size: 19px; }
.empty-state h3 { margin: 0 0 7px; font-size: 15px; }
.empty-state p { max-width: 300px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.process-list { display: grid; gap: 0; }
.process-item { display: grid; grid-template-columns: 25px 1fr auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.process-item:last-child { border-bottom: 0; }
.process-no { color: var(--blue); font-size: 11px; font-weight: 800; }
.process-item strong { display: block; font-size: 12px; }
.process-item span { color: var(--muted); font-size: 10px; }
.chip { display: inline-flex; align-items: center; min-height: 23px; padding: 0 8px; border-radius: 5px; color: #58718c; background: var(--canvas-deep); font-size: 10px; }
.chip.lime { color: var(--blue); background: var(--blue-soft); }
.chip.orange { color: #8c4e15; background: var(--amber-soft); }
.chip.green { color: var(--green); background: var(--green-soft); }
.toolbar-note { color: var(--muted); font-size: 10px; }
.quality-table { min-width: 820px; table-layout: fixed; }
.quality-table th:nth-child(1), .quality-table td:nth-child(1) { width: 23%; }
.quality-table th:nth-child(2), .quality-table td:nth-child(2) { width: 20%; }
.quality-table th:nth-child(3), .quality-table td:nth-child(3) { width: 17%; }
.quality-table th:nth-child(4), .quality-table td:nth-child(4) { width: 14%; }
.quality-table th:nth-child(5), .quality-table td:nth-child(5) { width: 13%; }
.quality-table th:nth-child(6), .quality-table td:nth-child(6) { width: 13%; }
.quality-table td { overflow-wrap: anywhere; }
.qc-rule-grid { display: grid; gap: 0; }
.qc-rule { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.qc-rule:last-child { border-bottom: 0; }
.qc-rule strong, .qc-rule-category { display: block; }
.qc-rule strong { margin-top: 4px; font-size: 12px; line-height: 1.45; }
.qc-rule-category { color: var(--muted); font-size: 10px; }

.section-spacer { margin-top: 16px; }
.intake-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.intake-card { padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); }
.intake-card strong { display: block; margin-bottom: 6px; font-size: 12px; }
.intake-card span { color: var(--muted); font-size: 11px; line-height: 1.5; }

.table-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 8px; }
.search-input, .select-input { min-height: 35px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: var(--surface); font-size: 12px; outline: none; }
.search-input { min-width: 240px; }
.search-input:focus, .select-input:focus, input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(53,109,243,.12); }
.data-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 7px; }
.data-table-wrap::after { display: none; }
.data-table { width: 100%; border-collapse: collapse; min-width: 920px; }
.data-table th { padding: 11px 13px; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--surface-soft); font-size: 11px; font-weight: 800; letter-spacing: .02em; text-align: left; }
.data-table td { padding: 13px; border-bottom: 1px solid var(--line); font-size: 12px; vertical-align: middle; }
.data-table tbody tr { background: var(--surface); transition: background .16s ease; }
.data-table tbody tr[data-task-id], .data-table tbody tr[data-project-id] { cursor: pointer; }
.data-table tbody tr:hover { background: #f3f6ff; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.task-id { color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.task-name { margin-top: 4px; font-weight: 800; line-height: 1.35; }
.muted { color: var(--muted); }
.table-empty { padding: 64px 20px; color: var(--muted); text-align: center; font-size: 12px; }
#projectTableRoot .data-table { min-width: 720px; }
.project-table { table-layout: fixed; }
.project-table th:nth-child(1), .project-table td:nth-child(1) { width: 26%; }
.project-table th:nth-child(2), .project-table td:nth-child(2) { width: 17%; }
.project-table th:nth-child(3), .project-table td:nth-child(3) { width: 31%; }
.project-table th:nth-child(4), .project-table td:nth-child(4) { width: 16%; }
.project-table th:nth-child(5), .project-table td:nth-child(5) { width: 10%; }
.project-table td { overflow-wrap: anywhere; }
.project-table .project-owner-select { min-width: 92px; max-width: 100%; }
.project-table .next-step-cell { color: var(--ink); }
.project-table .next-step-cell strong { display: block; font-weight: 700; line-height: 1.4; }
.project-table .table-meta { color: var(--muted-light); }
.grid-two .data-table { min-width: 0; }
.grid-two .data-table th, .grid-two .data-table td { padding-left: 9px; padding-right: 9px; }
.action-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.action-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 19px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .16s ease; }
.action-list li:hover { background: #f3f6ff; }
.action-list li:last-child { border-bottom: 0; }
.action-list strong, .action-list small { display: block; }
.action-list strong { margin: 5px 0 4px; font-size: 13px; }
.action-list small { color: var(--muted); font-size: 10px; }
.action-list .next-step-inline { display: block; margin-top: 6px; color: var(--ink-soft); font-size: 11px; font-style: normal; }
.data-table td small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.drawer-list-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.drawer-list-row:last-child { border-bottom: 0; }
.drawer-list-row span { color: var(--muted); font-size: 11px; text-align: right; }
.drawer-edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 130px auto; gap: 8px; align-items: center; }
.drawer-edit-grid input { width: 100%; min-height: 34px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); color: var(--ink); font: inherit; }
.progress-edit { grid-template-columns: 1fr 20px auto; }
.progress-unit { color: var(--muted); font-size: 12px; }
.drawer-actions { display: flex; gap: 8px; margin: 18px 0 4px; }
.qc-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0 14px; border-bottom: 1px solid var(--line); }
.qc-drawer-head > div { display: grid; gap: 6px; }
.qc-drawer-head strong { font-size: 12px; }
.qc-drawer-note { margin: 14px 0; padding: 10px 12px; border-left: 1px solid var(--amber); color: var(--muted); background: var(--amber-soft); font-size: 11px; line-height: 1.55; }
.qc-drawer-summary { display: grid; gap: 10px; margin-bottom: 16px; }
.qc-drawer-summary label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 800; }
.qc-drawer-summary textarea, .qc-drawer-summary input, .qc-drawer-item input { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: var(--surface-soft); font: inherit; font-size: 11px; }
.qc-drawer-summary textarea { resize: vertical; }
.qc-drawer-list { display: grid; gap: 12px; }
.qc-drawer-group { border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.qc-drawer-group-title { padding: 9px 11px; color: var(--ink); background: var(--surface-soft); font-size: 11px; font-weight: 800; }
.qc-drawer-item { padding: 11px; border-top: 1px solid var(--line); }
.qc-drawer-item-main { display: grid; grid-template-columns: minmax(0, 1fr) 92px; align-items: center; gap: 10px; }
.qc-drawer-item-main strong { display: block; color: var(--ink); font-size: 11px; line-height: 1.45; }
.qc-drawer-item-main small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.qc-drawer-item select { min-height: 31px; padding: 0 5px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--ink); background: var(--surface); font-size: 10px; }
.qc-drawer-item input { margin-top: 8px; }
.qc-drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
@media (max-width: 620px) { .drawer-edit-grid { grid-template-columns: 1fr; } }

.ledger-chain { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; padding: 19px; }
.ledger-chain > div { min-width: 0; min-height: 92px; padding: 13px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); }
.ledger-chain b { display: block; margin-bottom: 13px; color: var(--blue); font-size: 10px; }
.ledger-chain strong, .ledger-chain span { display: block; }
.ledger-chain strong { font-size: 12px; }
.ledger-chain span { margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.ledger-chain i { color: #9aabbd; font-size: 17px; font-style: normal; }

.settings-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.setting-card { padding: 17px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.setting-card strong { display: block; margin-bottom: 6px; font-size: 13px; }
.setting-card p { min-height: 38px; margin: 0 0 16px; color: var(--muted); font-size: 11px; line-height: 1.6; }

.modal-backdrop, .drawer-backdrop { position: fixed; inset: 0; z-index: 20; display: none; background: rgba(8,26,49,.52); }
.modal-backdrop.open, .drawer-backdrop.open { display: flex; }
.modal-backdrop { align-items: center; justify-content: center; padding: 22px; }
.modal-card { width: min(680px, 100%); max-height: min(760px, 95vh); overflow: auto; padding: 27px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.modal-header, .drawer-header { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.modal-header h2, .drawer-header h2 { margin: 8px 0 0; font-size: 26px; letter-spacing: -.05em; }
.modal-note { margin: 13px 0 23px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.icon-button { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink); background: transparent; font-size: 20px; line-height: 1; }
.icon-button:hover { color: var(--blue); border-color: #9bb5f4; background: var(--blue-soft); }
.task-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.field span { color: var(--coral); }
.field-wide { grid-column: 1 / -1; }
.field input, .field textarea, .field select { width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--surface-soft); outline: none; font-size: 12px; font-weight: 500; }
.field textarea { resize: vertical; }
.form-footer { display: flex; align-items: center; justify-content: space-between; grid-column: 1 / -1; gap: 15px; padding-top: 7px; }
.form-footer > div { display: flex; gap: 8px; }
.form-hint { color: var(--muted-light); font-size: 10px; }
.drawer-backdrop { justify-content: flex-end; }
.detail-drawer { width: min(480px, 100%); height: 100%; overflow: auto; padding: 25px; border-left: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.detail-drawer > .drawer-header { position: sticky; top: -25px; z-index: 2; margin: -25px -25px 0; padding: 25px 25px 14px; background: var(--surface); }
.detail-drawer .drawer-header h2 { font-size: 24px; }
.drawer-subtitle { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.detail-tabs { position: sticky; top: 79px; z-index: 2; display: flex; overflow-x: auto; gap: 4px; margin: 0 -25px; padding: 0 25px; border-bottom: 1px solid var(--line); background: var(--surface); scrollbar-width: none; }
.detail-tabs::-webkit-scrollbar { display: none; }
.detail-tabs button { flex: 0 0 auto; min-height: 38px; padding: 0 9px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; font-size: 11px; font-weight: 700; }
.detail-tabs button:hover { color: var(--blue); }
.detail-tabs button.active { color: var(--blue); border-bottom-color: var(--blue); }
.drawer-content { margin-top: 22px; }
.drawer-section-title { margin-bottom: 10px; color: var(--ink); font-size: 15px; font-weight: 800; }
.detail-block { padding: 14px 0; border-bottom: 1px solid var(--line); }
.detail-label { margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.detail-value { color: var(--ink); font-size: 14px; line-height: 1.6; }
.drawer-footnote { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; line-height: 1.6; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 40; max-width: 340px; padding: 12px 15px; border: 1px solid #183862; border-radius: 7px; color: #f4f8ff; background: var(--navy); box-shadow: var(--shadow); font-size: 12px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.data-table tbody tr:focus-visible, .action-list li:focus-visible { outline: 3px solid rgba(53,109,243,.32); outline-offset: -3px; }

@media (max-width: 980px) {
  .sidebar { width: 218px; flex-basis: 218px; }
  .topbar, .page { padding-left: 28px; padding-right: 28px; }
  .topbar { flex-wrap: wrap; gap: 10px; padding-top: 12px; padding-bottom: 12px; }
  .topbar-context { flex: 1 1 100%; }
  .topbar-actions { flex-wrap: wrap; }
  .grid-two { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr 1fr; }
  .ledger-chain { grid-template-columns: 1fr 1fr; }
  .ledger-chain i { display: none; }
}
@media (max-width: 700px) {
  .app-shell { display: block; }
  .sidebar { width: auto; padding: 16px 17px 11px; }
  .sidebar-rule, .nav-label, .version-stamp { display: none; }
  .nav-list { display: flex; overflow-x: auto; margin-top: 15px; padding-bottom: 2px; }
  .nav-item { flex: 0 0 auto; width: auto; padding: 9px 10px; }
  .nav-index { display: none; }
  .sidebar-bottom { display: none; }
  .topbar { min-height: 66px; padding: 12px 17px; }
  .topbar-actions { width: 100%; justify-content: flex-start; }
  .topbar-actions .role-hint { display: none; }
  .role-switch { display: inline-flex; }
  #downloadSchema { display: none; }
  #syncInstagramAccounts, #openProject, #openTask { display: inline-flex; }
  .page { padding: 27px 17px 52px; }
  .page-heading { display: block; }
  .page-heading h1 { font-size: 32px; }
  .heading-meta { margin-top: 18px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .intake-row, .settings-grid { grid-template-columns: 1fr; }
  .day-toolbar { display: block; }
  .data-status-bar { display: block; }
  .data-status-bar > div + div { margin-top: 5px; }
  .date-control { justify-content: flex-start; margin-top: 9px; flex-wrap: wrap; }
  .ledger-chain { grid-template-columns: 1fr; }
  .ledger-chain i { display: none; }
  .table-toolbar { display: block; }
  .toolbar-right { margin-top: 8px; }
  .search-input { min-width: 0; width: 100%; }
  .data-table-wrap::after { display: block; padding: 8px 12px; color: var(--muted-light); border-top: 1px solid var(--line); background: var(--surface-soft); font-size: 10px; content: "左右滑动查看完整字段"; }
  .task-form { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .form-footer { display: block; }
  .form-footer > div { margin-top: 14px; justify-content: flex-end; }
  .detail-drawer { padding: 20px; }
  .detail-drawer > .drawer-header { top: -20px; margin: -20px -20px 0; padding: 20px 20px 12px; }
  .detail-tabs { top: 68px; margin: 0 -20px; padding: 0 20px; }
  .qc-drawer-head { align-items: flex-start; flex-direction: column; }
  .qc-drawer-item-main { grid-template-columns: 1fr; }
  .qc-drawer-item select { width: 100%; }
  .qc-rule { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 420px) {
  .detail-grid { grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }

/* Operations control surface: calmer hierarchy, sharper data reading, fewer decorative containers. */
:root {
  --canvas: #f1f4f8;
  --canvas-deep: #e8edf3;
  --surface: #ffffff;
  --surface-soft: #f7f9fb;
  --ink: #111827;
  --muted: #526174;
  --muted-light: #778598;
  --ink-soft: #30415a;
  --line: #d8e0e9;
  --line-strong: #b9c5d3;
  --navy: #0b1424;
  --blue: #2457f5;
  --blue-soft: #e9efff;
  --green: #087f63;
  --green-soft: #e5f4ef;
  --amber: #9b5b12;
  --amber-soft: #fff3df;
  --coral: #b94239;
  --shadow: 0 10px 28px rgba(17, 24, 39, .06);
}

body { background: var(--canvas); }
.sidebar { width: 244px; flex-basis: 244px; padding: 24px 14px 18px; background: var(--navy); }
.brand-block { padding: 0 9px; }
.brand-mark { width: 38px; height: 38px; border-radius: 4px; background: var(--blue); }
.sidebar-rule { margin: 25px 9px 24px; background: rgba(216, 224, 233, .18); }
.nav-label { padding-left: 11px; color: #7e91aa; font-size: 9px; letter-spacing: .16em; }
.nav-label-spaced { margin-top: 24px; }
.nav-list { gap: 2px; }
.nav-item { min-height: 38px; padding: 9px 10px; border-radius: 4px; color: #aab8ca; font-size: 12px; }
.nav-item:hover { color: #fff; background: rgba(118, 148, 191, .14); }
.nav-item.active { color: #fff; border-color: rgba(99, 135, 221, .48); background: #172c4d; box-shadow: inset 2px 0 var(--blue); }
.nav-index { width: 24px; color: #7388a3; font-size: 9px; }
.nav-item.active .nav-index { color: #a9bfff; }
.version-stamp { color: #61748d; font-size: 8px; }
.topbar { min-height: 64px; padding: 0 38px; background: rgba(255, 255, 255, .97); backdrop-filter: none; }
.topbar-context { color: #394b63; font-size: 11px; font-weight: 700; }
.status-dot { width: 7px; height: 7px; box-shadow: 0 0 0 3px rgba(8, 127, 99, .13); }
.role-switch { border-radius: 4px; background: #f3f6fa; }
.role-option { min-height: 28px; border-radius: 3px; font-size: 10px; }
.role-option.active { color: var(--blue); background: #fff; box-shadow: 0 1px 4px rgba(17, 24, 39, .12); }
.button { min-height: 34px; border-radius: 4px; font-size: 11px; }
.button-primary { box-shadow: none; }
.button-secondary { background: #edf2ff; }
.page { max-width: 1540px; padding: 34px 38px 64px; }
.page-heading { margin-bottom: 24px; }
.page-heading > div > .eyebrow { display: none; }
.page-heading h1 { margin: 0 0 8px; font-size: clamp(32px, 3vw, 42px); letter-spacing: -.06em; }
.page-heading p { max-width: 760px; color: #536175; font-size: 12px; line-height: 1.65; }
.heading-meta { min-width: 160px; padding-left: 14px; border-left: 1px solid var(--blue); }
.heading-meta strong { font-size: 20px; }
.data-status-bar { margin: -5px 0 13px; padding: 9px 12px; border: 1px solid #e3d4b9; border-left-width: 1px; border-radius: 4px; background: #fffaf1; }
.status-pill { min-height: 20px; border-radius: 3px; }
.day-toolbar { margin-bottom: 14px; border-radius: 4px; box-shadow: none; }
.stat-grid { gap: 0; margin-bottom: 18px; }
.stat-card { min-height: 102px; padding: 16px 17px; border-radius: 0; box-shadow: none; }
.stat-card:first-child { border-radius: 4px 0 0 4px; }
.stat-card:last-child { border-radius: 0 4px 4px 0; }
.stat-card + .stat-card { border-left: 0; }
.stat-card .stat-number { font-size: 28px; }
.grid-two { gap: 14px; }
.panel { border-radius: 4px; box-shadow: none; }
.panel-head { padding: 15px 17px; }
.panel-title { font-size: 13px; }
.panel-subtitle { font-size: 10px; }
.panel-body { padding: 17px; }
.chip { min-height: 21px; padding: 0 7px; border-radius: 3px; font-size: 9px; font-weight: 700; }
.table-toolbar { margin-bottom: 12px; }
.search-input, .select-input { min-height: 34px; border-radius: 4px; font-size: 11px; }
.data-table-wrap { border-radius: 4px; }
.data-table th { padding: 10px 12px; background: #f2f5f8; font-size: 10px; letter-spacing: .04em; }
.data-table td { padding: 12px; font-size: 11px; }
.data-table tbody tr:hover, .action-list li:hover { background: #f3f6ff; }
.task-id { font-size: 9px; }
.task-name { font-size: 12px; }
.table-empty { padding: 58px 20px; }
.action-list li { padding: 14px 17px; }
.action-list strong { font-size: 12px; }
.ledger-chain { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; padding: 17px; }
.ledger-chain > div { min-height: 94px; padding: 12px; border: 0; border-top: 2px solid var(--ink); border-radius: 0; background: transparent; }
.ledger-chain b { margin-bottom: 15px; color: var(--blue); font-size: 9px; }
.ledger-chain strong { font-size: 11px; }
.ledger-chain span { font-size: 9px; }
.ledger-chain i { color: #98a6b7; font-size: 14px; }
.settings-grid { gap: 10px; }
.setting-card { padding: 16px; border-radius: 4px; }
.modal-card { border-radius: 5px; box-shadow: var(--shadow); }
.field input, .field textarea, .field select, .drawer-edit-grid input { border-radius: 4px; }
.detail-drawer { box-shadow: -12px 0 28px rgba(17, 24, 39, .12); }
.toast { border-radius: 4px; box-shadow: var(--shadow); }
.data-table tbody tr:focus-visible, .action-list li:focus-visible { outline: 2px solid rgba(36, 87, 245, .6); outline-offset: -2px; }

@media (max-width: 980px) {
  .sidebar { width: 218px; flex-basis: 218px; }
  .ledger-chain { grid-template-columns: 1fr 1fr; }
  .ledger-chain i { display: none; }
}

@media (max-width: 700px) {
  .sidebar { width: auto; padding: 15px 16px 10px; }
  .topbar { padding: 11px 16px; }
  .page { padding: 27px 16px 52px; }
  .page-heading h1 { font-size: 31px; }
  .stat-card:first-child { border-radius: 4px 0 0 0; }
  .stat-card:nth-child(2) { border-radius: 0 4px 0 0; border-left: 0; }
  .stat-card:nth-child(3) { border-radius: 0 0 0 4px; border-left: 1px solid var(--line); border-top: 0; }
  .stat-card:last-child { border-radius: 0 0 4px 0; border-top: 0; }
  .ledger-chain { grid-template-columns: 1fr; gap: 0; }
  .ledger-chain > div { min-height: 0; padding: 14px 0; border-top-width: 1px; }
}
