@font-face { font-family: 'Report Numerals'; src: url('/fonts/numerals.woff2') format('woff2'); font-style: normal; font-weight: 500; font-display: swap; }
@font-face { font-family: 'Report Headings'; src: url('/fonts/headings.woff2') format('woff2'); font-style: normal; font-weight: 500; font-display: swap; }
:root { color-scheme: light; --paper:#f5f1e8; --ink:#1a2e1f; --muted:#5f6c5d; --line:#c6c9bd; --soft:#e7e7da; --accent:#2e6b4f; --serif:'Report Headings','Songti SC',serif; --numbers:'Report Numerals','Baskerville',serif; }
* { box-sizing:border-box; }
body { margin:0; background:var(--paper); color:var(--ink); font:14px/1.45 -apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif; }
h1,h2,h3,p { margin:0; }
button,select { font:inherit; color:inherit; }
button { -webkit-tap-highlight-color:transparent; cursor:pointer; }
button:disabled,select:disabled { cursor:default; opacity:.35; }
button:focus-visible,select:focus-visible,a:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
[hidden] { display:none !important; }
svg { width:18px; height:18px; stroke:currentColor; fill:none; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; }
.flip { transform:rotate(180deg); }
.app { max-width:440px; margin:0 auto; padding-bottom:env(safe-area-inset-bottom,0); }
.header { padding:12px 18px 10px; display:flex; align-items:center; justify-content:space-between; gap:8px; }
h1 { font:500 22px/1.3 var(--serif); white-space:nowrap; }
.period { display:grid; grid-template-columns:44px minmax(0,1fr) 44px; max-width:230px; min-width:0; border-bottom:1px solid var(--line); }
.period button { display:grid; place-items:center; border:0; background:transparent; min-height:44px; padding:0; }
.period svg { width:14px; height:14px; }
.period select { min-width:0; width:100%; min-height:44px; border:0; background:var(--paper); font-size:16px; text-align:center; text-align-last:center; padding:0; }
.content { padding:0 18px 8px; }
.kpis { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 22px; padding:0 18px; color:var(--paper); background:var(--ink); }
.kpi { min-width:0; padding:14px 0 12px; }
.kpi h2 { font:400 12px/1.45 -apple-system,BlinkMacSystemFont,'PingFang SC',sans-serif; color:#d9e0d3; }
.kpi strong { display:block; font:500 clamp(35px,11.4vw,50px)/1.05 var(--numbers); letter-spacing:-.025em; margin-top:5px; white-space:nowrap; }
.kpi:first-child strong { font-size:clamp(48px,14.55vw,64px); line-height:.84; padding-top:5px; }
.kpi-value { display:flex; align-items:baseline; gap:7px; }
.unit { font-size:13px; }
.kpi:nth-child(n+3) { border-top:1px solid #71816b; padding-top:9px; }
.kpi:nth-child(n+3) strong { font-size:clamp(29px,9.1vw,40px); }
.kpi-note { color:#d9e0d3; font-size:10px; line-height:1.4; font-weight:400; margin-top:4px; }
.numeral { font-variant-numeric:lining-nums tabular-nums; }
.metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px 10px; padding:12px 0 11px; border-bottom:1px solid var(--line); color:var(--muted); }
.metrics h2 { font-size:11px; line-height:1.3; font-weight:400; }
.metrics strong { display:block; margin-top:3px; font-size:15px; font-weight:500; line-height:1.2; font-variant-numeric:tabular-nums; }
.contact { display:block; width:100%; background:transparent; border:0; border-bottom:1px solid var(--line); padding:10px 0; text-align:left; }
.section-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.section-title { font:500 18px/1.5 var(--serif); }
.detail-link { display:flex; align-items:center; gap:2px; white-space:nowrap; font-size:11px; color:var(--muted); font-weight:400; }
.detail-link svg { width:13px; height:13px; }
.contact-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:7px; }
.contact-stats > span { color:var(--muted); font-size:11px; }
.contact-stats strong { display:block; color:var(--ink); font-size:26px; line-height:1; margin-top:4px; font-weight:400; }
.contact-note { display:block; color:var(--muted); font-size:11px; margin-top:7px; }
.structure { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:18px; padding:5px 0 9px; border-bottom:1px solid var(--line); }
.structure-panel { min-width:0; }
.structure-panel + .structure-panel { border-left:1px solid var(--line); padding-left:17px; }
.panel-link { width:100%; display:flex; align-items:center; justify-content:space-between; gap:6px; padding:0; min-height:44px; background:transparent; border:0; text-align:left; font:500 15px/1.4 var(--serif); }
.panel-link svg { width:13px; height:13px; }
.fixed-rows { height:72px; }
.structure-row { display:flex; align-items:center; justify-content:space-between; height:24px; gap:6px; font-size:11px; }
.structure-row > span { min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.structure-row small { color:var(--muted); font-size:11px; margin-left:4px; }
.structure-row b { flex-shrink:0; font:500 23px/1 var(--numbers); }
.products { display:block; width:100%; min-height:49px; padding:9px 0; background:transparent; border:0; border-bottom:1px solid var(--line); text-align:left; }
.product-bar { display:flex; gap:3px; height:5px; margin-bottom:7px; }
.product-bar i { display:block; background:var(--ink); }
.product-bar i:nth-child(2) { background:#87967d; }
.product-bar i:nth-child(n+3) { background:#b6bba8; }
.product-labels { display:flex; justify-content:space-between; gap:8px; font-size:11px; color:var(--muted); }
.product-labels span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.product-labels b { color:var(--ink); font-weight:500; margin-left:4px; }
.sync-line { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; column-gap:8px; min-height:32px; padding:5px 0; font-size:11px; color:var(--muted); }
.load-error { padding:30px 0; color:var(--ink); line-height:1.7; }
.load-error button,.empty button { border:0; background:var(--ink); color:var(--paper); min-height:44px; padding:10px 18px; margin-top:14px; border-radius:3px; }
.page { padding:0 18px 25px; }
.page-head { display:flex; align-items:center; gap:7px; border-bottom:1px solid var(--line); padding:10px 0 9px; }
.back { display:grid; place-items:center; min-width:44px; min-height:44px; border:0; background:transparent; padding:0; }
.page-period { font-size:11px; color:var(--muted); margin:13px 0; }
.lead { display:flex; width:100%; align-items:flex-start; justify-content:space-between; gap:12px; padding:15px 0; border:0; border-bottom:1px solid var(--line); background:transparent; text-align:left; }
.lead-main { min-width:0; flex:1; }
.lead-name { display:block; font:500 18px/1.5 var(--serif); }
.lead-role { display:block; color:var(--muted); font-size:12px; margin-top:5px; }
.lead-note { display:block; font-size:13px; margin-top:8px; white-space:pre-wrap; overflow-wrap:anywhere; }
.lead-side { display:flex; align-items:center; flex-shrink:0; padding-top:5px; font-size:11px; white-space:nowrap; color:var(--muted); }
.lead-side svg { width:15px; height:15px; }
.person-top { padding:18px 0 15px; border-bottom:1px solid var(--line); }
.person-top h2 { font:500 25px/1.4 var(--serif); overflow-wrap:anywhere; }
.person-top p { color:var(--muted); font-size:12px; margin-top:5px; }
.info { margin:0; padding:4px 0 14px; border-bottom:1px solid var(--line); }
.info-row { display:grid; grid-template-columns:76px minmax(0,1fr); align-items:baseline; gap:10px; margin-top:13px; }
.info dt { color:var(--muted); font-size:12px; }
.info dd { margin:0; font-size:13px; overflow-wrap:anywhere; }
.detail-section { margin-top:21px; }
.detail-section h2 { font:500 18px/1.4 var(--serif); }
.status-row { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:39px; font-size:13px; border-bottom:1px solid var(--line); }
.status-row span:last-child { color:var(--muted); }
.note { margin-top:12px; padding:12px 14px; background:var(--soft); font-size:14px; line-height:1.8; white-space:pre-wrap; overflow-wrap:anywhere; }
.note-time { color:var(--muted); font-size:11px; margin-top:8px; }
.status-row select { min-height:44px; padding:7px 9px; border:1px solid var(--line); border-radius:3px; background:var(--paper); font-size:16px; }
.record-form textarea,.login-form input { width:100%; border:1px solid var(--line); border-radius:3px; background:var(--paper); color:var(--ink); font:16px/1.65 -apple-system,BlinkMacSystemFont,'PingFang SC',sans-serif; padding:10px 12px; margin-top:12px; }
.record-form textarea { min-height:110px; resize:vertical; }
.record-form textarea::placeholder { color:var(--muted); }
.record-form textarea:focus-visible,.login-form input:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.save-row { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:12px; }
.save-button { min-height:44px; padding:10px 17px; border:0; border-radius:3px; background:var(--ink); color:var(--paper); }
.save-message { font-size:12px; color:var(--muted); }
.login-form { max-width:360px; padding:14px 0 24px; }
.login-form label { font-size:13px; }
.login-form .save-button { margin-top:14px; }
.original-form { margin-top:21px; }
.original-form summary { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:44px; list-style:none; font-size:12px; }
.original-form summary::-webkit-details-marker { display:none; }
.original-form[open] summary svg { transform:rotate(90deg); }
.original-form dl { margin:0; }
.original-form dt { font-size:11px; color:var(--muted); margin-top:12px; }
.original-form dd { font-size:13px; margin:5px 0 0; overflow-wrap:anywhere; }
.distribution { width:100%; border-collapse:collapse; font-size:13px; }
.distribution th { text-align:left; color:var(--muted); font-size:11px; font-weight:400; }
.distribution td,.distribution th { padding:14px 0; border-bottom:1px solid var(--line); }
.distribution td:last-child,.distribution th:last-child { text-align:right; }
.empty { padding:55px 0; text-align:center; }
.empty h2 { font:500 21px/1.4 var(--serif); }
.empty p { color:var(--muted); font-size:13px; margin-top:10px; }
.dashboard-grid[aria-busy=true] { opacity:.55; }
@media (hover:hover) {
  .contact:hover,.lead:hover,.panel-link:hover,.products:hover { background:#eae8dd; }
}
@media (max-width:370px) {
  .header { padding:12px 14px 9px; flex-wrap:wrap; gap:5px; }
  .period { flex:1 1 100%; max-width:none; }
  .content,.page { padding-left:14px; padding-right:14px; }
  .kpis { padding:0 14px; column-gap:14px; }
  .structure { gap:12px; }
  .structure-panel + .structure-panel { padding-left:11px; }
}
@media (min-width:760px) {
  body { background:#e7e4da; padding:34px 24px; }
  .app { max-width:1040px; background:var(--paper); }
  .header { padding:24px 28px 18px; }
  .header h1 { font-size:28px; }
  .period { width:275px; max-width:275px; }
  .content { padding:0 28px 14px; }
  .dashboard-grid { display:grid; grid-template-columns:1.1fr 1fr; column-gap:30px; }
  .kpis { grid-column:1/-1; grid-template-columns:repeat(4,minmax(0,1fr)); column-gap:25px; padding:4px 25px; }
  .kpi { padding:18px 0; }
  .kpi:nth-child(n+3) { border-top:0; padding:18px 0; }
  .kpi strong { font-size:50px; }
  .kpi:nth-child(n+3) strong { font-size:42px; }
  .kpi:first-child strong { font-size:64px; }
  .metrics { grid-column:1/-1; grid-template-columns:repeat(6,minmax(0,1fr)); padding:15px 0; }
  .metrics strong { font-size:16px; }
  .contact { grid-column:1; }
  .structure { grid-column:2; grid-row:3/5; padding-top:7px; border-bottom:0; }
  .fixed-rows { height:96px; }
  .structure-row { height:32px; font-size:13px; }
  .products { grid-column:1; }
  .sync-line { grid-column:1/-1; border-top:1px solid var(--line); margin-top:5px; }
  .page { max-width:740px; margin:0 auto; padding:10px 28px 32px; }
}
