/* ===== auth pages shared ===== */
[hidden] { display: none !important; }

.auth-page {
  min-height: calc(100vh - 73px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  position: relative;
  z-index: 1;
}
.auth-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 60px rgba(11, 18, 32, .08);
}
.auth-card .eyebrow { margin-bottom: 8px; }
.auth-card h1 { font-size: 24px; }
.auth-card > p { font-size: 14.5px; margin-bottom: 0; }
.auth-form { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
.auth-form label { font-size: 13px; font-weight: 600; color: var(--ink-soft); display: flex; flex-direction: column; gap: 6px; }
.auth-form input {
  font-family: var(--font-body);
  font-size: 15px;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--ink);
}
.auth-form input:focus { outline: none; border-color: var(--primary); }
.auth-submit { justify-content: center; margin-top: 4px; }
.auth-error { font-size: 13.5px; color: #DC2626; font-weight: 600; min-height: 18px; margin: 0; }
.auth-hint { font-size: 13px; color: var(--ink-soft); margin: 20px 0 0; text-align: center; }
.auth-hint a { color: var(--primary); font-weight: 600; }

.auth-loading {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 15px;
  position: relative;
  z-index: 1;
}

/* ===== simple sub-header for gated pages ===== */
.page-header {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  position: relative;
  z-index: 1;
}
.page-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.page-header-user { display: flex; align-items: center; gap: 14px; }
.page-header-user span { font-size: 14px; color: var(--ink-soft); }

/* ===== admin dashboard ===== */
.dash { padding: 40px 0 80px; position: relative; z-index: 1; }
.dash-title { font-size: clamp(24px, 3vw, 32px); margin-bottom: 4px; }
.dash-subtitle { font-size: 14.5px; margin-bottom: 0; }
.dash-section {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-top: 28px;
}
.dash-section h2 { font-size: 19px; margin-bottom: 6px; }
.dash-section .section-hint { font-size: 13.5px; margin-bottom: 0; }

.student-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-top: 18px; }
.student-form .field { display: flex; flex-direction: column; gap: 6px; }
.student-form label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.student-form input, .student-form select {
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  min-width: 180px;
}
.student-form input:focus, .student-form select:focus { outline: none; border-color: var(--primary); }
.student-form .btn { height: 42px; }

.form-status { font-size: 13.5px; margin: 12px 0 0; min-height: 18px; }
.form-status.success { color: var(--primary); font-weight: 600; }
.form-status.error { color: #DC2626; font-weight: 600; }

.student-table-wrap { overflow-x: auto; margin-top: 20px; }
.student-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 480px; }
.student-table th, .student-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.student-table th { color: var(--ink-soft); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.student-empty { font-size: 14px; color: var(--ink-soft); margin-top: 18px; }

.btn-danger { background: transparent; border: 1px solid #DC2626; color: #DC2626; padding: 6px 16px; font-size: 13px; }
.btn-danger:hover { background: #DC2626; color: #fff; }

.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pw-input {
  font-family: var(--font-body);
  font-size: 13px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  min-width: 140px;
}
.pw-input:focus { outline: none; border-color: var(--primary); }
.student-table code {
  font-size: 12.5px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--ink-soft);
}

/* ===== course page ===== */
.course-hero { padding: 40px 0 8px; position: relative; z-index: 1; }
.course-hero h1 { font-size: clamp(26px, 3.4vw, 38px); }
.course-hero p { max-width: 640px; }

.accordion { padding: 24px 0 80px; position: relative; z-index: 1; }
.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
  background: var(--bg-soft);
}
.accordion-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-head);
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink);
}
.header-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.module-icon { width: 52px; height: 52px; border-radius: 13px; flex-shrink: 0; }
.accordion-header .num { color: var(--primary); margin-right: 8px; }
.accordion-header .chevron { flex-shrink: 0; color: var(--ink-soft); transition: transform .2s ease; }
.accordion-item.open .chevron { transform: rotate(180deg); }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.accordion-item.open .accordion-body { max-height: 2400px; }
.accordion-body-inner { padding: 0 24px 24px; }
.accordion-body-inner .intro { font-weight: 600; color: var(--ink); margin-bottom: 14px; font-size: 14.5px; }
.accordion-body-inner ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; color: var(--ink-soft); font-size: 14.5px; }
.accordion-body-inner .group-label { color: var(--ink); font-weight: 600; }
.accordion-body-inner .sub-list { margin-top: 8px; padding-left: 18px; }

/* ===== trial lesson: steps & terminal ===== */
.note-box {
  background: var(--teal-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  color: var(--ink);
  font-size: 14.5px;
}
.note-box strong { color: var(--primary-dark); }

.step {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  background: var(--bg);
}
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.step-num {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.step-title { font-weight: 700; color: var(--ink); font-size: 15px; }
.step-visual { margin: 8px 0 12px; }
.step-text { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 8px; }
.step-conclusion { color: var(--ink); font-size: 14.5px; margin: 0; }
.step kbd {
  font-family: var(--font-body);
  font-size: 12.5px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 2px 7px;
  background: var(--bg-soft);
  color: var(--ink);
}
.step code {
  font-size: 13px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  color: var(--primary-dark);
}

.step-icon-svg { display: block; }
.kbd-key { fill: var(--bg-soft); stroke: var(--primary); stroke-width: 2.5; }
.kbd-key-alt { stroke: var(--accent); }
.kbd-label { fill: var(--ink); font-family: var(--font-body); font-weight: 700; }
.kbd-plus { fill: var(--ink-soft); font-family: var(--font-body); font-weight: 700; }
.search-box { fill: var(--bg-soft); stroke: var(--border); stroke-width: 1.5; }
.search-icon { stroke: var(--ink-soft); }
.term-window { fill: var(--bg-soft); stroke: var(--border); stroke-width: 1.5; }
.term-bar { stroke: var(--border); stroke-width: 1.5; }
.term-dot-a { fill: var(--amber); }
.term-dot-b { fill: var(--accent); }
.term-dot-c { fill: var(--primary); }
.term-prompt { fill: var(--primary); font-weight: 700; font-family: 'SFMono-Regular', Consolas, monospace; }

.cmd-block {
  background: #0B1220;
  border-radius: 10px;
  padding: 14px 16px;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 13px;
  overflow-x: auto;
}
.cmd-line { color: #7DE0C8; margin-bottom: 6px; }
.cmd-line .cmd-prompt { color: #6B7A85; margin-right: 6px; }
.cmd-output { color: #C9D6D6; white-space: pre-wrap; line-height: 1.5; }

@media (max-width: 640px) {
  .auth-card { padding: 28px 22px; }
  .student-form { flex-direction: column; align-items: stretch; }
  .student-form input { min-width: 0; }
}
