:root {
  color-scheme: light;
  --canvas: #f5f7f5;
  --paper: #fff;
  --ink: #172820;
  --muted: #56695f;
  --line: #e1e9e3;
  --brand: #16714e;
  --brand-dark: #105a3e;
  --green-pale: #e7f4eb;
  --shadow: 0 8px 28px #1c493e0b;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--ink); font-size: 14px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #168761; outline-offset: 3px; }
button:disabled { cursor: wait; opacity: .6; }
h1, h2, h3, p { margin: 0; }
svg { display: block; flex: 0 0 auto; }
.icon { width: 19px; height: 19px; }
.layout { min-height: 100vh; display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 28px 17px 18px; background: #172921; color: #d0e0d6; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 7px; }
.brand-mark { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 11px; background: #bef0b2; color: #194f36; flex: 0 0 auto; }
.brand-mark svg { width: 21px; height: 21px; }
.brand strong { display: block; color: white; font-size: 16px; white-space: nowrap; letter-spacing: .025em; }
.brand small { display: block; color: #a9c1b2; font-size: 11px; letter-spacing: .12em; }
.workspace { display: flex; align-items: center; gap: 9px; padding: 10px; margin: 29px 1px 21px; border: 1px solid #436051; border-radius: 10px; }
.workspace span { width: 28px; height: 28px; background: #365347; border-radius: 7px; display: grid; place-items: center; color: #e1f0e6; flex: 0 0 auto; }
.workspace .icon { width: 16px; height: 16px; }
.workspace strong { min-width: 0; font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }
.menu-group { margin: 0 0 19px; }
.menu-group h2 { font-size: 10px; letter-spacing: .18em; color: #9eb4a6; font-weight: 600; margin: 0 11px 8px; }
.nav-link { display: flex; align-items: center; gap: 11px; text-decoration: none; padding: 10px 11px; border-radius: 8px; margin-bottom: 3px; font-size: 13px; }
.nav-link:hover { background: #274439; color: #fff; }
.nav-link[aria-current="page"] { color: #d7f6cc; background: #335746; font-weight: 650; }
.nav-link[aria-current="page"]::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #b9eeac; margin-left: auto; }
.side-footer { margin-top: auto; padding: 13px 6px 3px; border-top: 1px solid #355044; color: #a9c1b2; font-size: 11px; display: flex; align-items: center; gap: 7px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #6abe85; display: inline-block; flex: 0 0 auto; }
.main { min-width: 0; }
.topbar { display: flex; min-height: 67px; padding: 0 33px; background: #fff; border-bottom: 1px solid var(--line); align-items: center; gap: 13px; }
.breadcrumb { color: var(--muted); font-size: 13px; white-space: nowrap; }
.breadcrumb strong { color: var(--ink); margin-left: 8px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.avatar { width: 34px; height: 34px; background: #e4f1e8; color: #205e40; border-radius: 50%; display: grid; place-items: center; font-weight: 700; flex: 0 0 auto; }
.user-name { font-size: 12px; font-weight: 650; line-height: 1.2; }
.user-name small { font-size: 10px; display: block; color: var(--muted); margin-top: 4px; }
.icon-btn { display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--muted); width: 34px; height: 34px; }
.icon-btn:hover { background: var(--green-pale); color: var(--brand-dark); }
.menu-toggle { display: none; }
.content { max-width: 1540px; margin: auto; padding: 28px 33px 40px; }
.heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 23px; }
.heading h1 { font-size: clamp(24px, 3vw, 31px); letter-spacing: -.025em; line-height: 1.25; }
.heading p { margin-top: 6px; color: var(--muted); }
.eyebrow { display: flex; align-items: center; gap: 7px; color: var(--brand); font-size: 11px; font-weight: 750; letter-spacing: .14em; margin-bottom: 8px; }
.date-chip { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; white-space: nowrap; }
.date-chip .icon { width: 16px; height: 16px; }
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: 176px; padding: 24px 29px; display: flex; align-items: center; margin-bottom: 20px; border-radius: 13px; border: 1px solid #d9e8d7; background: #eaf3e7; }
.hero h2 { margin: 5px 0 7px; font-size: clamp(22px, 3vw, 30px); line-height: 1.25; letter-spacing: -.025em; }
.hero p { color: #465f50; margin-bottom: 15px; }
.hero-copy { width: min(100%, 520px); position: relative; z-index: 1; }
.hero-art { position: absolute; right: 0; height: 100%; top: 0; width: min(46%, 550px); z-index: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; padding: 8px 13px; min-height: 36px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 650; font-size: 12px; text-decoration: none; }
.btn .icon { width: 16px; height: 16px; }
.btn:hover { background: #f0f6f1; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: white; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.text { border-color: transparent; color: var(--brand-dark); background: transparent; padding: 4px 6px; min-height: 27px; }
.btn.text:hover { background: var(--green-pale); }
.btn.danger { color: #a52b31; }
.actions { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 20px; }
.metric, .card { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: var(--shadow); min-width: 0; }
.metric { padding: 14px 16px; }
.metric-top { display: flex; justify-content: space-between; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.metric-icon { width: 31px; height: 31px; display: grid; place-items: center; color: #27704f; background: #e5f3e9; border-radius: 8px; }
.metric-icon svg { width: 17px; height: 17px; }
.metric:nth-child(2) .metric-icon { color: #425f8a; background: #eaf1fb; }
.metric:nth-child(3) .metric-icon { color: #9a6324; background: #fcf0dc; }
.metric:nth-child(4) .metric-icon { color: #68558e; background: #f0eaf8; }
.metric strong { font-size: 27px; font-weight: 740; font-variant-numeric: tabular-nums; letter-spacing: -.035em; display: block; margin-top: 4px; }
.metric small { font-size: 11px; color: var(--muted); }
.card { margin-bottom: 17px; }
.card-header { padding: 16px 18px 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); }
.card h2 { font-size: 16px; letter-spacing: -.015em; }
.card-header p { color: var(--muted); font-size: 12px; margin-top: 3px; }
.card-body { padding: 16px 18px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 15px; }
.chart { width: 100%; height: auto; min-height: 142px; max-height: 200px; overflow: visible; }
.chart text { fill: #657970; font: 11px "Microsoft YaHei", sans-serif; }
.ranking { display: grid; gap: 13px; }
.rank-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; font-size: 12px; }
.rank-row strong { font-weight: 650; }
.bar { height: 5px; grid-column: 1/-1; border-radius: 4px; background: #ebf1ec; overflow: hidden; }
.bar span { display: block; background: #4a9c75; border-radius: inherit; height: 100%; }
.table-scroll { overflow: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 13px; }
th { background: #f6f8f6; color: var(--muted); font-size: 11px; font-weight: 650; white-space: nowrap; }
td, th { border-bottom: 1px solid var(--line); padding: 11px 15px; vertical-align: middle; }
td { max-width: 400px; overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfdfb; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; padding: 3px 8px; border-radius: 999px; color: #52645b; background: #eef2ef; white-space: nowrap; }
.pill.green { color: #176444; background: #e7f5eb; }
.pill.gold { color: #85551a; background: #fcf0d9; }
.pill.blue { color: #365e8a; background: #e8f0fa; }
.pill.red { color: #a7333b; background: #fbecee; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 13px 15px; border-bottom: 1px solid var(--line); }
input, select, textarea { min-height: 37px; max-width: 100%; border: 1px solid #d9e4dc; background: #fff; color: var(--ink); border-radius: 8px; padding: 8px 10px; }
input::placeholder, textarea::placeholder { color: #6d8074; opacity: 1; }
textarea { resize: vertical; min-height: 78px; }
input[type="checkbox"] { cursor: pointer; accent-color: var(--brand); min-height: auto; }
.search { width: min(100%, 245px); }
.empty { padding: 25px 15px; text-align: center; color: var(--muted); }
.empty .icon { margin: 0 auto 8px; color: #79a28b; width: 23px; height: 23px; }
.muted { color: var(--muted); }
.inline-error { padding: 10px; border-radius: 8px; color: #96323b; background: #faedef; margin-top: 10px; }
.settings { max-width: 840px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 13px; }
.field { min-width: 0; display: grid; gap: 5px; align-content: start; font-size: 12px; font-weight: 650; }
.field.wide { grid-column: 1/-1; }
.field small { color: var(--muted); font-weight: normal; }
.choices { display: flex; flex-wrap: wrap; gap: 7px 12px; padding: 6px 0; }
.choice { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 400; }
.score-choices { display: grid; gap: 6px; max-height: 205px; overflow: auto; padding: 5px; }
.score-choice { display: grid; grid-template-columns: minmax(0, 1fr) 70px; align-items: center; gap: 7px; border-bottom: 1px solid var(--line); padding-bottom: 5px; }
.score-choice label { display: flex; align-items: start; gap: 6px; }
.score-choice input[type="number"] { width: 100%; min-height: 31px; }
.settings .actions { margin-top: 15px; }
.modal { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; background: #17292178; padding: 14px; }
.modal-panel { background: white; width: min(100%, 635px); max-height: calc(100vh - 28px); border-radius: 14px; display: flex; flex-direction: column; box-shadow: 0 18px 75px #13251e56; }
.modal-panel.wide { width: min(100%, 1050px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 13px 19px; gap: 10px; }
.modal-head h2 { font-size: 18px; }
.modal-body { padding: 17px 19px; overflow: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 7px; padding: 11px 19px; border-top: 1px solid var(--line); }
.review-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 15px; }
.scan-page { background: #f1f5f1; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 9px; overflow: hidden; }
.scan-page summary { padding: 6px 9px; cursor: pointer; font-size: 12px; }
.scan-image { position: relative; width: 100%; display: block; }
.scan-image img { display: block; width: 100%; height: auto; }
.scan-image img:not([src]) { display: none; }
.scan-box { position: absolute; border: 2px solid #d44742; background: #d4474218; border-radius: 2px; pointer-events: none; }
.question-review { border: 1px solid var(--line); padding: 9px; border-radius: 8px; margin-bottom: 8px; }
.question-review legend { padding: 0 3px; font-size: 12px; color: var(--muted); }
.question-review p { margin: 4px 0; }
.question-review .form-grid { grid-template-columns: minmax(0, 1fr) 83px; }
.report-copy > * + * { margin-top: 12px; }
.report-copy ul { padding-left: 20px; }
#toast { position: fixed; right: 20px; bottom: 20px; z-index: 20; }
.toast { padding: 10px 15px; background: #173d2d; color: white; border-radius: 9px; box-shadow: 0 6px 20px #102d2650; max-width: min(400px, 85vw); }
.toast.error { background: #8f2b35; }
.login { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.login-banner { position: relative; isolation: isolate; overflow: hidden; display: grid; align-content: center; gap: 20px; padding: clamp(24px, 6vw, 100px); background: #172921; color: #e7f4ea; }
.login-banner .brand { padding: 0; }
.login-banner h1 { font-size: clamp(28px, 4vw, 54px); max-width: 520px; letter-spacing: -.04em; line-height: 1.2; }
.login-banner > p { color: #b8cec0; max-width: 420px; font-size: 15px; }
.login-banner::before, .login-banner::after { content: ""; border: 1px solid #365749; width: min(48vw, 520px); aspect-ratio: 1; border-radius: 50%; position: absolute; z-index: -1; bottom: -30%; right: -25%; }
.login-banner::after { right: -20%; bottom: -36%; }
.login-main { align-self: center; justify-self: center; width: min(100% - 44px, 375px); padding: 30px 0; }
.login-main h2 { font-size: 27px; margin-bottom: 5px; }
.login-main p { color: var(--muted); margin-bottom: 17px; }
.login-main form { display: grid; gap: 13px; }
.login-main button { margin-top: 3px; min-height: 41px; }
.login-main .other-portal { display: inline-block; margin-top: 13px; color: var(--brand-dark); font-size: 12px; }
@media (max-width: 1100px) {
  .layout { grid-template-columns: 198px minmax(0, 1fr); }
  .topbar, .content { padding-inline: 22px; }
  .side { padding-inline: 12px; }
}
@media (max-width: 820px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hero-art { opacity: .5; }
}
@media (max-width: 670px) {
  .layout { display: block; }
  .side { display: none; height: 100dvh; position: fixed; z-index: 6; left: 0; width: 235px; box-shadow: 0 0 0 100vmax #15241f5c; }
  .layout.nav-open .side { display: flex; }
  .menu-toggle { display: grid; }
  .topbar, .content { padding-inline: 12px; }
  .topbar { min-height: 56px; gap: 7px; }
  .topbar-right { gap: 6px; }
  .breadcrumb { font-size: 11px; }
  .user-name { display: none; }
  .heading { flex-wrap: wrap; align-items: center; }
  .hero { padding: 18px; }
  .hero-art { opacity: .2; }
  .login { grid-template-columns: 1fr; }
  .login-banner { gap: 9px; padding: 25px 22px; }
  .login-banner > p { font-size: 12px; }
  .form-grid, .review-grid { grid-template-columns: 1fr; }
}
[hidden] { display: none !important; }
.scan-tools { background: #fff; padding: 5px 9px; }
.scan-tools select { min-height: 28px; padding: 2px 6px; font-size: 11px; }
.scan-feedback { padding: 8px; }
.review-summary { margin-bottom: 10px; }
.preserve-lines { white-space: pre-wrap; }
@media (max-width: 620px) {
  .card-header { align-items: flex-start; flex-wrap: wrap; }
}
