/* 관리자 웹(2026-11-02) — 랜딩의 결을 가볍게: 크림 종이 · 제목과 큰 숫자는 그리운 규원체(보통 굵기 — 굵히지 않는다) ·
   표 · 설명은 Pretendard(없으면 시스템 고딕). 상태는 손 획 ○ △ ✕ — 글자 알약을 쓰지 않는다. 숫자가 주인공이고 색은 약하게.
   색은 앱 토큰(apps/mobile/lib/core/theme/app_colors.dart) · 랜딩과 같은 값. */

@font-face {
  font-family: 'Griun Gyuwon';
  src: url('/gyuwon.ttf') format('truetype');
  font-display: swap;
}

:root {
  --bg: #F2EFE8;
  --surface: #FFFFFF;
  --surface-2: #EDEAE0;
  --line: #E8E3DB;
  --ink: #222222;
  --ink-2: #696969;
  --accent: #FF752E;
  --accent-ink: #AD4B18;
  --green: #206E35;
  --green-soft: #B5E8B5;
  --amber: #B7791F;
  --red: #B42318;
  --red-soft: #F4D4CF;
  --display: 'Griun Gyuwon', 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', system-ui, sans-serif;
  --body: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', system-ui, 'Noto Sans KR', sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
.num, td.num, .big { font-variant-numeric: tabular-nums; }
.noscript { padding: 24px; }

/* 규원체 — 한 굵기뿐이라 굵게 하지 않는다 */
.display, h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: 0; margin: 0; }

/* ── 들어오기 ── */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.paper {
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px 28px 24px;
  box-shadow: 0 30px 60px -36px rgba(34, 34, 34, .45);
}
.paper h1 { font-size: 34px; line-height: 1.2; }
.lead { color: var(--ink-2); margin: 10px 0 22px; }
.lead b { color: var(--ink); font-weight: 600; }
.fine { color: var(--ink-2); font-size: 12px; margin: 18px 0 0; }
.code-field { display: block; margin: 0 0 18px; position: relative; cursor: text; }
.code-label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.code-label small { margin-left: 6px; color: var(--ink-2); opacity: .8; }
/* 보이는 칸 여섯 — 진짜 입력은 그 위에 투명하게 겹친다(붙여넣기 · 자동 채움 · 화면 낭독기가 그대로 된다) */
.slots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.slot {
  height: 56px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 30px;
  transition: border-color .14s var(--ease), transform .14s var(--ease), background .14s var(--ease);
}
.slot.filled { background: var(--surface); border-color: var(--ink-2); }
.slot.caret { border-color: var(--accent); }
.slot.pop { transform: translateY(-2px); }
.code-input {
  position: absolute; left: 0; right: 0; bottom: 0; height: 56px; width: 100%;
  opacity: 0; border: 0; font-size: 16px; caret-color: transparent;
}
.code-input:focus-visible + .slots, .code-field:focus-within .slots { outline: none; }
.code-field:focus-within .slot.caret { box-shadow: 0 0 0 3px rgba(255, 117, 46, .18); }
.shake .slots { animation: shake .34s var(--ease); }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.error { color: var(--red); background: var(--red-soft); border-radius: 10px; padding: 8px 12px; font-size: 13px; margin: 0 0 14px; }

.button {
  appearance: none; border: 0; cursor: pointer;
  font-family: var(--display); font-size: 18px;
  background: var(--ink); color: var(--surface);
  border-radius: 999px; padding: 12px 22px; min-height: 48px; width: 100%;
  transition: transform .12s var(--ease), opacity .12s var(--ease);
}
.button:active { transform: scale(.97); }
.button[disabled] { opacity: .5; cursor: default; }
.button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); width: auto; font-size: 15px; min-height: 40px; padding: 8px 16px; }
.button.small { width: auto; font-size: 15px; min-height: 40px; padding: 8px 16px; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }

