/* ─────────────────────────────────────────────────────────
   EDUNEXT LMS — 디자인 시스템 (LMS.dc.html 기반)
   라이트 기본 + [data-lms="dark"] 다크. 인라인 디자인을 클래스로 정리.
   ───────────────────────────────────────────────────────── */
:root {
  --bg: #f7f6f4; --surface: #ffffff; --surface2: #faf9f7; --surface3: #f2f0ec;
  --line: #e4e1dc; --line2: #f2f0ec; --line3: #f5f3ef;
  --ink: #14171a; --body: #3f464d; --muted: #6b7280; --faint: #9aa0a6; --ghost: #b3b8bd;
  --accent: #d61e33; --accent-hover: #a81527; --accent-soft: #fdeaec;
  --green: #2f7d5d; --green-soft: #e8f3ee; --amber: #b7791f; --amber-soft: #fdf3e2;
  --bar: #dfdcd6; --track: #eceae5; --stripe: #f0eeea;
  --shadow: 0 18px 50px rgba(20,23,26,0.13);
}
:root[data-lms="dark"] {
  --bg: #0f1215; --surface: #171b1f; --surface2: #1b2025; --surface3: #232a30;
  --line: #2a3137; --line2: #232a30; --line3: #1f262b;
  --ink: #eef1f3; --body: #c6cdd3; --muted: #98a2aa; --faint: #7c868e; --ghost: #616a72;
  --accent: #ff4d5f; --accent-hover: #ff7583; --accent-soft: #33171b;
  --green: #4cb98b; --green-soft: #16302a; --amber: #d7a03c; --amber-soft: #322614;
  --bar: #2c343a; --track: #262d33; --stripe: #1e242a;
  --shadow: 0 18px 50px rgba(0,0,0,0.5);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: 'Noto Sans KR', system-ui, sans-serif; font-size: 14px; line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
.eyebrow { font-family: Montserrat, sans-serif; font-size: 10px; letter-spacing: 0.18em; color: var(--faint); text-transform: uppercase; }
.eyebrow.accent { color: var(--accent); }
h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.025em; margin: 10px 0 0; }
h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.sub { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.muted { color: var(--muted); } .faint { color: var(--faint); font-size: 13px; }

/* ── 레이아웃 ── */
.shell { min-height: 100vh; display: flex; }
.sidebar {
  width: 244px; flex: 0 0 244px; position: sticky; top: 0; height: 100vh;
  border-right: 1px solid var(--line); background: var(--surface);
  display: flex; flex-direction: column; padding: 22px 14px; gap: 18px; overflow: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.brand .logo { width: 24px; height: 24px; border-radius: 7px; background: var(--accent); }
.brand .name { font-family: Montserrat, sans-serif; font-weight: 700; letter-spacing: 0.14em; font-size: 12px; }
.navgroup { display: flex; flex-direction: column; gap: 3px; }
.navgroup > .eyebrow { padding: 0 12px 6px; }
.nav-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  text-align: left; border: 0; cursor: pointer; font-family: inherit; font-size: 14px;
  padding: 10px 12px; border-radius: 10px; background: transparent; color: var(--body); text-decoration: none;
}
.nav-item:hover { background: var(--surface3); color: var(--ink); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.sidebar .spacer { margin-top: auto; }
.userbox { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.userbox .avatar { width: 34px; height: 34px; border-radius: 999px; background: var(--surface3); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.main { flex: 1; min-width: 0; padding: 34px 40px; display: flex; flex-direction: column; gap: 20px; max-width: 1120px; }
.topbar { display: none; }

/* ── 카드 / 스탯 ── */
.card { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); padding: 24px; }
.card.tight { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line2); }
.card-head .title { font-size: 15px; font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat { border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; background: var(--surface); }
.stat .val { font-size: 30px; font-weight: 700; letter-spacing: -0.025em; margin-top: 10px; }
.stat .lbl { font-size: 12px; color: var(--muted); margin-top: 5px; }
.grid2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 860px){ .grid2 { grid-template-columns: 1fr; } }

/* ── 버튼 (필) ── */
.btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-family: inherit; font-size: 14px; font-weight: 500;
  padding: 10px 20px; border-radius: 999px; text-decoration: none; transition: .12s; }
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn.sm { padding: 7px 14px; font-size: 13px; }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn.ghost { background: var(--surface2); color: var(--muted); }
.btn.disabled, .btn:disabled { background: var(--surface3); color: var(--faint); border-color: var(--line); cursor: not-allowed; }

/* ── 진도바 ── */
.progress { height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }

/* ── 배지 ── */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.badge.pass { background: var(--green-soft); color: var(--green); }
.badge.fail { background: var(--accent-soft); color: var(--accent); }
.badge.wip { background: var(--amber-soft); color: var(--amber); }

/* ── 테이블 ── */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-family: Montserrat, sans-serif; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); padding: 12px 14px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 14px; border-bottom: 1px solid var(--line3); font-size: 14px; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: var(--surface2); }

/* ── 폼 ── */
label { display: block; font-size: 13px; font-weight: 500; color: var(--body); margin: 12px 0 5px; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface2); color: var(--ink); font-family: inherit; font-size: 14px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }

/* ── 플래시 ── */
.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 6px; font-size: 14px; }
.flash.ok { background: var(--green-soft); color: var(--green); }
.flash.err { background: var(--accent-soft); color: var(--accent); }

/* ── 인증(중앙) ── */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card { width: 100%; max-width: 400px; }
.list-row { display: flex; gap: 14px; align-items: center; padding: 15px 22px; border-bottom: 1px solid var(--line3); }
.list-row:last-child { border-bottom: 0; }
.thumb { width: 56px; height: 42px; flex: 0 0 56px; border-radius: 8px; border: 1px solid var(--line);
  background-image: repeating-linear-gradient(135deg, var(--stripe) 0 8px, var(--surface2) 8px 16px); }
