/* ============================================================
   TeacherBox — shared theme
   Every page links this file. Change a value here and it
   updates across the whole site.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Colours */
  --navy:         #1b2340;   /* page background */
  --panel:        #242e54;   /* cards, raised surfaces */
  --panel-hover:  #1f2a4c;   /* card hover state */
  --btn-blue:     #141a35;   /* primary button */
  --btn-blue-hover: #1b2242;
  --offwhite:     #f3f5fa;   /* body text */
  --mint:         #4fd1c5;   /* accent / highlight */
  --coral:        #ff8b6b;   /* secondary accent */
  --danger:       #ff6b6b;   /* errors, elimination */

  /* Text on tinted backgrounds */
  --text-muted:   rgba(243,245,250,0.60);
  --text-faint:   rgba(243,245,250,0.35);
  --hairline:     rgba(243,245,250,0.08);
  --hairline-soft:rgba(243,245,250,0.18);

  /* Shape */
  --radius-card:  14px;
  --radius-btn:   10px;
  --radius-input: 8px;

  /* Type */
  --font: 'Inter', system-ui, sans-serif;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100vh;
  background: var(--navy);
  color: var(--offwhite);
  font-family: var(--font);
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

/* ---------- Typography ---------- */
.wordmark {
  font-weight: 800;
  font-size: clamp(3rem, 9vw, 5.5rem);
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1;
}

.page-title {
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

.section-title {
  text-align: center;
  font-weight: 700;
  font-size: 1.35rem;
  margin: 0 0 28px;
}

.subtitle {
  font-style: italic;
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--text-muted);
  margin: 0;
}

.note {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 32px;
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius-btn);
  padding: 11px 22px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
  transition: background-color 0.15s;
}

.btn-primary {
  background: var(--btn-blue);
  color: var(--offwhite);
}
.btn-primary:hover { background: var(--btn-blue-hover); }

.btn-accent {
  background: var(--mint);
  color: var(--navy);
  font-weight: 700;
}
.btn-accent:hover { filter: brightness(1.06); }

.btn-ghost {
  background: none;
  border: 1.5px dashed var(--hairline-soft);
  color: var(--offwhite);
}
.btn-ghost:hover { border-color: var(--mint); }

.btn-danger {
  background: rgba(255,107,107,0.15);
  color: var(--danger);
}
.btn-danger:hover { background: rgba(255,107,107,0.25); }

.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-block { width: 100%; text-align: center; }

/* ---------- Surfaces ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 28px 32px;
}

.card-interactive {
  transition: background-color 0.15s, border-color 0.15s;
}
.card-interactive:hover {
  background: var(--panel-hover);
  border-color: var(--mint);
}

/* Circular icon badge */
.icon-badge {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(79,209,197,0.14);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Form fields ---------- */
.field { margin-bottom: 18px; }

.field label,
.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

input[type=text],
input[type=number],
select {
  width: 100%;
  background: rgba(243,245,250,0.06);
  border: 1.5px solid var(--hairline-soft);
  border-radius: var(--radius-input);
  color: var(--offwhite);
  font-family: var(--font);
  font-size: 1rem;
  padding: 11px 14px;
}

input[type=text]:focus,
input[type=number]:focus,
select:focus {
  outline: none;
  border-color: var(--mint);
}

/* The dropdown popup doesn't inherit the page background, only the text
   color — without this, options render pale text on the browser's
   default white, unreadable until hovered. */
select option {
  background: var(--panel);
  color: var(--offwhite);
}

input::placeholder { color: var(--text-faint); }

/* ---------- Chips / pills ---------- */
.chip {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(243,245,250,0.08);
  color: var(--text-muted);
}
.chip-active { background: var(--mint); color: var(--navy); }
.chip-out { text-decoration: line-through; opacity: 0.35; }

/* ---------- Decorative ---------- */
.rule {
  width: 64px;
  height: 4px;
  background: var(--mint);
  border-radius: 2px;
  margin: 24px auto 20px;
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-faint);
  padding: 0 0 40px;
}

.footer-divider {
  width: 48px;
  height: 1px;
  background: rgba(243,245,250,0.15);
  margin: 0 auto 18px;
}

/* ---------- Utility ---------- */
.hidden { display: none; }

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