:root {
  --navy: #0b1f3a;
  --navy-2: #102b50;
  --blue: #246bfd;
  --blue-dark: #1551ca;
  --blue-soft: #edf4ff;
  --cyan: #0fa4c5;
  --green: #10a875;
  --orange: #ec8a24;
  --purple: #7657d6;
  --red: #d74b58;
  --ink: #142033;
  --muted: #6f7c90;
  --line: #e4e9f1;
  --canvas: #f3f6fb;
  --white: #ffffff;
  --shadow: 0 12px 34px rgba(27, 48, 82, .07);
  --shadow-strong: 0 24px 64px rgba(18, 46, 87, .13);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

/* Application shell */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 268px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 18px 18px; color: #fff; background: linear-gradient(175deg, #0a1d36 0%, #102b4e 64%, #0c233f 100%); display: flex; flex-direction: column; overflow: auto; box-shadow: 10px 0 35px rgba(8, 28, 54, .08); z-index: 4; }
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 22px; }
.brand-mark { flex: 0 0 auto; width: 43px; height: 43px; border-radius: 13px; display: grid; place-items: center; color: #fff; font-size: 20px; font-weight: 900; background: linear-gradient(145deg, #2e70ff, #4dbcf5); box-shadow: 0 10px 26px rgba(36, 107, 253, .32); }
.brand-copy strong, .brand-copy small { display: block; }
.brand-copy strong { font-size: 16px; letter-spacing: .2px; }
.brand-copy small { margin-top: 4px; color: #8ea7c6; font-size: 9px; letter-spacing: 1.25px; }
.workspace-badge { margin: 0 5px 25px; padding: 12px 13px; display: flex; align-items: center; gap: 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 11px; background: rgba(255,255,255,.045); }
.workspace-badge b, .workspace-badge small { display: block; }
.workspace-badge b { font-size: 11px; font-weight: 600; }
.workspace-badge small { margin-top: 4px; color: #8ea7c6; font-size: 9px; }
.status-pulse { width: 8px; height: 8px; border-radius: 50%; background: #35d49a; box-shadow: 0 0 0 5px rgba(53, 212, 154, .12); }
.side-nav { display: grid; gap: 5px; }
.nav-label { margin: 16px 12px 5px; color: #6e89aa; font-size: 9px; font-weight: 800; letter-spacing: 1.15px; }
.side-nav a { min-height: 44px; padding: 9px 12px; display: flex; align-items: center; gap: 11px; border: 1px solid transparent; border-radius: 10px; color: #aec0d7; font-size: 13px; transition: .18s ease; }
.side-nav a:hover { color: #fff; background: rgba(255,255,255,.055); transform: translateX(2px); }
.side-nav a.active { color: #fff; border-color: rgba(113, 165, 255, .19); background: linear-gradient(90deg, rgba(45, 105, 221, .34), rgba(45, 105, 221, .13)); box-shadow: inset 3px 0 0 #4c8eff; }
.side-nav a.nav-subitem { min-height: 38px; padding-left: 18px; font-size: 11px; }
.nav-icon { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: #a9c5e7; background: rgba(255,255,255,.06); font-size: 11px; font-weight: 800; }
.side-nav a.active .nav-icon { color: #fff; background: #2f6edb; }
.sidebar-version { margin-top: auto; padding: 15px 4px 0; display: flex; justify-content: space-between; color: #647f9e; font-family: Consolas, monospace; font-size: 9px; }

.main-area { min-width: 0; overflow-x: clip; }
.topbar { min-height: 98px; padding: 18px 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.page-heading .eyebrow { margin: 0 0 3px; color: var(--blue); font-size: 9px; font-weight: 800; letter-spacing: 1.2px; }
.page-heading h1 { margin: 0; font-size: 23px; line-height: 1.25; letter-spacing: -.35px; }
.page-heading > p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.top-status { padding: 8px 11px; display: flex; align-items: center; gap: 7px; border-radius: 20px; color: #59677a; background: #f3f6fa; font-size: 10px; font-weight: 600; white-space: nowrap; }
.top-status i { width: 7px; height: 7px; border-radius: 50%; background: #aeb8c6; }
.top-status.ready { color: #087a54; background: #eaf8f2; }
.top-status.ready i { background: var(--green); }
.top-status.waiting { color: #a36b16; background: #fff5df; }
.top-status.waiting i { background: var(--orange); }
.demo-toggle { padding: 8px 11px; color: #5b3cad; border: 1px solid #d9cff8; border-radius: 20px; background: #f5f1ff; font-size: 9px; font-weight: 700; white-space: nowrap; }
.demo-toggle:hover, .demo-toggle.active { color: #fff; border-color: var(--purple); background: var(--purple); }
.scope-card { min-width: 118px; padding: 7px 12px; border-left: 1px solid var(--line); }
.scope-card span, .scope-card strong { display: block; }
.scope-card span { color: var(--muted); font-size: 9px; }
.scope-card strong { max-width: 165px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.user-card { display: flex; align-items: center; gap: 9px; }
.user-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--blue); background: #eaf1ff; font-size: 13px; font-weight: 800; }
.user-copy strong, .user-copy small { display: block; }
.user-copy strong { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.user-copy small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.text-button { padding: 7px; color: #8590a0; border: 0; background: transparent; cursor: pointer; font-size: 10px; }
.text-button:hover { color: var(--blue); }
.content { width: 100%; max-width: 1660px; margin: 0 auto; padding: 25px 32px 52px; }

/* Overview */
.baseline-hero { position: relative; overflow: hidden; margin-bottom: 17px; padding: 24px 26px; display: grid; grid-template-columns: minmax(270px, .9fr) minmax(560px, 1.5fr); align-items: center; gap: 28px; color: #fff; border-radius: 17px; background: linear-gradient(115deg, #17488f 0%, #1c5bb2 50%, #173f7b 100%); box-shadow: 0 16px 38px rgba(21, 75, 151, .18); }
.baseline-hero::after { content: ""; position: absolute; right: -90px; top: -150px; width: 330px; height: 330px; border: 55px solid rgba(255,255,255,.045); border-radius: 50%; }
.baseline-copy, .baseline-kpis { position: relative; z-index: 1; }
.hero-kicker, .section-kicker { color: #7eb4ff; font-size: 9px; font-weight: 800; letter-spacing: 1.2px; }
.baseline-copy h2 { margin: 7px 0 6px; display: flex; align-items: center; gap: 10px; font-size: 20px; }
.baseline-copy h2 i { width: 4px; height: 4px; border-radius: 50%; background: #82b7ff; }
.baseline-copy p { margin: 0; color: #c7d8ef; font-size: 10px; }
.baseline-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.baseline-kpis article { min-height: 65px; padding: 4px 22px; border-left: 1px solid rgba(255,255,255,.15); }
.baseline-kpis span, .baseline-kpis strong, .baseline-kpis small { display: block; }
.baseline-kpis span { color: #c8d9ef; font-size: 9px; }
.baseline-kpis strong { margin-top: 8px; font-size: 19px; }
.baseline-kpis small { margin-top: 4px; color: #a9c4e6; font-size: 8px; }
.baseline-kpis .pending strong { color: #ffd26d; }
.baseline-kpis .confirmed strong { color: #aef0cf; }
.baseline-kpis .final-profit-entry { padding: 0; transition: background .18s ease; }
.baseline-kpis .final-profit-entry:hover { background: rgba(255,255,255,.07); }
.baseline-kpis .final-profit-entry a { min-height: 73px; padding: 4px 22px; display: block; color: inherit; text-decoration: none; }
.baseline-kpis .final-profit-entry b { display: block; margin-top: 6px; color: #fff; font-size: 9px; }
.baseline-kpis .baseline-kpi-entry { padding: 0; transition: background .18s ease; }
.baseline-kpis .baseline-kpi-entry:hover { background: rgba(255,255,255,.07); }
.baseline-kpis .baseline-kpi-entry a { min-height: 73px; padding: 4px 22px; display: block; color: inherit; text-decoration: none; }
.preview-notice { margin: -2px 0 16px; padding: 12px 15px; display: flex; align-items: center; gap: 11px; color: #765b20; border: 1px solid #efd89f; border-radius: 11px; background: #fff8e6; box-shadow: 0 8px 22px rgba(111, 83, 24, .05); }
.preview-notice > span { flex: 0 0 auto; padding: 5px 8px; color: #9a6713; border-radius: 15px; background: #ffebba; font-size: 8px; font-weight: 800; }
.preview-notice p { margin: 0; font-size: 9px; line-height: 1.65; }
.demo-notice { margin: -2px 0 16px; padding: 13px 15px; display: flex; align-items: center; gap: 11px; color: #49347e; border: 1px solid #d9cff5; border-radius: 11px; background: linear-gradient(100deg, #f4f0ff, #faf8ff); box-shadow: 0 8px 22px rgba(85, 57, 148, .06); }
.demo-notice > span { flex: 0 0 auto; padding: 5px 8px; color: #fff; border-radius: 14px; background: var(--purple); font-family: Consolas, monospace; font-size: 8px; font-weight: 800; letter-spacing: .8px; }
.demo-notice p { margin: 0; font-size: 9px; line-height: 1.65; }

.control-bar { margin-bottom: 16px; padding: 12px 15px; display: flex; align-items: flex-end; gap: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.control-group { display: grid; gap: 6px; }
.control-label { color: var(--muted); font-size: 9px; font-weight: 600; }
.segmented, .region-tabs { display: flex; gap: 3px; padding: 3px; border-radius: 9px; background: #f0f3f8; }
.segmented a, .region-tabs a { min-width: 47px; padding: 7px 10px; text-align: center; border-radius: 7px; color: #68758a; font-size: 10px; font-weight: 700; white-space: nowrap; }
.segmented a.active, .region-tabs a.active { color: var(--blue); background: #fff; box-shadow: 0 3px 10px rgba(32, 61, 99, .11); }
.region-tabs a { min-width: auto; }
.date-filter { display: grid; grid-template-columns: auto 138px auto 112px auto auto 112px auto; gap: 5px 7px; align-items: center; }
.date-filter-title { grid-column: 1 / -1; color: var(--muted); font-size: 9px; font-weight: 700; }
.date-filter label { color: var(--muted); font-size: 9px; font-weight: 600; white-space: nowrap; }
.date-separator { color: var(--muted); font-size: 9px; }
.date-filter input, .date-filter select { height: 34px; padding: 0 9px; color: #344156; border: 1px solid var(--line); border-radius: 8px; outline: none; background: #fff; font-size: 10px; }
.date-filter input:focus, .date-filter select:focus { border-color: #86aafa; box-shadow: 0 0 0 3px #eff4ff; }
.date-filter button { height: 34px; padding: 0 13px; color: #fff; border: 0; border-radius: 8px; background: var(--blue); cursor: pointer; font-size: 10px; }
.range-summary { margin-left: auto; padding: 0 5px 2px; text-align: right; }
.range-summary span, .range-summary strong { display: block; }
.range-summary span { color: var(--blue); font-size: 9px; font-weight: 700; }
.range-summary strong { margin-top: 5px; font-size: 11px; white-space: nowrap; }

.metric-grid { margin-bottom: 16px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 11px; }
.metric-card { position: relative; overflow: hidden; min-height: 125px; padding: 17px 17px 15px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.metric-card-link { display: block; color: inherit; text-decoration: none; cursor: pointer; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.metric-card-link:hover, .metric-card-link:focus-visible { transform: translateY(-2px); border-color: #8fb7f0; box-shadow: 0 12px 26px rgba(31, 82, 147, .13); outline: none; }
.metric-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: #aab7c8; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.metric-top span { color: #657288; font-size: 10px; white-space: nowrap; }
.metric-top i { padding: 3px 6px; border-radius: 5px; color: #7b8798; background: #f1f4f8; font-size: 8px; font-style: normal; }
.metric-card > strong { display: block; margin: 16px 0 10px; font-size: clamp(17px, 1.35vw, 23px); letter-spacing: -.4px; white-space: nowrap; }
.metric-card > small { color: #8793a5; font-size: 8px; line-height: 1.45; }
.metric-card.blue::before { background: var(--blue); }
.metric-card.blue .metric-top i { color: var(--blue); background: var(--blue-soft); }
.metric-card.cyan::before { background: var(--cyan); }
.metric-card.cyan .metric-top i { color: #057e99; background: #e8f8fb; }
.metric-card.green::before { background: var(--green); }
.metric-card.green .metric-top i { color: #07845b; background: #e8f8f2; }
.metric-card.orange::before { background: var(--orange); }
.metric-card.orange .metric-top i { color: #a66312; background: #fff4e6; }
.metric-card.purple::before { background: var(--purple); }
.metric-card.purple .metric-top i { color: #6241bd; background: #f1edff; }
.metric-card.pending-card { background: linear-gradient(145deg, #fffdf7, #fff8e9); }
.metric-card.pending-card::before { background: #d8aa3c; }
.metric-card.pending-card > strong { color: #aa7711; }

.status-grid { margin-bottom: 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.status-card { min-height: 92px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow); }
.status-icon { width: 39px; height: 39px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; color: #6f7b8d; background: #f1f4f8; font-size: 12px; font-weight: 800; }
.status-icon.blue { color: var(--blue); background: #eaf1ff; }
.status-icon.cyan { color: #087f99; background: #e7f7fa; }
.status-icon.green { color: #087c57; background: #e7f7f0; }
.status-icon.orange { color: #ab6812; background: #fff2df; }
.status-icon.purple { color: #6442bd; background: #f0ecff; }
.status-card span, .status-card strong, .status-card small { display: block; }
.status-card span { color: var(--muted); font-size: 9px; }
.status-card strong { margin: 4px 0; font-size: 17px; }
.status-card small { color: #8a95a5; font-size: 8px; line-height: 1.4; }
.status-card-link { color: inherit; text-decoration: none; cursor: pointer; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.status-card-link:hover, .status-card-link:focus-visible { transform: translateY(-2px); border-color: #8fb7f0; box-shadow: 0 12px 26px rgba(31, 82, 147, .13); outline: none; }

.dashboard-columns { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(285px, .72fr); gap: 16px; }
.dashboard-columns > *, .side-stack > * { min-width: 0; }
.dashboard-ranking-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.dashboard-ranking-stack > * { min-width: 0; }
.side-stack { min-width: 0; }
.panel { margin-bottom: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow); }
.panel-header { margin-bottom: 15px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.panel-header h2 { margin: 3px 0 0; font-size: 15px; }
.panel-header p { margin: 5px 0 0; color: var(--muted); font-size: 9px; }
.panel-header a { color: var(--blue); font-size: 9px; font-weight: 700; }
.panel-header.compact { margin-bottom: 10px; }
.count-badge { padding: 6px 9px; color: #59687c; border-radius: 18px; background: #f1f4f8; font-size: 9px; white-space: nowrap; }
.count-badge.warning { color: #9e6419; background: #fff2dc; }
.count-badge-link { text-decoration: none; }
.table-wrap { width: 100%; overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 10px; }
th { padding: 10px 11px; color: #7a879a; background: #f7f9fc; text-align: left; font-size: 9px; font-weight: 700; white-space: nowrap; }
th:first-child { border-radius: 8px 0 0 8px; }
th:last-child { border-radius: 0 8px 8px 0; }
td { padding: 11px; border-bottom: 1px solid #edf1f6; color: #344156; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcff; }
td.numeric, th.numeric { text-align: right; font-variant-numeric: tabular-nums; }
td.profit { color: #087d58; }
.rank { width: 22px; height: 22px; display: grid; place-items: center; color: #68768a; border-radius: 7px; background: #f1f4f8; font-size: 9px; font-weight: 800; }
tr:nth-child(-n+3) .rank { color: var(--blue); background: #eaf1ff; }
.table-subtext { display: block; margin-top: 4px; color: #939dab; font-size: 8px; }
code { padding: 4px 7px; color: #34526f; border-radius: 6px; background: #eef3f8; font-family: Consolas, monospace; font-size: 9px; }

.empty-state { min-height: 250px; padding: 34px 16px; display: grid; place-items: center; align-content: center; text-align: center; color: #69778b; }
.empty-icon { width: 50px; height: 50px; margin-bottom: 12px; display: grid; place-items: center; color: #7e9bc4; border-radius: 15px; background: #edf3fb; font-size: 18px; font-weight: 800; }
.empty-state h3 { margin: 0; color: #334157; font-size: 14px; }
.empty-state p { max-width: 500px; margin: 8px auto 0; font-size: 9px; line-height: 1.7; }
.empty-state a { margin-top: 13px; color: var(--blue); font-size: 9px; font-weight: 700; }
.empty-mini { padding: 24px 4px; color: #8a95a6; text-align: center; font-size: 9px; }

.pipeline-list { display: grid; }
.pipeline-step { position: relative; min-height: 58px; display: flex; gap: 11px; }
.pipeline-step::after { content: ""; position: absolute; left: 13px; top: 29px; bottom: -2px; width: 1px; background: #e4e9f1; }
.pipeline-step:last-child::after { display: none; }
.pipeline-step > span { position: relative; z-index: 1; width: 27px; height: 27px; flex: 0 0 auto; display: grid; place-items: center; color: #778397; border: 1px solid #dfe5ed; border-radius: 50%; background: #fff; font-size: 9px; font-weight: 800; }
.pipeline-step b, .pipeline-step small { display: block; }
.pipeline-step b { margin-top: 1px; font-size: 10px; }
.pipeline-step small { margin-top: 5px; color: #8c97a7; font-size: 8px; }
.pipeline-step.done > span { color: #fff; border-color: var(--green); background: var(--green); }
.pipeline-step.warning > span { color: #fff; border-color: var(--orange); background: var(--orange); }
.pipeline-step.locked > span { color: #fff; border-color: #7f8b9b; background: #7f8b9b; }
.pipeline-step-link { color: inherit; text-decoration: none; }

.dashboard-detail-scope { min-width: 260px; text-align: right; }
.dashboard-detail-scope span, .dashboard-detail-scope strong, .dashboard-detail-scope small { display: block; }
.dashboard-detail-scope span { color: var(--blue); }
.dashboard-detail-scope small { color: var(--muted); }
.dashboard-detail-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-record-table { min-width: 980px; }
.activity-list { display: grid; }
.activity-item { padding: 10px 2px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #eef1f5; }
.activity-item:last-child { border-bottom: 0; }
.status-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #a8b2c0; box-shadow: 0 0 0 4px #f1f3f6; }
.status-dot.success { background: var(--green); box-shadow: 0 0 0 4px #e8f7f1; }
.status-dot.failed, .status-dot.blocked { background: var(--red); box-shadow: 0 0 0 4px #fcecee; }
.status-dot.processing, .status-dot.uploading { background: var(--orange); box-shadow: 0 0 0 4px #fff3e4; }
.status-dot.uploaded { background: var(--blue); box-shadow: 0 0 0 4px #eaf1ff; }
.activity-item b, .activity-item small { display: block; }
.activity-item b { font-size: 9px; }
.activity-item small { margin-top: 4px; color: #8b96a6; font-size: 8px; }
.issue-panel { margin-bottom: 0; }
.issue-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.issue-item { padding: 12px; display: flex; gap: 10px; border: 1px solid var(--line); border-radius: 10px; }
.issue-item > span { height: max-content; padding: 4px 7px; color: #697688; border-radius: 12px; background: #eff2f6; font-size: 8px; }
.issue-item b { font-size: 9px; }
.issue-item p { margin: 5px 0 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.issue-action-link { display: inline-block; margin-top: 7px; color: var(--blue); font-size: 9px; font-weight: 750; }
.issue-item.critical { border-left: 3px solid var(--red); }
.issue-item.warning { border-left: 3px solid var(--orange); }
.empty-inline { padding: 12px 14px; display: flex; align-items: center; gap: 10px; color: #657287; border-radius: 9px; background: #f6f9fc; }
.empty-inline > span { width: 25px; height: 25px; display: grid; place-items: center; color: var(--green); border-radius: 50%; background: #e8f7f1; font-weight: 800; }
.empty-inline p { margin: 0; font-size: 9px; }

/* Master data and collection pages */
.page-intro-card { position: relative; overflow: hidden; margin-bottom: 16px; padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border: 1px solid #dbe5f5; border-radius: 15px; background: linear-gradient(120deg, #f8fbff, #eef5ff); box-shadow: var(--shadow); }
.page-intro-card::after { content: ""; position: absolute; right: 14%; top: -70px; width: 180px; height: 180px; border: 30px solid rgba(36, 107, 253, .035); border-radius: 50%; }
.page-intro-card > * { position: relative; z-index: 1; }
.page-intro-card h2 { margin: 6px 0; font-size: 18px; }
.page-intro-card p { margin: 0; color: var(--muted); font-size: 10px; }
.outline-button { padding: 10px 13px; color: var(--blue); border: 1px solid #bbd0fa; border-radius: 9px; background: rgba(255,255,255,.8); font-size: 9px; font-weight: 700; white-space: nowrap; }
.outline-button:hover { color: #fff; border-color: var(--blue); background: var(--blue); }
.master-stats, .import-stats { margin-bottom: 16px; }
.team-chip { width: 25px; height: 25px; margin-right: 8px; display: inline-grid; place-items: center; color: var(--blue); border-radius: 7px; background: #eaf1ff; font-weight: 800; }
.missing-text { color: #ad761c; }
.pill { padding: 5px 8px; display: inline-flex; align-items: center; gap: 5px; border-radius: 14px; color: #667387; background: #eef2f6; font-size: 8px; font-weight: 700; }
.pill i { width: 5px; height: 5px; border-radius: 50%; background: #9aa5b4; }
.pill.success, .pill.ready { color: #087c56; background: #e7f7f0; }
.pill.success i, .pill.ready i { background: var(--green); }
.pill.warning, .pill.processing, .pill.uploading { color: #9a6114; background: #fff1dc; }
.pill.warning i, .pill.processing i, .pill.uploading i { background: var(--orange); }
.pill.failed, .pill.blocked { color: #b13a47; background: #fce9ec; }
.pill.failed i, .pill.blocked i { background: var(--red); }
.pill.uploaded { color: #1f5bc9; background: #e8f0ff; }
.pill.uploaded i { background: var(--blue); }
.guardrail-callout { padding: 15px 18px; display: flex; align-items: center; gap: 13px; color: #6f5b2c; border: 1px solid #f0dba8; border-radius: 12px; background: #fff8e7; }
.callout-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; color: #a66f15; border-radius: 10px; background: #ffecbd; font-weight: 900; }
.guardrail-callout b { font-size: 10px; }
.guardrail-callout p { margin: 5px 0 0; font-size: 9px; line-height: 1.5; }
.guardrail-callout > span { margin-left: auto; padding: 5px 8px; border-radius: 12px; background: rgba(255,255,255,.65); font-size: 8px; white-space: nowrap; }
.api-address { min-width: 210px; padding: 12px 15px; border: 1px solid #dbe5f3; border-radius: 10px; background: rgba(255,255,255,.78); }
.api-address span, .api-address code { display: block; }
.api-address span { margin-bottom: 7px; color: var(--muted); font-size: 8px; }
.api-address code { color: var(--blue); background: transparent; padding: 0; font-size: 11px; }
.import-intro-actions { display: flex; align-items: center; gap: 10px; }
.primary-outline { color: #fff; border-color: var(--blue); background: var(--blue); }
.primary-outline:hover { border-color: var(--blue-dark); background: var(--blue-dark); }
.manual-status { min-width: 190px; padding: 13px 16px; border: 1px solid #d9e5f5; border-radius: 11px; background: rgba(255,255,255,.82); }
.manual-status span, .manual-status strong, .manual-status small { display: block; }
.manual-status span { color: var(--muted); font-size: 8px; }
.manual-status strong { margin: 5px 0; color: var(--blue); font-size: 15px; }
.manual-status small { color: #8a96a7; font-size: 8px; }
.upload-result { margin-bottom: 16px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; border-radius: 12px; }
.upload-result.success { color: #176c51; border: 1px solid #bee8d8; background: #ecf9f4; }
.upload-result.error { color: #a43a49; border: 1px solid #efc7cd; background: #fdf0f2; }
.result-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.72); font-weight: 900; }
.upload-result b { font-size: 10px; }
.upload-result p { margin: 4px 0 0; font-size: 9px; line-height: 1.5; }
.upload-result > span { margin-left: auto; padding: 5px 8px; border-radius: 14px; background: rgba(255,255,255,.68); font-size: 8px; font-weight: 700; white-space: nowrap; }
.manual-upload-form { display: block; }
.metadata-grid { display: grid; grid-template-columns: 1.15fr .78fr .78fr 1fr; gap: 13px; }
.metadata-grid label { display: grid; gap: 7px; }
.metadata-grid label > span { color: #526075; font-size: 9px; font-weight: 700; }
.metadata-grid input, .metadata-grid select { width: 100%; height: 40px; padding: 0 11px; color: #2f3c50; border: 1px solid #dfe5ed; border-radius: 9px; outline: none; background: #fbfcfe; font-size: 10px; }
.metadata-grid input:focus, .metadata-grid select:focus { border-color: #7fa5f6; background: #fff; box-shadow: 0 0 0 4px #eff4ff; }
.metadata-grid small { color: #8b96a6; font-size: 8px; }
.source-note-field { margin-top: 14px; display: grid; gap: 7px; }
.source-note-field > span { color: #526075; font-size: 9px; font-weight: 700; }
.source-note-field textarea { width: 100%; min-height: 72px; padding: 10px 11px; color: #2f3c50; border: 1px solid #dfe5ed; border-radius: 9px; outline: none; background: #fbfcfe; font: inherit; font-size: 10px; line-height: 1.5; resize: vertical; }
.source-note-field textarea:focus { border-color: #7fa5f6; background: #fff; box-shadow: 0 0 0 4px #eff4ff; }
.source-note-field small { display: block; color: #8b96a6; font-size: 8px; }
.upload-slot-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 11px; }
.upload-slot { position: relative; min-height: 175px; padding: 18px 15px; display: flex; flex-direction: column; align-items: flex-start; border: 1px dashed #cfd8e5; border-radius: 12px; background: #fafcff; cursor: pointer; transition: .18s ease; }
.upload-slot:hover { border-color: #79a0f4; background: #f4f8ff; transform: translateY(-2px); box-shadow: 0 10px 22px rgba(36,107,253,.07); }
.upload-slot:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px #eef4ff; }
.upload-slot input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.slot-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--blue); border-radius: 10px; background: #eaf1ff; font-size: 11px; font-weight: 800; }
.upload-slot strong { margin-top: 14px; font-size: 11px; }
.upload-slot small { min-height: 30px; margin-top: 6px; color: var(--muted); font-size: 8px; line-height: 1.55; }
.upload-slot em { margin-top: auto; padding: 6px 9px; color: var(--blue); border-radius: 7px; background: #edf3ff; font-size: 8px; font-style: normal; font-weight: 700; }
.upload-slot.has-file { border-color: #69bd9f; background: #f3fbf8; }
.upload-slot.has-file em { max-width: 100%; overflow: hidden; color: #087b56; background: #e2f6ee; text-overflow: ellipsis; white-space: nowrap; }
.upload-slot.has-file .slot-icon { color: #fff; background: #21836c; }
.upload-slot.required-slot { border-style: solid; border-color: #bcd0fa; background: #f8fbff; }
.upload-slot.other-slot .slot-icon { color: #6b7483; background: #eef1f5; }
.manual-selected-files { margin-top: 10px; padding: 12px 14px; border: 1px solid #bfe0d4; border-radius: 8px; background: #f2faf7; }
.manual-selected-files[hidden] { display: none; }
.manual-selected-files > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.manual-selected-files > div strong { color: #176c51; font-size: 11px; }
.manual-selected-files > div span { color: #60756e; font-size: 9px; }
.manual-selected-files ul { margin: 9px 0 0; padding: 0; display: grid; gap: 5px; list-style: none; }
.manual-selected-files li { min-width: 0; padding-top: 5px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid #d9ebe4; }
.manual-selected-files li span { min-width: 0; overflow: hidden; color: #30463f; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.manual-selected-files li small { flex: 0 0 auto; color: #75867f; font-size: 9px; }
.manual-selected-files .text-button { margin-top: 9px; padding: 0; color: #176c51; border: 0; background: transparent; cursor: pointer; font-size: 9px; font-weight: 750; }
.manual-upload-result { scroll-margin-top: 18px; }
.manual-upload-result-copy { min-width: 0; }
.manual-uploaded-files { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.manual-uploaded-files span { max-width: 420px; padding: 3px 6px; overflow: hidden; color: #176c51; border: 1px solid #cde9df; border-radius: 5px; background: rgba(255,255,255,.72); text-overflow: ellipsis; white-space: nowrap; }
.manual-upload-result-message { color: #42675b; }
.manual-upload-batch-status.success { color: #176c51; background: #dff4eb; }
.manual-upload-batch-status.blocked, .manual-upload-batch-status.failed { color: #9b4242; background: #fae6e6; }
.upload-policy { margin-top: 14px; padding: 13px 15px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; border-radius: 11px; background: #f6f8fb; }
.upload-policy > div { padding-left: 11px; border-left: 2px solid #cdd8e7; }
.upload-policy b { font-size: 9px; }
.upload-policy p { margin: 5px 0 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.upload-submit-row { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.upload-submit-row p { margin: 0; color: var(--muted); font-size: 8px; }
.upload-submit-row .primary-button { min-width: 215px; margin-top: 0; }
.compact-empty { min-height: 180px; }
.flow-track { padding: 7px 10px 3px; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: 12px; }
.flow-track > i { color: #a9b5c6; font-size: 17px; font-style: normal; }
.flow-track article { position: relative; min-height: 145px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe; }
.flow-number { position: absolute; right: 12px; top: 11px; color: #c5cfdb; font-family: Consolas, monospace; font-size: 10px; font-weight: 800; }
.flow-icon { width: 37px; height: 37px; display: grid; place-items: center; color: var(--blue); border-radius: 10px; background: #eaf1ff; font-size: 11px; font-weight: 800; }
.flow-track h3 { margin: 14px 0 6px; font-size: 11px; }
.flow-track p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.message-cell { max-width: 340px; overflow: hidden; text-overflow: ellipsis; }

/* Login */
.login-page { min-height: 100vh; background: #eff3f9; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(460px, 1.12fr) minmax(430px, .88fr); }
.login-story { position: relative; overflow: hidden; padding: clamp(38px, 6vw, 78px); display: flex; flex-direction: column; color: #fff; background: linear-gradient(145deg, #091d38 0%, #123d73 56%, #195bb0 100%); }
.login-story::before, .login-story::after { content: ""; position: absolute; border-radius: 50%; border: 80px solid rgba(255,255,255,.035); }
.login-story::before { width: 430px; height: 430px; right: -210px; top: -190px; }
.login-story::after { width: 300px; height: 300px; left: -210px; bottom: -170px; }
.login-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.login-brand strong, .login-brand small { display: block; }
.login-brand strong { font-size: 15px; }
.login-brand small { margin-top: 4px; color: #8fb2dc; font-size: 8px; letter-spacing: 1.2px; }
.login-intro { position: relative; z-index: 1; margin: auto 0 40px; max-width: 620px; }
.product-tag { padding: 6px 10px; display: inline-block; color: #b9d7ff; border: 1px solid rgba(151, 196, 255, .22); border-radius: 20px; background: rgba(44, 109, 201, .18); font-size: 9px; }
.login-intro h1 { margin: 20px 0 18px; font-size: clamp(34px, 4vw, 58px); line-height: 1.18; letter-spacing: -2px; }
.login-intro h1 em { color: #79b7ff; font-style: normal; }
.login-intro p { max-width: 540px; margin: 0; color: #b8cce5; font-size: 12px; line-height: 1.85; }
.login-feature-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.login-feature-grid article { min-height: 100px; padding: 15px; display: flex; gap: 10px; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; background: rgba(255,255,255,.045); }
.login-feature-grid article > span { color: #64a8ff; font-family: Consolas, monospace; font-size: 10px; font-weight: 800; }
.login-feature-grid b, .login-feature-grid small { display: block; }
.login-feature-grid b { font-size: 10px; }
.login-feature-grid small { margin-top: 7px; color: #94acc7; font-size: 8px; line-height: 1.55; }
.login-baseline { position: relative; z-index: 1; margin: 20px 0 0; color: #7898bd; font-size: 8px; }
.login-baseline strong { color: #a9c6e8; }
.login-panel { padding: 42px; display: grid; place-items: center; align-content: center; background: radial-gradient(circle at 75% 10%, #e1ecff 0, transparent 34%), #f5f7fb; }
.login-card { width: min(440px, 100%); padding: 34px; border: 1px solid #e1e7ef; border-radius: 20px; background: #fff; box-shadow: var(--shadow-strong); }
.login-card-heading { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 27px; }
.secure-dot { width: 10px; height: 10px; margin-top: 5px; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px #e6f7f0; }
.login-card-heading p { margin: 0 0 5px; color: var(--blue); font-size: 8px; font-weight: 800; letter-spacing: 1px; }
.login-card-heading h2 { margin: 0; font-size: 23px; }
.login-card-heading div > span { display: block; margin-top: 7px; color: var(--muted); font-size: 9px; }
.login-form { display: grid; gap: 7px; }
.login-form label { margin-top: 7px; color: #526075; font-size: 9px; font-weight: 700; }
.input-wrap { height: 43px; display: flex; align-items: center; border: 1px solid #dfe5ed; border-radius: 10px; background: #fbfcfe; transition: .18s ease; }
.input-wrap:focus-within { border-color: #7fa5f6; background: #fff; box-shadow: 0 0 0 4px #eff4ff; }
.input-wrap > span { width: 41px; color: #8290a3; text-align: center; border-right: 1px solid #e6eaf0; font-size: 9px; }
.input-wrap input { min-width: 0; flex: 1; height: 100%; padding: 0 12px; color: var(--ink); border: 0; outline: 0; background: transparent; font-size: 12px; }
.primary-button { height: 44px; margin-top: 13px; padding: 0 16px; display: flex; align-items: center; justify-content: center; gap: 9px; color: #fff; border: 0; border-radius: 10px; background: linear-gradient(100deg, #246bfd, #1c5edc); box-shadow: 0 10px 22px rgba(36, 107, 253, .23); cursor: pointer; font-size: 11px; font-weight: 700; }
.primary-button:hover { background: var(--blue-dark); transform: translateY(-1px); }
.login-warning { margin-top: 22px; padding: 12px 13px; border: 1px solid #f1dfb4; border-radius: 9px; background: #fff9eb; }
.login-warning b { color: #8d641a; font-size: 9px; }
.login-warning p { margin: 5px 0 0; color: #866e3e; font-size: 8px; line-height: 1.55; }
.login-footnote { margin: 17px 0 0; color: #909aaa; font-size: 8px; }
.alert { margin-bottom: 14px; padding: 11px; border-radius: 9px; }
.alert b, .alert span { display: block; }
.alert b { font-size: 9px; }
.alert span { margin-top: 4px; font-size: 8px; }
.alert.danger { color: #a63644; background: #fdecf0; }

@media (max-width: 1400px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric-card { min-height: 115px; }
  .baseline-hero { grid-template-columns: .85fr 1.5fr; }
  .baseline-kpis article { padding: 4px 15px; }
}

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 225px minmax(0, 1fr); }
  .sidebar { padding-left: 13px; padding-right: 13px; }
  .dashboard-columns { grid-template-columns: 1fr; }
  .side-stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .baseline-hero { grid-template-columns: 1fr; }
  .baseline-kpis article:first-child { border-left: 0; padding-left: 0; }
  .control-bar { flex-wrap: wrap; }
  .range-summary { margin-left: 0; }
  .login-shell { grid-template-columns: 1fr 440px; }
  .login-feature-grid { grid-template-columns: 1fr; }
  .login-feature-grid article { min-height: auto; }
}

@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 14px; }
  .brand { padding-bottom: 10px; }
  .workspace-badge, .sidebar-version, .nav-label { display: none; }
  .side-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-nav a, .side-nav a.nav-subitem { min-height: 40px; padding: 7px 9px; }
  .topbar { padding: 17px 18px; align-items: flex-start; }
  .scope-card, .top-status { display: none; }
  .content { padding: 18px; }
  .baseline-kpis { grid-template-columns: 1fr; }
  .baseline-kpis article { padding: 12px 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.13); }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .issue-grid, .side-stack { grid-template-columns: 1fr; }
  .flow-track { grid-template-columns: 1fr; }
  .flow-track > i { transform: rotate(90deg); text-align: center; }
  .page-intro-card { align-items: flex-start; flex-direction: column; }
  .dashboard-detail-scope { min-width: 0; text-align: left; }
  .import-intro-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .metadata-grid { grid-template-columns: 1fr; }
  .upload-slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .upload-policy { grid-template-columns: 1fr; }
  .login-shell { display: block; }
  .login-story { min-height: auto; padding: 34px 24px; }
  .login-intro { margin: 65px 0 35px; }
  .login-feature-grid, .login-baseline { display: none; }
  .login-panel { min-height: 520px; padding: 28px 20px; }
}

@media (max-width: 560px) {
  .side-nav { grid-template-columns: 1fr; }
  .side-nav a.nav-subitem { display: none; }
  .topbar-actions { gap: 4px; }
  .user-copy { display: none; }
  .metric-grid, .status-grid { grid-template-columns: 1fr; }
  .control-bar { display: grid; align-items: stretch; }
  .segmented a { flex: 1; }
  .region-tabs { overflow-x: auto; }
  .date-filter { grid-template-columns: auto minmax(112px, 1fr) auto; width: 100%; }
  .date-filter-title { grid-column: 1 / -1; }
  .date-separator { display: none; }
  .date-filter label[for="dashboard-team-filter"] { grid-column: 1; grid-row: 2; }
  .date-filter #dashboard-team-filter { grid-column: 2; grid-row: 2; }
  .date-filter label[for="report-start-date"] { grid-column: 1; grid-row: 3; }
  .date-filter #report-start-date { grid-column: 2; grid-row: 3; }
  .date-filter label[for="report-end-date"] { grid-column: 1; grid-row: 4; }
  .date-filter #report-end-date { grid-column: 2; grid-row: 4; }
  .date-filter button { grid-column: 3; grid-row: 2 / span 3; height: 100%; }
  .range-summary { text-align: left; }
  .baseline-hero { padding: 21px; }
  .login-intro h1 { font-size: 36px; }
  .login-card { padding: 26px 22px; }
  .guardrail-callout { align-items: flex-start; }
  .guardrail-callout > span { display: none; }
  .upload-slot-grid { grid-template-columns: 1fr; }
  .upload-submit-row { align-items: stretch; flex-direction: column; }
  .upload-submit-row .primary-button { width: 100%; }
  .upload-result { align-items: flex-start; }
  .upload-result > span { display: none; }
}

/* 2026-07-19 simplified finance workspace: readable, role-first UI */
body { font-size: 14px; line-height: 1.55; background: #f4f7fb; }
.app-shell { grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { padding: 22px 15px 16px; background: linear-gradient(180deg, #0d2340 0%, #102d51 62%, #0c203b 100%); }
.brand { gap: 12px; padding: 0 8px 20px; }
.brand-mark { width: 38px; height: 38px; font-size: 16px; border-radius: 11px; }
.brand-copy strong { font-size: 15px; }
.brand-copy small { margin-top: 3px; font-size: 9px; }
.workspace-badge { padding: 12px; }
.workspace-badge b { font-size: 12px; }
.workspace-badge small { font-size: 10px; }
.nav-label { margin: 20px 10px 6px; font-size: 10px; letter-spacing: 1.2px; }
.side-nav a, .side-nav a.nav-subitem { min-height: 42px; padding: 9px 10px; gap: 10px; border-radius: 9px; font-size: 13px; }
.side-nav a.nav-subitem { padding-left: 10px; }
.nav-icon { width: 27px; height: 27px; font-size: 11px; border-radius: 7px; }
.sidebar-version { font-size: 9px; }
.topbar { min-height: 92px; padding: 19px 28px; }
.page-heading .eyebrow { font-size: 10px; }
.page-heading h1 { font-size: 24px; letter-spacing: -.4px; }
.page-heading > p:last-child { font-size: 12px; }
.scope-card span, .user-card small { font-size: 10px; }
.scope-card strong, .user-card strong { font-size: 12px; }
.text-button, .demo-toggle, .top-status { font-size: 11px; }
.content { padding: 24px 28px 40px; }
.panel { padding: 20px; border-radius: 14px; box-shadow: 0 7px 22px rgba(27, 52, 86, .055); }
.panel-header { margin-bottom: 17px; }
.panel-header h2 { font-size: 18px; }
.panel-header p { margin-top: 5px; font-size: 12px; }
.section-kicker { font-size: 10px; }
.count-badge { font-size: 11px; }
.baseline-copy h2 { font-size: 24px; }
.baseline-copy p, .hero-kicker { font-size: 11px; }
.baseline-kpis article span, .baseline-kpis article small { font-size: 10px; }
.baseline-kpis article strong { font-size: 21px; }
.metric-grid { gap: 13px; }
.metric-card { min-height: 128px; padding: 18px; border-radius: 13px; }
.metric-top span, .metric-card small { font-size: 11px; }
.metric-top i { font-size: 9px; }
.metric-card > strong { margin: 15px 0 8px; font-size: 25px; }
.status-card { min-height: 84px; padding: 14px; }
.status-card span, .status-card small { font-size: 10px; }
.status-card strong { font-size: 16px; }
.control-label, .date-filter-title, .date-filter label, .range-summary span { font-size: 10px; }

.alipay-date-detection {
  align-self: end;
  min-height: 38px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9fc;
  color: var(--muted);
  font-size: 12px;
}
.alipay-date-detection[data-state="loading"] { color: #1d62c7; }
.alipay-date-detection[data-state="success"] { border-color: #b9e3d1; background: #eef9f4; color: #167451; }
.alipay-date-detection[data-state="error"] { border-color: #f1c7c7; background: #fff5f5; color: #a23b3b; }
.segmented a, .region-tabs a, .date-filter input, .date-filter select, .date-filter button { font-size: 11px; }
.range-summary strong { font-size: 12px; }
.table-wrap table { min-width: 760px; }
.alipay-table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
}
.alipay-table th,
.alipay-table td {
  padding: 9px 6px;
  vertical-align: top;
}
.alipay-table .selection-cell { width: 34px; min-width: 34px; text-align: center; }
.alipay-table .selection-cell input { width: 16px; height: 16px; accent-color: #246bfd; cursor: pointer; }
.alipay-table th:nth-child(2), .alipay-table td:nth-child(2) { width: 92px; overflow-wrap: anywhere; }
.alipay-table th:nth-child(3), .alipay-table td:nth-child(3) { width: 174px; }
.alipay-table th:nth-child(4), .alipay-table td:nth-child(4) { width: 76px; }
.alipay-table th:nth-child(5), .alipay-table td:nth-child(5) { width: 78px; }
.alipay-table th:nth-child(6), .alipay-table td:nth-child(6) { width: 60px; }
.alipay-table th:nth-child(7), .alipay-table td:nth-child(7) { width: 80px; overflow-wrap: anywhere; }
.alipay-table th:nth-child(8), .alipay-table td:nth-child(8) { width: 84px; }
.alipay-table .message-cell {
  white-space: normal;
  overflow-wrap: anywhere;
}
.alipay-table .message-cell .table-subtext {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.alipay-table .payment-method-cell { color: #52657a; white-space: normal; overflow-wrap: anywhere; }
.alipay-table .finance-note-cell {
  width: 84px;
  min-width: 84px;
  max-width: 84px;
  color: #3e5266;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.45;
  font-size: 11px;
}
.alipay-table .finance-note-cell .table-subtext,
.alipay-table .finance-note-cell {
  overflow: hidden;
}
.alipay-table .finance-note-cell.empty { color: #8a99a8; }
.alipay-table th:last-child,
.alipay-table td:last-child {
  width: 132px;
  min-width: 132px;
  max-width: 132px;
  background: #fff;
}
.alipay-table thead th:last-child { background: #f8fbff; }
.alipay-table th:nth-last-child(2),
.alipay-table td:nth-last-child(2) {
  width: 90px;
  min-width: 90px;
  max-width: 90px;
  background: #fff;
}
.alipay-table thead th:nth-last-child(2) { background: #f8fbff; }
.alipay-action-cell {
  display: grid;
  gap: 5px;
  align-content: start;
  vertical-align: top;
  white-space: normal;
}
.alipay-action-cell > .table-subtext { max-width: 100%; white-space: normal; }
.alipay-table .classification-status-trigger {
  max-width: 100%;
  white-space: normal;
  line-height: 1.25;
  text-align: left;
}
.alipay-table .company-expense-choice {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  margin: 0 0 5px;
  min-height: 28px;
  gap: 5px;
}
.alipay-table .company-expense-choice > span {
  color: #5b6f82;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.25;
}
.alipay-table .company-expense-choice form { display: flex; margin: 0; }
.alipay-table .company-expense-switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 42px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #aeb9c4;
  box-shadow: inset 0 0 0 1px rgba(28, 48, 66, .08);
  cursor: pointer;
  transition: background-color .16s ease;
}
.alipay-table .company-expense-switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(13, 38, 61, .28);
  transition: transform .16s ease;
}
.alipay-table .company-expense-switch.on { background: #22aa5a; }
.alipay-table .company-expense-switch.on i { transform: translateX(18px); }
.alipay-table .company-expense-switch[aria-busy="true"] { cursor: wait; opacity: .68; }
.alipay-table .company-expense-switch:hover { box-shadow: 0 0 0 3px rgba(36, 107, 253, .14); }
.alipay-table .company-expense-switch:focus-visible { outline: 3px solid rgba(36, 107, 253, .28); outline-offset: 2px; }
.alipay-row-removing { opacity: 0; transition: opacity .16s ease; }
.alipay-save-toast {
  position: fixed;
  z-index: 90;
  top: 18px;
  right: 18px;
  padding: 10px 14px;
  border: 1px solid #8ed7bc;
  border-radius: 6px;
  background: #ecfbf4;
  color: #08704f;
  box-shadow: 0 10px 26px rgba(22, 73, 52, .16);
  font-size: 12px;
  font-weight: 750;
}
.alipay-save-toast.failed { border-color: #efadad; background: #fff1f1; color: #a32929; }
.alipay-table .action-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 29px;
  margin-top: 0;
  padding: 5px 8px;
  color: #fff;
  border-radius: 7px;
  background: #246bfd;
  cursor: pointer;
  list-style: none;
  font-size: 10px;
  font-weight: 750;
  border: 0;
  white-space: nowrap;
}
.alipay-table .action-trigger::before { content: "✎"; margin-right: 4px; font-size: 12px; }
.alipay-review-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  color: #2f3c50;
  border: 1px solid #d8e2ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(18, 39, 68, .24);
}
.alipay-review-dialog::backdrop { background: rgba(17, 32, 53, .48); }
.alipay-review-heading { padding: 18px 20px 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid #e3eaf3; }
.alipay-review-heading span { color: #246bfd; font-size: 10px; font-weight: 800; }
.alipay-review-heading h3 { margin: 3px 0 0; color: #26364b; font-size: 17px; }
.alipay-review-heading p { margin: 6px 0 0; color: #718096; font-size: 11px; line-height: 1.5; }
.dialog-close { width: 32px; height: 32px; flex: 0 0 32px; padding: 0; color: #56667b; border: 0; border-radius: 6px; background: #eef3f8; cursor: pointer; font-size: 20px; line-height: 1; }
.alipay-review-dialog > form { padding: 18px 20px 20px; }
.alipay-review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.alipay-review-grid label { min-width: 0; display: grid; gap: 6px; }
.alipay-review-grid [hidden] { display: none !important; }
.alipay-filter-bar { margin-bottom: 14px; display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 10px; align-items: end; }
.alipay-filter-bar label { min-width: 0; display: grid; gap: 6px; }
.alipay-filter-bar label > span { color: #526075; font-size: 11px; font-weight: 700; }
.alipay-filter-bar select, .alipay-filter-bar input { width: 100%; min-width: 0; height: 39px; padding: 0 10px; color: #2f3c50; border: 1px solid #dce4ee; border-radius: 7px; outline: none; background: #fff; font: inherit; font-size: 12px; }
.alipay-filter-bar select:focus, .alipay-filter-bar input:focus { border-color: #6f9cff; box-shadow: 0 0 0 3px rgba(36, 107, 253, .1); }
.alipay-filter-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.alipay-filter-actions button,
.alipay-filter-actions a { display: flex; align-items: center; justify-content: center; height: 39px; margin: 0; padding: 0 14px; border-radius: 7px; cursor: pointer; font-size: 12px; font-weight: 750; text-decoration: none; }
.alipay-filter-actions button { color: #fff; border: 1px solid #246bfd; background: #246bfd; }
.alipay-filter-actions a { color: #34445a; border: 1px solid #d3deeb; background: #fff; }
.alipay-filter-actions a:hover { color: #246bfd; border-color: #8fb1ff; background: #f5f8ff; }
.alipay-batch-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; padding: 10px 12px; border: 1px solid #e4ebf4; border-radius: 8px; background: #f8fbff; color: #526075; font-size: 12px; }
.alipay-batch-toolbar strong { color: #1d3f79; }
.alipay-batch-toolbar button:disabled { opacity: .5; cursor: not-allowed; }
.amount-filter > div { position: relative; }
.amount-filter b { position: absolute; left: 10px; top: 50%; z-index: 1; color: #718096; font-size: 11px; transform: translateY(-50%); }
.alipay-filter-bar .amount-filter input { padding-left: 25px; }
.alipay-category-summary { margin: 0 0 16px; padding: 13px 14px; border: 1px solid #dfe7f1; border-radius: 8px; background: #f8fafc; }
#alipay-transactions[data-category-loading="1"] .alipay-category-summary,
#alipay-transactions[data-category-loading="1"] .table-wrap,
#alipay-transactions[data-category-loading="1"] [data-alipay-pagination] { opacity: .58; pointer-events: none; }
.alipay-category-summary, .alipay-table tbody, [data-alipay-pagination] { transition: opacity .14s ease; }
.category-summary-heading { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.category-summary-heading > div:first-child, .category-summary-heading > div:last-child { display: grid; gap: 3px; }
.category-summary-heading > div:last-child { text-align: right; }
.category-summary-heading strong { color: #27374c; font-size: 13px; }
.category-summary-heading span, .category-summary-heading small { color: #738197; font-size: 10px; }
.category-summary-heading b { color: #1f5dcc; font-size: 16px; }
.category-summary-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.category-summary-item { min-width: 0; padding: 9px 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; color: inherit; border: 1px solid #e1e8f1; border-radius: 7px; background: #fff; text-decoration: none; }
.category-summary-item:hover, .category-summary-item:focus-visible { border-color: #87adf6; box-shadow: 0 0 0 2px rgba(36, 107, 253, .08); outline: none; }
.category-summary-item.active { border-color: #5d91ef; background: #edf4ff; }
.category-summary-item span { overflow: hidden; color: #526075; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.category-summary-item strong { color: #204f92; font-size: 12px; text-align: right; white-space: nowrap; }
.category-summary-item small { grid-column: 1 / -1; color: #8490a2; font-size: 9px; }
.category-summary-empty { grid-column: 1 / -1; padding: 14px; color: #718096; text-align: center; font-size: 11px; }
.alipay-review-grid label > span { color: #526075; font-size: 11px; font-weight: 750; }
.alipay-review-grid .full-width { grid-column: 1 / -1; }
.alipay-review-grid select, .alipay-review-grid textarea { width: 100%; min-width: 0; padding: 10px 11px; color: #2f3c50; border: 1px solid #d5dfeb; border-radius: 7px; outline: none; background: #fff; font: inherit; font-size: 12px; }
.alipay-review-grid textarea { min-height: 86px; resize: vertical; }
.alipay-review-grid select:focus, .alipay-review-grid textarea:focus { border-color: #6f9cff; box-shadow: 0 0 0 3px rgba(36, 107, 253, .1); }
.alipay-review-actions { margin-top: 16px; display: flex; justify-content: flex-end; gap: 9px; }
.alipay-review-actions button { min-width: 92px; min-height: 39px; margin: 0; }
.alipay-split-dialog { width: min(760px, calc(100vw - 32px)); }
.alipay-split-dialog > form { padding-top: 16px; }
.split-total-check {
  margin-bottom: 8px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid #f0d7ae;
  border-radius: 8px;
  background: #fff9ef;
}
.split-total-check.valid { border-color: #bbdfcd; background: #f0fbf5; }
.split-total-check span { min-width: 0; color: #66758a; font-size: 11px; font-weight: 700; white-space: nowrap; }
.split-total-check strong { color: #26364b; font-size: 13px; }
.split-total-check.valid strong { color: #14704f; }
.split-auto-hint { margin: -2px 0 10px; color: #607086; font-size: 11px; line-height: 1.5; }
.split-table-wrap { overflow-x: hidden; border: 0; }
.split-table-wrap .split-entry-table { width: 100%; min-width: 0 !important; border-collapse: separate; border-spacing: 0; table-layout: auto; }
.split-entry-table thead { display: none; }
.split-entry-table tbody { display: grid; gap: 10px; }
.split-entry-table tr[data-split-row] {
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) 34px;
  gap: 8px;
  border: 1px solid #e2e9f2;
  border-radius: 8px;
  background: #f9fbfd;
}
.split-entry-table td {
  min-width: 0;
  padding: 0;
  display: grid;
  gap: 5px;
  border: 0;
  white-space: normal;
}
.split-entry-table td::before {
  content: attr(data-label);
  color: #64748b;
  font-size: 10px;
  font-weight: 750;
}
.split-entry-table td:nth-child(5) { grid-column: 1 / 3; }
.split-entry-table td:nth-child(6) { grid-column: 3 / 5; }
.split-entry-table td:nth-child(7) { grid-column: 1 / 5; }
.split-entry-table .split-remove-cell {
  grid-column: 5;
  grid-row: 1 / span 2;
  align-self: start;
  justify-content: end;
}
.split-entry-table .split-remove-cell::before { display: none; }
.split-entry-table input,
.split-entry-table select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  color: #2f3c50;
  border: 1px solid #d5dfeb;
  border-radius: 6px;
  outline: none;
  background: #fff;
  font: inherit;
  font-size: 11px;
}
.split-entry-table input:focus,
.split-entry-table select:focus { border-color: #6f9cff; box-shadow: 0 0 0 3px rgba(36, 107, 253, .1); }
.split-entry-table select:disabled { color: #9aa6b2; background: #eef3f8; cursor: not-allowed; }
.split-entry-table .icon-button { width: 32px; height: 32px; }
.split-reason textarea { min-height: 64px; }
@media (max-width: 680px) {
  .split-total-check { grid-template-columns: 1fr; }
  .split-entry-table tr[data-split-row] { grid-template-columns: minmax(0, 1fr) 34px; }
  .split-entry-table td { grid-column: 1 !important; }
  .split-entry-table .split-remove-cell { grid-column: 2 !important; grid-row: 1; }
}
th { padding: 12px 13px; font-size: 11px; }
td { padding: 12px 13px; font-size: 12px; line-height: 1.5; }
td a { font-size: 12px; font-weight: 700; }
.table-subtext { margin-top: 3px; font-size: 10px; }
.pill { padding: 5px 8px; font-size: 10px; }
.classification-status-trigger { border: 0; cursor: pointer; font: inherit; }
.classification-status-trigger:hover { box-shadow: 0 0 0 2px rgba(36, 107, 253, .16); }
.outline-button, .primary-button, .filter-bar button, .form-grid button { font-size: 12px; }
.empty-mini, .empty-state p, .empty-inline p { font-size: 12px; }
.demo-notice p, .preview-notice p, .guardrail-callout p { font-size: 11px; }

.message-stack { margin-bottom: 14px; display: grid; gap: 8px; }
.flash-message { padding: 12px 15px; color: #24568e; border: 1px solid #cfe0f5; border-radius: 10px; background: #eff6ff; font-size: 12px; font-weight: 650; }
.flash-message.success { color: #166b4d; border-color: #bfe6d6; background: #edf9f4; }
.flash-message.error { color: #a43a49; border-color: #efc8ce; background: #fff0f2; }
.scope-explainer { margin-bottom: 16px; padding: 17px 19px; display: flex; align-items: flex-start; gap: 13px; color: #24466f; border: 1px solid #cfe0f5; border-radius: 13px; background: linear-gradient(120deg, #f7fbff, #edf5ff); }
.scope-explainer.team-scope { color: #30533f; border-color: #cae7d9; background: linear-gradient(120deg, #f5fbf8, #eaf7f0); }
.scope-icon { width: 35px; height: 35px; display: grid; place-items: center; color: #fff; border-radius: 10px; background: #246bfd; font-weight: 800; }
.team-scope .scope-icon { background: #22966f; }
.scope-explainer strong { font-size: 14px; }
.scope-explainer p { margin: 4px 0 0; color: #61748c; font-size: 11px; }
.compact-panel { padding: 14px 17px; }
.simple-filter { display: flex; align-items: end; gap: 12px; }
.simple-filter label, .simple-form-grid label { display: grid; gap: 6px; }
.simple-filter label span, .simple-form-grid label span { color: #526075; font-size: 11px; font-weight: 700; }
.simple-filter input, .simple-filter select, .simple-form-grid input, .simple-form-grid select, .simple-form-grid textarea, .inline-action textarea, .close-period-card textarea { padding: 10px 11px; color: #2f3c50; border: 1px solid #dce4ee; border-radius: 9px; outline: none; background: #fff; font: inherit; font-size: 12px; }
.simple-filter button, .inline-action button, .close-period-card button { min-height: 39px; padding: 8px 14px; color: #fff; border: 0; border-radius: 9px; background: #246bfd; cursor: pointer; font-size: 11px; font-weight: 750; }
.sku-filter { margin: 4px 0 18px; padding: 14px; border: 1px solid #e5ebf2; border-radius: 8px; background: #f8fafc; }
.sku-filter .sku-search { min-width: 240px; flex: 1; }
.sku-table table { min-width: 1120px; }
.sku-table th:nth-child(1), .sku-table td:nth-child(1) { width: 105px; }
.sku-table th:nth-child(2), .sku-table td:nth-child(2) { width: 130px; }
.sku-table th:nth-child(3), .sku-table td:nth-child(3) { width: 280px; min-width: 240px; max-width: 320px; white-space: normal; line-height: 1.5; }
.sku-table th:nth-child(4), .sku-table td:nth-child(4) { min-width: 125px; }
.match-status { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border-radius: 6px; font-size: 10px; font-weight: 750; }
.match-status.matched { color: #17734b; background: #e7f7ef; }
.match-status.missing { color: #a05b16; background: #fff0db; }
.match-status.conflict { color: #a33a3a; background: #fde8e8; }
.missing-text { color: #a05b16; font-weight: 700; }
.pagination { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; color: #6f7b8d; font-size: 11px; }
.pagination div { display: flex; gap: 8px; }
.pagination a { padding: 8px 12px; color: #1f5dcc; border: 1px solid #dbe4f0; border-radius: 7px; background: #fff; text-decoration: none; font-weight: 700; }
.alipay-pagination { flex-wrap: wrap; gap: 10px 14px; }
.alipay-pagination-form { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 10px; margin: 0; }
.alipay-pagination-form label { display: inline-flex; align-items: center; gap: 5px; color: #6f7b8d; white-space: nowrap; }
.alipay-pagination-form select, .alipay-pagination-form input { height: 32px; padding: 0 8px; color: #33445a; border: 1px solid #dbe4f0; border-radius: 6px; background: #fff; font: inherit; font-size: 11px; }
.alipay-pagination-form select { min-width: 76px; }
.alipay-pagination-form input { width: 64px; }
.alipay-pagination-form button { height: 32px; margin: 0; padding: 0 10px; color: #1f5dcc; border: 1px solid #dbe4f0; border-radius: 6px; background: #fff; cursor: pointer; font: inherit; font-weight: 700; }
.alipay-pagination-links { display: flex; gap: 8px; }
.issue-filter { margin: 0; }
.missing-cost-issue-shortcut { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-color: #d6e4f8; background: #f8fbff; }
.missing-cost-issue-shortcut strong, .missing-cost-issue-shortcut small { display: block; }
.missing-cost-issue-shortcut strong { color: #27374c; font-size: 12px; }
.missing-cost-issue-shortcut small { margin-top: 4px; color: #68778c; font-size: 10px; line-height: 1.5; }
.missing-cost-issue-shortcut > div:last-child { display: flex; align-items: center; gap: 9px; }
.missing-cost-issue-shortcut .outline-button { text-decoration: none; }
.missing-cost-issue-shortcut .primary-button { height: 38px; margin: 0; text-decoration: none; box-shadow: none; }
.issue-table { max-height: min(70vh, 720px); overflow: auto; }
.issue-table thead th { position: sticky; top: 0; z-index: 1; }
.issue-table table { min-width: 1260px; }
.issue-table th:last-child, .issue-table td:last-child { min-width: 190px; }
.issue-resolution { margin-top: 7px; }
.issue-resolution form { min-width: 260px; }
.issue-resolution form label { display: grid; gap: 5px; color: #526075; font-size: 10px; font-weight: 700; }
.issue-resolution textarea { min-height: 76px; resize: vertical; }
.issue-resolution form small, .resolution-note { display: block; margin-top: 5px; color: #6f7b8d; font-size: 9px; line-height: 1.5; }
.issue-cost-entry { margin-top: 8px; }
.issue-cost-entry form { min-width: 300px; }
.issue-cost-entry form label { display: grid; gap: 4px; color: #526075; font-size: 10px; font-weight: 700; }
.issue-cost-entry form input, .issue-cost-entry form textarea { width: 100%; min-width: 0; padding: 8px 9px; border: 1px solid #dce4ee; border-radius: 7px; background: #fff; font: inherit; }
.issue-cost-entry form textarea { min-height: 64px; resize: vertical; }
.issue-cost-entry form > small, .issue-cost-target small { display: block; color: #6f7b8d; font-size: 9px; line-height: 1.5; }
.issue-cost-target { padding: 8px; border-radius: 7px; background: #edf5ff; }
.issue-store-id-entry { margin-top: 8px; }
.issue-store-id-entry form { min-width: 300px; }
.issue-store-id-entry form label { display: grid; gap: 4px; color: #526075; font-size: 10px; font-weight: 700; }
.issue-store-id-entry form input, .issue-store-id-entry form textarea { width: 100%; min-width: 0; padding: 8px 9px; border: 1px solid #dce4ee; border-radius: 7px; background: #fff; font: inherit; }
.issue-store-id-entry form textarea { min-height: 64px; resize: vertical; }
.issue-store-id-entry form > small { display: block; color: #6f7b8d; font-size: 9px; line-height: 1.5; }
.cost-completion { margin-top: 6px; }
.cost-completion form { min-width: 280px; }
.cost-completion form label { display: grid; gap: 4px; color: #526075; font-size: 10px; font-weight: 700; }
.cost-completion form input { min-width: 0; padding: 8px 9px; border: 1px solid #dce4ee; border-radius: 7px; background: #fff; font: inherit; }
.cost-completion form small { color: #7c8797; font-size: 9px; line-height: 1.5; }
.missing-cost-workflow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid #e3eaf3; }
.missing-cost-workflow > div { min-width: 0; padding: 16px 20px 4px 0; }
.missing-cost-workflow > div + div { padding-left: 20px; border-left: 1px solid #e3eaf3; }
.missing-cost-workflow h3 { margin: 0; color: #27374c; font-size: 13px; }
.missing-cost-workflow p { min-height: 34px; margin: 6px 0 12px; color: #68778c; font-size: 11px; line-height: 1.55; }
.missing-cost-download { display: flex; align-items: end; gap: 10px; }
.missing-cost-download label { display: grid; gap: 5px; }
.missing-cost-download label span { color: #526075; font-size: 10px; font-weight: 700; }
.missing-cost-download select, .missing-cost-upload input, .missing-cost-upload textarea, .missing-cost-upload select { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid #dce4ee; border-radius: 7px; background: #fff; font: inherit; font-size: 11px; }
.missing-cost-download button { min-height: 39px; padding: 8px 14px; color: #fff; border: 0; border-radius: 8px; background: #246bfd; cursor: pointer; font-size: 11px; font-weight: 750; }
.missing-cost-upload form { min-width: 0; }
.missing-cost-upload form p { min-height: 0; margin: 0; display: grid; gap: 5px; }
.missing-cost-upload form label { color: #526075; font-size: 10px; font-weight: 700; }
.simple-form-grid { display: grid; grid-template-columns: 1.1fr .8fr .8fr .8fr 1.5fr auto; align-items: end; gap: 12px; }
.simple-form-grid textarea { min-height: 42px; resize: vertical; }
.simple-form-grid .primary-button { margin: 0; white-space: nowrap; }
.workflow-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.workflow-steps > div { padding: 12px 14px; border: 1px solid #e3eaf3; border-radius: 10px; background: #f8fbff; }
.workflow-steps b { display: block; color: #243247; font-size: 12px; }
.workflow-steps span { display: block; margin-top: 5px; color: #68778c; font-size: 11px; line-height: 1.5; }
.team-ratio-panel { scroll-margin-top: 18px; }
.team-ratio-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.team-ratio-row { padding: 13px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #dfe7f1; border-radius: 8px; background: #f8fbff; }
.team-ratio-row > span:first-child strong, .team-ratio-row > span:first-child small { display: block; }
.team-ratio-row > span:first-child strong { color: #27374c; font-size: 12px; }
.team-ratio-row > span:first-child small { margin-top: 4px; color: #738196; font-size: 9px; }
.ratio-input { width: 112px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; overflow: hidden; border: 1px solid #ccd8e7; border-radius: 7px; background: #fff; }
.ratio-input input { width: 100%; min-width: 0; padding: 9px 8px; border: 0; outline: none; background: transparent; font: inherit; font-size: 13px; font-weight: 800; text-align: right; }
.ratio-input b { padding: 0 9px 0 3px; color: #66758a; font-size: 11px; }
.team-ratio-meta { margin-top: 12px; display: grid; grid-template-columns: .8fr 1.6fr .65fr auto; align-items: end; gap: 11px; }
.team-ratio-meta label { display: grid; gap: 6px; }
.team-ratio-meta label > span { color: #526075; font-size: 11px; font-weight: 750; }
.team-ratio-meta input, .team-ratio-meta textarea { width: 100%; min-width: 0; padding: 10px 11px; color: #2f3c50; border: 1px solid #dce4ee; border-radius: 8px; outline: none; background: #fff; font: inherit; font-size: 11px; }
.team-ratio-meta textarea { min-height: 42px; resize: vertical; }
.team-ratio-meta small { color: #7a8799; font-size: 9px; }
.ratio-total { min-height: 62px; padding: 8px 10px; border: 1px solid #efd8ad; border-radius: 8px; background: #fff9ef; }
.ratio-total span, .ratio-total strong, .ratio-total small { display: block; }
.ratio-total span { color: #7b6c54; font-size: 9px; }
.ratio-total strong { margin-top: 3px; color: #a16413; font-size: 15px; }
.ratio-total small { margin-top: 2px; color: #8d795c; }
.ratio-total.valid { border-color: #bee4d2; background: #f0faf5; }
.ratio-total.valid strong { color: #18835d; }
.team-ratio-meta .primary-button { min-height: 42px; margin: 0; white-space: nowrap; }
.allocation-rule-form { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.allocation-rule-form label:nth-last-of-type(2) { grid-column: span 2; }
.allocation-rule-form .primary-button { align-self: end; }
.compact-table { margin-top: 16px; }
.template-download { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 14px 0; padding: 13px 15px; border: 1px solid #dce7f3; border-radius: 10px; background: #f7fbff; }
.template-download strong { display: block; color: #27364b; font-size: 12px; }
.template-download small { display: block; margin-top: 4px; color: #6b7a8e; font-size: 11px; }
.entry-mode-switch { margin: 14px 0; }
.entry-mode-switch > div { display: inline-flex; padding: 3px; gap: 3px; border: 1px solid #dbe4ef; border-radius: 8px; background: #f5f8fc; }
.entry-mode-switch > div > div { display: contents; }
.entry-mode-switch label { position: relative; min-width: 108px; padding: 8px 13px; display: flex; align-items: center; justify-content: center; color: #65748a; border-radius: 6px; cursor: pointer; font-size: 11px; font-weight: 700; }
.entry-mode-switch input { position: absolute; opacity: 0; pointer-events: none; }
.entry-mode-switch label:has(input:checked) { color: #174bb5; background: #fff; box-shadow: 0 2px 8px rgba(37, 86, 166, .12); }
.inline-expense-entry { margin-top: 14px; }
.inline-entry-heading { margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.inline-entry-heading strong { display: block; color: #26364c; font-size: 13px; }
.inline-entry-heading small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.inline-expense-rows { display: grid; gap: 10px; }
.inline-expense-row { padding: 13px; display: grid; grid-template-columns: 30px repeat(4, minmax(140px, 1fr)) 34px; gap: 10px; align-items: end; border: 1px solid #dce5ef; border-radius: 8px; background: #fbfcfe; }
.inline-expense-row label { min-width: 0; display: grid; gap: 5px; }
.inline-expense-row label > span { color: #5b6a7f; font-size: 9px; font-weight: 700; }
.inline-expense-row input, .inline-expense-row select { width: 100%; min-width: 0; height: 38px; padding: 0 9px; color: #2f3c50; border: 1px solid #dbe3ed; border-radius: 7px; background: #fff; font-size: 10px; }
.inline-expense-row input:focus, .inline-expense-row select:focus { border-color: #7fa5f6; outline: none; box-shadow: 0 0 0 3px #eff4ff; }
.inline-row-number { width: 26px; height: 26px; align-self: center; display: grid; place-items: center; color: #315c9e; border-radius: 50%; background: #eaf2ff; font-size: 10px; font-weight: 800; }
.inline-description { grid-column: span 2; }
.inline-form-error { grid-column: 2 / -2; }
.field-error, .formset-error { color: #b93535 !important; font-size: 10px !important; }
.formset-error { margin: 8px 0; padding: 9px 11px; border-radius: 7px; background: #fff1f1; }
.inline-entry-unavailable { padding: 16px; color: #6f7f94; border: 1px dashed #cfd9e6; border-radius: 8px; background: #fafcff; font-size: 11px; }
.expense-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.alipay-cash-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.funds-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.money-cell { color: #164f9a; font-weight: 800; }
.money-cell.refund { color: #18805d; }
.positive-text { color: #16815e; font-weight: 750; }
.inline-action { position: relative; }
.inline-action summary { color: #246bfd; cursor: pointer; font-size: 11px; font-weight: 750; }
.inline-action form { min-width: 230px; margin-top: 8px; padding: 10px; display: grid; gap: 8px; border: 1px solid #dce5f1; border-radius: 10px; background: #f8fbff; }
.inline-action form > div { display: flex; gap: 7px; }
.inline-action .danger-button, .danger-button { background: #c94b5a; }
.account-password-action form { min-width: 310px; }
.account-password-action label { display: grid; gap: 5px; }
.account-password-action label span { color: #526075; font-size: 10px; font-weight: 750; }
.account-password-action input { width: 100%; min-height: 38px; padding: 8px 10px; color: #2f3c50; border: 1px solid #dce4ee; border-radius: 8px; outline: none; background: #fff; }
.account-password-action small { color: #6b7a8e; line-height: 1.55; }
.operator-scope-note { margin: -3px 0 16px; padding: 12px 15px; display: flex; align-items: center; gap: 12px; color: #596b82; border: 1px solid #dce5ef; border-radius: 11px; background: #f8fafc; }
.operator-scope-note span { padding: 5px 8px; color: #245aa4; border-radius: 7px; background: #e8f0ff; font-size: 10px; font-weight: 800; }
.operator-scope-note p { margin: 0; font-size: 11px; }
.daily-trend-panel { overflow: hidden; }
.daily-trend-header { align-items: flex-start; }
.trend-legend { margin: -2px 0 10px; display: flex; flex-wrap: wrap; gap: 9px 18px; color: #536278; font-size: 11px; font-weight: 700; }
.trend-legend span { display: inline-flex; align-items: center; gap: 7px; }
.trend-legend i { width: 18px; height: 3px; display: inline-block; border-radius: 3px; }
.trend-chart-wrap { position: relative; width: 100%; height: 320px; min-height: 320px; }
.trend-chart-wrap canvas { width: 100%; height: 100%; display: block; }
.trend-tooltip { position: absolute; z-index: 3; min-width: 190px; padding: 10px 12px; transform: translate(-50%, -100%); color: #fff; border-radius: 7px; background: rgba(25, 39, 60, .94); box-shadow: 0 8px 24px rgba(20, 35, 56, .2); pointer-events: none; font-size: 10px; }
.trend-tooltip strong, .trend-tooltip span { display: block; }
.trend-tooltip strong { margin-bottom: 5px; font-size: 11px; }
.trend-tooltip span { margin-top: 4px; white-space: nowrap; }
.trend-tooltip i { width: 7px; height: 7px; margin-right: 6px; display: inline-block; border-radius: 50%; }
.trend-table-wrap { max-height: 310px; margin-top: 8px; border-top: 1px solid #e6ecf3; }
.daily-trend-table { min-width: 680px; }
.daily-trend-table thead th { position: sticky; top: 0; z-index: 1; background: #f8fbff; }
.daily-trend-table .no-daily-data td { color: #8994a3; background: #fbfcfe; }
.daily-data-status { display: inline-flex; padding: 4px 7px; border-radius: 6px; font-size: 9px; font-weight: 750; }
.daily-data-status.ready { color: #14704f; background: #e8f7ef; }
.daily-data-status.empty { color: #68778b; background: #edf1f5; }
.trend-footnote { margin: 10px 0 0; color: #748196; font-size: 10px; line-height: 1.6; }
.trend-empty { min-height: 150px; display: grid; place-content: center; text-align: center; }
.trend-empty strong { color: #334359; font-size: 14px; }
.trend-empty p { max-width: 560px; margin: 7px auto 0; color: #718096; font-size: 11px; line-height: 1.6; }
.close-period-card { padding: 14px; border: 1px solid #dce5ef; border-radius: 11px; background: #f8fafc; }
.close-period-card summary { cursor: pointer; font-size: 12px; font-weight: 750; }
.close-period-card form { margin-top: 10px; display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.profit-period-filter select { min-width: 170px; }
.profit-readiness { scroll-margin-top: 18px; }
.profit-source-summary { margin-bottom: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.profit-source-check { min-width: 0; padding: 11px 13px; border: 1px solid #e1e8f1; border-radius: 7px; background: #f8fafc; }
.profit-source-check.done { border-color: #cbe8da; background: #f4faf7; }
.profit-source-check.pending { border-color: #efd3a3; background: #fffaf0; }
.profit-source-check span, .profit-source-check strong { display: block; }
.profit-source-check span { color: #68778b; font-size: 9px; }
.profit-source-check strong { margin-top: 4px; color: #26364b; font-size: 11px; line-height: 1.45; }
.readiness-score { padding: 7px 10px; color: #9b651c; border-radius: 7px; background: #fff0d9; font-size: 11px; font-weight: 800; }
.readiness-score.done { color: #187150; background: #e5f6ed; }
.readiness-list { display: grid; gap: 9px; }
.readiness-item { min-height: 72px; padding: 12px 14px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 13px; border: 1px solid #e1e8f1; border-radius: 8px; background: #fff; }
.readiness-item.done { border-color: #cbe8da; background: #f6fbf8; }
.readiness-icon { width: 29px; height: 29px; display: grid; place-items: center; color: #9b651c; border-radius: 50%; background: #fff0d9; font-size: 11px; font-weight: 850; }
.readiness-item.done .readiness-icon { color: #fff; background: #249266; }
.readiness-item strong { color: #26364b; font-size: 12px; }
.readiness-item p { margin: 4px 0 0; color: #68778b; font-size: 10px; line-height: 1.5; }
.readiness-state { padding: 5px 8px; color: #9b651c; border-radius: 6px; background: #fff0d9; font-size: 9px; font-weight: 800; }
.readiness-item.done .readiness-state { color: #187150; background: #e5f6ed; }
.readiness-item a { min-width: 105px; color: #246bfd; text-align: right; text-decoration: none; font-size: 10px; font-weight: 800; }
.final-profit-confirm-form { margin: 0; }
.final-profit-confirm-form button { min-width: 150px; min-height: 34px; padding: 7px 12px; color: #fff; border: 1px solid #246bfd; border-radius: 6px; background: #246bfd; cursor: pointer; font-size: 10px; font-weight: 750; white-space: nowrap; }
.final-profit-confirm-form button:hover, .final-profit-confirm-form button:focus-visible { border-color: #1d56ca; background: #1d56ca; outline: none; }
.readiness-waiting { max-width: 150px; color: #7d8795; text-align: right; font-size: 9px; line-height: 1.45; }
.warehouse-explainer { margin-bottom: 14px; }
.warehouse-upload-panel { scroll-margin-top: 16px; }
.warehouse-upload-form { display: grid; grid-template-columns: minmax(260px, 2fr) minmax(180px, 1fr) minmax(150px, .8fr) auto; gap: 12px; align-items: end; }
.warehouse-upload-form label { min-width: 0; display: grid; gap: 6px; }
.warehouse-upload-form label > span { color: #5f6f84; font-size: 10px; font-weight: 750; }
.warehouse-upload-form input, .warehouse-upload-form select { width: 100%; min-height: 39px; padding: 8px 10px; border: 1px solid #dbe4ef; border-radius: 6px; background: #fff; color: #26364b; }
.warehouse-upload-form input[type="file"] { padding: 6px; }
.warehouse-upload-form button { min-height: 39px; padding: 8px 16px; border: 0; border-radius: 6px; background: #246bfd; color: #fff; cursor: pointer; font-weight: 750; white-space: nowrap; }
.warehouse-filter { flex-wrap: wrap; align-items: end; }
.warehouse-filter label { min-width: 135px; flex: 1 1 135px; }
.warehouse-filter label:nth-last-of-type(2) { flex: 1.5 1 210px; }
.warehouse-filter button, .warehouse-filter .outline-button { margin-top: 18px; }
.warehouse-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.warehouse-metrics .metric-card { min-height: 112px; }
.warehouse-metrics .metric-card.warning::before { background: #d59a2d; }
.warehouse-trend-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.warehouse-trend-panel { min-width: 0; overflow: hidden; }
.warehouse-trend-header { align-items: flex-start; }
.warehouse-chart-legend { margin: -2px 0 8px; display: flex; align-items: center; gap: 7px; color: #536278; font-size: 11px; font-weight: 700; }
.warehouse-chart-legend i { width: 18px; height: 3px; display: inline-block; border-radius: 3px; }
.warehouse-chart-wrap { position: relative; width: 100%; height: 260px; min-height: 260px; }
.warehouse-chart-wrap canvas { width: 100%; height: 100%; display: block; }
.warehouse-chart-tooltip { position: absolute; z-index: 3; min-width: 145px; padding: 9px 11px; transform: translate(-50%, -100%); color: #fff; border-radius: 7px; background: rgba(25, 39, 60, .94); pointer-events: none; font-size: 10px; }
.warehouse-chart-tooltip strong, .warehouse-chart-tooltip span { display: block; }
.warehouse-chart-tooltip strong { margin-bottom: 4px; font-size: 11px; }
.warehouse-cost-action { margin-top: 7px; display: inline-block; color: #1b5fc8; font-size: 10px; font-weight: 750; text-decoration: none; }
.warehouse-cost-action:hover { text-decoration: underline; }
.focused-cost-row { background: #eef7ff; scroll-margin-top: 18px; }
.focused-cost-row .cost-completion { outline: 2px solid rgba(36, 107, 253, .2); outline-offset: 3px; }
@media (max-width: 820px) {
  .warehouse-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .warehouse-metrics { grid-template-columns: 1fr; }
}
.data-source-note { max-width: 420px; color: #718096; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.warehouse-store-table, .warehouse-detail-table { min-width: 1120px; }
.warehouse-detail-table { min-width: 1650px; }
.warehouse-detail-table td, .warehouse-detail-table th { white-space: nowrap; }
.warehouse-detail-table td { vertical-align: top; }
.warehouse-detail-table td strong, .warehouse-detail-table td small { display: block; }
.warehouse-detail-table td small { margin-top: 4px; color: #718096; font-size: 9px; line-height: 1.35; }
.warehouse-product-cell { min-width: 230px; max-width: 280px; white-space: normal !important; }
.pagination-bar { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #68778b; font-size: 11px; }
.pagination-bar > div { display: flex; gap: 8px; }
.pagination-bar .outline-button { margin: 0; }
.profit-result-strip { margin-top: 14px; padding: 14px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; border: 1px solid #f0d8aa; border-radius: 8px; background: #fffaf0; }
.profit-result-strip.confirmed { border-color: #cbe8da; background: #f2faf6; }
.profit-result-strip span, .profit-result-strip strong, .profit-result-strip small { display: block; }
.profit-result-strip span { color: #7d8795; font-size: 9px; }
.profit-result-strip strong { margin-top: 4px; color: #28374b; font-size: 13px; }
.profit-result-strip small { margin-top: 4px; color: #68778b; font-size: 10px; line-height: 1.5; }

@media (max-width: 1180px) {
  .warehouse-upload-form { grid-template-columns: 1fr 1fr; }
  .warehouse-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .simple-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .expense-metrics, .alipay-cash-metrics, .funds-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .warehouse-upload-form { grid-template-columns: 1fr; }
  .warehouse-trend-grid { grid-template-columns: 1fr; }
  .content { padding: 18px; }
  .simple-filter { align-items: stretch; flex-direction: column; }
  .alipay-filter-bar { grid-template-columns: 1fr 1fr; }
  .category-summary-list { grid-template-columns: 1fr 1fr; }
  .simple-form-grid, .expense-metrics, .alipay-cash-metrics, .funds-metrics { grid-template-columns: 1fr; }
  .workflow-steps { grid-template-columns: 1fr; }
  .missing-cost-workflow { grid-template-columns: 1fr; }
  .missing-cost-workflow > div { padding-right: 0; }
  .missing-cost-workflow > div + div { padding-left: 0; border-left: 0; border-top: 1px solid #e3eaf3; }
  .missing-cost-issue-shortcut { align-items: flex-start; flex-direction: column; }
  .team-ratio-grid, .team-ratio-meta { grid-template-columns: 1fr; }
  .team-ratio-row { align-items: flex-start; }
  .allocation-rule-form { grid-template-columns: 1fr; }
  .allocation-rule-form label:nth-last-of-type(2) { grid-column: auto; }
  .template-download { align-items: flex-start; flex-direction: column; }
  .inline-entry-heading { align-items: flex-start; flex-direction: column; }
  .inline-expense-row { grid-template-columns: 28px 1fr; }
  .inline-expense-row label, .inline-description { grid-column: 2; }
  .inline-expense-row .icon-action { grid-column: 2; }
  .scope-explainer { align-items: flex-start; }
  .readiness-item { grid-template-columns: auto 1fr; }
  .profit-source-summary { grid-template-columns: 1fr; }
  .readiness-state, .readiness-item a, .final-profit-confirm-form, .readiness-waiting { grid-column: 2; text-align: left; }
  .profit-result-strip { grid-template-columns: 1fr; }
  .alipay-review-grid { grid-template-columns: 1fr; }
  .alipay-review-grid .full-width { grid-column: auto; }
  .trend-chart-wrap { height: 280px; min-height: 280px; }
  .daily-trend-header { gap: 10px; }
  .trend-tooltip { display: none; }
}

@media (max-width: 560px) {
  .topbar { display: grid; gap: 12px; }
  .topbar-actions { width: 100%; flex-wrap: wrap; }
  .side-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .daily-trend-panel { min-width: 0; }
  .daily-trend-header { display: grid; }
  .warehouse-chart-wrap { height: 230px; min-height: 230px; }
  .warehouse-chart-tooltip { display: none; }
  .dashboard-columns { min-width: 0; }
}
.table-primary-link {
  color: #173b68;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 750;
  text-decoration: none;
}

.table-primary-link:hover { color: #246bfd; }
.table-primary-link span { font-size: 13px; }

.store-detail-owner {
  min-width: 180px;
  display: grid;
  gap: 4px;
  text-align: right;
}

.store-detail-owner span,
.store-detail-owner small { color: #6b7890; }
.store-detail-owner strong { font-size: 20px; color: #15243a; }

.store-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border: 1px solid #e4e9f1;
}

.store-profile-grid div { padding: 16px 18px; border-right: 1px solid #e4e9f1; border-bottom: 1px solid #e4e9f1; }
.store-profile-grid div:nth-child(3n) { border-right: 0; }
.store-profile-grid div:nth-last-child(-n + 3) { border-bottom: 0; }
.store-profile-grid dt { color: #758197; font-size: 12px; margin-bottom: 6px; }
.store-profile-grid dd { color: #17253a; font-weight: 700; margin: 0; overflow-wrap: anywhere; }
.store-detail-controls { gap: 16px; }
.store-product-filter { margin-bottom: 14px; }
.store-product-table-wrap { overflow-x: hidden; }
.store-product-table { width: 100%; min-width: 0 !important; table-layout: fixed; }
.store-product-table .product-col { width: 19%; }
.store-product-table .sku-col,
.store-product-table .goods-col { width: 9%; }
.store-product-table .region-col { width: 8%; }
.store-product-table .quantity-col { width: 8%; }
.store-product-table .money-col { width: 10.5%; }
.store-product-table .rate-col { width: 8%; }
.store-product-table .action-col { width: 7.5%; }
.store-product-table th,
.store-product-table td { padding-left: 6px; padding-right: 6px; }
.store-product-table th:first-child,
.store-product-table td:first-child { white-space: normal; }
.store-product-name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.store-product-code { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-product-table th:not(:first-child),
.store-product-table td:not(:first-child) { white-space: nowrap; }

@media (max-width: 800px) {
  .store-detail-owner { min-width: 0; text-align: left; }
  .store-profile-grid { grid-template-columns: 1fr; }
  .store-profile-grid div,
  .store-profile-grid div:nth-child(3n),
  .store-profile-grid div:nth-last-child(-n + 3) { border-right: 0; border-bottom: 1px solid #e4e9f1; }
  .store-profile-grid div:last-child { border-bottom: 0; }
  .store-product-table-wrap { overflow-x: auto; }
  .store-product-table { min-width: 1080px !important; }
}

/* Keep responsive shell rules after all desktop overrides above. */
@media (max-width: 820px) {
  .app-shell { display: block; grid-template-columns: none; }
  .sidebar { position: static; width: 100%; height: auto; padding: 14px; }
  .brand { padding-bottom: 10px; }
  .workspace-badge, .sidebar-version, .nav-label { display: none; }
  .side-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-nav a, .side-nav a.nav-subitem { min-height: 40px; padding: 7px 9px; }
  .topbar { min-height: 0; padding: 17px 18px; align-items: flex-start; }
  .scope-card, .top-status { display: none; }
  .content { padding: 18px; }
  .panel { padding: 16px; border-radius: 8px; }
  .page-heading h1 { letter-spacing: 0; }
}

@media (max-width: 560px) {
  .topbar { display: grid; gap: 12px; }
  .topbar-actions { width: 100%; flex-wrap: wrap; }
  .user-copy { display: none; }
  .panel-header { align-items: flex-start; flex-direction: column; }
}

/* Other-platform ledger */
.page-action-group { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.other-platform-page { min-width: 0; display: grid; gap: 16px; }
.other-platform-page > * { min-width: 0; }
.other-platform-notice { margin: 0; padding: 13px 15px; align-items: flex-start; color: #285348; border-color: #cce2d9; background: #f4faf7; box-shadow: none; }
.other-platform-notice .notice-icon { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; color: #fff; border-radius: 7px; background: #21836c; font-size: 11px; font-weight: 800; }
.other-platform-notice > div { min-width: 0; }
.other-platform-notice strong { display: block; color: #245749; font-size: 12px; }
.other-platform-notice p { margin-top: 3px; color: #61766f; font-size: 11px; line-height: 1.55; }
.other-expense-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border: 1px solid #dfe6ec; border-radius: 8px; background: #fff; box-shadow: 0 5px 18px rgba(44, 58, 75, .05); }
.other-expense-summary article { min-width: 0; padding: 15px 17px; border-left: 1px solid #e5eaef; }
.other-expense-summary article:first-child { border-left: 0; }
.other-expense-summary span, .other-expense-summary strong, .other-expense-summary small { display: block; }
.other-expense-summary span { color: #6a7685; font-size: 10px; font-weight: 750; }
.other-expense-summary strong { margin-top: 6px; color: #263746; font-size: 19px; line-height: 1.2; }
.other-expense-summary small { margin-top: 4px; color: #89939e; font-size: 9px; }
.other-expense-summary .income { border-top: 3px solid #2a9278; }
.other-expense-summary .expense { border-top: 3px solid #cf5b58; }
.other-expense-summary .shared { border-top: 3px solid #d79b32; }
.other-expense-summary .net { border-top: 3px solid #397db3; }
.other-expense-entry-panel, .other-expense-list-panel { overflow: hidden; }
.other-expense-entry-panel .panel-header { align-items: flex-start; }
.other-expense-form { min-width: 0; display: grid; gap: 0; }
.other-expense-form > .field-company { max-width: 320px; margin-bottom: 14px; }
.other-expense-presets { margin: 2px 0 14px; padding: 10px 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; border: 1px solid #dce6e2; border-radius: 8px; background: #f7fbf9; }
.other-expense-presets > span { margin-right: 2px; color: #53645f; font-size: 10px; font-weight: 800; }
.other-expense-presets button { min-height: 30px; padding: 0 10px; color: #246452; border: 1px solid #cfe0da; border-radius: 7px; background: #fff; cursor: pointer; font: inherit; font-size: 10px; font-weight: 750; }
.other-expense-presets button:hover, .other-expense-presets button:focus-visible { color: #fff; border-color: #247b67; background: #247b67; outline: none; }
.other-expense-group { min-width: 0; padding: 17px 0; border-top: 1px solid #e4e9ee; }
.other-expense-group:first-of-type { border-top: 0; padding-top: 0; }
.other-expense-group-heading { margin-bottom: 13px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.other-expense-group-heading strong, .other-expense-group-heading small { display: block; }
.other-expense-group-heading strong { color: #2c3e4d; font-size: 13px; }
.other-expense-group-heading small { margin-top: 2px; color: #84909c; font-size: 9px; }
.other-expense-group-heading > span { width: 25px; height: 25px; flex: 0 0 25px; display: grid; place-items: center; color: #537083; border: 1px solid #dce4e9; border-radius: 50%; background: #f7f9fa; font-size: 9px; font-weight: 800; }
.other-expense-fields { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; }
.other-expense-fields label, .other-expense-form > .field-company, .other-expense-allocation-fields label { min-width: 0; display: grid; gap: 6px; }
.other-expense-fields label > span, .other-expense-form > .field-company > span, .other-expense-allocation-fields label > span { color: #566474; font-size: 10px; font-weight: 750; }
.other-expense-fields input, .other-expense-fields select, .other-expense-fields textarea, .other-expense-form > .field-company input, .other-expense-form > .field-company select, .other-expense-allocation-fields select { width: 100%; min-width: 0; box-sizing: border-box; padding: 9px 10px; color: #2d3b48; border: 1px solid #d6dfe6; border-radius: 7px; outline: none; background: #fff; font: inherit; font-size: 11px; }
.other-expense-fields input, .other-expense-fields select, .other-expense-form > .field-company input, .other-expense-form > .field-company select, .other-expense-allocation-fields select { min-height: 38px; }
.other-expense-fields textarea { min-height: 74px; resize: vertical; line-height: 1.5; }
.other-expense-fields input:focus, .other-expense-fields select:focus, .other-expense-fields textarea:focus, .other-expense-allocation-fields select:focus { border-color: #659d8e; box-shadow: 0 0 0 3px rgba(42, 146, 120, .09); }
.other-expense-fields small { color: #89939e; font-size: 9px; line-height: 1.4; }
.other-expense-fields .field-wide { grid-column: span 2; }
.other-expense-notes .other-expense-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.other-expense-allocation { padding: 14px 15px; display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; align-items: end; border: 1px solid #dce5e1; border-radius: 7px; background: #f7faf8; }
.other-expense-allocation.muted { opacity: .55; }
.other-expense-allocation-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.other-expense-form .company-expense-choice { min-height: 38px; display: grid; gap: 6px; color: #516176; }
.other-expense-form .company-expense-choice > span:first-child { color: #40554f; font-size: 10px; font-weight: 750; }
.other-expense-form .company-expense-choice > span:last-child { min-height: 38px; padding: 0 10px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid #d5e1dc; border-radius: 7px; background: #fff; font-size: 11px; }
.other-expense-form .company-expense-choice input { width: 17px; height: 17px; margin: 0; accent-color: #21836c; }
.other-expense-submit { padding-top: 15px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.other-expense-submit > span { color: #87919b; font-size: 9px; }
.other-expense-submit .primary-button { min-height: 40px; margin: 0; padding: 0 20px; white-space: nowrap; }
.other-expense-bulk-panel { overflow: hidden; }
.other-expense-bulk-panel .panel-header { align-items: flex-start; }
.template-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.other-expense-upload-form { margin-bottom: 14px; padding: 13px; display: grid; grid-template-columns: 180px minmax(260px, 1fr) auto; gap: 12px; align-items: end; border: 1px solid #dde6ed; border-radius: 8px; background: #f8fafb; }
.other-expense-upload-form label { min-width: 0; display: grid; gap: 6px; }
.other-expense-upload-form label > span { color: #566474; font-size: 10px; font-weight: 750; }
.other-expense-upload-form select, .other-expense-upload-form input[type="file"] { width: 100%; min-height: 38px; box-sizing: border-box; padding: 7px 9px; color: #2f3c49; border: 1px solid #d6dfe6; border-radius: 7px; background: #fff; font: inherit; font-size: 11px; }
.bulk-entry-wrap { max-width: 100%; overflow-x: auto; border: 1px solid #e0e6eb; border-radius: 8px; }
.other-expense-bulk-table { width: 100%; min-width: 1120px; table-layout: fixed; }
.other-expense-bulk-table th { white-space: nowrap; }
.other-expense-bulk-table th:nth-child(1) { width: 7%; }
.other-expense-bulk-table th:nth-child(2) { width: 10%; }
.other-expense-bulk-table th:nth-child(3) { width: 10%; }
.other-expense-bulk-table th:nth-child(4) { width: 13%; }
.other-expense-bulk-table th:nth-child(5) { width: 9%; }
.other-expense-bulk-table th:nth-child(6) { width: 10%; }
.other-expense-bulk-table th:nth-child(7) { width: 12%; }
.other-expense-bulk-table th:nth-child(8) { width: 10%; }
.other-expense-bulk-table th:nth-child(9) { width: 12%; }
.other-expense-bulk-table th:nth-child(10) { width: 13%; }
.other-expense-bulk-table th:nth-child(11) { width: 7%; }
.other-expense-bulk-table input, .other-expense-bulk-table select { width: 100%; min-width: 0; height: 34px; box-sizing: border-box; padding: 0 8px; color: #2f3c49; border: 1px solid #d7dfe6; border-radius: 6px; background: #fff; font: inherit; font-size: 10px; }
.other-expense-bulk-table input:focus, .other-expense-bulk-table select:focus { border-color: #659d8e; outline: none; box-shadow: 0 0 0 3px rgba(42, 146, 120, .08); }
.bulk-check { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; color: #506172; font-size: 10px; font-weight: 700; }
.bulk-check input { width: 15px; height: 15px; accent-color: #21836c; }
.other-expense-filter { margin: 0 0 15px; padding: 13px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px 11px; align-items: end; border: 1px solid #e0e6eb; border-radius: 8px; background: #f7f9fa; }
.other-expense-filter .filter-search { grid-column: span 2; }
.other-expense-filter label { min-width: 0; display: grid; gap: 5px; }
.other-expense-filter label > span { color: #5b6876; font-size: 9px; font-weight: 750; }
.other-expense-filter input, .other-expense-filter select { width: 100%; min-width: 0; height: 36px; box-sizing: border-box; padding: 0 9px; color: #2f3c49; border: 1px solid #d7dfe6; border-radius: 6px; outline: none; background: #fff; font: inherit; font-size: 10px; }
.other-expense-filter input:focus, .other-expense-filter select:focus { border-color: #659d8e; box-shadow: 0 0 0 3px rgba(42, 146, 120, .08); }
.other-expense-filter .filter-actions { display: flex; align-items: center; gap: 7px; }
.other-expense-filter .filter-actions button, .other-expense-filter .filter-actions a { flex: 1; min-width: 0; height: 36px; margin: 0; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; font-size: 10px; }
.other-expense-filter .filter-actions button { color: #fff; border: 1px solid #247b67; background: #247b67; cursor: pointer; font-weight: 750; }
.other-expense-filter .filter-actions a { color: #465663; border: 1px solid #d4dce3; background: #fff; text-decoration: none; font-weight: 700; }
.other-expense-list-panel .table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid #e0e6eb; border-radius: 8px; }
.other-expense-table { width: 100%; table-layout: fixed; }
.other-expense-table th:nth-child(1) { width: 14%; }
.other-expense-table th:nth-child(2) { width: 21%; }
.other-expense-table th:nth-child(3) { width: 12%; }
.other-expense-table th:nth-child(4) { width: 15%; }
.other-expense-table th:nth-child(5) { width: 16%; }
.other-expense-table th:nth-child(6) { width: 12%; }
.other-expense-table th:nth-child(7) { width: 10%; }
.other-expense-table td { overflow-wrap: anywhere; vertical-align: top; }
.other-expense-table .money-cell strong, .other-expense-table .direction-label { display: block; }
.other-expense-table .direction-label { margin-bottom: 4px; font-size: 9px; font-weight: 800; }
.other-expense-table .direction-label.income, .positive-text { color: #1f8068; }
.other-expense-table .direction-label.expense, .negative-text { color: #ba514f; }
.other-expense-actions { display: grid; justify-items: start; gap: 5px; }
.other-expense-edit-button { min-height: 27px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; color: #fff; border-radius: 6px; background: #246bfd; text-decoration: none; font-size: 10px; font-weight: 800; box-shadow: 0 8px 18px rgba(36, 107, 253, .16); }
.other-expense-edit-button:hover, .other-expense-edit-button:focus-visible { background: #1d56ca; outline: none; }
.delete-other-expense summary { color: #a84947; cursor: pointer; font-size: 10px; font-weight: 700; }
.delete-other-expense form { width: 150px; display: grid; gap: 6px; }
.delete-other-expense input[type="text"] { width: 100%; min-width: 0; box-sizing: border-box; padding: 7px; border: 1px solid #ddd; border-radius: 6px; font: inherit; font-size: 9px; }
.delete-other-expense .danger-button { margin: 0; padding: 7px 8px; font-size: 9px; }

@media (max-width: 1180px) {
  .other-expense-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .other-expense-filter { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .other-expense-table { min-width: 980px; }
  .other-expense-upload-form { grid-template-columns: 1fr 1fr; }
  .other-expense-upload-form button { grid-column: span 2; }
}
@media (max-width: 820px) {
  .other-expense-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .other-expense-summary article:nth-child(3) { border-left: 0; border-top-width: 3px; }
  .other-expense-fields, .other-expense-notes .other-expense-fields, .other-expense-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .other-expense-fields .field-wide, .other-expense-filter .filter-search { grid-column: span 2; }
  .other-expense-allocation { grid-template-columns: 1fr; }
  .other-expense-upload-form { grid-template-columns: 1fr; }
  .other-expense-upload-form button { grid-column: auto; }
  .template-actions { justify-content: flex-start; }
  .other-expense-allocation-fields { grid-template-columns: 1fr; }
  .other-expense-submit { align-items: stretch; flex-direction: column; }
  .other-expense-submit .primary-button { width: 100%; box-sizing: border-box; justify-content: center; }
}
@media (max-width: 560px) {
  .page-action-group { width: 100%; }
  .page-action-group a { flex: 1; text-align: center; }
  .other-platform-notice { gap: 9px; }
  .other-expense-summary { grid-template-columns: 1fr; }
  .other-expense-summary article { border-left: 0; border-top-width: 3px; }
  .other-expense-fields, .other-expense-notes .other-expense-fields, .other-expense-filter { grid-template-columns: 1fr; }
  .other-expense-fields .field-wide, .other-expense-filter .filter-search { grid-column: auto; }
  .other-expense-filter .filter-actions { grid-column: auto; }
}
.ownership-table .selection-cell { width: 44px; text-align: center; }
.ownership-table .selection-cell input,
.batch-select-all input { width: 16px; height: 16px; accent-color: #246bfd; cursor: pointer; }
.batch-select-all { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.batch-export-panel .primary-button { margin: 0; white-space: nowrap; }
