/* apps/student/static/student/student.css */
@import url('https://fonts.googleapis.com/css2?family=Architects+Daughter&family=Montserrat:wght@400;600;700&display=swap');

:root {
  --teal: #2a7e94;
  --teal-dark: #1f6070;
  --teal-pale: #e8f4f7;
  --teal-mid: #aacbd4;
  --surface: #f7f8f8;
  --surface-2: #ffffff;
  --border: #dde3e6;
  --text: #1a2224;
  --text-muted: #6c7c80;
  --success: #198754;
  --success-pale: #e8f5ee;
  --warning: #b45309;
  --warning-pale: #fef3c7;
  --danger: #dc3545;
  --radius: 5px;
  --font-ui: 'Architects Daughter', cursive;
  --font-body: 'Montserrat', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--surface);
  line-height: 1.5;
}

/* ── Header ──────────────────────────────────────────────── */
.s-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.s-header-brand {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--teal);
  letter-spacing: 0.01em;
}
.s-header-user { font-size: 0.8rem; color: var(--text-muted); }

/* ── Main ────────────────────────────────────────────────── */
.s-main { max-width: 600px; margin: 0 auto; padding: 24px 16px; }

/* ── Login ───────────────────────────────────────────────── */
.s-login-wrap { max-width: 360px; margin: 48px auto; }
.s-login-title {
  font-family: var(--font-ui);
  font-size: 1.5rem;
  margin-bottom: 24px;
  color: var(--teal);
}

/* ── Form ────────────────────────────────────────────────── */
.s-form { display: flex; flex-direction: column; gap: 8px; }
.s-label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.s-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--font-body);
  width: 100%;
  background: var(--surface-2);
  color: var(--text);
  transition: border-color 150ms ease;
}
.s-input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(42,126,148,0.15); }
.s-form-error {
  background: #fde8e8;
  border: 1px solid #f5c6c6;
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--danger);
}

/* ── Buttons ─────────────────────────────────────────────── */
.s-btn-primary {
  background: var(--teal);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 8px 20px;
  font-size: 0.9rem;
  font-family: var(--font-ui);
  cursor: pointer;
  margin-top: 8px;
  transition: background 150ms ease;
}
.s-btn-primary:hover { background: var(--teal-dark); }

.s-btn-secondary {
  background: var(--surface-2);
  color: var(--teal);
  border: 1px solid var(--teal-mid);
  border-radius: 16px;
  padding: 6px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  text-decoration: none;
  transition: all 150ms ease;
  display: inline-block;
}
.s-btn-secondary:hover { background: var(--teal-pale); border-color: var(--teal); }

/* ── Back link ───────────────────────────────────────────── */
.s-back {
  color: var(--teal);
  font-size: 0.8rem;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 16px;
  font-family: var(--font-body);
  transition: opacity 150ms ease;
}
.s-back:hover { opacity: 0.75; text-decoration: none; }

/* ── Resume card ─────────────────────────────────────────── */
.s-resume-card {
  background: var(--teal);
  color: white;
  border-radius: var(--radius);
  padding: 16px 20px;
  cursor: pointer;
  margin-bottom: 24px;
  text-decoration: none;
  display: block;
  transition: background 150ms ease;
}
.s-resume-card:hover { background: var(--teal-dark); }
.s-resume-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.s-resume-title { font-family: var(--font-ui); font-size: 1.05rem; font-weight: 400; }
.s-resume-progress { background: rgba(255,255,255,0.28); height: 4px; border-radius: 2px; margin-top: 12px; }
.s-resume-progress-bar { background: white; height: 4px; border-radius: 2px; transition: width 400ms ease-out; }
.s-resume-meta { font-size: 0.75rem; opacity: 0.8; margin-top: 4px; }

/* ── Section label ───────────────────────────────────────── */
.s-section-label {
  font-family: var(--font-body);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* ── Unit cards ──────────────────────────────────────────── */
.s-unit-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 8px;
  text-decoration: none;
  display: block;
  color: inherit;
  background: var(--surface-2);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.s-unit-card.active { border-color: var(--teal-mid); }
.s-unit-card.active:hover { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(42,126,148,0.1); }
.s-unit-card.locked { opacity: 0.45; pointer-events: none; }
.s-unit-card-row { display: flex; justify-content: space-between; align-items: center; }
.s-unit-title { font-family: var(--font-ui); font-weight: 400; font-size: 0.95rem; }
.s-unit-pct { font-size: 0.75rem; color: var(--teal); font-weight: 600; }
.s-progress-bar-track { background: var(--border); height: 4px; border-radius: 2px; margin-top: 8px; }
.s-progress-bar-fill { background: var(--teal); height: 4px; border-radius: 2px; transition: width 400ms ease-out; }

/* ── Skill rows ──────────────────────────────────────────── */
.s-skill-row {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  background: var(--surface-2);
}
.s-skill-row.mastered { border-color: #a3cfbb; background: var(--success-pale); }
.s-skill-row.in-progress { border-color: #ffe082; background: var(--warning-pale); }

.s-skill-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.s-skill-dot.mastered { background: var(--success); color: white; }
.s-skill-dot.in-progress { background: #f59e0b; color: white; }
.s-skill-dot.not-started { background: var(--border); color: var(--text-muted); }

.s-skill-info { min-width: 150px; flex: 1; }
.s-skill-name { font-family: var(--font-ui); font-weight: 400; font-size: 0.95rem; margin-bottom: 2px; }
.s-skill-level { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.s-skill-level.mastered { color: var(--success); }
.s-skill-level.in-progress { color: var(--warning); }
.s-skill-level.not-started { color: var(--text-muted); }

.s-skill-actions { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; margin-top: 8px; border-top: 1px solid var(--border); padding-top: 12px; }
@media (min-width: 500px) {
  .s-skill-actions { width: auto; margin-top: 0; border-top: none; padding-top: 0; justify-content: flex-end; }
}

/* ── Player ──────────────────────────────────────────────── */
.s-player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.s-player-pos { font-size: 0.75rem; color: var(--text-muted); font-family: var(--font-body); }

.s-player-instruction {
  background: var(--teal-pale);
  border: 1px solid var(--teal-mid);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 0.85rem;
  margin-bottom: 8px;
  color: #1a4a56;
}

.s-player-dots { display: flex; gap: 4px; justify-content: center; padding: 8px 0; }
.s-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.s-dot.done { background: var(--success); }
.s-dot.current { background: var(--teal); }

@media (max-width: 600px) {
  .s-main { padding: 16px 12px; }
}
