:root {
  color-scheme: light;
  --ink: #14231d;
  --muted: #66766f;
  --line: #dce6e0;
  --paper: #ffffff;
  --soft: #f2f7f4;
  --brand: #176b4b;
  --brand-dark: #0e5138;
  --danger: #b83535;
  --warning: #9a6412;
  --shadow: 0 22px 60px rgba(25, 57, 43, .12);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(65, 156, 113, .14), transparent 32rem),
    linear-gradient(145deg, #f8fbf9, #eef4f0);
}
button, input { font: inherit; }
button { cursor: pointer; }
.page { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 48px 0 64px; }
.narrow { width: min(520px, calc(100% - 32px)); }
.brand { display: flex; align-items: center; gap: 13px; margin-bottom: 28px; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: var(--brand); font-weight: 800; box-shadow: 0 10px 24px rgba(23, 107, 75, .25); }
.brand h1 { margin: 0; font-size: clamp(23px, 3vw, 34px); letter-spacing: -.03em; }
.brand p { margin: 4px 0 0; color: var(--muted); }
.card { background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 26px; }
.login-card h2, .section-head h2 { margin: 0; }
.login-card > p { color: var(--muted); line-height: 1.65; }
.field { display: grid; gap: 7px; margin: 16px 0; }
.field label { font-weight: 700; font-size: 14px; }
.field input { width: 100%; border: 1px solid #cad8d0; border-radius: 12px; padding: 12px 14px; outline: none; background: #fff; }
.field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(23, 107, 75, .12); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 20px; }
.btn { border: 0; border-radius: 12px; padding: 11px 16px; font-weight: 750; color: #fff; background: var(--brand); }
.btn:hover { background: var(--brand-dark); }
.btn.secondary { color: var(--brand); background: #e5f2eb; }
.btn.ghost { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.btn.danger { color: #fff; background: var(--danger); }
.btn.small { padding: 7px 10px; border-radius: 9px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: wait; }
.status { display: none; margin-top: 15px; padding: 11px 13px; border-radius: 11px; line-height: 1.55; }
.status.show { display: block; }
.status.info { background: #eaf3ff; color: #24517b; }
.status.good { background: #e6f5ec; color: #155b3d; }
.status.error { background: #fdecec; color: #922d2d; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.65; }
.session-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 999px; background: #e8f3ed; color: var(--brand-dark); font-size: 13px; font-weight: 700; }
.admin-top { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 22px; }
.admin-grid { display: grid; gap: 20px; }
.section-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 18px; }
.section-head p { margin: 5px 0 0; color: var(--muted); }
.upload-box { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; padding: 18px; border-radius: 16px; background: var(--soft); border: 1px dashed #afc6b9; }
.upload-box .field { margin: 0; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.summary { padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.summary strong { display: block; font-size: 21px; margin-top: 5px; }
.summary span { color: var(--muted); font-size: 13px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 14px; }
th, td { padding: 12px 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { position: sticky; top: 0; background: #f4f8f5; color: #506159; font-size: 12px; letter-spacing: .03em; }
tr:last-child td { border-bottom: 0; }
.pill { display: inline-block; padding: 4px 8px; border-radius: 999px; background: #eef2f0; color: #4c5d55; font-size: 12px; font-weight: 700; }
.pill.good { background: #e1f3e8; color: #17613f; }
.pill.bad { background: #fae6e6; color: #9b3030; }
.pill.warn { background: #fff1d7; color: #85560f; }
.inline-form { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 10px; align-items: end; margin-bottom: 18px; }
.inline-form .field { margin: 0; }
.tabs { display: flex; gap: 8px; margin: 0 0 18px; flex-wrap: wrap; }
.tab { border: 1px solid var(--line); background: #fff; color: var(--muted); padding: 9px 13px; border-radius: 10px; font-weight: 700; }
.tab.active { color: #fff; background: var(--brand); border-color: var(--brand); }
.tab-panel[hidden] { display: none; }
.ua { max-width: 320px; color: var(--muted); font-size: 12px; word-break: break-word; }
.empty { padding: 26px; text-align: center; color: var(--muted); }
.footer { text-align: center; color: var(--muted); margin-top: 24px; font-size: 13px; }
.link { color: var(--brand); font-weight: 700; text-decoration: none; }
.report-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.report-card { display: grid; gap: 8px; min-height: 150px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); text-decoration: none; background: #fff; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.report-card:hover { transform: translateY(-2px); border-color: #a8cbbb; box-shadow: 0 12px 24px rgba(25,57,43,.10); }
.report-card strong { font-size: 18px; }
.report-card small { color: var(--muted); line-height: 1.55; }
.report-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: var(--brand); font-weight: 800; }
.report-icon.blue { background: #2b68b1; }
.report-icon.amber { background: #b87917; }
.upload-stack { display: grid; gap: 18px; }
.upload-card { box-shadow: none; }
.source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.source-grid .field { margin: 0; }
.source-note { color: var(--muted); font-size: 12px; line-height: 1.55; margin-top: 5px; }

@media (max-width: 760px) {
  .page { padding-top: 26px; }
  .card { padding: 18px; border-radius: 17px; }
  .admin-top, .section-head { flex-direction: column; }
  .upload-box, .inline-form { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
  .report-grid, .source-grid { grid-template-columns: 1fr; }
}
