/*
  DESIGN PLAN (per frontend-design skill process)
  ================================================
  Subject: an online tutoring marketplace — verified teachers, parents,
  students, admin oversight, Nigerian market (Paystack, naira). Audience mixes
  professionals (teachers running a small business) and families (parents
  supervising a child's learning) — needs to read as credible and calm, not
  cold enterprise SaaS, not childish or playful.

  Color (4-6 named hex values):
    --ink    #1B2430  deep blue-charcoal — primary text, primary buttons, headings
    --paper  #F7F8FA  cool near-white background (deliberately NOT warm cream,
                       to avoid the cream+serif+terracotta AI-generated default)
    --amber  #C68A2E  single accent — achievement/highlight (a report-card gold
                       star, not a terracotta/clay tone) — used sparingly:
                       primary CTAs, active-state emphasis, star ratings
    --teal   #2F6F62  muted forest-teal — success/active/verified states,
                       intentionally desaturated rather than neon-green
    --slate  #5B6472  secondary text, borders, quiet UI chrome
    --coral  #B3432B  errors/alerts — a muted brick tone, not stock bright red

  Type: Zilla Slab (headings, 600/700) for a sturdy "report card / textbook"
  personality with some character — paired with IBM Plex Sans (body/UI,
  400/500/600), a humanist sans with a slightly technical edge that suits a
  software product. Two families, clearly distinct roles, no display/body
  ambiguity.

  Layout: left-aligned content throughout, no center-justified hero copy.
  Dashboards are the one place cards are used — justified structurally, since
  a dashboard genuinely IS a collection of discrete stat blocks, not cards
  applied as decoration. To avoid the generic "identical rounded card + soft
  grey shadow" kit, cards use a flat 1px border plus a 3px top accent border
  whose color encodes status (teal = active/good, amber = pending/attention,
  coral = alert) rather than every card looking the same regardless of
  meaning. Border-radius stays modest (4px) — structured/institutional, not
  the ubiquitous 12–16px "app" rounding.

  Principles:
    1. Report-card clarity — status is conveyed by color-coded badges/borders,
       not icons or emoji.
    2. One accent, spent sparingly — amber only for primary actions and
       highlights; everything else stays ink/slate/paper.
    3. No card-kit sameness — differentiate by semantic color, not decoration.
    4. Calm by default — flat surfaces, no gradients, no drop shadows.
*/

@import url('https://fonts.googleapis.com/css2?family=Zilla+Slab:wght@500;600;700&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
  --ink: #1B2430;
  --ink-soft: #333E4C;
  --paper: #F7F8FA;
  --surface: #FFFFFF;
  --amber: #C68A2E;
  --amber-soft: #F3E4C8;
  --teal: #2F6F62;
  --teal-soft: #E1EEEA;
  --slate: #5B6472;
  --slate-soft: #E4E7EB;
  --coral: #B3432B;
  --coral-soft: #F5E1DB;

  --font-display: 'Zilla Slab', Georgia, serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;

  --radius: 4px;
  --max-width: 72rem;
  --content-width: 42rem;
}

/* --- Reset & base --- */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 var(--space-3);
  color: var(--ink);
}
h1 { font-size: 1.9rem; font-weight: 700; }
h2 { font-size: 1.35rem; margin-top: var(--space-5); }
h3 { font-size: 1.1rem; }

p { margin: 0 0 var(--space-3); max-width: 68ch; }

a {
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
a:hover, a:focus { border-bottom-color: currentColor; }

/* Visible keyboard focus everywhere — accessibility floor (§39) */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--surface);
  padding: var(--space-2) var(--space-3);
  z-index: 100;
}
.skip-link:focus { left: var(--space-2); top: var(--space-2); }

ul, ol { padding-left: 1.25rem; }
li { margin-bottom: var(--space-2); }

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-4);
}
th, td {
  text-align: left;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--slate-soft);
}
th { font-family: var(--font-display); font-weight: 600; }

/* --- Layout shell --- */
.site-header {
  background: var(--ink);
  color: var(--paper);
  padding: var(--space-3) var(--space-4);
}
.site-header a { color: var(--paper); }
.site-header .brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--surface);
  border: none;
}

.app-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  max-width: var(--max-width);
  margin: 0 auto;
}
.app-nav .nav-user {
  font-weight: 600;
  margin-right: auto;
}
.app-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  list-style: none;
  padding: 0;
  margin: 0;
}
.app-nav a { color: var(--paper); opacity: 0.9; }
.app-nav a:hover { opacity: 1; }
.app-nav form { margin: 0; }
.app-nav button {
  background: transparent;
  border: 1px solid rgba(247,248,250,0.4);
  color: var(--paper);
  padding: var(--space-1) var(--space-2);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-5) var(--space-4);
}

.messages {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-4);
}
.messages li {
  background: var(--teal-soft);
  border-left: 3px solid var(--teal);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-2);
}

/* --- Buttons & forms --- */
button, .btn, input[type="submit"] {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--ink);
  color: var(--surface);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  display: inline-block;
}
a.btn, a.btn-primary { border-bottom: none; }
button:hover, .btn:hover { background: var(--ink-soft); }
button.btn-primary, .btn-primary { background: var(--amber); border-color: var(--amber); color: var(--ink); }
button.btn-primary:hover, .btn-primary:hover { background: #B37D28; }
button.btn-danger { background: var(--coral); border-color: var(--coral); }

form p { margin-bottom: var(--space-3); }
label { display: block; font-weight: 600; margin-bottom: var(--space-1); }

input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
select, textarea {
  width: 100%;
  max-width: 32rem;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: var(--space-2);
  border: 1px solid var(--slate-soft);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}
textarea { min-height: 6rem; }
input[type="checkbox"], input[type="radio"] { margin-right: var(--space-2); }

/* Django's default helptext/error markup */
.helptext { display: block; color: var(--slate); font-size: 0.85rem; margin-top: var(--space-1); }
ul.errorlist { list-style: none; padding: 0; margin: 0 0 var(--space-2); color: var(--coral); font-weight: 600; }

/* --- Cards (dashboards & structured content only — see design note above) --- */
.card {
  background: var(--surface);
  border: 1px solid var(--slate-soft);
  border-top: 3px solid var(--slate);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}
.card.status-active, .card.status-verified { border-top-color: var(--teal); }
.card.status-pending { border-top-color: var(--amber); }
.card.status-alert { border-top-color: var(--coral); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--space-4);
}
.mt-4 { margin-top: var(--space-4); }

/* --- Badges --- */
.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--slate-soft);
  color: var(--ink-soft);
}
.badge-verified, .badge-active, .badge-success { background: var(--teal-soft); color: var(--teal); }
.badge-pending { background: var(--amber-soft); color: var(--amber); }
.badge-alert { background: var(--coral-soft); color: var(--coral); }

/* --- Empty states (§56) --- */
.empty-state {
  border: 1px dashed var(--slate-soft);
  border-radius: var(--radius);
  padding: var(--space-5);
  text-align: left;
  color: var(--slate);
}
.empty-state strong { color: var(--ink); display: block; margin-bottom: var(--space-1); }

/* --- Responsive --- */
@media (max-width: 40rem) {
  main { padding: var(--space-4) var(--space-3); }
  h1 { font-size: 1.5rem; }
  .card-grid { grid-template-columns: 1fr; }
}

/* Respect reduced-motion preference — nothing here animates by default, this
   is a guard for any future addition */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
