/* ============================================================
   InnovationBedAI LMS - Design System
   Subject: pan-African AI mentorship network linking students,
   facilitators and sponsors. Signature motif: a node/connection
   pattern standing in for those three linked roles - used once,
   deliberately, rather than scattered everywhere.
   ============================================================ */

:root {
  /* Color */
  --ink:        #10162B;   /* deep night navy - dark surfaces */
  --indigo:     #1B2350;   /* secondary dark surface / sidebar */
  --indigo-700: #263067;
  --gold:       #E8A33D;   /* savanna sunset - primary accent */
  --gold-600:   #CC8A28;
  --teal:       #2E9E8E;   /* growth / tech - secondary accent */
  --teal-600:   #248073;
  --sand:       #F6F1E7;   /* warm neutral background */
  --sand-100:   #FBF8F2;
  --slate:      #2B2E38;   /* body text */
  --slate-500:  #6B7080;
  --line:       #E4DECF;
  --danger:     #C2453D;
  --success:    #2E9E8E;

  /* Type */
  --font-display: 'Sora', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', Consolas, monospace;

  /* Layout */
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-card: 0 1px 2px rgba(16, 22, 43, 0.06), 0 1px 1px rgba(16, 22, 43, 0.04);
  --sidebar-w: 260px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--sand);
  color: var(--slate);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
}
h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 .5rem;
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
a { color: var(--teal-600); text-decoration: none; }
a:hover { color: var(--gold-600); }
code, .mono { font-family: var(--font-mono); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Public site chrome ---------- */
.public-nav {
  background: var(--ink);
  color: #fff;
  padding: 0.9rem 0;
  position: sticky; top: 0; z-index: 50;
}
.public-nav .container { display: flex; align-items: center; justify-content: space-between; }
.public-nav .brand { font-family: var(--font-display); font-weight: 700; color: #fff; font-size: 1.15rem; display: flex; align-items: center; gap: .5rem; }
.public-nav .brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); display: inline-block; }
.public-nav nav a { color: #D9DBEA; margin-left: 1.4rem; font-size: .92rem; }
.public-nav nav a:hover { color: var(--gold); }
.public-nav .cta { background: var(--gold); color: var(--ink); padding: .5rem 1.1rem; border-radius: 999px; font-weight: 600; }
.public-nav .cta:hover { background: #fff; color: var(--ink); }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 1.25rem; }

/* Hero with node-network signature (SVG defined once in Site.Master, reused via .hero-motif) */
.hero {
  background: radial-gradient(1100px 480px at 15% -10%, #232C57 0%, var(--ink) 55%, var(--ink) 100%);
  color: #fff;
  padding: 5.5rem 0 4.5rem;
  position: relative;
  overflow: hidden;
}
.hero h1 { color: #fff; font-size: 2.9rem; max-width: 640px; }
.hero p.lead { color: #C7CBE0; max-width: 560px; font-size: 1.08rem; }
.hero .hero-motif { position: absolute; right: -60px; top: -40px; opacity: .55; pointer-events: none; }
.hero .btn-row { margin-top: 1.6rem; display: flex; gap: .8rem; flex-wrap: wrap; }

.section { padding: 3.5rem 0; }
.section-alt { background: var(--sand-100); }
.eyebrow {
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .12em;
  font-size: .72rem; color: var(--teal-600); font-weight: 600;
}

.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem; box-shadow: var(--shadow-card);
}
.card h3 { margin-top: .25rem; }

.country-chip {
  display: inline-flex; align-items: center; gap: .5rem;
  border: 1px solid var(--line); border-radius: 999px; padding: .4rem .9rem;
  background: #fff; font-size: .85rem; color: var(--slate);
}

footer.site-footer { background: var(--ink); color: #B7BBD4; padding: 2.5rem 0; font-size: .88rem; }
footer.site-footer a { color: #D9DBEA; }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-block; font-weight: 600; font-size: .92rem;
  padding: .65rem 1.3rem; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; transition: transform .08s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { background: var(--gold-600); color: var(--ink); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,.35); color: #fff; }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-600); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-sm { padding: .4rem .85rem; font-size: .8rem; }

.form-control {
  width: 100%; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: .92rem; background: #fff; color: var(--slate);
}
.form-control:focus { border-color: var(--teal); }
.form-control[readonly] { background: #F1EEE5; color: var(--slate-500); }
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: .82rem; font-weight: 600; color: var(--slate-500); margin-bottom: .3rem; }

.auth-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--ink); position: relative; overflow: hidden; padding: 2rem 1rem;
}
.auth-card {
  background: #fff; border-radius: 14px; padding: 2.4rem; width: 100%; max-width: 440px;
  position: relative; z-index: 2; box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.auth-card .eyebrow { margin-bottom: .4rem; display: block; }

.alert { padding: .8rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: .9rem; }
.alert-success { background: #E3F4F1; color: #1C6E62; border: 1px solid #BEE6DE; }
.alert-danger  { background: #FBE9E7; color: #9C2F28; border: 1px solid #F3C5C0; }

/* ---------- Dashboard chrome ---------- */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
  width: var(--sidebar-w); background: var(--indigo); color: #D9DBEA; flex-shrink: 0;
  padding: 1.4rem 1rem; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.app-sidebar .brand { color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; padding: 0 .6rem 1.2rem; display: flex; gap:.5rem; align-items:center; }
.app-sidebar .brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.app-sidebar .role-badge {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(232,163,61,.16); color: var(--gold); padding: .2rem .55rem; border-radius: 999px; margin-left: .5rem;
}
.app-sidebar nav a {
  display: flex; align-items: center; gap: .65rem; color: #C6CAE2; padding: .6rem .7rem; border-radius: var(--radius-sm);
  font-size: .89rem; margin-bottom: .15rem;
}
.app-sidebar nav a:hover { background: var(--indigo-700); color: #fff; }
.app-sidebar nav a.active { background: var(--gold); color: var(--ink); font-weight: 600; }
.app-sidebar .nav-section { font-family: var(--font-mono); font-size: .65rem; text-transform: uppercase; letter-spacing: .1em; color: #7C81A0; margin: 1.1rem .7rem .35rem; }

.app-main { flex: 1; min-width: 0; }
.app-topbar {
  background: #fff; border-bottom: 1px solid var(--line); padding: .9rem 1.6rem;
  display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 10;
}
.app-topbar .greeting { font-family: var(--font-display); font-weight: 600; color: var(--ink); }
.app-content { padding: 1.6rem; max-width: 1180px; }

.stat-tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.stat-tile .num { font-family: var(--font-display); font-size: 1.9rem; color: var(--ink); font-weight: 700; }
.stat-tile .label { color: var(--slate-500); font-size: .82rem; }

table.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; }
table.data-table th {
  text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--slate-500);
  border-bottom: 1px solid var(--line); padding: .7rem .9rem; background: var(--sand-100);
}
table.data-table td { padding: .8rem .9rem; border-bottom: 1px solid var(--line); font-size: .89rem; }
table.data-table tr:last-child td { border-bottom: none; }

.badge { font-size: .72rem; font-weight: 600; padding: .2rem .55rem; border-radius: 999px; }
.badge-success { background: #E3F4F1; color: #1C6E62; }
.badge-warning { background: #FCF0DD; color: #9A6B15; }
.badge-danger  { background: #FBE9E7; color: #9C2F28; }

.empty-state { text-align: center; padding: 2.6rem 1rem; color: var(--slate-500); }
.empty-state .icon { font-size: 2rem; margin-bottom: .5rem; }

@media (max-width: 880px) {
  .app-sidebar { position: fixed; left: -280px; z-index: 100; transition: left .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .app-sidebar.open { left: 0; }
  .app-content { padding: 1rem; }
}
