/* ======================================================================
   NexLms Design System — shared tokens, primitives, and layout patterns.
   Consumed by Login, Signup, Dashboard, etc. Fonts are loaded by the host page.
   ====================================================================== */

:root {
  /* brand / palette */
  --brand-ink:   #0E2A47;   /* deep academic navy */
  --brand-ink-2: #183C63;
  --brand-accent:#B8372E;   /* warm red accent */
  --brand-soft:  #F3EFE6;   /* warm paper */

  /* surfaces */
  --bg:         #F7F6F2;
  --panel:      #ffffff;
  --panel-2:    #FAFAF7;
  --text:       #1A1A1A;
  --muted:      #6B6B6B;
  --faint:      #A8A49A;
  --line:       #E4E1D9;
  --line-2:     #F0EDE5;

  /* form */
  --field-bg:   #FAFAF7;
  --field-bd:   #D8D3C6;
  --btn-bg:     #1F2937;
  --btn-fg:     #ffffff;

  /* status */
  --ok:    #2E7D57;
  --warn:  #B8860B;
  --err:   #C94B3B;
  --info:  #2E5AAC;

  /* geometry */
  --radius:    4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-xl: 14px;

  /* shadow */
  --shadow-sm: 0 1px 2px rgba(14,42,71,0.04), 0 0 0 1px rgba(14,42,71,0.04);
  --shadow-md: 0 4px 16px rgba(14,42,71,0.06), 0 0 0 1px rgba(14,42,71,0.05);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.12), 0 0 0 1px rgba(14,42,71,0.06);

  /* type */
  --font-kr:     "Noto Sans KR", system-ui, -apple-system, sans-serif;
  --font-display:"Noto Sans KR", system-ui, sans-serif;
  --font-serif:  "Gowun Batang", "Noto Serif KR", serif;
}

/* -------- Reset & base -------- */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%;
  font-family: var(--font-kr);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* scrollbar-gutter: stable 제거 — 짧은 페이지(스크롤 없는 화면)에서 우측에 빈 gap 이 보이는 문제.
   기본값(auto) 으로 두면 스크롤이 뜰 때만 자리 차지하고, 학생 shell 과 동일하게 화면이 꽉 찬다.
   페이지 전환 시 스크롤 유무가 바뀌면 미세한 가로 흔들림이 있을 수 있지만 gap 가시성보다 우선. */
a { color: inherit; }
button { font-family: inherit; }

/* -------- Brand panel (split auth screens) -------- */
.app { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }

.brand {
  position: relative;
  background: var(--brand-ink);
  color: #fff;
  padding: 56px 72px 48px;
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden; isolation: isolate;
}
.brand::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(1100px 600px at -10% 110%, rgba(255,255,255,0.08), transparent 60%),
    radial-gradient(800px 500px at 110% -10%, rgba(255,255,255,0.05), transparent 55%);
  z-index: -1;
}
.brand-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
  z-index: -1;
}

.logo { display: flex; align-items: baseline; gap: 10px; letter-spacing: -0.01em; }
.logo .mark { font-family: var(--font-display); font-weight: 800; font-size: 28px; letter-spacing: -0.03em; }
.logo .mark em { font-style: normal; color: var(--brand-accent); }
.logo .sub { font-size: 12.5px; color: rgba(255,255,255,0.7); letter-spacing: 0.02em; font-weight: 400; }

.brand-hero { max-width: 520px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.7); font-weight: 500; margin-bottom: 28px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: rgba(255,255,255,0.5); }
.headline {
  font-family: var(--font-display); font-weight: 700;
  font-size: 54px; line-height: 1.15; letter-spacing: -0.035em;
  margin: 0 0 22px; text-wrap: balance;
}
.headline .accent { color: var(--brand-accent); font-weight: 800; }
.headline .serif { font-family: var(--font-serif); font-weight: 400; font-style: italic; letter-spacing: -0.01em; }
.sub-headline { font-size: 16px; line-height: 1.7; color: rgba(255,255,255,0.78); max-width: 460px; margin: 0; font-weight: 300; }