/* ── 운영 화면 ── */
.console { max-width: 1180px; margin: 0 auto; padding: 18px clamp(16px, 3vw, 32px) 64px; }
.top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.brand { font-size: 28px; }
.who { margin: 0; color: var(--ink-2); font-size: 13px; flex: 1; }
.who .num.low { color: var(--red); }
.top-actions { display: flex; gap: 8px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 10px 0 0; scrollbar-width: none; }
.tab {
  appearance: none; border: 0; background: transparent; cursor: pointer; white-space: nowrap;
  font-family: var(--display); font-size: 17px; color: var(--ink-2);
  padding: 8px 12px 10px; border-bottom: 2px solid transparent;
}
.tab[aria-selected='true'] { color: var(--ink); border-bottom-color: var(--accent); }
.view { padding-top: 18px; }
.loading { color: var(--ink-2); padding: 24px 0; }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; min-width: 0; }
.card h2 { font-size: 19px; margin-bottom: 8px; }
.card.wide { grid-column: 1 / -1; }
.kpi { display: flex; flex-wrap: wrap; gap: 18px 28px; }
.kpi .item { min-width: 96px; }
.big { font-family: var(--display); font-size: 38px; line-height: 1.1; }
.big.mid { font-size: 28px; }
.cap { color: var(--ink-2); font-size: 13px; }
.sub { color: var(--ink-2); font-size: 13px; margin: 4px 0 0; }
.muted { color: var(--ink-2); }
.pending-note { color: var(--ink-2); font-size: 12px; border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 8px; }

/* 상태 줄 — 손 획 표시 + 글 */
.lines { list-style: none; margin: 0; padding: 0; }
.lines li { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-top: 1px solid var(--line); }
.lines li:first-child { border-top: 0; }
.lines li[data-go] { cursor: pointer; }
.lines li[data-go]:hover { background: var(--bg); }
.lines .name { font-family: var(--display); font-size: 17px; width: 64px; flex: none; }
.lines .text { flex: 1; min-width: 0; }
.mark { width: 26px; height: 26px; flex: none; }
.mark path { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.mark.ok path { stroke: var(--green); }
.mark.warn path { stroke: var(--amber); }
.mark.bad path { stroke: var(--red); }
.mark.none path { stroke: #B8B2A6; }
.mark.draw path { stroke-dasharray: 80; stroke-dashoffset: 80; animation: draw .5s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* 막대 · 선 — 장식 없이 */
.chart { width: 100%; height: 120px; display: block; }
.chart.small { height: 44px; }
.chart rect.bar { fill: var(--ink); opacity: .78; }
.chart rect.bar.alt { fill: var(--accent); opacity: .9; }
.chart rect.bar.today { fill: var(--accent); opacity: 1; }
.chart rect.bad { fill: var(--red); }
.chart line.base { stroke: var(--line); }
.chart text { font-size: 10px; fill: var(--ink-2); font-family: var(--body); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-2); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.legend i.lg-ink { background: var(--ink); opacity: .78; }
.legend i.lg-red { background: var(--red); }
.hbar { display: grid; grid-template-columns: minmax(80px, 140px) 1fr auto; align-items: center; gap: 10px; margin: 6px 0; font-size: 13px; }
.hbar .track { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.hbar .fill { height: 100%; background: var(--ink); opacity: .75; border-radius: 99px; width: 0; transition: width .4s var(--ease); }

/* 표 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 500; color: var(--ink-2); padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th.sortable { cursor: pointer; }
th.sortable[aria-sort]::after { content: ' ↓'; }
td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.num, th.num { text-align: right; white-space: nowrap; }
td.route { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; }
tr.probe td { color: var(--ink-2); }
td .flag { color: var(--red); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { appearance: none; border: 0; background: transparent; padding: 6px 14px; cursor: pointer; font-size: 13px; }
.seg button[aria-pressed='true'] { background: var(--ink); color: var(--surface); }
input[type='month'] { font: inherit; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.warnings { margin-top: 18px; font-size: 12px; color: var(--ink-2); }
.warnings code { background: var(--surface-2); border-radius: 6px; padding: 1px 5px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 10px 18px; border-radius: 999px; font-size: 14px; }

/* 운영 큐 — 신고 하나하나(11-03). 24시간을 넘긴 줄은 붉은 테두리 · 나이. */
.reports { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.report { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 8px; background: var(--surface); }
.report.late { border-color: var(--red); }
.report-head { display: flex; align-items: baseline; gap: 10px; }
.report-head .name { font-family: var(--display); font-size: 17px; }
.report-head .late { color: var(--red); }
.report p { margin: 4px 0 0; }
.report-title { font-family: var(--display); font-size: 16px; }
.report-body, .report-detail { color: var(--ink-2); font-size: 14px; word-break: break-word; }
.report-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.button.danger { background: var(--red); }

@media (max-width: 640px) {
  .big { font-size: 32px; }
  .lines .name { width: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
  .mark.draw path { stroke-dashoffset: 0; animation: none; }
}
