/* =====================================================================
   昆明统一生物科技有限公司 · 财务分析系统
   Visual system ported from the original design, with China-safe fonts.
   NO external font/CDN dependencies — renders fully offline and inside
   the Great Firewall (Google Fonts is unreachable in China, so we rely
   on locally-installed system fonts with strong CJK fallbacks).
   ===================================================================== */

:root{
  --ink:#2a2620; --plum:#c96442; --plum2:#7c3a23; --orchid:#dd8a63; --orchid-soft:#f0cdb8;
  --lilac:#f1ece1; --page:#f0ebe0; --leaf:#6e8348; --rose:#c24433; --gold:#b5862f;
  --line:#e8e2d4; --muted:#8a8273; --field:#fbf6ee; --field-bd:#e6cdb4;

  /* China-safe font stacks (system fonts only) */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               "PingFang SC", "Microsoft YaHei", "微软雅黑", "Hiragino Sans GB",
               "Noto Sans CJK SC", "Source Han Sans SC", "WenQuanYi Micro Hei", sans-serif;
  --font-serif: Georgia, "Times New Roman", "Songti SC", "SimSun", "宋体",
                "Noto Serif CJK SC", "Source Han Serif SC", serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", "Courier New", monospace;
}

*{ box-sizing:border-box; }
html,body{ margin:0; }
body{
  background:var(--page);
  color:var(--ink);
  font-family:var(--font-sans);
}

#app{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

.serif{ font-family:var(--font-serif); }
.num{ font-family:var(--font-mono); font-feature-settings:'tnum'; }

::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-thumb{ background:#d8cdb8; border-radius:8px; border:2px solid var(--page); }
::-webkit-scrollbar-track{ background:transparent; }

input.fld, select.fld{ font-family:var(--font-mono); font-feature-settings:'tnum'; }
input.fld:focus, select.fld:focus{
  outline:none; border-color:var(--orchid)!important;
  box-shadow:0 0 0 3px rgba(201,100,66,.15); background:#fff!important;
}
input.fld::placeholder{ color:#bdb09a; font-style:italic; }
/* text fields that hold names/notes should use the sans (CJK) face, not mono */
input.fld.txt, select.fld.txt{ font-family:var(--font-sans); font-feature-settings:normal; }

.bg-paper{ background-color:var(--page); background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23p)' opacity='0.05'/%3E%3C/svg%3E"); }
.bg-forest{ background-color:#e9e2d1; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23f)' opacity='0.10'/%3E%3C/svg%3E"); }
.bg-fabric{ background-color:#ede5d3; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Cpath d='M0 1H6' stroke='%23ffffff' stroke-opacity='0.32' stroke-width='1'/%3E%3Cpath d='M0 4H6' stroke='%23000000' stroke-opacity='0.04' stroke-width='1'/%3E%3Cpath d='M1 0V6' stroke='%23ffffff' stroke-opacity='0.2' stroke-width='1'/%3E%3Cpath d='M4 0V6' stroke='%23000000' stroke-opacity='0.03' stroke-width='1'/%3E%3C/svg%3E"); background-size:6px 6px; }
.bg-cross{ background-color:var(--page); background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9'%3E%3Cpath d='M0 9L9 0' stroke='%234a3c26' stroke-opacity='0.11' stroke-width='1'/%3E%3Cpath d='M0 0L9 9' stroke='%234a3c26' stroke-opacity='0.11' stroke-width='1'/%3E%3C/svg%3E"); background-size:9px 9px; }
.bg-cloth{ background-color:#75603c; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Cpath d='M0 1H6' stroke='%23ffffff' stroke-opacity='0.09' stroke-width='1'/%3E%3Cpath d='M0 4H6' stroke='%23000000' stroke-opacity='0.17' stroke-width='1'/%3E%3Cpath d='M1 0V6' stroke='%23ffffff' stroke-opacity='0.055' stroke-width='1'/%3E%3Cpath d='M4 0V6' stroke='%23000000' stroke-opacity='0.13' stroke-width='1'/%3E%3C/svg%3E"); background-size:6px 6px; }

.chips{ scrollbar-width:none; }
.chips::-webkit-scrollbar{ display:none; }

main table tbody tr:nth-child(2n){ background:rgba(122,96,60,.045); }
.kpi-row > div:first-child{ border-top:3px solid var(--plum); }

/* generic helpers for elements built by app.js */
button{ font-family:inherit; }
select.fld{ -webkit-appearance:none; appearance:none; }
/* week-picker disclosures (months → weeks): hide the default triangle */
summary{ cursor:pointer; list-style:none; user-select:none; }
summary::-webkit-details-marker{ display:none; }
summary::marker{ content:''; }

@media print{
  .no-print{ display:none!important; }
  .print-area{ box-shadow:none!important; }
  body{ background:#fff; }
}
