:root {
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #243447;
  background: #f4f5f3;
  font-size: 16px;
  font-synthesis: none;
  line-height: 1.5;
  --ink: #243447;
  --muted: #75808a;
  --accent: #246577;
  --line: #e4e8e6;
  --surface: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; outline-offset: 3px; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, .table-scroll:focus-visible { outline: 3px solid #81b5c2; }
a { color: var(--accent); }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.85rem; line-height: 1.3; letter-spacing: -.045em; }
h2 { font-size: 1.35rem; line-height: 1.4; letter-spacing: -.025em; }
h3 { font-size: .95rem; font-weight: 650; }
main { outline: none; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1280px; margin: auto; min-height: 72px; padding: 15px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 19px; color: #20384a; text-decoration: none; white-space: nowrap; }
.brand strong { position: relative; font-size: 1.125rem; font-weight: 800; letter-spacing: .11em; padding-bottom: 3px; }
.brand strong::after { content: ""; position: absolute; bottom: -1px; left: 0; width: 19px; height: 2px; border-radius: 2px; background: #3b8891; }
.brand > span { font-size: .8rem; color: var(--muted); border-left: 1px solid var(--line); padding-left: 19px; }
.account-area { display: flex; align-items: center; gap: 20px; min-width: 0; }
.account-copy { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.account-copy strong { font-size: .875rem; font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-copy > span { font-size: .75rem; color: var(--muted); max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-button { border: 0; background: none; color: var(--muted); padding: 8px 0; font-size: .8rem; white-space: nowrap; }
.text-button:hover { color: var(--accent); }
.demo-badge { display: inline-flex; align-items: center; padding: 2px 7px; border: 1px solid #ddd5ba; border-radius: 5px; background: #faf7ee; color: #837244; font-size: .6875rem; line-height: 1.5; font-weight: 550; white-space: nowrap; }
.primary-button, .secondary-button { display: inline-flex; justify-content: center; align-items: center; min-height: 42px; border: 1px solid transparent; border-radius: 8px; padding: 9px 15px; font-size: .875rem; font-weight: 550; text-decoration: none; white-space: nowrap; }
.primary-button { color: #fff; background: var(--accent); }
.primary-button:hover:not(:disabled) { background: #1d5261; }
.secondary-button { background: #fff; color: #51636e; border-color: #dce3e1; }
.secondary-button:hover:not(:disabled), .secondary-button.selected { background: #edf4f3; color: #255e6c; border-color: #bbd2d3; }
.eyebrow { display: block; color: var(--muted); font-size: .6875rem; font-weight: 550; letter-spacing: .09em; margin-bottom: 8px; }
.workspace { max-width: 1280px; margin: auto; padding: 24px 28px 18px; }
.workspace-heading { min-height: 22px; display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.workspace-heading > p { margin-left: auto; color: var(--muted); font-size: .75rem; }
.view-tabs { display: flex; gap: 4px; width: fit-content; padding: 4px; margin-bottom: 26px; background: #e9edeb; border-radius: 11px; }
.view-tab { min-width: 135px; min-height: 40px; border: 0; border-radius: 8px; padding: 9px 24px; background: transparent; color: #738079; font-size: .9rem; font-weight: 550; }
.view-tab.active { background: #fff; color: #234e5c; box-shadow: 0 1px 4px #203e3e10; }
.section-heading { display: flex; align-items: baseline; gap: 16px; margin-bottom: 20px; }
.section-heading p { color: var(--muted); font-size: .8rem; }
.filters { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(320px, 1.15fr); column-gap: 22px; row-gap: 12px; margin-bottom: 18px; }
.filter-topline, .search-row { display: flex; align-items: center; gap: 9px; min-width: 0; }
.filter-topline { grid-column: 1; }
.search-row { grid-column: 2; }
.filter-topline .refresh-button { margin-left: auto; }
.task-list-label { color: #55666e; font-size: .875rem; font-weight: 550; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { color: #667780; font-size: .75rem; font-weight: 550; }
.field input, .field select { display: block; width: 100%; min-width: 0; min-height: 42px; padding: 9px 12px; border: 1px solid #dce3e1; border-radius: 8px; color: #344c5a; background: #fff; font-size: .9375rem; line-height: 1.4; }
.field input:focus, .field select:focus { border-color: #80acb7; }
.field input::placeholder { color: #98a2a5; font-weight: 400; }
.field select { padding-right: 28px; }
.field input[type=date] { max-width: 100%; font-variant-numeric: tabular-nums; }
.field input[type=date]::-webkit-date-and-time-value { text-align: left; }
.dataset-field { flex: 1; max-width: 310px; }
.dataset-field select { font-weight: 600; color: #2e5260; }
.search-field { flex: 1; min-width: 0; }
.query-button, .filter-toggle { flex-shrink: 0; min-width: 62px; padding-inline: 13px; }
.filter-summary { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 7px 10px; min-width: 0; }
.filter-chip { padding: 3px 9px; min-height: 27px; border: 1px solid #dce6e2; border-radius: 6px; background: #edf2ef; color: #5a776f; font-size: .75rem; font-variant-numeric: tabular-nums; }
.filter-chip:hover { border-color: #99bbb0; color: #315f54; }
#search-summary { font-size: .75rem; color: var(--muted); overflow-wrap: anywhere; }
.filter-panel { grid-column: 1 / -1; display: flex; align-items: flex-end; gap: 14px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
#task-status-field { width: 200px; }
.date-fields { display: flex; gap: 12px; min-width: 0; flex: 1; max-width: 410px; }
.date-fields > .field { flex: 1; min-width: 0; }
.table-card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px #2b484703; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 14px; padding: 17px 20px; }
.table-heading { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.table-heading h3 { overflow-wrap: anywhere; }
.count-label { padding-left: 10px; border-left: 1px solid var(--line); color: #8a9599; font-size: .75rem; white-space: nowrap; }
.update-time { color: #8a9599; font-size: .6875rem; font-variant-numeric: tabular-nums; }
.notice { padding: 10px 13px; border: 1px solid #dce9e6; border-radius: 7px; background: #f2f7f5; color: #5d7972; font-size: .8rem; overflow-wrap: anywhere; }
.table-notice { margin: 0 16px 14px; }
.table-status { display: flex; flex-direction: column; justify-content: center; gap: 9px; min-height: 240px; padding: 54px 20px; text-align: center; color: var(--muted); font-size: .875rem; }
.table-status strong { color: #526770; font-size: .95rem; font-weight: 550; }
.table-status .empty-help { font-size: .8rem; }
.error-state { padding: 42px 20px; min-height: 220px; color: #a05656; text-align: center; font-size: .875rem; }
.error-state p { margin-bottom: 16px; overflow-wrap: anywhere; }
.table-scroll { width: 100%; max-width: 100%; overflow: auto; overscroll-behavior-x: contain; border-top: 1px solid #e9eeeb; scrollbar-width: thin; scrollbar-color: #ccd9d4 transparent; }
table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; font-size: .875rem; }
th, td { padding: 13px 17px; border-bottom: 1px solid #edf0ee; min-width: 118px; max-width: 310px; vertical-align: middle; overflow-wrap: anywhere; }
th { background: #f7f9f7; color: #7c898e; font-size: .75rem; font-weight: 550; white-space: nowrap; }
td { background: #fff; color: #435862; }
th:first-child, td:first-child { position: sticky; left: 0; z-index: 1; min-width: 175px; max-width: 260px; border-right: 1px solid #e9eeeb; }
th:first-child { z-index: 2; }
tbody tr:last-child > td { border-bottom: 0; }
tbody tr:hover > td { background: #f8fbf9; }
.number-cell { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.date-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
#data-table:not(.is-task-table) th, #data-table:not(.is-task-table) td { white-space: nowrap; overflow-wrap: normal; }
#data-table:not(.is-task-table) th:first-child, #data-table:not(.is-task-table) td:first-child { min-width: 112px; max-width: none; }
.task-row { cursor: pointer; }
.task-link { border: 0; background: none; padding: 3px 0; color: #2f6577; font: inherit; font-weight: 550; text-align: left; line-height: 1.5; overflow-wrap: anywhere; }
.task-link:hover { color: #194e60; text-decoration: underline; }
.status-pill { display: inline-block; padding: 3px 8px; border-radius: 5px; background: #f1f3f3; color: #6a777d; font-size: .75rem; font-weight: 500; white-space: nowrap; }
.status-pill.pending { background: #f9f3e8; color: #9b7e4e; }
.status-pill.shooting { background: #edf4f8; color: #52798e; }
.status-pill.review { background: #f0eef7; color: #7a6e9d; }
.status-pill.rework { background: #fbf0ec; color: #a87561; }
.status-pill.done { background: #eaf4ed; color: #5c886a; }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid #edf0ee; color: #8a9599; font-size: .75rem; }
.pagination { display: flex; align-items: center; gap: 14px; }
.pagination .secondary-button { min-height: 34px; padding: 6px 11px; font-size: .75rem; }
.pagination > span { min-width: 32px; text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-hint { margin-top: 9px; color: #9aa3a4; font-size: .6875rem; }
.workspace-footer { display: flex; justify-content: space-between; gap: 15px; padding: 23px 1px 4px; color: #9aa3a4; font-size: .6875rem; }
.login-screen { padding: 72px 24px; }
.login-card { position: relative; max-width: 440px; margin: auto; padding: 40px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 36px #2a443d06; }
.login-card::before { content: ""; display: block; width: 32px; height: 3px; border-radius: 3px; background: #4b8990; margin-bottom: 26px; }
.login-card h1 { font-size: 1.65rem; }
.login-intro { margin: 12px 0 26px; font-size: .9rem; color: var(--muted); }
.login-action { width: 100%; margin-top: 18px; }
.login-footnote { margin-top: 28px; padding-top: 18px; border-top: 1px solid #edf0ee; color: #94a09e; font-size: .75rem; }
.demo-note { margin: 20px 0; }
.demo-note p { margin-top: 8px; color: var(--muted); font-size: .8rem; }
.password-login-form { margin-top: 22px; }
.password-login-form > .field + .field { margin-top: 16px; }
.message { color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.message.error { padding: 12px; border-radius: 7px; color: #9c5454; background: #fbf1f0; }
.task-dialog { width: min(780px, calc(100% - 32px)); max-width: calc(100% - 32px); max-height: calc(100dvh - 48px); margin: auto; padding: 0; border: 1px solid #e0e7e3; border-radius: 16px; background: #fff; color: var(--ink); box-shadow: 0 28px 100px #1b353d30; overflow: auto; }
.task-dialog::backdrop { background: #1d363d70; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 25px 26px 21px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 4; }
.dialog-heading h2 { font-size: 1.2rem; line-height: 1.5; overflow-wrap: anywhere; }
.dialog-heading > div { min-width: 0; }
.dialog-heading .eyebrow { color: #7f9899; margin-bottom: 6px; }
.close-button { flex-shrink: 0; min-height: 36px; padding: 7px 12px; border-radius: 7px; background: #f6f8f6; border-color: transparent; font-size: .8rem; }
.dialog-content { padding: 16px 26px 24px; }
.dialog-content > .table-scroll { margin-top: 22px; border: 1px solid var(--line); border-radius: 9px; }
.detail-fields th, .detail-fields td { position: static; border-right: 0; min-width: 0; max-width: none; padding: 13px 0; font-size: .875rem; background: #fff; }
.detail-fields th { width: 112px; color: #8a979b; white-space: normal; font-weight: 450; padding-right: 18px; }
.detail-fields td { color: #3a515c; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-fields tr:last-child > th { border-bottom: 0; }
.dialog-footnote { padding: 13px 26px; border-top: 1px solid var(--line); background: #f7f9f7; color: #93a09d; font-size: .6875rem; }
.toast { position: fixed; bottom: max(22px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 10; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 9px; background: #28424c; color: #fff; box-shadow: 0 5px 24px #20334e29; font-size: .875rem; overflow-wrap: anywhere; }
.visually-hidden, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 20; padding: 10px; background: #fff; border: 2px solid var(--accent); }
@media (min-width: 1000px) {
  .data-section { min-height: 520px; }
  .table-status { min-height: 280px; }
}
@media (max-width: 760px) {
  .topbar-inner { min-height: 65px; padding: 12px 18px; gap: 14px; }
  .brand { flex-direction: column; gap: 4px; align-items: flex-start; }
  .brand strong { font-size: 1rem; line-height: 1.15; padding-bottom: 4px; }
  .brand > span { font-size: .625rem; line-height: 1; border: 0; padding: 0; color: #8a969a; }
  .account-area { gap: 14px; }
  .account-copy { flex-direction: column; gap: 0; align-items: flex-end; }
  .account-copy strong { max-width: 125px; font-size: .8rem; }
  .account-copy > span { font-size: .625rem; }
  .text-button { font-size: .75rem; }
  .workspace { padding: 12px 16px 16px; }
  .workspace-heading { min-height: 20px; margin-bottom: 10px; }
  .workspace-heading > p { font-size: .6875rem; }
  .view-tabs { width: 100%; display: flex; gap: 4px; padding: 3px; border-radius: 10px; margin-bottom: 16px; }
  .view-tab { flex: 1; min-width: 0; min-height: 38px; border-radius: 7px; padding: 8px 14px; font-size: .875rem; }
  .section-heading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  .filters { display: flex; flex-direction: column; gap: 9px; margin-bottom: 13px; }
  .filter-topline { gap: 9px; min-height: 40px; }
  .dataset-field { max-width: none; }
  .field input, .field select { min-height: 40px; padding: 9px 11px; font-size: 16px; line-height: 1.25; border-radius: 8px; }
  .dataset-field select { font-size: .875rem; min-height: 40px; }
  .task-list-label { font-size: .8125rem; color: #62767d; }
  .primary-button, .secondary-button { min-height: 40px; font-size: .8125rem; padding: 9px 13px; }
  .refresh-button { min-width: 58px; padding-inline: 12px; font-size: .75rem; }
  .search-row { gap: 7px; }
  .search-field input { font-size: 16px; }
  .query-button, .filter-toggle { min-width: 56px; padding-inline: 11px; }
  .filter-summary { gap: 5px 8px; }
  .filter-chip { font-size: .6875rem; min-height: 25px; padding: 3px 8px; }
  #search-summary { font-size: .6875rem; }
  .filter-panel { padding: 13px; gap: 12px; border-radius: 9px; flex-wrap: wrap; }
  .date-fields { width: 100%; max-width: none; flex-basis: 100%; gap: 10px; }
  .field > span { font-size: .6875rem; }
  #task-status-field { flex: 1; width: auto; }
  #filter-apply { margin-left: auto; }
  .table-card { border-radius: 11px; }
  .table-toolbar { padding: 13px 14px 11px; gap: 3px 10px; }
  .table-heading { gap: 8px; }
  .table-heading h3 { font-size: .875rem; }
  .count-label { padding-left: 8px; font-size: .6875rem; }
  .update-time { width: 100%; font-size: .625rem; line-height: 1.4; }
  .table-notice { margin: 0 12px 11px; font-size: .75rem; padding: 9px 11px; }
  .table-status { min-height: 220px; }
  th, td { padding: 12px 13px; min-width: 100px; font-size: .875rem; }
  th { padding-block: 10px; font-size: .6875rem; }
  th:first-child, td:first-child { min-width: 166px; max-width: 205px; }
  .is-task-table th:first-child, .is-task-table td:first-child { width: 150px; min-width: 150px; max-width: 150px; }
  .is-task-table th:nth-child(2), .is-task-table td:nth-child(2) { width: 76px; min-width: 76px; padding-inline: 8px; }
  .is-task-table th:nth-child(3), .is-task-table td:nth-child(3) { width: 102px; min-width: 102px; padding-inline: 8px; font-size: .75rem; }
  .task-link { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 179px; padding: 0; font-size: .875rem; font-weight: 550; }
  .status-pill { font-size: .6875rem; padding: 3px 7px; }
  .table-footer { padding: 12px; gap: 10px; }
  .table-footer > span { font-size: .6875rem; }
  .pagination { gap: 8px; }
  .pagination .secondary-button { font-size: .6875rem; min-height: 34px; padding: 6px 9px; }
  .pagination > span { font-size: .6875rem; min-width: 25px; }
  .table-hint { font-size: .625rem; margin-top: 8px; }
  .workspace-footer { padding-top: 20px; font-size: .625rem; }
  .task-dialog { width: calc(100% - 20px); max-width: calc(100% - 20px); max-height: calc(100dvh - 24px); border-radius: 14px; }
  .dialog-heading { padding: 20px 18px 16px; gap: 12px; }
  .dialog-heading h2 { font-size: 1.0625rem; }
  .dialog-heading .eyebrow { font-size: .625rem; }
  .close-button { min-height: 34px; padding: 6px 10px; font-size: .75rem; }
  .dialog-content { padding: 10px 18px 20px; }
  .detail-fields th, .detail-fields td { padding-block: 12px; min-width: 0; font-size: .875rem; }
  .detail-fields th { width: 88px; min-width: 88px; padding-right: 14px; font-size: .8125rem; }
  .dialog-footnote { padding: 11px 18px; font-size: .625rem; }
  .login-screen { padding: 42px 18px; }
  .login-card { padding: 30px 26px; }
  .login-card h1 { font-size: 1.5rem; }
  .login-card::before { margin-bottom: 24px; }
  .login-card .field input, .login-card .field select, .login-card .primary-button { min-height: 46px; }
}
@media (max-width: 370px) {
  .topbar-inner { padding-inline: 15px; }
  .workspace { padding-inline: 13px; }
  .account-copy strong { max-width: 105px; }
  .account-area { gap: 12px; }
  .table-footer { flex-wrap: wrap; }
  .table-footer > span { width: 100%; }
  .pagination { width: 100%; justify-content: space-between; }
  .workspace-footer { flex-wrap: wrap; }
  .login-card { padding: 27px 22px; }
}
@media (prefers-reduced-motion: no-preference) {
  button, a { transition: background-color .14s, color .14s, border-color .14s; }
  .task-dialog[open] { animation: dialog-in .16s ease-out; }
  @keyframes dialog-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
}

/* The first three live-session columns fit the phone viewport together. */
#data-table.is-live-table { table-layout: fixed; width: 100%; min-width: 834px; }
#data-table.is-live-table col.live-col-account { width: 128px; }
#data-table.is-live-table col.live-col-gmv,
#data-table.is-live-table col.live-col-net,
#data-table.is-live-table col.live-col-cost,
#data-table.is-live-table col.live-col-refund { width: 108px; }
#data-table.is-live-table col.live-col-refund_rate { width: 82px; }
#data-table.is-live-table col.live-col-orders { width: 76px; }
#data-table.is-live-table col.live-col-hour_gmv { width: 116px; }
#data-table.is-live-table th,
#data-table.is-live-table td { min-width: 0; max-width: none; padding: 12px 10px; white-space: nowrap; overflow-wrap: normal; }
#data-table.is-live-table th:first-child,
#data-table.is-live-table td:first-child { width: 128px; min-width: 128px; max-width: 128px; white-space: normal; overflow-wrap: anywhere; border-right: 1px solid #e3ebe7; }
#data-table.is-live-table th { font-size: .75rem; padding-block: 10px; }
#data-table.is-live-table .number-cell { font-size: .875rem; font-variant-numeric: tabular-nums; }
#data-table.is-live-table td.live-net { background: #f4f9f6; color: #396c59; font-weight: 600; }
#data-table.is-live-table th.live-net { color: #4d7967; background: #eef5f0; }
#data-table.is-live-table tbody tr:hover > td.live-net { background: #edf6f0; }
.live-account-button { display: block; width: 100%; padding: 0; border: 0; background: none; color: #2f6070; text-align: left; font: inherit; }
.live-account-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 1rem; font-weight: 550; line-height: 1.4; overflow-wrap: anywhere; }
.live-account-button:hover .live-account-name { color: #1f4c5c; text-decoration: underline; }
.live-start-time { display: block; margin-top: 4px; color: #8b989c; font-size: .6875rem; font-weight: 400; line-height: 1.3; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-notice.live-table-note { padding: 0; margin: 0 14px 9px; border: 0; background: transparent; color: #8a9897; font-size: .6875rem; line-height: 1.4; }
.live-dialog { max-width: 580px; }
.live-detail-fields td.live-net { color: #396c59; font-weight: 650; }
.live-detail-fields td { font-size: 1rem; }
.live-detail-fields td.number-cell { font-size: .875rem; white-space: nowrap; }
@media (max-width: 760px) {
  #data-table.is-live-table { min-width: 798px; }
  #data-table.is-live-table col.live-col-account { width: 124px; }
  #data-table.is-live-table col.live-col-gmv,
  #data-table.is-live-table col.live-col-net { width: 92px; }
  #data-table.is-live-table th:first-child,
  #data-table.is-live-table td:first-child { width: 124px; min-width: 124px; max-width: 124px; }
  #data-table.is-live-table th,
  #data-table.is-live-table td { padding-inline: 8px; }
}

/* ---------- 2026-11-21：经营总览、汇总条、合计行、排序、直播提醒 ---------- */
:root { --good: #3f7d5c; --bad: #b5574f; --warn: #a2761f; --bar: #5c9aa8; --line-color: #d08a3c; }
.range-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.range-chip { min-height: 30px; padding: 4px 11px; border: 1px solid #dce3e1; border-radius: 999px; background: #fff; color: #5b6d73; font-size: .75rem; font-weight: 550; }
.range-chip:hover { border-color: #a9c6c8; color: #255e6c; }
.range-chip.selected { background: #e5f0ef; border-color: #a7c9c9; color: #1f5866; }
#table-range-chips { margin-left: 4px; }

.overview-section { min-height: 520px; }
.overview-head { display: grid; gap: 12px; margin-bottom: 18px; }
.overview-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.range-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
.custom-range { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.custom-range .field { width: 160px; }
.period-line { color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 12px; margin-bottom: 16px; }
.metric { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.metric.kpi { padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.metric-label { color: #6f7f86; font-size: .75rem; font-weight: 550; }
.metric-value { color: #1f3b4a; font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric.kpi .metric-value { font-size: 1.55rem; }
.metric-delta { font-size: .6875rem; font-variant-numeric: tabular-nums; color: #8a9599; }
.metric-delta.good { color: var(--good); }
.metric-delta.bad { color: var(--bad); }
.metric-delta.neutral { color: #607884; }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.panel-card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.panel-foot { margin-top: 10px; color: #9aa3a4; font-size: .6875rem; }
.chart-legend { display: flex; gap: 14px; color: #6f7f86; font-size: .6875rem; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-item::before { content: ""; display: inline-block; width: 12px; height: 10px; border-radius: 2px; background: var(--bar); }
.legend-item.line::before { height: 3px; border-radius: 2px; background: var(--line-color); }
.chart-wrap { width: 100%; overflow: hidden; }
.trend-svg { display: block; width: 100%; height: auto; }
.trend-svg .grid { stroke: #edf1ef; stroke-width: 1; }
.trend-svg .axis { stroke: #d4dcd9; stroke-width: 1; }
.trend-svg .tick { fill: #8d989c; font-size: 10.5px; font-variant-numeric: tabular-nums; }
.trend-svg .bar { fill: var(--bar); opacity: .85; }
.trend-svg .line { fill: none; stroke: var(--line-color); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.trend-svg .dot { fill: #fff; stroke: var(--line-color); stroke-width: 1.6; }
.trend-svg .hit { fill: transparent; cursor: pointer; outline: none; }
.trend-svg .hit:hover, .trend-svg .hit.active, .trend-svg .hit:focus { fill: #24657712; }
.chart-readout { min-height: 1.5em; margin-top: 6px; color: #4f6670; font-size: .75rem; font-variant-numeric: tabular-nums; }
.daily-details { margin-top: 10px; border-top: 1px solid #edf0ee; padding-top: 10px; }
.daily-details summary { cursor: pointer; color: #4f7480; font-size: .75rem; font-weight: 550; }
.daily-scroll { margin-top: 10px; border: 1px solid var(--line); border-radius: 9px; max-height: 360px; }
.daily-scroll th, .daily-scroll td { min-width: 92px; padding: 9px 12px; white-space: nowrap; }
.daily-scroll th:first-child, .daily-scroll td:first-child { min-width: 100px; }

.ranking-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ranking-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name figures" "bar figures"; column-gap: 12px; row-gap: 5px; padding: 9px 0; border-bottom: 1px solid #f0f3f1; }
.ranking-item:last-child { border-bottom: 0; }
.ranking-name { grid-area: name; display: flex; align-items: baseline; gap: 8px; min-width: 0; padding: 0; border: 0; background: none; color: #2f6070; font-weight: 550; font-size: .875rem; text-align: left; }
.ranking-name:hover .ranking-label { text-decoration: underline; }
.ranking-rank { flex-shrink: 0; width: 18px; color: #9aa6a8; font-size: .75rem; font-variant-numeric: tabular-nums; }
.ranking-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking-bar { grid-area: bar; display: block; height: 6px; margin-left: 26px; border-radius: 4px; background: #eef2f0; overflow: hidden; }
.ranking-fill { display: block; height: 100%; border-radius: 4px; background: var(--bar); }
.ranking-figures { grid-area: figures; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 2px; text-align: right; }
.ranking-figures strong { font-size: .9375rem; color: #1f3b4a; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ranking-sub { color: #8a9599; font-size: .6875rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ranking-empty { color: var(--muted); font-size: .8rem; padding: 18px 0; }
.overview-notice { margin-top: 14px; color: #8a9599; font-size: .6875rem; line-height: 1.6; }
#overview-as-of { margin-top: 4px; }

.summary-strip { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 0 16px 14px; padding: 12px 14px; border: 1px solid #e6ece9; border-radius: 9px; background: #fafcfb; }
.strip-note { flex-basis: 100%; color: #9aa3a4; font-size: .6875rem; }

#data-table tfoot th, #data-table tfoot td { background: #f4f8f6; color: #2d4652; font-weight: 650; border-top: 1px solid #dfe7e3; border-bottom: 0; position: sticky; bottom: 0; }
#data-table tfoot th:first-child { left: 0; z-index: 3; font-size: .75rem; white-space: nowrap; }
.sort-button { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: inherit; font: inherit; white-space: nowrap; }
.number-cell .sort-button { flex-direction: row; }
.sort-button:hover { color: #255e6c; }
.sort-mark { color: #b7c1c3; font-size: .7rem; }
.sort-mark.active { color: #246577; }
th[aria-sort="ascending"], th[aria-sort="descending"] { color: #255e6c; }

.flag-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.flag { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: .625rem; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.flag.bad { background: #fbeceb; color: var(--bad); }
.flag.warn { background: #fbf3e2; color: var(--warn); }
#data-table td.is-bad { color: var(--bad); font-weight: 650; }
#data-table td.is-warn { color: var(--warn); font-weight: 650; }

@media (max-width: 900px) {
  .overview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .overview-section { min-height: 0; }
  .overview-head { gap: 10px; margin-bottom: 14px; }
  .overview-title-row h2 { font-size: 1.1rem; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
  .metric.kpi { padding: 12px 13px; border-radius: 10px; }
  .metric.kpi .metric-value { font-size: 1.2rem; }
  .panel-card { padding: 13px 13px; border-radius: 11px; }
  .custom-range .field { width: calc(50% - 5px); }
  .custom-range { width: 100%; }
  .summary-strip { margin: 0 12px 11px; gap: 8px 18px; padding: 10px 11px; }
  .summary-strip .metric-value { font-size: 1rem; }
  #table-range-chips { margin-left: 0; }
  .range-chip { min-height: 28px; padding: 3px 10px; }
}
.period-line.lagging { color: var(--warn); }

/* ---------- 2026-11-21：手机端（卡片列表、底部导航、底部弹出详情） ---------- */
.sort-field select { min-height: 36px; padding: 6px 28px 6px 10px; border: 1px solid #dce3e1; border-radius: 8px; background: #fff; color: #3b5662; font-size: .8125rem; }
.card-list { list-style: none; margin: 0; padding: 0 12px 4px; display: grid; gap: 10px; }
.data-card { min-width: 0; }
.card-button { display: flex; flex-direction: column; gap: 8px; width: 100%; padding: 14px 14px 12px; border: 1px solid #e3e9e6; border-radius: 12px; background: #fff; color: inherit; font: inherit; text-align: left; }
button.card-button:active { background: #f4f8f6; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-width: 0; }
.card-title { min-width: 0; color: #22495a; font-size: 1rem; font-weight: 650; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.card-head .flag-list { margin-top: 2px; flex-shrink: 0; justify-content: flex-end; max-width: 45%; }
.card-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: #84929a; font-size: .75rem; font-variant-numeric: tabular-nums; }
.card-main { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px 0 2px; border-top: 1px solid #f0f3f1; }
.figure { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.figure-label { color: #8a979b; font-size: .6875rem; }
.figure-value { color: #1f3b4a; font-size: 1.0625rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.figure.is-net .figure-value { color: #396c59; }
.figure.is-bad .figure-value { color: var(--bad); }
.card-extra { display: flex; flex-wrap: wrap; gap: 4px 14px; color: #6f7f86; font-size: .75rem; font-variant-numeric: tabular-nums; }
.extra-item.is-warn { color: var(--warn); font-weight: 650; }
.task-card .card-head .status-pill { flex-shrink: 0; }
.due { font-weight: 550; color: #5d6f76; }
.due.overdue { color: var(--bad); }
.card-meta { color: #8a979b; }
.card-more { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 16px; color: #8a9599; font-size: .75rem; font-variant-numeric: tabular-nums; }
.card-more .secondary-button { min-width: 112px; }
.table-card.is-card-mode { background: transparent; border: 0; box-shadow: none; overflow: visible; }
.table-card.is-card-mode .table-toolbar { padding: 4px 2px 10px; }
.table-card.is-card-mode .table-notice { margin: 0 2px 10px; }
.table-card.is-card-mode .summary-strip { margin: 0 0 12px; background: #fff; }
.table-card.is-card-mode .card-list { padding: 0; }
.table-card.is-card-mode .card-more { padding-inline: 2px; }
.table-card.is-card-mode .table-status, .table-card.is-card-mode .error-state { background: #fff; border: 1px solid var(--line); border-radius: 12px; }

@media (max-width: 760px) {
  /* 栏目切换固定在底部，单手拇指可及；为内容和提示条留出空间。 */
  body.in-workspace { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .view-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; width: 100%; margin: 0; padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); gap: 6px; border-radius: 0; background: #ffffffee; border-top: 1px solid var(--line); box-shadow: 0 -4px 18px #1d363d0d; backdrop-filter: blur(8px); }
  .view-tab { min-height: 48px; font-size: .875rem; border-radius: 10px; }
  .view-tab.active { background: #e5f0ef; color: #1f5866; box-shadow: none; }
  .toast { bottom: calc(82px + env(safe-area-inset-bottom)); }
  .workspace-heading { margin-bottom: 8px; }
  .range-chip { min-height: 36px; padding: 6px 13px; font-size: .8125rem; }
  .range-chips { gap: 8px; }
  .filter-chip { min-height: 32px; }
  .table-toolbar { align-items: center; }
  .table-card.is-card-mode .update-time { width: auto; }
  .sort-field { width: 100%; }
  .sort-field select { width: 100%; min-height: 40px; font-size: 16px; }
  .card-more .secondary-button { min-height: 44px; }
  .ranking-name, .daily-details summary { min-height: 36px; }
  .daily-details summary { display: flex; align-items: center; }
  /* 详情从底部弹出，像原生面板一样贴底、可滚动。 */
  .task-dialog { width: 100%; max-width: 100%; max-height: 88dvh; margin: auto 0 0; border-radius: 18px 18px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom); }
  .task-dialog .dialog-heading { padding-top: 22px; }
  .task-dialog .dialog-heading::before { content: ""; position: absolute; top: 8px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: #d5ddda; }
  .task-dialog .close-button { min-height: 40px; padding-inline: 14px; }
}
@media (max-width: 760px) and (prefers-reduced-motion: no-preference) {
  .task-dialog[open] { animation: sheet-in .2s ease-out; }
  @keyframes sheet-in { from { transform: translateY(24px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
}
.sheet-figures { margin: 6px 0 4px; padding: 12px 0; border-top: 0; border-bottom: 1px solid #edf0ee; }
.sheet-figures .figure-value { font-size: 1.25rem; }
.sheet-flags { margin: 10px 0 2px; }
