/* 교풀 아두이노 — 공통 스타일. 바탕은 아두이노 웹 에디터처럼 흰색·연회색, 브랜드 색은 교풀 파랑(네이비)이다. */
:root {
  --navy: #1A2B6E; --navy-2: #2D4AC5; --navy-soft: #E4E8F7; --navy-050: #F1F3FB;
  --bg: #EDF0F6; --surface: #FFFFFF; --surface-2: #E3E8F1; --paper: #F7F8FB; --line: #DCE1EB; --line-2: #C3CAD8;
  --ink: #1E2433; --ink-2: #3B4357; --muted: #636B82;
  --teal: #2E7F7A; --teal-soft: #DDEEEC;
  --sage: #3A7344; --sage-soft: #E2F0E5;
  --coral: #B03A35; --coral-soft: #F8E1DF;
  --amber: #93601A; --amber-soft: #F6EBD7;
  --mark: #F4C84A;
  --code-bg: #FFFFFF; --code-gutter: #FFFFFF;
  --f-body: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  --f-mono: "D2Coding", "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --r: 10px;
  --shadow: 0 1px 2px rgba(22,30,52,.06), 0 8px 24px rgba(22,30,52,.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.55; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; }
p { margin: 0; }
a { color: var(--navy-2); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--navy-2); outline-offset: 2px; }
[hidden] { display: none !important; }
.mono { font-family: var(--f-mono); }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 6px 14px;
  border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); cursor: pointer; font-size: 14px; white-space: nowrap; }
.btn:hover { border-color: var(--ink-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--navy-2); border-color: var(--navy-2); color: #fff; font-weight: 700; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { border-color: var(--coral); color: var(--coral); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--muted); }
.btn.small { min-height: 30px; padding: 3px 10px; font-size: 13px; }

/* 입력 */
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label, .field > .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=url], select, textarea {
  border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); padding: 8px 10px; font-size: 14px; }
textarea { resize: vertical; }
.hint { font-size: 12.5px; color: var(--muted); }
.error-text { font-size: 13px; color: var(--coral); }

/* 카드·표 */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table.list { border-collapse: collapse; width: 100%; font-size: 14px; }
table.list th, table.list td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list th { font-size: 12.5px; color: var(--muted); font-weight: 600; background: var(--paper); }
table.list tr:last-child td { border-bottom: 0; }

/* 표시 */
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.ok { background: var(--sage-soft); color: var(--sage); }
.pill.warn { background: var(--amber-soft); color: var(--amber); }
.pill.bad { background: var(--coral-soft); color: var(--coral); }
.pill.info { background: var(--navy-soft); color: var(--navy-2); }
.pill.muted { background: var(--surface-2); color: var(--muted); }

/* 머리줄(쪽 공통): 흰 바탕, 맨 왼쪽 교풀에듀 로고 */
.topbar { background: var(--surface); color: var(--ink); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 8px 18px; min-height: 56px; border-bottom: 1px solid var(--line); }
.topbar .logo, .topbar .brand { display: flex; align-items: center; gap: 12px; flex: none; }
.topbar .logo img, .topbar .brand img { display: block; height: 22px; width: auto; }
.topbar .spacer { flex: 1; }
.page { max-width: 1120px; margin: 0 auto; padding: 24px 18px 60px; display: flex; flex-direction: column; gap: 18px; }

/* 알림 띠 */
.banner { padding: 9px 14px; border-radius: 10px; font-size: 14px; }
.banner.warn { background: var(--amber-soft); color: var(--amber); }
.banner.bad { background: var(--coral-soft); color: var(--coral); }
.banner.ok { background: var(--sage-soft); color: var(--sage); }
.banner.info { background: var(--navy-050); color: var(--navy); }

/* 대화 상자 대신 쓰는 아래쪽 알림 */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); width: max-content; max-width: min(560px, calc(100vw - 32px)); text-align: center; word-break: keep-all; overflow-wrap: break-word; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow); z-index: 70; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