.brand-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0; margin-top: 48px; padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.stat { padding-right: 18px; }
.stat + .stat { border-left: 1px solid rgba(255,255,255,0.1); padding-left: 24px; }
.stat .num { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; margin-bottom: 6px; }
.stat .lbl { font-size: 12.5px; color: rgba(255,255,255,0.6); }

.brand-foot {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: rgba(255,255,255,0.45); margin-top: 24px;
}
.brand-foot .dots { display: flex; gap: 6px; }
.brand-foot .dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.2); }
.brand-foot .dot.on { background: var(--brand-accent); }

/* -------- Right pane -------- */
.pane {
  background: var(--panel);
  display: flex; align-items: center; justify-content: center;
  padding: 40px; position: relative;
}
.pane-top {
  position: absolute; top: 24px; right: 40px; left: 40px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--muted);
}
.crumbs { display: flex; align-items: center; gap: 8px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs svg { width: 12px; height: 12px; }
.lang { display: flex; gap: 14px; }
.lang button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 13px; padding: 4px 0; border-bottom: 1px solid transparent; }
.lang button.on { color: var(--text); border-bottom-color: var(--text); }

.form-card { width: 100%; max-width: 420px; }
.form-head { margin-bottom: 32px; }
.form-head .kicker { font-size: 12.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brand-accent); font-weight: 600; margin-bottom: 14px; }
.form-head h1 { font-family: var(--font-display); font-size: 32px; font-weight: 700; letter-spacing: -0.03em; margin: 0 0 10px; }
.form-head p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }

/* -------- Fields -------- */
.fields { display: grid; gap: 14px; }
.field { position: relative; display: block; }
.field > label.lbl {
  display: block;
  font-size: 12.5px; color: var(--muted); font-weight: 500;
  margin-bottom: 6px; letter-spacing: 0.01em;
}
.field > label.lbl .req { color: var(--brand-accent); margin-left: 3px; }

.field input,
.field select {
  width: 100%; height: 52px;
  padding: 0 16px 0 46px;
  background: var(--field-bg);
  border: 1px solid var(--field-bd);
  border-radius: var(--radius);
  font-family: inherit; font-size: 15px; color: var(--text);
  transition: border-color .15s, background .15s, box-shadow .15s;
  outline: none;
}
.field.no-icon input,
.field.no-icon select { padding-left: 16px; }
.field select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237D7461' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}
.field select:hover {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230E2A47' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
}
.field select:focus {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230E2A47' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
}
.field select::-ms-expand { display: none; }

/* ──────────────────────────────────────────────────────────────
   전역 select 커스텀 (99-4)
   .field 컨테이너 밖 raw <select> 에도 OS 기본 메뉴 대신
   동일 디자인 토큰의 커스텀 외형 적용. 화살표·텍스트 여백 확보.
   ────────────────────────────────────────────────────────────── */
