:root {
  --ink:#302924; --muted:#746b63; --line:#e7e1da; --paper:#f8f7f4; --card:#fff;
  --accent:#a34215; --hot:#ff954e;
  font-family:"DM Sans","Microsoft YaHei UI","PingFang SC",system-ui,sans-serif;
}
.console {display:grid;grid-template-columns:222px minmax(0,1fr);min-height:100vh}
.rail {position:sticky;top:0;height:100vh;display:flex;flex-direction:column;background:#fffdfa;border-right:1px solid var(--line);padding:29px 17px 18px}
.rail .brand {gap:10px;margin:0 6px 42px;font-size:19px;line-height:1.35;white-space:nowrap}
.brand small {display:block;font-size:11px;font-weight:500;letter-spacing:.08em;color:var(--muted);margin:4px 0 0}
.rail nav {display:grid;gap:29px}
.rail nav p {font-size:11px;letter-spacing:.12em;color:var(--muted);padding:0 14px;margin:0 0 8px}
.rail nav a {display:flex;gap:12px;align-items:center;color:#5c5550;font-size:14px;text-decoration:none;padding:10px 14px;min-height:44px;border-radius:11px;margin-bottom:2px}
.ico {width:19px;height:19px;flex:none}
.rail nav a:hover {background:#f6f2ec}
.rail nav a[aria-current] {background:#ffeadb;color:#963c10;font-weight:700}
.signout {margin-top:auto;padding-top:16px;border-top:1px solid var(--line)}
.signout button {gap:10px;font-size:13px}
.workspace {min-width:0;padding:38px clamp(20px,3.3vw,58px) 52px}
.workspace-inner {max-width:1500px;margin:0 auto}
.report-head {display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}
.report-head h1 {font-size:clamp(28px,2.6vw,40px);letter-spacing:-.045em;font-weight:740}
.dateline {font:600 12px/1.6 "Segoe UI","Microsoft YaHei UI",sans-serif;color:#77695f;letter-spacing:.035em;margin-bottom:7px}
.dateline span {padding:0 5px;color:#aba198}
.controls,.seg,.legend,.key,.section-title,.filters {display:flex;align-items:center}
.controls,.filters {gap:10px;flex-wrap:wrap}
.seg {gap:2px;border:1px solid #e3dcd4;background:#f0ede7;padding:3px;border-radius:10px}
.seg a {text-decoration:none;white-space:nowrap;color:#665e55;border-radius:7px;font-size:12px;font-weight:550;padding:6px 10px;min-height:32px;display:grid;align-items:center}
.seg a[aria-current] {background:white;color:#86380f;box-shadow:0 1px 4px #5d42251e}
.seg a:hover {color:#943e15}
.period {color:var(--muted);font-size:12px;margin:9px 0 23px}
.stat-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin:0 0 19px}
.stat,.panel {border:1px solid var(--line);background:white;border-radius:17px}
.stat {padding:17px 18px 15px;min-width:0}
.stat:first-child {background:#fff1e5;border-color:#f4d6be}
.stat>div {display:flex;align-items:center;justify-content:space-between;gap:5px;font-size:13px;color:#63574e}
.stat .ico {width:17px;height:17px;color:#9c8069}
.stat:first-child .ico {color:#ae511d}
.stat strong {display:block;margin:10px 0 5px;font:650 clamp(22px,2.2vw,38px)/1.2 "Segoe UI","DM Sans",sans-serif;letter-spacing:-.05em;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.stat small,.legend small {font-size:12px;color:var(--muted)}
.report-grid {display:grid;grid-template-columns:minmax(0,1.9fr) minmax(230px,1fr);gap:16px}
.panel {min-width:0;padding:21px 22px;margin:0 0 18px}
.section-title {justify-content:space-between;gap:10px;margin-bottom:18px;flex-wrap:wrap}
.section-title h2,.panel>h2 {font-size:18px;font-weight:700;line-height:1.4}
.section-title>a {font-size:13px;text-decoration:none}
.section-title>a:hover,.records a:hover {text-decoration:underline}
.section-title .seg a {padding:2px 9px;min-height:26px}
.section-title .btn {min-height:36px;padding:4px 12px}
.legend {gap:15px;flex-wrap:wrap;margin:0 0 10px}
.key {gap:6px;font-size:12px;color:#60584f}
.key:before {content:"";width:13px;height:3px;border-radius:3px;background:#e4762e}
.key.k1:before {background:#766293}
.legend small {margin-left:auto}
.line-plot {width:100%;height:auto;display:block;overflow:visible}
.line-plot text {fill:#6d655d;font:12px "Segoe UI",sans-serif}
.gridline {stroke:#e8e2da;stroke-dasharray:3 4}
.date-cursor {stroke:#a79589;stroke-dasharray:2 4;pointer-events:none}
.chart-readout {display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:12px;color:#60554d}
.chart-readout input {width:72px;height:20px;accent-color:#a75a2f}
.series {fill:none;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.l0 {stroke:#d76622}.l1 {stroke:#766293;stroke-dasharray:6 4}
.point {fill:transparent}.p0:hover {fill:#d76622}.p1:hover {fill:#766293}
.plot-data {margin-top:6px;color:var(--muted);font-size:12px}
.plot-data summary {cursor:pointer;padding:5px 0}
.plot-data .table-scroll {max-height:290px}
.rank-line {margin:0 0 13px}
.rank-line:last-child {margin-bottom:0}
.rank-line div {display:flex;justify-content:space-between;align-items:center;font-size:13px;margin:0 0 4px}
.rank-line b {font-weight:600;font-variant-numeric:tabular-nums}
.rank-line progress {width:100%;display:block;appearance:none;height:5px;background:#f1eae3;border:0;border-radius:3px;overflow:hidden}
.rank-line progress::-webkit-progress-bar {background:#f3ede7}
.rank-line progress::-webkit-progress-value {background:#e39053;border-radius:3px}
.rank-line progress::-moz-progress-bar {background:#e39053}
.table-scroll {overflow:auto;max-width:100%}
.records {font-size:14px;white-space:nowrap}
.records td,.records th {padding:11px 12px;vertical-align:middle;text-align:left}
.records th {font-size:12px;background:#f7f5f1;color:#6d6259}
.records tbody tr:last-child td {border-bottom:0}
.records a {text-decoration:none}
.records .id {font-family:"Segoe UI",sans-serif;font-weight:600}
.pill {display:inline-block;border-radius:6px;padding:2px 8px;font-size:12px;background:#efeeec;color:#655e56}
.pill.paid {background:#f7eadb;color:#7d461b}.pill.refunded {background:#eee9f5;color:#654c7e}.pill.pending {background:#fff2d5;color:#805a10}
.empty-state,.records td.empty-state {white-space:normal;text-align:center;padding:30px 10px;color:var(--muted);font-size:14px}
.first-data {border:1px solid #eacfb9;color:#744622;background:#fff6ef;padding:12px 16px;border-radius:12px;margin-bottom:18px;font-size:13px}
.first-data a {margin-left:12px}
.filters {margin:0 0 18px}
.filters input,.filters select,.importer select,.importer textarea,.importer input {font:inherit;color:var(--ink);border:1px solid #d4ccc2;background:#fff;border-radius:9px;padding:8px 11px;min-height:40px;max-width:100%}
.filters input {width:min(280px,100%)}.filters input,.filters select,.filters button,.filters>a {font-size:13px}
.filters button {min-height:40px}.filters>a {margin-left:2px}
.importer {display:grid;gap:15px;margin-top:20px}
.importer label {display:grid;gap:6px;font-size:14px;font-weight:600}
.importer textarea {resize:vertical;font-weight:400;font-family:Consolas,"Microsoft YaHei UI",monospace}
.importer button {justify-self:start}
.guidance p {margin-top:16px;font-size:14px;color:var(--muted)}
.report-head+.report-grid,.report-head+.backlink {margin-top:22px}
.backlink {margin-bottom:16px;font-size:14px}
.detail dl {max-width:680px}.detail dd {font-weight:600}
@media(max-width:1100px) {
  .console {grid-template-columns:180px minmax(0,1fr)}.rail {padding-inline:12px}
  .rail .brand {font-size:16px}.rail .brand img {width:36px;height:36px}.workspace {padding-inline:22px}
  .panel,.stat {padding:16px}.report-grid {grid-template-columns:minmax(0,1.7fr) minmax(200px,1fr)}
}
@media(max-width:800px) {
  .console {display:block}.rail {height:auto;position:static;border-right:0;border-bottom:1px solid var(--line);padding:11px 16px 7px;display:grid;grid-template-columns:1fr auto;gap:6px}
  .rail .brand {margin:0}.brand small {margin:0;font-size:10px}.rail nav {grid-row:2;grid-column:1/-1;display:flex;overflow-x:auto;gap:4px}
  .rail nav div {display:flex;gap:3px}.rail nav p,.rail nav .ico {display:none}.rail nav a {font-size:12px;white-space:nowrap;padding:6px 10px;min-height:35px}
  .signout {grid-row:1;grid-column:2;padding:0;border:0;margin:0}.signout button {padding:5px 8px;min-height:36px}
  .workspace {padding:23px 16px 36px}.stat-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:620px) {
  .report-grid {grid-template-columns:minmax(0,1fr);gap:0}.controls {gap:6px}.report-head {gap:12px}
  .seg a {padding-inline:8px}.report-head h1 {font-size:28px}.period {margin-bottom:15px}
  .stat-grid {gap:9px}.stat {padding:13px}.stat strong {font-size:25px}.stat small {font-size:11px}
  .panel {padding:14px}.records th,.records td {padding:9px 8px}.line-plot text {font-size:15px}
  .filters input {width:100%}.pages {font-size:12px}.workspace .words {font-size:13px}
}

.report-head .controls{flex-wrap:wrap}
.custom-period{display:flex;align-items:end;gap:8px;flex-wrap:wrap;margin:0}
.custom-period label{display:grid;gap:3px;font-size:12px}
.custom-period input,.custom-period button{min-height:34px;max-width:100%;box-sizing:border-box}
