/* 교사용 관리 화면 — 표와 숫자가 또렷하게 */

[hidden] { display: none !important; }

:root {
  --ink: #2C2C2C;
  --blue: #0D99FF;
  --line: #E4E6EB;
  --muted: #7A808A;
  --wait: #B26A00;   --wait-bg: #FFF4E0;
  --ok: #0F7B4F;     --ok-bg: #E6F6EE;
  --no: #C0392B;     --no-bg: #FDECEA;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Malgun Gothic', '맑은 고딕', system-ui, sans-serif;
  font-size: 14px;
  color: var(--ink);
  background-color: #FBFBFC;
  background-image: radial-gradient(#DFE2E8 1px, transparent 1px);
  background-size: 18px 18px;
}

button, input { font-family: inherit; font-size: 14px; }

/* ── 로그인 ───────────────────────────────── */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.gate-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 32px 28px; width: 100%; max-width: 360px;
  box-shadow: 0 10px 34px rgba(20,25,40,.09);
}
.gate-card h1 { margin: 0 0 6px; font-size: 20px; }
.gate-card p { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; }
.gate-card input {
  width: 100%; height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 8px; margin-bottom: 12px;
}
.gate-card input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(13,153,255,.16); }
.gate-err { color: var(--no) !important; font-weight: 600; margin: -6px 0 12px !important; }
.btn-blue {
  width: 100%; height: 44px; border: none; border-radius: 8px;
  background: var(--blue); color: #fff; font-weight: 700; cursor: pointer;
}
.btn-blue:hover { background: #0B87E3; }

/* ── 상단 바 ──────────────────────────────── */
.bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff;
  padding: 0 16px; height: 52px;
  position: sticky; top: 0; z-index: 10;
}
.bar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); }
.bar b { font-size: 14.5px; }
.bar-sub { color: #A8AEB8; font-size: 12.5px; }
.bar-right { margin-left: auto; display: flex; gap: 6px; }
.bar .chip { background: #3C3C3C; color: #EDEFF2; border-color: #4A4A4A; }
.bar .chip:hover { background: #4A4A4A; }

.chip {
  height: 32px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 7px;
  background: #fff; color: var(--ink); cursor: pointer; font-weight: 600;
}
.chip:hover { background: #F2F4F7; }

.page { max-width: 1240px; margin: 0 auto; padding: 18px 16px 60px; }

/* ── 숫자 카드 ────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
}
.stat span { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 4px; }
.stat b { font-size: 26px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat.wait b { color: var(--wait); }
.stat.ok b { color: var(--ok); }
.stat.no b { color: var(--no); }

/* ── 도구 줄 ──────────────────────────────── */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.seg { display: flex; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button {
  border: none; background: none; height: 34px; padding: 0 14px;
  cursor: pointer; font-weight: 600; color: var(--muted);
  border-right: 1px solid var(--line);
}
.seg button:last-child { border-right: none; }
.seg button.on { background: var(--blue); color: #fff; }
.toolbar input {
  height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.toolbar input[type=search] { min-width: 220px; flex: 1; max-width: 320px; }
.toolbar input:focus { outline: none; border-color: var(--blue); }

/* ── 표 ──────────────────────────────────── */
.tablewrap { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 960px; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid #EEF0F3; white-space: nowrap; }
th { background: #F7F8FA; font-size: 12.5px; color: var(--muted); font-weight: 700; }
td { font-variant-numeric: tabular-nums; }
tbody tr:hover { background: #F8FBFF; }
tbody tr:last-child td { border-bottom: none; }
td.wrap { white-space: normal; max-width: 260px; min-width: 160px; }
.name { font-weight: 700; }
.sub { color: var(--muted); font-size: 12.5px; }

.tag { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.tag.대기 { background: var(--wait-bg); color: var(--wait); }
.tag.승인 { background: var(--ok-bg); color: var(--ok); }
.tag.반려 { background: var(--no-bg); color: var(--no); }

.act { display: flex; gap: 5px; }
.act button { height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; font-size: 12.5px; }
.act button.y:hover { background: var(--ok-bg); border-color: #A8DCC3; color: var(--ok); }
.act button.n:hover { background: var(--no-bg); border-color: #F0B7B0; color: var(--no); }
.act button.w:hover { background: var(--wait-bg); border-color: #EBCF95; color: var(--wait); }

.empty { text-align: center; color: var(--muted); padding: 40px 0; margin: 0; }

@media (max-width: 640px) {
  .bar-sub { display: none; }
  .stat b { font-size: 22px; }
}