select:not([multiple]):not([size]) {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: #fff;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237D7461' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}
select:not([multiple]):not([size]):hover {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230E2A47' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
}
select::-ms-expand { display: none; }

/* ──────────────────────────────────────────────────────────────
   filter bar 의 select 박스 width 통일 (99-6)
   `[class*="filters"]` 직계 자식 select / .nx-select 를 170px 로 고정.
   검색바(flex:1)와 select 가 한 줄에 자연스럽게 배치되도록.
   ────────────────────────────────────────────────────────────── */
[class*="filters"] > select,
[class*="filters"] > .nx-select,
[class*="filters"] > .nx-filter {
  flex: 0 0 170px;
  width: 170px;
  max-width: 170px;
}

/* ──────────────────────────────────────────────────────────────
   NexLms 자체 select (99-5)
   nx-select.js 가 모든 <select> 를 감싸 NxDatePicker 와 동일한
   톤의 dropdown 으로 enhance. 트리거 박스는 기존 select 의
   height·padding·border 를 그대로 흡수.
   ────────────────────────────────────────────────────────────── */
.nx-select {
  position: relative;
  display: inline-block;
  width: 100%;
  font-family: inherit;
  vertical-align: middle;
}
.nx-select-trigger {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  height: 38px;
  padding: 0 14px 0 14px;
  background: #fff;
  border: 1px solid var(--field-bd, #d8d2c4);
  border-radius: 6px;
  font-family: inherit; font-size: 13px;
  color: var(--text, #1F2A3A);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .12s;
  text-align: left;
}
.nx-select-trigger:hover { border-color: var(--brand-ink, #1F2A3A); }
.nx-select.open > .nx-select-trigger,
.nx-select-trigger:focus {
  border-color: var(--brand-ink, #1F2A3A);
  box-shadow: 0 0 0 3px rgba(14,42,71,0.08);
  outline: none;
}
.nx-select.disabled > .nx-select-trigger {
  background: var(--panel-2, #F4F0E8);
  color: var(--faint, #C4BCA8);
  cursor: not-allowed;
}
.nx-select-label {
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-weight: 500;
}
.nx-select-chev {
  flex-shrink: 0;
  display: grid; place-items: center;
  width: 16px; height: 16px;
  margin-left: 10px;
  color: var(--muted, #7D7461);
  transition: transform .18s, color .12s;
}
.nx-select-chev svg { width: 14px; height: 14px; }
.nx-select-trigger:hover .nx-select-chev { color: var(--brand-ink, #1F2A3A); }
.nx-select.open .nx-select-chev { transform: rotate(180deg); color: var(--brand-ink, #1F2A3A); }

/* dropdown popover — nx-dp-popover 톤 그대로 */
.nx-select-options {
  position: absolute;
  top: calc(100% + 6px); left: 0; right: 0; z-index: 9500;
  display: none;
  background: #fff;
  border: 1px solid var(--line, #ddd);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(14,42,71,0.18);
  padding: 6px;
  max-height: 280px; overflow-y: auto;
  user-select: none;
}
.nx-select.open .nx-select-options { display: block; }
.nx-select-option {
  display: flex; align-items: center;
  padding: 9px 12px;
  border-radius: 5px;
  font-family: inherit; font-size: 13px;
  color: var(--text, #1F2A3A); font-weight: 500;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.nx-select-option:hover { background: var(--panel-2, #F4F0E8); }
.nx-select-option.active {
  background: var(--brand-ink, #1F2A3A);
  color: #fff;
  font-weight: 700;
}
.nx-select-option.active:hover { background: var(--brand-ink, #1F2A3A); }
.nx-select-option.disabled {
  color: var(--faint, #C4BCA8);
  cursor: not-allowed;
}
.nx-select-option.disabled:hover { background: transparent; }

/* 자연스러운 스크롤바 — popover 안 */
.nx-select-options::-webkit-scrollbar { width: 8px; }
.nx-select-options::-webkit-scrollbar-thumb {
  background: var(--line-2, #e8e3d6);
  border-radius: 4px;
}
.nx-select-options::-webkit-scrollbar-thumb:hover {
  background: var(--muted, #7D7461);
}

/* .field 내부 select 는 height 52px·padding 다름 — 트리거도 동일 사이즈 흡수 */
.field .nx-select-trigger {
  height: 52px;
  padding: 0 16px 0 16px;
  font-size: 15px;
  background: var(--field-bg, #fafaf7);
  border-radius: var(--radius, 8px);
}
.field.no-icon .nx-select-trigger { padding-left: 16px; }
/* .field 가 좌측 아이콘 padding 을 가진 경우, native select 의 padding-left 46 을 트리거에도 */
.field:not(.no-icon) .nx-select { padding-left: 0; }
.field:not(.no-icon) .nx-select-trigger { padding-left: 46px; }

/* ──────────────────────────────────────────────────────────────
   NexLms 자체 날짜·시간 picker (99-1)
   shell.js NexLmsInitDatePicker 가 type=date / datetime-local 을
   text input + 팝오버 달력으로 교체.
   ────────────────────────────────────────────────────────────── */
/* input 우측 달력 아이콘 (affordance) */
input[data-nx-dp] {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237D7461' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='2' ry='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 38px !important;
}
input[data-nx-dp]:hover {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231F2A3A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='2' ry='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/></svg>");
}
.nx-dp-popover {
  position: absolute; z-index: 9500; display: none;
  background: #fff; border: 1px solid var(--line, #ddd);
  border-radius: 10px; box-shadow: 0 16px 40px rgba(14,42,71,0.18);
  padding: 14px; width: 296px;
  font-family: inherit; user-select: none;
}
.nx-dp-popover.on { display: block; }
.nx-dp-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.nx-dp-nav {
  background: transparent; border: 0; cursor: pointer;
  width: 30px; height: 30px; border-radius: 6px;
  color: var(--brand-ink, #1F2A3A); font-size: 18px;
  display: grid; place-items: center;
  font-family: inherit;
}
.nx-dp-nav:hover { background: var(--panel-2, #F4F0E8); }
.nx-dp-title {
  font-family: var(--font-display, inherit);
  font-size: 14.5px; font-weight: 700;
  color: var(--text, #1F2A3A); letter-spacing: -0.005em;
}
.nx-dp-week {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-bottom: 4px;
  background: var(--panel-2, #F4F0E8);
  border-radius: 5px;
  padding: 2px 0;
}
.nx-dp-w {
  text-align: center; font-size: 11px;
  color: var(--muted, #7D7461); font-weight: 700;
  padding: 6px 0; letter-spacing: 0.04em;
}
.nx-dp-w.sun { color: #B8372E; }
.nx-dp-w.sat { color: #4A5A8C; }
.nx-dp-days {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px; margin-top: 4px;
}
.nx-dp-day {
  background: transparent; border: 1px solid transparent;
  cursor: pointer; height: 34px; width: 100%; min-width: 0;
  box-sizing: border-box; border-radius: 5px;
  font-family: inherit; font-size: 13px;
  color: var(--text, #1F2A3A); font-weight: 500;
  display: grid; place-items: center;
  transition: background .12s, color .12s;
  padding: 0;
}
.nx-dp-day:hover { background: var(--panel-2, #F4F0E8); }
.nx-dp-day.off { color: var(--faint, #C4BCA8); font-weight: 400; }
.nx-dp-day.is-today {
  color: var(--brand-accent, #B8372E);
  font-weight: 700;
  border-color: var(--brand-accent, #B8372E);
}
.nx-dp-day.is-today:hover {
  background: var(--brand-accent, #B8372E); color: #fff;
}
.nx-dp-day.is-sel {
  background: var(--brand-ink, #1F2A3A); color: #fff;
  font-weight: 700; border-color: var(--brand-ink, #1F2A3A);
}
.nx-dp-day.is-sel:hover { background: var(--brand-ink, #1F2A3A); }
.nx-dp-day.is-sel.today { border-color: #fff; }
/* 시간 영역 진입 버튼 (date 단계 popover 안) */
.nx-dp-time-btn {
  width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
  display: flex; align-items: center; gap: 10px;
  background: var(--panel-2, #F4F0E8);
  border: 1px solid var(--field-bd, #D4CCB8);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text, #1F2A3A);
  transition: background .12s, border-color .12s;
}
.nx-dp-time-btn:hover {
  background: var(--field-bg, #FAF7EF);
  border-color: var(--brand-ink, #1F2A3A);
}
.nx-dp-time-label { font-size: 12px; color: var(--muted, #7D7461); font-weight: 600; }
.nx-dp-time-val {
  font-family: var(--font-display, inherit);
  font-weight: 700; font-size: 16px;
  flex: 1; text-align: center; letter-spacing: 0.04em;
  color: var(--brand-ink, #1F2A3A);
}
.nx-dp-time-arrow { font-size: 18px; color: var(--muted, #7D7461); line-height: 1; }
.nx-dp-nav-spacer { width: 30px; height: 30px; }

/* 시·분 그리드 (단계 전환 picker) — 가독성 우선: 셀 폭·높이 키움 */
.nx-dp-grid-time {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 6px 0 14px;
}
.nx-dp-grid-time.minute {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.nx-dp-tcell {
  background: var(--field-bg, #FAF7EF);
  border: 1px solid var(--line-2, #EAE5D7);
  cursor: pointer;
  height: 46px; width: 100%; min-width: 0;
  box-sizing: border-box; border-radius: 6px;
  font-family: var(--font-display, inherit);
  font-weight: 700; font-size: 16px;
  color: var(--text, #1F2A3A);
  display: grid; place-items: center;
  transition: background .12s, color .12s, border-color .12s, transform .08s;
  padding: 0;
  letter-spacing: 0.02em;
}
.nx-dp-tcell:hover {
  background: var(--panel-2, #F4F0E8);
  border-color: var(--field-bd, #D4CCB8);
}
.nx-dp-tcell:active { transform: scale(0.97); }
.nx-dp-tcell.is-sel {
  background: var(--brand-ink, #1F2A3A);
  color: #fff;
  border-color: var(--brand-ink, #1F2A3A);
  box-shadow: 0 2px 6px rgba(31,42,58,0.18);
}
.nx-dp-tcell.is-sel:hover { background: #2C3A52; }
.nx-dp-foot {
  display: flex; gap: 6px; margin-top: 12px;
  padding-top: 10px; border-top: 1px solid var(--line-2, #EAE5D7);
}
.nx-dp-foot button {
  flex: 1; padding: 8px 10px; border-radius: 5px;
  font-family: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--field-bd, #D4CCB8);
  background: #fff; color: var(--text, #1F2A3A);
  transition: background .12s;
}
.nx-dp-foot button:hover { background: var(--panel-2, #F4F0E8); }
.nx-dp-foot button.nx-dp-confirm {
  background: var(--brand-ink, #1F2A3A); color: #fff;
  border-color: var(--brand-ink, #1F2A3A);
}
.nx-dp-foot button.nx-dp-confirm:hover { background: #2C3A52; }

/* ──────────────────────────────────────────────────────────────
   파일 드롭존 (.nx-drop) + 첨부 리스트 (.nx-drop-list)
   ────────────────────────────────────────────────────────────── */
.nx-drop {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  padding: 28px 18px;
  border: 1.5px dashed var(--field-bd, #D4CCB8);
  border-radius: 8px;
  background: var(--field-bg, #FAF7EF);
  text-align: center;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.nx-drop:hover { background: #F4F0E8; border-color: var(--brand-ink, #1F2A3A); }
.nx-drop.drag { background: var(--brand-soft, #E5E2D7); border-color: var(--brand-ink, #1F2A3A); border-style: solid; }
.nx-drop .nx-drop-icon {
  width: 28px; height: 28px; color: var(--muted, #7D7461);
}
.nx-drop .nx-drop-text { font-size: 13px; color: var(--text, #1F2A3A); }
.nx-drop .nx-drop-text strong { color: var(--brand-ink, #1F2A3A); font-weight: 700; }
.nx-drop .nx-drop-hint { font-size: 11.5px; color: var(--muted, #7D7461); }

.nx-drop-list {
  list-style: none; margin: 8px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.nx-drop-item {
  display: grid; grid-template-columns: 22px 1fr auto 28px; align-items: center;
  gap: 10px; padding: 8px 12px;
  background: #fff; border: 1px solid var(--line-2, #EAE5D7); border-radius: 6px;
}
.nx-drop-item-ico { width: 18px; height: 18px; color: var(--muted, #7D7461); }
.nx-drop-item-name {
  font-size: 12.5px; color: var(--text, #1F2A3A); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nx-drop-item-size { font-size: 11px; color: var(--muted, #7D7461); font-family: var(--font-display, inherit); font-weight: 600; }
.nx-drop-item-x {
  width: 24px; height: 24px; border: 0; border-radius: 4px;
  background: transparent; color: var(--muted, #7D7461);
  font-size: 18px; font-weight: 700; cursor: pointer; line-height: 1;
  display: grid; place-items: center;
  font-family: inherit;
}
.nx-drop-item-x:hover { background: rgba(184,55,46,0.10); color: var(--brand-accent, #B8372E); }
.field input::placeholder { color: var(--faint); }
.field input:hover,
.field select:hover { border-color: #BFB8A7; }
.field input:focus,
.field select:focus {
  border-color: var(--brand-ink); background: #fff;
  box-shadow: 0 0 0 3px rgba(14,42,71,0.08);
}
.field.invalid input,
.field.invalid select { border-color: var(--err); box-shadow: 0 0 0 3px rgba(201,75,59,0.1); }
.field.valid input { border-color: var(--ok); }

.field .icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: #9A9486; width: 18px; height: 18px; pointer-events: none;
}
.field > label.lbl ~ .icon { top: calc(50% + 12px); }
.field input:focus ~ .icon { color: var(--brand-ink); }

.field .affix {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: 12px; color: var(--muted); pointer-events: none;
}
.field > label.lbl ~ .affix { top: calc(50% + 12px); }

.field .toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; padding: 8px; cursor: pointer;
  color: #9A9486; border-radius: 4px;
}
.field > label.lbl ~ .toggle { top: calc(50% + 12px); }
.field .toggle:hover { color: var(--text); background: rgba(0,0,0,0.04); }
.field .toggle svg { width: 18px; height: 18px; display: block; }

.field .caps {
  position: absolute; right: 48px; top: 50%; transform: translateY(-50%);
  font-size: 10.5px; font-weight: 600; color: var(--brand-accent);
  background: #FDECEA; padding: 3px 6px; border-radius: 3px;
  letter-spacing: 0.04em; display: none;
}
.field.caps-on .caps { display: block; }

.field .hint-msg {
  font-size: 12px; color: var(--muted); margin-top: 6px; padding-left: 2px;
  display: flex; align-items: center; gap: 6px;
}
.field .hint-msg.ok { color: var(--ok); }
.field .hint-msg.err { color: var(--err); }

.row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px; gap: 12px;
}

.check {
  display: inline-flex; align-items: center; gap: 10px;
  cursor: pointer; font-size: 13.5px; color: var(--text); user-select: none;
}
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box {
  width: 18px; height: 18px; border-radius: 3px;
  border: 1.5px solid #BFB8A7;
  display: grid; place-items: center; background: #fff;
  transition: all .15s; flex-shrink: 0;
}
.check input:checked + .box { background: var(--brand-ink); border-color: var(--brand-ink); }
.check .box svg { width: 12px; height: 12px; color: #fff; opacity: 0; transform: scale(0.7); transition: all .15s; }
.check input:checked + .box svg { opacity: 1; transform: scale(1); }
.check .hint { color: var(--muted); font-size: 12px; margin-left: 4px; }
.check strong { font-weight: 600; }

.links { display: flex; gap: 14px; font-size: 13px; }
.links a { color: var(--muted); text-decoration: none; border-bottom: 1px solid transparent; padding-bottom: 1px; }
.links a:hover { color: var(--text); border-bottom-color: var(--text); }

/* -------- Buttons -------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px;
  border: 0; border-radius: var(--radius);
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .15s;
  text-decoration: none;
}
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { background: #111827; }
.btn-primary:active { transform: translateY(1px); }
.btn-primary[disabled] { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  background: #fff; color: var(--text);
  border: 1px solid var(--field-bd);
}
.btn-secondary:hover { border-color: #9A9486; background: var(--panel-2); }

.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: rgba(14,42,71,0.05); }

.btn-lg { height: 54px; font-size: 15px; padding: 0 24px; }
.btn-sm { height: 36px; font-size: 13px; padding: 0 14px; }
.btn-block { width: 100%; }

.submit {
  width: 100%; height: 54px; margin-top: 22px;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 0; border-radius: var(--radius);
  font-family: inherit; font-size: 15px; font-weight: 600; letter-spacing: 0.02em;
  cursor: pointer; transition: transform .08s, background .15s, box-shadow .15s;
  position: relative; overflow: hidden;
}
.submit:hover { background: #111827; }
.submit:active { transform: translateY(1px); }
.submit[disabled] { opacity: 0.6; cursor: not-allowed; }
.submit .spin {
  display: none; width: 16px; height: 16px; margin-right: 10px;
  border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff;
  border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: middle;
}
.submit.loading .spin { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* -------- Divider -------- */
.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 26px 0 20px; color: var(--faint); font-size: 12px; letter-spacing: 0.04em;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* -------- Tag / pill / badge -------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600;
  padding: 4px 8px; border-radius: 3px;
  letter-spacing: 0.02em;
  background: var(--line-2); color: var(--muted);
}
.badge.ink    { background: var(--brand-ink); color: #fff; }
.badge.accent { background: #FDECEA; color: var(--brand-accent); }
.badge.ok     { background: #E7F2EC; color: var(--ok); }
.badge.info   { background: #E6EEF9; color: var(--info); }
.badge.warn   { background: #F8F0D8; color: var(--warn); }
.badge.outline { background: #fff; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }

/* -------- Toast -------- */
.toast {
  position: fixed; top: 24px; left: 50%;
  transform: translateX(-50%) translateY(-80px);
  background: #1F2937; color: #fff;
  padding: 12px 18px; border-radius: 6px; font-size: 13.5px;
  opacity: 0; transition: all .3s cubic-bezier(.2,.8,.2,1);
  pointer-events: none; z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.err { background: var(--err); }
.toast.ok  { background: var(--ok); }

/* -------- Card (general surface) -------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.card-head h3 {
  font-family: var(--font-display);
  margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -0.01em;
}
.card-head .more { font-size: 12.5px; color: var(--muted); text-decoration: none; }
.card-head .more:hover { color: var(--text); }

/* -------- Progress -------- */
.progress {
  position: relative; width: 100%; height: 6px;
  background: var(--line-2); border-radius: 999px; overflow: hidden;
}
.progress > .bar {
  position: absolute; inset: 0 auto 0 0;
  background: var(--brand-ink); border-radius: 999px;
  transition: width .4s cubic-bezier(.2,.8,.2,1);
}
.progress.accent > .bar { background: var(--brand-accent); }

/* -------- Tweaks panel (shared chrome) -------- */
.tweaks {
  position: fixed; right: 24px; bottom: 24px; z-index: 200;
  width: 280px; background: #fff;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.06);
  padding: 16px; font-size: 13px; display: none;
}
.tweaks.on { display: block; }
.tweaks h4 { margin: 0 0 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.tweaks .group + .group { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.tweaks .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tweaks .opts button {
  background: var(--bg); border: 1px solid transparent;
  padding: 8px 10px; border-radius: 6px;
  font-family: inherit; font-size: 12.5px;
  cursor: pointer; text-align: left; transition: all .12s;
}
.tweaks .opts button:hover { background: #EFECE4; }
.tweaks .opts button.on { background: var(--brand-ink); color: #fff; border-color: var(--brand-ink); }

/* -------- Variants (shared across auth) -------- */

/* v-default: Login/Signup brand panel — Player.html 원본과 톤 통일 (거의 검정 그라데이션) */
body.v-default .brand {
  background: linear-gradient(160deg, #07172A 0%, #0A1F38 55%, #050F1C 100%);
}

body.v-modern {
  --brand-ink: #1E3A5F; --brand-ink-2: #2B4F7E;
  --brand-accent: #D64530; --brand-soft: #F1F5FA;
  --bg: #F7F8FA; --btn-bg: #1E3A5F;
  --field-bg: #F7F8FA; --field-bd: #DCE1E8; --line: #E6EAF0;
}
body.v-modern .brand { background: linear-gradient(155deg, #1E3A5F 0%, #0E2A47 60%, #0A1F38 100%); }
body.v-modern .headline .serif { font-family: var(--font-kr); font-style: normal; }

body.v-scholar {
  --brand-ink: #2B2416; --brand-ink-2: #3D3420;
  --brand-accent: #A8421F; --brand-soft: #F0EADB;
  --bg: #F4EFE2; --btn-bg: #2B2416;
  --field-bg: #FBF7EC; --field-bd: #D8CFB7; --line: #DCD3BB;
  --font-display: "Gowun Batang", "Noto Serif KR", serif;
}
body.v-scholar .brand { background: #2B2416; }

body.v-minimal {
  --brand-ink: #111111; --brand-ink-2: #2A2A2A;
  --brand-accent: #D64530; --brand-soft: #F5F5F5;
  --bg: #FFFFFF; --btn-bg: #111111;
  --field-bg: #FFFFFF; --field-bd: #E5E5E5; --line: #EDEDED;
}
body.v-minimal .brand { background: #111111; }
body.v-minimal .brand-grid { opacity: 0.6; }

/* density */
body.d-compact .form-card { max-width: 380px; }
body.d-compact .field input { height: 46px; }
body.d-compact .submit { height: 48px; }
body.d-compact .form-head h1 { font-size: 28px; }

body.d-spacious .form-card { max-width: 460px; }
body.d-spacious .field input { height: 56px; }
body.d-spacious .submit { height: 58px; }

/* small screen fallback for auth */
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .brand { padding: 40px 32px; min-height: 320px; }
  .headline { font-size: 38px; }
  .pane { padding: 40px 24px; }
  .pane-top { position: static; margin-bottom: 24px; }
}

/* -------- List pager (.nl-pager) --------
 * 공용 페이지네이션 컴포넌트. design-system.md 8.2 목록 화면 레시피용.
 * 과제/시험/성적 등 클라이언트 페이지네이션과, 공지/QnA 등 서버 페이지네이션에 공통 사용. */
.nl-pager {
  display: flex; justify-content: center; align-items: center;
  gap: 4px; margin: 28px 0 8px; flex-wrap: wrap;
}
.nl-pager .pg-btn {
  min-width: 36px; height: 36px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--line);
  color: var(--text); font-family: inherit; font-size: 13px; font-weight: 500;
  border-radius: var(--radius-md); cursor: pointer;
  transition: border-color .12s, background .12s, color .12s;
  text-decoration: none;
}
.nl-pager .pg-btn:hover:not([disabled]):not(.on) {
  border-color: var(--brand-ink); color: var(--brand-ink);
}
.nl-pager .pg-btn.on {
  background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; cursor: default;
}
.nl-pager .pg-btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.nl-pager .pg-ellipsis {
  min-width: 24px; color: var(--muted); font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
}
.nl-pager .pg-meta {
  margin-left: 8px; color: var(--muted); font-size: 12.5px;
}
@media (max-width: 720px) {
  .nl-pager .pg-btn { min-width: 32px; height: 32px; font-size: 12.5px; padding: 0 8px; }
  .nl-pager .pg-meta { display: none; }
}
