:root {
  color-scheme: light;
  --ink: #20261f;
  --muted: #60685e;
  --line: #dee4db;
  --surface: #fff;
  --background: #f6f8f4;
  --sage: #e7efe1;
  --green: #294c38;
  --green-dark: #1e3a2a;
  --radius: 12px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--ink); }
a { color: var(--green); text-underline-offset: .2em; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; overflow-wrap: anywhere; }
p { line-height: 1.65; }
h1 { font-size: clamp(1.8rem, 4.2vw, 2.8rem); line-height: 1.18; letter-spacing: -.045em; }
h2 { font-size: 1.13rem; line-height: 1.35; }
h3 { font-size: 1rem; line-height: 1.45; }
:focus-visible { outline: 2px solid #527958; outline-offset: 3px; }
[hidden] { display: none !important; }

.layout { display: grid; grid-template-columns: 218px minmax(0, 1fr); min-height: 100vh; }
.sidebar { display: flex; flex-direction: column; min-width: 0; padding: 28px 16px 20px; border-right: 1px solid var(--line); background: var(--surface); }
.brand, .login-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.brand { margin: 0 12px 34px; text-decoration: none; color: var(--ink); }
.brand img, .login-brand img { display: block; width: 112px; height: auto; }
.brand span, .login-brand span { font-size: .7rem; letter-spacing: .23em; font-weight: 750; }
.main-nav { display: grid; gap: 5px; }
.main-nav a { display: flex; gap: .65rem; align-items: center; min-height: 44px; border-radius: 8px; padding: 7px 12px; color: var(--muted); font-weight: 620; font-size: .91rem; text-decoration: none; white-space: nowrap; }
.main-nav a:hover { background: var(--background); }
.main-nav a[aria-current] { color: var(--green-dark); background: var(--sage); }
.nav-symbol { display: inline-grid; width: 20px; place-items: center; font-size: 1.12rem; }
.sidebar-note { display: flex; gap: .55rem; align-items: center; margin-top: auto; padding: 24px 10px 0; color: var(--muted); font-size: .82rem; }
.health-dot { border-radius: 50%; background: #5b8953; height: 8px; width: 8px; }
.topbar { min-height: 68px; padding: 11px clamp(16px, 3vw, 42px); border-bottom: 1px solid var(--line); background: var(--surface); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.workspace-name { font-size: .95rem; font-weight: 670; }
.workspace-name span { margin-left: 6px; padding-left: 10px; border-left: 1px solid var(--line); color: var(--muted); font-weight: 450; }
.account, .actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.account a { color: var(--ink); text-decoration: none; font-weight: 650; }
.account a:hover { text-decoration: underline; }
.role, .tag, .pill { border-radius: 999px; padding: 4px 9px; background: #edf1eb; color: #425642; white-space: nowrap; font-size: .85rem; font-weight: 650; }
.pill-review, .pill-changes { background: #f9edd4; color: #654c1b; }
.pill-approved, .pill-completed { background: #def1e2; color: #245030; }
.pill-working { background: #e6edf8; color: #2a4a73; }
.main { max-width: 1370px; margin-inline: auto; padding: clamp(16px, 3vw, 40px); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.eyebrow { color: var(--green); font-size: .85rem; font-weight: 720; letter-spacing: .06em; }
.welcome { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(250px, 1fr); gap: 16px; margin-bottom: 17px; }
.welcome-text, .day-plan { min-width: 0; border-radius: var(--radius); padding: clamp(23px, 3vw, 36px); }
.welcome-text { display: grid; justify-items: start; gap: 11px; border: 1px solid var(--line); background: #edf3e9; }
.welcome-text .actions { margin-top: 8px; }
.day-plan { display: grid; align-content: center; justify-items: start; gap: 6px; background: var(--green); color: #f5f8f1; }
.day-plan h2 { font-size: 2rem; letter-spacing: -.05em; }
.day-plan .eyebrow, .day-plan p { color: #e1eddf; }
.day-plan .eyebrow span { margin-left: 8px; font-weight: 470; }
.day-plan a { color: #fff; margin-top: 9px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 26px; }
.metric { display: grid; gap: 4px; border: 1px solid var(--line); padding: 14px 17px; border-radius: var(--radius); background: var(--surface); color: var(--muted); text-decoration: none; }
.metric strong { color: var(--ink); font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.section-head, .page-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.section-head { margin-bottom: 12px; }
.page-head { margin-bottom: 21px; }
.page-head h1, .page-head p { margin-top: 5px; }
.crumb { display: inline-block; margin-bottom: 6px; font-size: .9rem; }
.modules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 21px; }
.module { display: grid; justify-items: start; align-content: start; gap: 8px; min-height: 142px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; padding: 16px; }
.module:hover, .metric:hover { border-color: #8ba78e; background: #fcfdfa; }
.module p { font-size: .88rem; color: var(--muted); }
.module-icon { display: grid; place-items: center; width: 35px; height: 35px; background: var(--sage); border-radius: 9px; color: var(--green); font-size: 1.15rem; font-weight: 700; }
.dashboard-bottom, .detail-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.panel { padding: clamp(16px, 2.3vw, 24px); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; background: var(--surface); min-width: 0; }
.panel > h2, .panel > p { margin-bottom: 11px; }
.panel > :last-child { margin-bottom: 0; }
.list-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 12px 2px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
.list-row:last-child { border-bottom: 0; }
a.list-row:hover { color: var(--green); background: #f9fbf7; }
.list-row small, .timeline small { display: block; margin-top: 4px; font-size: .85rem; color: var(--muted); }
.empty { color: var(--muted); padding-block: 10px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 43px; padding: 8px 15px; border-radius: 8px; border: 1px solid #ccd7ca; background: #fff; color: var(--green-dark); font-size: .95rem; font-weight: 680; text-decoration: none; text-align: center; }
.button:hover { background: #eff4ec; }
.button.primary { color: white; background: var(--green); border-color: var(--green); }
.button.primary:hover { background: var(--green-dark); }
.link-button { border: none; padding: 5px 0; color: var(--green); background: transparent; text-decoration: underline; text-underline-offset: .2em; }
.form { display: grid; gap: 14px; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-all { grid-column: 1 / -1; }
.search { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-block: 8px 12px; }
.search label { flex: 1 1 180px; min-width: 0; }
label { display: grid; gap: 6px; color: #39463a; font-size: .93rem; font-weight: 640; }
input, textarea, select { width: 100%; min-height: 44px; border: 1px solid #cdd7cb; border-radius: 8px; padding: 9px 11px; background: #fff; color: var(--ink); font-weight: 430; font-size: 1rem; }
input[type=file] { padding: 7px; }
textarea { resize: vertical; }
fieldset { margin: 0; min-width: 0; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px; }
legend { padding: 0 5px; font-size: .9rem; }
.check { display: flex; align-items: center; gap: 7px; overflow-wrap: anywhere; }
.check input { width: auto; min-height: 28px; }
.notice, .status-line { padding: 10px 13px; margin-bottom: 13px; border-radius: 8px; border: 1px solid #cde1c9; background: #ebf7e8; color: #254e2b; }
.status-line { background: #f4f5f1; border-color: var(--line); color: var(--ink); }
.notice.error { border-color: #eac9c4; background: #fff0ee; color: #832f25; }
.settings { padding: 10px 0; border-bottom: 1px solid var(--line); }
.settings summary { cursor: pointer; overflow-wrap: anywhere; }
.settings summary .muted { margin-left: 7px; }
.settings > p { margin-top: 9px; }
.inset { margin-top: 10px; padding: 12px; border-radius: 8px; background: var(--background); }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.facts { margin: 0 0 9px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.facts div { padding: 10px 12px; background: var(--background); border-radius: 8px; }
.facts dt { color: var(--muted); font-size: .88rem; }
.facts dd { margin: 3px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.assets { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 11px; margin-block: 14px; }
.asset { min-width: 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.asset img, .asset video, .file-preview { display: block; width: 100%; height: 135px; object-fit: contain; background: #eff3ed; }
.file-preview { display: grid; place-items: center; font-weight: 720; color: #526451; }
.asset-body { padding: 10px; overflow-wrap: anywhere; }
.asset-body .actions { margin-top: 6px; font-size: .88rem; }
.timeline { margin: 0; padding-left: 23px; }
.timeline li { margin-bottom: 12px; }
.timeline li:last-child { margin-bottom: 0; }
.file-links { padding-left: 23px; }
.guest { min-height: 100vh; display: grid; place-content: center; padding: 20px; }
.login-card { padding: clamp(18px, 5vw, 37px); width: min(92vw, 460px); background: white; border: 1px solid var(--line); border-radius: 16px; }
.login-card h1 { margin: 22px 0 7px; font-size: 1.85rem; }
.login-card .form { margin-top: 18px; }
.narrow { max-width: 540px; }
.table-scroll { overflow-x: auto; margin: 10px 0; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 7px; text-align: left; border-bottom: 1px solid var(--line); }
th { font-weight: 550; }
td input { min-width: 79px; }
.size-table { background: #f0f0f0; color: #000; }
.size-table th, .size-table td { padding: 11px 13px; white-space: nowrap; font-weight: 400; }
.image-sample { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--background); border-radius: 9px; }
.print-sheet { max-width: 840px; margin: 0 auto; border: 1px solid var(--line); background: white; }
.sheet-head { padding: clamp(16px, 4vw, 36px); background: #e8f0e3; }
.sheet-head img { display: block; width: 115px; margin-bottom: 16px; }
.sheet-head h2 { margin-top: 5px; font-size: clamp(1.3rem, 5vw, 2.25rem); }
.sheet-hero { margin: 0; text-align: center; background: #f4f6f3; }
.sheet-hero img { display: block; width: 100%; max-height: 560px; object-fit: contain; }
.sheet-information, .sheet-gallery { display: grid; gap: 14px; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 19px; }
.sheet-information section { break-inside: avoid; }
.sheet-information section:first-child { grid-column: 1 / -1; }
.sheet-information h3, .sheet-sizing h3 { margin-bottom: 7px; }
.sheet-gallery figure { margin: 0; break-inside: avoid; }
.sheet-gallery img { display: block; width: 100%; height: 225px; object-fit: contain; background: #f6f8f4; }
.sheet-gallery figcaption { padding: 5px; text-align: center; }
.sheet-sizing { padding: 0 19px 19px; }

@media (max-width: 1060px) {
  .layout { grid-template-columns: 172px minmax(0, 1fr); }
  .sidebar { padding-inline: 10px; }
  .modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .layout { display: block; }
  .sidebar { padding: 11px 13px 6px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { flex-direction: row; gap: 10px; align-items: end; margin: 0 0 9px; }
  .brand img { width: 92px; }
  .main-nav { display: flex; overflow-x: auto; padding: 4px 3px; scrollbar-width: thin; }
  .main-nav a { padding: 7px 9px; min-height: 40px; }
  .sidebar-note { display: none; }
  .topbar { min-height: 52px; }
  .workspace-name span { display: none; }
  .welcome, .dashboard-bottom, .detail-grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 440px) {
  .form-grid, .facts { grid-template-columns: 1fr; }
  .workspace-name { display: none; }
  .topbar { justify-content: flex-end; }
  .module { min-height: 0; padding: 12px; }
}
@media print {
  @page { margin: 11mm; }
  body, .layout, .workspace, .main { display: block; margin: 0; padding: 0; background: #fff; }
  .sidebar, .topbar, .no-print, .notice { display: none !important; }
  .print-sheet { border: 0; width: 100%; print-color-adjust: exact; }
  .sheet-hero img { max-height: 135mm; }
  .sheet-sizing .table-scroll { overflow: visible; }
  .size-table th, .size-table td { white-space: normal; padding: 5px; }
}
