:root {
  --ink: #18212b;
  --muted: #687582;
  --line: #dce2e6;
  --soft-line: #edf0f2;
  --surface: #ffffff;
  --canvas: #f3f5f6;
  --nav: #17242c;
  --nav-soft: #23343e;
  --teal: #147d73;
  --teal-dark: #0f665e;
  --teal-soft: #e0f1ee;
  --blue: #316a91;
  --blue-soft: #e5eef4;
  --amber: #c88327;
  --amber-soft: #f8ecd9;
  --coral: #bd5c4d;
  --coral-soft: #f7e6e3;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(20, 33, 42, .04), 0 8px 24px rgba(20, 33, 42, .05);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); min-width: 320px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--nav); color: #fff; padding: 22px 14px 18px; display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 9px 24px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-mark { width: 36px; height: 36px; border-radius: 6px; display: grid; place-items: center; background: #e9f2ef; color: var(--teal-dark); font-weight: 900; font-size: 18px; }
.brand strong { font-size: 14px; display: block; letter-spacing: 0; }
.brand span { font-size: 9px; letter-spacing: 1.5px; color: #94a6b0; display: block; margin-top: 3px; }
.nav { display: grid; gap: 5px; margin-top: 18px; }
.nav-item { border: 0; color: #bdc8ce; background: transparent; height: 42px; border-radius: 6px; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 9px; padding: 0 11px; text-align: left; font-size: 13px; }
.nav-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-item.active { color: #fff; background: var(--nav-soft); box-shadow: inset 3px 0 var(--teal); }
.nav-item svg { width: 17px; height: 17px; }
.nav-item b { min-width: 20px; padding: 2px 6px; text-align: center; border-radius: 9px; background: rgba(255,255,255,.09); font-size: 10px; }
.sidebar-foot { margin-top: auto; padding: 16px 9px 0; border-top: 1px solid rgba(255,255,255,.1); color: #8699a3; font-size: 10px; }
.my-entry { width: 100%; border: 0; border-radius: 8px; background: rgba(255,255,255,.06); color: #dbe5e9; min-height: 52px; padding: 8px; display: grid; grid-template-columns: 32px 1fr 14px; align-items: center; gap: 9px; text-align: left; margin-bottom: 12px; }
.my-entry:hover { background: rgba(255,255,255,.1); }
.my-entry .my-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: #fff; font-weight: 900; }
.my-entry strong { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-entry em { display: block; margin-top: 3px; color: #91a5ae; font-style: normal; font-size: 9px; }
.my-entry svg { width: 13px; height: 13px; color: #91a5ae; }
.save-state { display: flex; align-items: center; gap: 6px; color: #a9b8bf; margin-bottom: 5px; }
.save-state span { width: 7px; height: 7px; border-radius: 50%; background: #53bca7; box-shadow: 0 0 0 3px rgba(83,188,167,.12); }
.main { min-width: 0; }
.topbar { height: 76px; background: rgba(255,255,255,.95); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 28px; position: sticky; top: 0; z-index: 15; backdrop-filter: blur(10px); }
.topbar > div { display: flex; align-items: center; gap: 12px; }
.page-heading h1 { font-size: 20px; margin: 0 0 3px; }
.page-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.top-actions { display: flex; gap: 8px; }
.mobile-menu { display: none !important; }
.button, .icon-button, .text-button { border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 6px; }
.button { min-height: 36px; padding: 0 14px; font-size: 12px; font-weight: 700; }
.button svg { width: 15px; height: 15px; }
.button.primary { background: var(--teal); color: #fff; box-shadow: 0 4px 12px rgba(20,125,115,.18); }
.button.primary:hover { background: var(--teal-dark); }
.button.secondary { background: #fff; color: #34434d; border: 1px solid var(--line); }
.button.small { min-height: 32px; padding: 0 11px; }
.button.mini { min-height: 28px; padding: 0 9px; font-size: 10px; }
.button:disabled, .icon-button:disabled { opacity: .45; cursor: not-allowed; }
.button.danger-ghost { color: var(--coral); background: var(--coral-soft); }
.icon-button { width: 34px; height: 34px; background: #fff; border: 1px solid var(--line); color: #4d5b64; }
.icon-button:hover { background: #f7f9fa; }
.icon-button svg { width: 16px; height: 16px; }
.text-button { background: transparent; color: var(--teal); padding: 5px; font-size: 11px; font-weight: 700; }
.text-button svg { width: 13px; height: 13px; }
.view { display: none; padding: 22px 28px 34px; }
.view.active { display: block; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-head { min-height: 58px; padding: 14px 17px; border-bottom: 1px solid var(--soft-line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-head h2 { margin: 0 0 3px; font-size: 13px; }
.panel-head span { color: var(--muted); font-size: 10px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); min-height: 112px; padding: 16px; display: grid; grid-template-columns: 1fr 38px; box-shadow: var(--shadow); }
.kpi-label { font-size: 11px; color: var(--muted); }
.kpi-value { font-size: 24px; font-weight: 800; margin-top: 12px; font-variant-numeric: tabular-nums; }
.kpi-foot { font-size: 10px; color: var(--muted); margin-top: 7px; }
.kpi-icon { width: 38px; height: 38px; border-radius: 7px; display: grid; place-items: center; }
.kpi-icon svg { width: 18px; height: 18px; }
.kpi:nth-child(1) .kpi-icon { color: var(--blue); background: var(--blue-soft); }
.kpi:nth-child(2) .kpi-icon { color: var(--teal); background: var(--teal-soft); }
.kpi:nth-child(3) .kpi-icon { color: var(--amber); background: var(--amber-soft); }
.kpi:nth-child(4) .kpi-icon { color: var(--coral); background: var(--coral-soft); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .8fr); gap: 16px; }
.trend-panel, .status-panel { min-height: 310px; }
.bar-chart { height: 236px; padding: 24px 18px 14px; display: flex; align-items: end; justify-content: space-around; gap: 14px; border-bottom: 0; }
.bar-item { height: 100%; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: end; gap: 7px; min-width: 30px; }
.bar-track { height: 182px; width: min(48px, 72%); display: flex; align-items: end; border-bottom: 1px solid var(--line); position: relative; }
.bar-fill { width: 100%; min-height: 3px; background: var(--teal); border-radius: 4px 4px 0 0; position: relative; transition: height .3s ease; }
.bar-fill:hover { background: var(--teal-dark); }
.bar-value { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 9px; font-weight: 700; color: #42525c; }
.bar-label { font-size: 10px; color: var(--muted); }
.legend { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); }
.legend span { width: 8px; height: 8px; border-radius: 2px; background: var(--teal); }
.donut-wrap { height: 245px; display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 12px; padding: 15px; }
.donut { width: 138px; height: 138px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--teal) 0 25%, var(--blue) 25% 50%, var(--amber) 50% 75%, #b9c3c8 75%); position: relative; }
.donut::after { content: ""; position: absolute; inset: 25px; border-radius: 50%; background: #fff; }
.donut > div { position: relative; z-index: 1; text-align: center; }
.donut strong { display: block; font-size: 26px; }
.donut span { color: var(--muted); font-size: 10px; }
.status-legend { display: grid; gap: 11px; }
.status-row { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 7px; font-size: 11px; }
.status-row i { width: 8px; height: 8px; border-radius: 2px; }
.status-row b { font-size: 11px; }
.recent-list, .workload-list { padding: 6px 16px 12px; }
.recent-item { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--soft-line); }
.recent-item:last-child { border-bottom: 0; }
.project-dot { width: 32px; height: 32px; border-radius: 6px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-size: 11px; font-weight: 800; }
.recent-main strong { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-main span { color: var(--muted); font-size: 9px; }
.recent-money { font-size: 11px; font-weight: 700; }
.workload-row { display: grid; grid-template-columns: 28px 90px 1fr 22px; align-items: center; gap: 8px; padding: 8px 0; }
.avatar { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--blue); font-size: 9px; font-weight: 800; }
.workload-row span { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meter { height: 6px; border-radius: 3px; background: #edf1f2; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.workload-row b { font-size: 10px; text-align: right; }
.toolbar { min-height: 58px; padding: 10px 12px; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.search-box { height: 36px; width: min(390px, 45vw); background: #f6f8f9; border: 1px solid var(--line); border-radius: 6px; display: flex; align-items: center; padding: 0 10px; gap: 8px; }
.search-box svg { width: 15px; color: var(--muted); }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 12px; }
.toolbar-filters { display: flex; align-items: center; gap: 7px; }
select, input { min-height: 36px; border: 1px solid #cfd7dc; border-radius: 5px; background: #fff; padding: 0 10px; color: var(--ink); outline: 0; }
select:focus, input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(20,125,115,.1); }
.toolbar select { font-size: 11px; color: #43515a; }
.table-panel { overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th { height: 39px; background: #f6f8f9; color: #596872; text-align: left; font-weight: 700; white-space: nowrap; padding: 0 13px; border-bottom: 1px solid var(--line); }
td { height: 54px; padding: 7px 13px; border-bottom: 1px solid var(--soft-line); white-space: nowrap; }
tbody tr:hover { background: #fbfcfc; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.project-cell strong { display: block; color: #26343d; margin-bottom: 3px; }
.project-cell span { color: var(--muted); font-size: 9px; }
.person-cell { display: flex; align-items: center; gap: 7px; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 4px; font-size: 9px; font-weight: 700; }
.status-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-待启动 { color: #66757e; background: #edf0f2; }
.status-进行中 { color: #276487; background: var(--blue-soft); }
.status-质控中 { color: #9b671f; background: var(--amber-soft); }
.status-已完成 { color: #167166; background: var(--teal-soft); }
.row-actions { display: flex; justify-content: flex-end; gap: 4px; }
.row-actions .icon-button { width: 30px; height: 30px; border-color: transparent; background: transparent; }
.row-actions .delete:hover { color: var(--coral); background: var(--coral-soft); }
.empty-state { display: none; min-height: 260px; align-items: center; justify-content: center; flex-direction: column; color: var(--muted); gap: 10px; }
.empty-state.show { display: flex; }
.empty-state svg { width: 32px; height: 32px; stroke-width: 1.5; }
.empty-state strong { font-size: 12px; }
.people-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.mini-kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 17px; box-shadow: var(--shadow); }
.mini-kpi span { color: var(--muted); font-size: 10px; }
.mini-kpi strong { font-size: 20px; display: block; margin-top: 7px; }
.table-title { min-height: 62px; }
.settings-layout { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(300px,.75fr); gap: 14px; align-items: start; }
.settings-panel { overflow: hidden; }
.settings-form { padding: 12px 17px 5px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.settings-form label, .modal label { display: grid; gap: 6px; }
.settings-form label span, .modal label span { font-size: 10px; color: #52616a; font-weight: 700; }
.setting-group { grid-column: 1 / -1; border: 1px solid var(--soft-line); border-radius: var(--radius); padding: 12px; background: #fbfcfc; }
.setting-group h3 { margin: 0 0 10px; font-size: 12px; color: #26343d; }
.setting-group-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.field-with-unit { position: relative; }
.field-with-unit input { width: 100%; padding-right: 34px; }
.field-with-unit em { position: absolute; right: 11px; top: 10px; font-size: 10px; color: var(--muted); font-style: normal; }
.balance-check { margin: 12px 17px 17px; padding: 10px 12px; border-radius: 5px; background: var(--teal-soft); color: var(--teal-dark); display: flex; justify-content: space-between; font-size: 10px; font-weight: 700; }
.balance-check.bad { background: var(--coral-soft); color: var(--coral); }
.person-list { padding: 8px 16px 16px; }
.person-setting { display: grid; grid-template-columns: 30px 1fr auto auto; align-items: center; gap: 9px; padding: 9px 0; border-bottom: 1px solid var(--soft-line); }
.person-setting:last-child { border-bottom: 0; }
.person-setting strong { font-size: 11px; }
.person-setting.account-bound { grid-template-columns: 30px minmax(120px, 1fr) minmax(160px, 220px) auto; align-items: center; }
.person-setting.account-bound label { display: grid; gap: 4px; }
.person-setting.account-bound label span { color: var(--muted); font-size: 9px; font-weight: 700; }
.person-setting.account-bound input { min-height: 30px; font-size: 11px; }
.lock-tip { color: var(--muted); font-size: 10px; white-space: nowrap; }
.type-tag { font-size: 9px; padding: 4px 7px; border-radius: 4px; color: var(--blue); background: var(--blue-soft); }
.type-tag.intern { color: #9a651d; background: var(--amber-soft); }
.person-setting .icon-button { width: 28px; height: 28px; border: 0; }
.data-panel { grid-column: 2; }
.data-actions { padding: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.account-grid, .admin-layout { display: grid; grid-template-columns: minmax(320px, .8fr) minmax(420px, 1.2fr); gap: 14px; align-items: start; }
.account-users { grid-column: 1 / -1; overflow: hidden; }
.account-card { padding: 18px; display: flex; align-items: center; gap: 14px; }
.account-card.stacked { padding: 0; }
.account-card strong { display: block; font-size: 18px; margin-bottom: 6px; }
.account-card span { color: var(--muted); font-size: 12px; }
.password-cell { display: inline-flex; align-items: center; gap: 8px; }
.password-cell code { min-width: 78px; padding: 4px 7px; border-radius: 4px; background: #f5f7f8; color: #26343d; font-family: Consolas, monospace; font-size: 11px; }
.my-panel-body { padding: 18px; display: grid; gap: 16px; }
.my-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.my-info-grid div { border: 1px solid var(--soft-line); border-radius: var(--radius); padding: 10px; background: #fbfcfc; }
.my-info-grid span { display: block; color: var(--muted); font-size: 10px; margin-bottom: 6px; }
.my-info-grid strong { font-size: 12px; }
.my-actions { margin: 0 18px 18px; }
.person-cell { min-width: 0; }
.person-cell small { display: block; color: var(--muted); font-size: 9px; margin-top: 2px; }
.clickable-row { cursor: pointer; }
.clickable-row:hover { background: #f3faf8; }
.detail-body { padding: 16px 18px 18px; }
.detail-body .people-summary { margin-bottom: 14px; }
.big-avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--teal); font-weight: 900; font-size: 20px; box-shadow: 0 8px 24px rgba(20,125,115,.18); }
.admin-form { padding: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.admin-form label { display: grid; gap: 6px; }
.admin-form label span { font-size: 10px; color: #52616a; font-weight: 700; }
.admin-form button { justify-self: start; }
.admin-layout { grid-template-columns: minmax(0, 1fr) minmax(360px, .85fr); }
.admin-layout .panel:first-child { grid-column: 1; }
.admin-layout .panel:nth-child(2) { grid-column: 1; }
.preview-panel { grid-column: 2; grid-row: 1 / span 2; }
.theme-preview { padding: 18px; display: grid; gap: 14px; }
.preview-brand { background: var(--nav); color: #fff; border-radius: var(--radius); padding: 18px; display: flex; align-items: center; gap: 12px; }
.preview-brand b { width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center; background: #e9f2ef; color: var(--teal-dark); font-size: 18px; }
.preview-brand strong { display: block; font-size: 15px; }
.preview-brand span { display: block; margin-top: 4px; color: #9fb0b9; font-size: 10px; letter-spacing: 1.4px; }
.preview-card { min-height: 100px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--canvas); padding: 14px; color: var(--muted); font-size: 12px; display: grid; place-items: center; text-align: center; }
.admin-design input[type="color"] { padding: 3px; min-height: 38px; }
.fatal { max-width: 520px; margin: 80px auto; padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; }
.fatal h1 { margin: 0 0 10px; font-size: 22px; }
.fatal p { color: var(--muted); }
.fatal a { color: var(--teal); font-weight: 700; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(13,23,29,.5); display: none; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(3px); }
.modal-backdrop.open { display: flex; }
.modal { width: min(820px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 8px; box-shadow: 0 24px 80px rgba(0,0,0,.24); }
.small-modal { width: min(430px,100%); }
.modal-head { min-height: 68px; padding: 15px 18px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 17px; }
.eyebrow { color: var(--teal); font-size: 8px; letter-spacing: 1.6px; font-weight: 800; }
.modal form { padding: 17px 18px 18px; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.form-grid label:first-child { grid-column: span 2; }
.modal label input, .modal label select { width: 100%; }
.modal label small { color: var(--muted); font-size: 9px; }
.form-section-title { border-top: 1px solid var(--soft-line); margin: 18px 0 12px; padding-top: 13px; font-size: 11px; font-weight: 800; }
.costs-grid { grid-template-columns: repeat(4,1fr); }
.costs-grid label:first-child { grid-column: span 1; }
.fixed-cost-note { margin-top: 16px; border: 1px dashed #b8d8d2; background: #f7fcfb; color: #3f5755; border-radius: 6px; padding: 10px 12px; display: flex; align-items: center; gap: 8px; font-size: 11px; }
.fixed-cost-note svg { width: 15px; color: var(--teal); }
.fixed-cost-note strong { color: var(--teal-dark); }
.fixed-cost-note em { margin-left: auto; color: var(--muted); font-style: normal; }
.live-calculation { margin-top: 12px; border: 1px solid #cfe2de; background: #f3faf8; padding: 13px; border-radius: 6px; display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.calc-item span { color: var(--muted); font-size: 9px; display: block; }
.calc-item strong { font-size: 13px; display: block; margin-top: 5px; }
.calc-item.primary strong { color: var(--teal-dark); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--soft-line); }
.small-modal form { display: grid; gap: 13px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 200; min-height: 42px; padding: 0 14px; background: #16252d; color: #fff; border-radius: 6px; display: flex; align-items: center; gap: 8px; font-size: 11px; box-shadow: 0 14px 40px rgba(0,0,0,.2); transform: translateY(90px); opacity: 0; transition: .22s ease; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast svg { width: 15px; color: #6ed2be; }
.login-page { min-height: 100vh; background: radial-gradient(circle at 15% 20%, rgba(20,125,115,.16), transparent 28%), linear-gradient(135deg, #102129 0%, #eef4f3 58%, #f7faf9 100%); }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.login-card { width: min(440px, 100%); background: rgba(255,255,255,.96); border: 1px solid rgba(255,255,255,.8); border-radius: 16px; box-shadow: 0 26px 80px rgba(15,32,39,.22); padding: 28px; }
.login-brand { display: flex; align-items: center; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--soft-line); }
.login-brand strong { display: block; font-size: 18px; }
.login-brand span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; letter-spacing: 1.6px; }
.login-heading { margin: 22px 0 18px; }
.login-heading h1 { margin: 0 0 8px; font-size: 24px; }
.login-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.login-form { display: grid; gap: 14px; }
.login-form label { display: grid; gap: 7px; }
.login-form label span { color: #52616a; font-size: 11px; font-weight: 800; }
.login-form input { width: 100%; min-height: 42px; }
.login-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: -2px; }
.login-options .remember-option { display: inline-flex; grid-template-columns: none; align-items: center; width: auto; gap: 7px; color: #52616a; cursor: pointer; user-select: none; }
.login-options .remember-option input { width: 15px; min-height: 15px; height: 15px; accent-color: var(--teal); }
.login-options .remember-option span { font-size: 12px; font-weight: 700; }
.login-submit { width: 100%; min-height: 42px; margin-top: 4px; }
.login-tip { margin-top: 16px; padding: 12px; border-radius: 8px; background: #f6f8f9; color: var(--muted); display: grid; gap: 6px; font-size: 11px; }
.login-tip code { color: #26343d; font-family: Consolas, monospace; }
.login-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.login-error { margin: 14px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--coral-soft); color: var(--coral); font-size: 12px; }
.login-footer-actions { margin-top: 14px; text-align: center; }
.portal-page { min-height: 100vh; background: linear-gradient(135deg, #f3f7f6 0%, #ffffff 45%, #e8f2ef 100%); }
.portal-shell { max-width: 1120px; margin: 0 auto; padding: 34px 28px 60px; }
.portal-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 46px; }
.portal-brand { padding: 0; border: 0; }
.portal-user { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.portal-hero { margin-bottom: 24px; }
.portal-hero h1 { margin: 8px 0 10px; font-size: 34px; }
.portal-hero p { margin: 0; color: var(--muted); max-width: 720px; line-height: 1.8; }
.portal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.portal-card { min-height: 240px; padding: 26px; border-radius: 18px; background: rgba(255,255,255,.92); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; display: flex; flex-direction: column; gap: 12px; transition: .2s ease; }
.portal-card:hover { transform: translateY(-3px); box-shadow: 0 20px 60px rgba(20,33,42,.12); border-color: rgba(20,125,115,.35); }
.portal-card svg { width: 34px; height: 34px; color: var(--teal); }
.portal-card span { color: var(--teal); font-size: 12px; font-weight: 800; letter-spacing: .8px; }
.portal-card strong { font-size: 24px; line-height: 1.35; max-width: 360px; }
.portal-card em { margin-top: auto; color: var(--muted); font-style: normal; font-size: 13px; }
.platform-return { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 6px; background: #fff; border: 1px solid var(--line); color: #34434d; font-size: 12px; font-weight: 800; text-decoration: none; }

@media (max-width: 1050px) {
  .kpi-grid { grid-template-columns: repeat(2,1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .portal-grid { grid-template-columns: 1fr; }
  .data-panel { grid-column: auto; }
  .account-grid, .admin-layout { grid-template-columns: 1fr; }
  .preview-panel, .admin-layout .panel:first-child, .admin-layout .panel:nth-child(2) { grid-column: auto; grid-row: auto; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: -240px; width: 224px; transition: left .2s ease; box-shadow: 14px 0 40px rgba(0,0,0,.2); }
  .sidebar.open { left: 0; }
  .mobile-menu { display: inline-flex !important; }
  .topbar { height: 66px; padding: 0 14px; }
  .page-heading h1 { font-size: 17px; }
  .top-actions .secondary { display: none; }
  .view { padding: 14px; }
  .kpi-grid { gap: 9px; }
  .kpi { min-height: 100px; padding: 12px; }
  .kpi-value { font-size: 18px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search-box { width: 100%; }
  .toolbar-filters { justify-content: space-between; }
  .toolbar select { flex: 1; min-width: 0; }
  .people-summary { grid-template-columns: 1fr; gap: 8px; }
  .form-grid, .costs-grid { grid-template-columns: 1fr 1fr; }
  .form-grid label:first-child { grid-column: span 2; }
  .costs-grid label:first-child { grid-column: span 1; }
  .live-calculation { grid-template-columns: 1fr 1fr; }
  .donut-wrap { grid-template-columns: 140px 1fr; }
  .admin-form { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .top-actions .button span { display: none; }
  .top-actions .button { width: 36px; padding: 0; }
  .kpi-grid { grid-template-columns: 1fr; }
  .form-grid, .costs-grid { grid-template-columns: 1fr; }
  .form-grid label:first-child { grid-column: span 1; }
  .live-calculation { grid-template-columns: 1fr 1fr; }
  .settings-form { grid-template-columns: 1fr; }
  .setting-group-grid { grid-template-columns: 1fr; }
  .person-setting.account-bound { grid-template-columns: 30px 1fr; }
  .person-setting.account-bound label, .person-setting.account-bound .lock-tip, .person-setting.account-bound .icon-button { grid-column: 2; }
  .donut-wrap { grid-template-columns: 1fr; justify-items: center; height: auto; }
  .status-legend { width: 100%; grid-template-columns: 1fr 1fr; }
}
