:root {
  color-scheme: light;
  --ink: #1d2530;
  --muted: #6b7280;
  --line: #e5e7eb;
  --surface: #ffffff;
  --canvas: #f6f7fb;
  --accent: #4355d6;
  --accent-soft: #eef0ff;
  --health: #5267e8;
  --auto: #f29c55;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 5vw; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); font-weight: 800; letter-spacing: -0.04em; }
.topbar nav { display: flex; align-items: center; gap: 20px; font-size: 14px; }
.topbar nav a.active { color: var(--ink); font-weight: 800; text-decoration: none; }
.account-id { color: var(--muted); }
.page-shell { width: min(1180px, 90vw); margin: 48px auto 80px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 28px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.06em; }
h2 { font-size: 17px; letter-spacing: -0.03em; }
.eyebrow { margin-bottom: 10px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .15em; }
.muted { color: var(--muted); }
.page-heading .muted { max-width: 46rem; }
.score-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.score-grid-3 { grid-template-columns: repeat(3, 1fr); }
.score-card, .panel, .form-card, .auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 32px rgba(28, 36, 58, .04); }
.score-card { padding: 22px; }
.score-card p { margin-bottom: 24px; color: var(--muted); font-size: 14px; }
.score-card strong { display: block; font-size: clamp(22px, 2.4vw, 32px); letter-spacing: -0.05em; white-space: nowrap; }
.score-card span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.score-card span.up { color: #19703b; }
.score-card span.down { color: #b42318; }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.panel { padding: 22px; min-width: 0; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; }
.panel-heading h2 { margin-bottom: 20px; }
.panel-heading span { color: var(--muted); font-size: 12px; }
.panel-heading-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.chart-toggle { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 500; white-space: nowrap; }
.chart-toggle input { width: auto; margin: 0; accent-color: var(--accent); }
.chart-visibility-button { padding: 7px 10px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.chart-visibility-button:disabled { opacity: .45; cursor: default; }
.chart-container { position: relative; height: 300px; }
.chart-container.tall { height: min(520px, 70vh); }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; }
.filter-row.range-row { align-items: flex-end; gap: 14px; }
.range-field { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 650; }
.range-field input[type="date"] { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; color: var(--ink); background: var(--surface); }
.range-row .button-secondary { padding: 8px 14px; font-size: 12px; font-weight: 650; }
.segmented { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 999px; background: #f3f4f8; }
.segmented button { padding: 7px 14px; border-radius: 999px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 650; }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(28, 36, 58, .08); }
.legend-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.legend-tools .button-secondary { padding: 8px 12px; font-size: 12px; font-weight: 650; }
.chart-note { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
canvas { width: 100%; height: 100%; display: block; }
.form-card, .auth-card { width: min(100%, 520px); margin: 0 auto; padding: clamp(24px, 5vw, 42px); }
.form-card.wide { width: min(100%, 680px); }
.form-stack { display: grid; gap: 17px; }
label { display: grid; gap: 7px; color: #454d5b; font-size: 13px; font-weight: 650; }
.id-with-mark { display: flex; align-items: center; gap: 8px; }
.id-with-mark input { flex: 1; min-width: 0; }
.verify-mark { flex: 0 0 auto; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border: 0; padding: 0; border-radius: 999px; font-size: 13px; font-weight: 800; line-height: 1; cursor: default; }
.verify-mark.ok { background: #edf9f1; color: #19703b; }
.verify-mark.bad { background: #fff0f0; color: #b42318; cursor: pointer; }
.verify-wrap { position: relative; display: inline-flex; }
.verify-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  z-index: 3;
  display: none;
  width: max-content;
  max-width: 240px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #1c243a;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  box-shadow: 0 8px 20px rgba(28, 36, 58, .18);
}
.verify-wrap:hover .verify-tip,
.verify-wrap:focus-within .verify-tip,
.verify-wrap.open .verify-tip { display: block; }
input { width: 100%; padding: 12px 13px; border: 1px solid #d6d9e2; border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-weight: 400; }
input:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
small { color: var(--muted); font-weight: 400; }
button { padding: 13px 16px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font: inherit; font-weight: 750; cursor: pointer; }
button:hover { filter: brightness(.95); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-card h2 { margin: 8px 0 -2px; padding-top: 8px; border-top: 1px solid var(--line); }
.form-footer { margin: 22px 0 0; text-align: center; font-size: 13px; }
.data-status { margin-top: 32px; padding-top: 26px; border-top: 1px solid var(--line); }
.data-status-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.data-status h2 { margin: 0 0 6px; padding: 0; border: 0; }
.data-status-heading p { margin-bottom: 0; font-size: 13px; }
.status-badge { display: inline-flex; align-items: center; padding: 6px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; white-space: nowrap; }
.data-status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 22px 0 0; }
.data-status-grid > div { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcff; }
.data-status-grid dt { color: var(--muted); font-size: 12px; }
.data-status-grid dd { margin: 8px 0 5px; color: var(--ink); font-size: 16px; font-weight: 750; line-height: 1.35; word-break: keep-all; }
.data-status-grid small { display: block; font-size: 11px; line-height: 1.4; }
.data-status-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.button-secondary { background: #eef0f5; color: var(--ink); }
.button-secondary:hover { filter: brightness(.97); }
.alert { padding: 12px 14px; border-radius: 10px; font-size: 13px; }
.alert.error { background: #fff0f0; color: #b42318; }
.alert.success { background: #edf9f1; color: #19703b; }
.hidden { display: none; }
@media (max-width: 800px) { .score-grid, .chart-grid, .score-grid-3 { grid-template-columns: 1fr 1fr; } .chart-grid { grid-template-columns: 1fr; } .data-status-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .topbar { padding: 0 5vw; } .topbar nav { gap: 10px; } .account-id { display: none; } .score-grid, .score-grid-3 { grid-template-columns: 1fr 1fr; } .score-card { padding: 16px; } .score-card strong { font-size: 26px; } .form-grid { grid-template-columns: 1fr; } .data-status-heading, .data-status-actions { align-items: stretch; flex-direction: column; } .data-status-grid { grid-template-columns: 1fr; } .chart-container.tall { height: 360px; } }

/* Primary navigation separates operational work from the account area. */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 12px; background: var(--surface); }
.skip-link:focus { top: 8px; }
.topbar { min-height: 64px; height: auto; gap: 24px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.topbar .global-nav { margin-right: auto; }
.topbar nav a { padding: 8px 0; white-space: nowrap; }
.topbar .global-nav a.active { color: var(--accent); box-shadow: 0 2px var(--accent); }
.topbar .account-nav { gap: 14px; }
a:focus-visible, button:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (max-width: 840px) {
  .topbar { gap: 8px 20px; }
  .topbar .account-id { display: none; }
}
@media (max-width: 560px) {
  .topbar .global-nav { order: 3; width: 100%; justify-content: flex-start; margin: 0; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; }
  .topbar .global-nav::-webkit-scrollbar { display: none; }
  .topbar .account-nav { margin-left: auto; }
}

#followup-staff-form[hidden] { display: none; }
