/* SPLM Online School — shared styles (ALX ehub inspired) */
:root {
  --splm-black: #121212;
  --splm-red: #d21f26;
  --splm-green: #078930;
  --splm-green-dark: #056724;
  --splm-blue: #0f47af;
  --splm-gold: #fcd116;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --ink: #1b1f23;
  --muted: #5f6b76;
  --line: #e3e8ee;
  --sidebar-bg: #0d1117;
  --sidebar-ink: #c9d4de;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 4px 16px rgba(16, 24, 40, .06);
  font-size: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

img { max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------- Flag stripe accent ---------- */
.flag-stripe {
  height: 6px;
  background: linear-gradient(90deg,
    var(--splm-black) 0 30%, #fff 30% 32%,
    var(--splm-red) 32% 64%, #fff 64% 66%,
    var(--splm-green) 66% 100%);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.4rem; border-radius: 999px;
  font-weight: 600; font-size: .95rem; border: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary { background: var(--splm-green); color: #fff; }
.btn-primary:hover { background: var(--splm-green-dark); }
.btn-outline { background: transparent; color: var(--splm-green); border: 2px solid var(--splm-green); }
.btn-dark { background: var(--splm-black); color: #fff; }
.btn-gold { background: var(--splm-gold); color: var(--splm-black); }
.btn-sm { padding: .45rem 1rem; font-size: .85rem; }

/* ---------- Badges / chips ---------- */
.chip {
  display: inline-block; padding: .2rem .7rem; border-radius: 999px;
  font-size: .75rem; font-weight: 600; letter-spacing: .02em;
}
.chip-green { background: #e2f5e8; color: var(--splm-green-dark); }
.chip-red { background: #fdeaea; color: var(--splm-red); }
.chip-blue { background: #e8eefb; color: var(--splm-blue); }
.chip-gold { background: #fef7d9; color: #8a6d00; }

/* ---------- Landing page ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.site-header .inner {
  max-width: 1180px; margin: 0 auto; padding: .8rem 1.5rem;
  display: flex; align-items: center; gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: .7rem; font-weight: 800; font-size: 1.05rem; }
.brand img { height: 34px; border-radius: 4px; box-shadow: 0 0 0 1px var(--line); }
.brand .sub { display: block; font-size: .68rem; font-weight: 600; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 1.4rem; font-size: .93rem; font-weight: 500; color: var(--muted); }
.site-nav a:hover { color: var(--splm-green); }

.hero {
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(7, 137, 48, .25), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(210, 31, 38, .18), transparent 60%),
    var(--splm-black);
  color: #fff;
}
.hero .inner {
  max-width: 1180px; margin: 0 auto; padding: 5rem 1.5rem 4.5rem;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; align-items: center;
}
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.12; letter-spacing: -.02em; }
.hero h1 .accent { color: var(--splm-gold); }
.hero p.lead { margin-top: 1.1rem; font-size: 1.1rem; color: #b9c4cf; max-width: 34rem; }
.hero .cta-row { margin-top: 2rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.hero .motto { margin-top: 2.2rem; display: flex; gap: 1.6rem; font-weight: 700; letter-spacing: .12em; font-size: .8rem; text-transform: uppercase; }
.hero .motto span::before { content: "★ "; color: var(--splm-gold); }
.hero-flag { text-align: center; }
.hero-flag img {
  width: min(380px, 100%); border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  transform: rotate(-2deg);
}

.stats-bar { background: var(--surface); border-bottom: 1px solid var(--line); }
.stats-bar .inner {
  max-width: 1180px; margin: 0 auto; padding: 1.4rem 1.5rem;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; text-align: center;
}
.stat b { display: block; font-size: 1.6rem; color: var(--splm-green); }
.stat span { font-size: .85rem; color: var(--muted); }

.section { max-width: 1180px; margin: 0 auto; padding: 4rem 1.5rem; }
.section > h2 { font-size: 1.9rem; letter-spacing: -.01em; }
.section > .section-sub { color: var(--muted); margin-top: .4rem; max-width: 40rem; }

.card-grid { margin-top: 2rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }

.program-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.program-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.program-card .banner { height: 8px; }
.banner-green { background: var(--splm-green); }
.banner-red { background: var(--splm-red); }
.banner-blue { background: var(--splm-blue); }
.banner-black { background: var(--splm-black); }
.banner-gold { background: var(--splm-gold); }
.program-card .body { padding: 1.3rem 1.3rem 1.5rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.program-card h3 { font-size: 1.12rem; }
.program-card p { font-size: .9rem; color: var(--muted); flex: 1; }
.program-card .meta { display: flex; gap: .9rem; font-size: .8rem; color: var(--muted); }
.program-card .foot { margin-top: .6rem; display: flex; justify-content: space-between; align-items: center; }

.pillars { background: var(--splm-black); color: #fff; }
.pillars .inner { max-width: 1180px; margin: 0 auto; padding: 4rem 1.5rem; }
.pillars h2 { font-size: 1.9rem; }
.pillar-grid { margin-top: 2rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.pillar { border: 1px solid #2a3038; border-radius: var(--radius); padding: 1.6rem; }
.pillar .icon { font-size: 1.8rem; }
.pillar h3 { margin-top: .8rem; color: var(--splm-gold); }
.pillar p { margin-top: .5rem; color: #aab6c2; font-size: .92rem; }

.site-footer { background: var(--splm-black); color: #8b98a5; font-size: .88rem; }
.site-footer .inner {
  max-width: 1180px; margin: 0 auto; padding: 2.5rem 1.5rem;
  display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
}
.site-footer strong { color: #fff; }

/* ---------- App shell (dashboard / courses) ---------- */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }

.sidebar {
  background: var(--sidebar-bg); color: var(--sidebar-ink);
  padding: 1.3rem 1rem; display: flex; flex-direction: column; gap: 1.6rem;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { color: #fff; }
.sidebar .brand img { height: 30px; box-shadow: none; }
.sidebar nav { display: flex; flex-direction: column; gap: .25rem; }
.sidebar nav .group-label {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .1em;
  color: #5b6673; margin: 1rem .8rem .35rem;
}
.sidebar nav a {
  display: flex; align-items: center; gap: .75rem;
  padding: .62rem .8rem; border-radius: 10px; font-size: .92rem; font-weight: 500;
}
.sidebar nav a:hover { background: #1a2129; color: #fff; }
.sidebar nav a.active { background: var(--splm-green); color: #fff; font-weight: 600; }
.sidebar .foot { margin-top: auto; font-size: .75rem; color: #5b6673; padding: 0 .8rem; }

.main { padding: 0 2rem 3rem; }

.topbar {
  display: flex; align-items: center; gap: 1.2rem;
  padding: 1.1rem 0; border-bottom: 1px solid var(--line); margin-bottom: 1.8rem;
}
.topbar .search {
  flex: 1; max-width: 420px; display: flex; align-items: center; gap: .6rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: .55rem 1.1rem; color: var(--muted); font-size: .9rem;
}
.topbar .search input { border: none; outline: none; flex: 1; font-size: .9rem; background: transparent; }
.topbar .spacer { flex: 1; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--splm-green);
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem;
}

.welcome-banner {
  background: linear-gradient(120deg, var(--splm-black) 40%, #17321f 75%, var(--splm-green-dark));
  color: #fff; border-radius: var(--radius); padding: 1.8rem 2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.welcome-banner h1 { font-size: 1.5rem; }
.welcome-banner p { margin-top: .35rem; color: #b9c4cf; font-size: .93rem; max-width: 36rem; }
.welcome-banner .flag-mini { height: 64px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.4); }

.panel-title { display: flex; align-items: baseline; justify-content: space-between; margin: 2rem 0 1rem; }
.panel-title h2 { font-size: 1.2rem; }
.panel-title a { font-size: .85rem; font-weight: 600; color: var(--splm-green); }

.dash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.dash-grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 1.2rem; align-items: start; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.3rem;
}

.stat-tile { display: flex; align-items: center; gap: 1rem; }
.stat-tile .ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem;
}
.stat-tile b { font-size: 1.45rem; display: block; line-height: 1.2; }
.stat-tile span { font-size: .82rem; color: var(--muted); }
.ico-green { background: #e2f5e8; } .ico-red { background: #fdeaea; }
.ico-blue { background: #e8eefb; } .ico-gold { background: #fef7d9; }

.progress {
  height: 8px; background: #edf1f5; border-radius: 999px; overflow: hidden;
}
.progress > i { display: block; height: 100%; background: var(--splm-green); border-radius: 999px; }

.course-row { display: flex; align-items: center; gap: 1.1rem; padding: .95rem 0; border-bottom: 1px solid var(--line); }
.course-row:last-child { border-bottom: none; }
.course-row .thumb {
  width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.course-row .info { flex: 1; min-width: 0; }
.course-row .info h4 { font-size: .95rem; }
.course-row .info .progress { margin-top: .5rem; max-width: 300px; }
.course-row .pct { font-size: .85rem; font-weight: 700; color: var(--splm-green); width: 44px; text-align: right; }

.event-item { display: flex; gap: .9rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.event-item:last-child { border-bottom: none; }
.event-date {
  width: 52px; flex-shrink: 0; text-align: center; background: #f0f3f6;
  border-radius: 10px; padding: .45rem 0; line-height: 1.15;
}
.event-date b { display: block; font-size: 1.15rem; color: var(--splm-red); }
.event-date span { font-size: .68rem; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.event-item h5 { font-size: .9rem; }
.event-item p { font-size: .78rem; color: var(--muted); margin-top: .15rem; }

/* ---------- Course detail ---------- */
.course-hero {
  background: linear-gradient(120deg, var(--splm-black) 45%, #123a63 80%, var(--splm-blue));
  color: #fff; border-radius: var(--radius); padding: 2rem;
}
.course-hero h1 { font-size: 1.7rem; margin-top: .5rem; }
.course-hero p { color: #b9c4cf; margin-top: .5rem; max-width: 44rem; font-size: .95rem; }
.course-hero .meta-row { display: flex; gap: 1.6rem; margin-top: 1.2rem; font-size: .85rem; color: #d6dee6; flex-wrap: wrap; }

.module { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1rem; overflow: hidden; }
.module summary {
  list-style: none; cursor: pointer; padding: 1.1rem 1.3rem;
  display: flex; align-items: center; gap: 1rem; font-weight: 600;
}
.module summary::-webkit-details-marker { display: none; }
.module summary .num {
  width: 34px; height: 34px; border-radius: 50%; background: var(--splm-black); color: var(--splm-gold);
  display: grid; place-items: center; font-size: .85rem; flex-shrink: 0;
}
.module summary .count { margin-left: auto; font-size: .8rem; color: var(--muted); font-weight: 500; }
.module summary .caret { transition: transform .2s; color: var(--muted); }
.module[open] summary .caret { transform: rotate(90deg); }
.lesson {
  display: flex; align-items: center; gap: .9rem;
  padding: .8rem 1.3rem .8rem 3.6rem; border-top: 1px solid var(--line); font-size: .92rem;
}
.lesson:hover { background: #f8fafb; }
.lesson input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--splm-green); cursor: pointer; }
.lesson.done .lesson-title { color: var(--muted); text-decoration: line-through; }
.lesson .kind { margin-left: auto; font-size: .74rem; color: var(--muted); }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side {
  background:
    radial-gradient(800px 400px at 80% 0%, rgba(7,137,48,.3), transparent 60%),
    var(--splm-black);
  color: #fff; display: flex; flex-direction: column; justify-content: center; padding: 4rem;
}
.auth-side img.flag { width: 300px; border-radius: 10px; box-shadow: 0 16px 48px rgba(0,0,0,.5); margin-bottom: 2rem; }
.auth-side h2 { font-size: 1.8rem; line-height: 1.2; }
.auth-side p { color: #aab6c2; margin-top: .8rem; max-width: 28rem; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 3rem 1.5rem; }
.auth-card { width: min(420px, 100%); }
.auth-card h1 { font-size: 1.6rem; }
.auth-card .sub { color: var(--muted); margin: .4rem 0 1.6rem; font-size: .92rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; }
.field input, .field select {
  width: 100%; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: 10px;
  font-size: .95rem; outline: none; background: var(--surface);
}
.field input:focus, .field select:focus { border-color: var(--splm-green); box-shadow: 0 0 0 3px rgba(7,137,48,.15); }
.auth-card .btn { width: 100%; justify-content: center; margin-top: .4rem; }
.auth-card .alt { text-align: center; margin-top: 1.2rem; font-size: .88rem; color: var(--muted); }
.auth-card .alt a { color: var(--splm-green); font-weight: 600; }

/* ---------- Icons ---------- */
.nav-ico {
  width: 24px; height: 24px; object-fit: contain; flex-shrink: 0;
  background: #fff; border-radius: 6px; padding: 3px;
}
.brand img.logo { height: 36px; width: auto; box-shadow: none; border-radius: 0; }
.sidebar .brand .logo { background: #fff; border-radius: 8px; padding: 3px; }
.ico-img { width: 26px; height: 26px; object-fit: contain; }
.thumb-img { width: 34px; height: 34px; object-fit: contain; }

/* ---------- Demo credentials box ---------- */
.demo-creds {
  background: #e8eefb; border: 1px solid #c9d8f2; border-radius: 10px;
  padding: .85rem 1rem; font-size: .84rem; margin-bottom: 1.3rem; color: #23406e;
}
.demo-creds b { display: block; margin-bottom: .3rem; }
.demo-creds code {
  background: #fff; border: 1px solid #c9d8f2; border-radius: 5px;
  padding: .05rem .4rem; font-size: .8rem;
}
.form-error {
  display: none; background: #fdeaea; color: var(--splm-red);
  border: 1px solid #f5c2c4; border-radius: 10px;
  padding: .7rem 1rem; font-size: .86rem; margin-bottom: 1rem;
}

/* ---------- Admin ---------- */
.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.admin-table th {
  text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); padding: .5rem .6rem; border-bottom: 2px solid var(--line);
}
.admin-table td { padding: .65rem .6rem; border-bottom: 1px solid var(--line); }
.admin-table tr:last-child td { border-bottom: none; }
.del-btn {
  background: #fdeaea; color: var(--splm-red); border: none; cursor: pointer;
  width: 28px; height: 28px; border-radius: 8px; font-size: .85rem; flex-shrink: 0;
}
.del-btn:hover { background: var(--splm-red); color: #fff; }
.announce-item { display: flex; gap: .8rem; align-items: flex-start; padding: .7rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.announce-item:last-child { border-bottom: none; }
.field textarea {
  width: 100%; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: 10px;
  font-size: .95rem; outline: none; background: var(--surface); font-family: inherit; resize: vertical;
}
.field textarea:focus { border-color: var(--splm-green); box-shadow: 0 0 0 3px rgba(7,137,48,.15); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.file-drop {
  border: 2px dashed var(--line); border-radius: 10px; padding: 1.2rem;
  text-align: center; color: var(--muted); font-size: .88rem; cursor: pointer;
}
.file-drop:hover { border-color: var(--splm-green); color: var(--splm-green); }
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 100;
  background: var(--splm-green); color: #fff; padding: .8rem 1.4rem;
  border-radius: 10px; font-weight: 600; font-size: .9rem; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(10px); transition: all .25s ease; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ---------- YouTube video modal ---------- */
.yt-modal { position: fixed; inset: 0; z-index: 200; display: none; }
.yt-modal.open { display: block; }
.yt-modal-backdrop { position: absolute; inset: 0; background: rgba(10, 14, 18, .85); }
.yt-modal-box {
  position: relative; max-width: 900px; width: 92%; margin: 6vh auto 0;
  background: #000; border-radius: 14px; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.yt-modal-close {
  position: absolute; top: .6rem; right: .6rem; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: rgba(255, 255, 255, .15); color: #fff; font-size: 1rem; cursor: pointer;
}
.yt-modal-close:hover { background: rgba(255, 255, 255, .3); }
.yt-modal-frame { position: relative; padding-top: 56.25%; }
.yt-modal-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.play-yt, .edit-yt, .play-yt-card {
  background: none; border: none; cursor: pointer;
  font-size: .78rem; font-weight: 600; color: var(--splm-green); padding: 0 .15rem;
}
.play-yt:hover, .edit-yt:hover { text-decoration: underline; }
.edit-yt { color: var(--muted); font-size: .82rem; }

/* ---------- Leadership welcome message ---------- */
.leader-card {
  max-width: 1180px; margin: 0 auto; padding: 4rem 1.5rem;
  display: grid; grid-template-columns: 300px 1fr; gap: 2.8rem; align-items: center;
}
.leader-photo {
  width: 100%; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .25); border: 4px solid var(--surface); outline: 1px solid var(--line);
}
.leader-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; display: block; }
.leader-text .quote {
  font-size: 1.15rem; line-height: 1.6; color: var(--ink); margin-top: 1rem;
  font-style: italic; max-width: 42rem;
}
.leader-text .leader-name { margin-top: 1.4rem; font-weight: 800; font-size: 1.05rem; }
.leader-text .leader-title { font-size: .85rem; color: var(--muted); }

/* ---------- Filter chips (catalogue) ---------- */
.filter-row { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.4rem; }
.filter-chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  padding: .45rem 1rem; border-radius: 999px; font-size: .85rem; font-weight: 600; cursor: pointer;
}
.filter-chip:hover { border-color: var(--splm-green); color: var(--splm-green); }
.filter-chip.active { background: var(--splm-green); border-color: var(--splm-green); color: #fff; }
.empty-note { color: var(--muted); font-size: .9rem; padding: 2rem 0; text-align: center; }

/* ---------- Study groups ---------- */
.group-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem; display: flex; flex-direction: column; gap: .6rem;
}
.group-card h3 { font-size: 1.05rem; }
.group-card .state { font-size: .78rem; color: var(--splm-green); font-weight: 600; }
.group-card .meta-line { font-size: .84rem; color: var(--muted); display: flex; flex-direction: column; gap: .25rem; }
.group-card .foot { margin-top: .6rem; display: flex; align-items: center; justify-content: space-between; }
.group-card .members { font-size: .8rem; color: var(--muted); }
.btn-join { background: var(--splm-green); color: #fff; }
.btn-joined { background: #e2f5e8; color: var(--splm-green-dark); }

/* ---------- Events (full page) ---------- */
.event-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1.4rem; display: flex; align-items: center; gap: 1.2rem;
}
.event-card .event-date { width: 62px; padding: .6rem 0; }
.event-card .event-date b { font-size: 1.4rem; }
.event-card .info { flex: 1; }
.event-card .info h4 { font-size: 1rem; }
.event-card .info p { font-size: .85rem; color: var(--muted); margin-top: .25rem; }
.bell-btn {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: .45rem 1rem; font-size: .82rem; font-weight: 600; color: var(--muted); cursor: pointer; flex-shrink: 0;
}
.bell-btn.on { background: var(--splm-gold); border-color: var(--splm-gold); color: var(--splm-black); }

/* ---------- Certificates ---------- */
.cert-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem; display: flex; align-items: center; gap: 1.1rem;
}
.cert-card .cert-ico {
  width: 50px; height: 50px; border-radius: 12px; background: #fef7d9;
  display: grid; place-items: center; font-size: 1.4rem; flex-shrink: 0;
}
.cert-card .info { flex: 1; }
.cert-card .info h4 { font-size: .98rem; }
.cert-card .info p { font-size: .8rem; color: var(--muted); margin-top: .2rem; }

.cert-modal { position: fixed; inset: 0; z-index: 200; display: none; }
.cert-modal.open { display: block; }
.cert-modal-backdrop { position: absolute; inset: 0; background: rgba(10, 14, 18, .85); }
.cert-modal-close {
  position: absolute; top: 1rem; right: 1rem; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: rgba(0, 0, 0, .1); color: var(--ink); font-size: 1rem; cursor: pointer;
}
.cert-sheet {
  position: relative; max-width: 720px; width: 92%; margin: 6vh auto 4vh;
  background: #fffdf5; border-radius: 14px; text-align: center; overflow: hidden;
  border: 10px solid var(--splm-black); box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.cert-modal-close {
  background: rgba(255, 255, 255, .85);
}

/* Flag letterhead band + overlapping seal badge */
.cert-flag-band { position: relative; height: 130px; background: var(--splm-black); }
.cert-flag-band img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cert-seal-wrap {
  position: absolute; left: 50%; bottom: -34px; transform: translateX(-50%);
  width: 76px; height: 76px; border-radius: 50%; background: #fff;
  border: 4px solid var(--splm-gold); box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  display: grid; place-items: center;
}
.cert-seal-wrap img.cert-seal { width: 60px; height: 60px; object-fit: contain; }

.cert-body { padding: 3rem 2.5rem 2.4rem; }
.cert-sheet .cert-kicker { letter-spacing: .18em; text-transform: uppercase; font-size: .78rem; color: var(--splm-red); font-weight: 700; }
.cert-sheet h2 { font-size: 1.7rem; margin-top: .6rem; }
.cert-sheet .cert-name { font-size: 1.4rem; color: var(--splm-green-dark); font-weight: 800; margin-top: 1.4rem; }
.cert-sheet .cert-course { font-size: 1.1rem; margin-top: .5rem; font-weight: 700; }

.cert-sign-row {
  display: flex; justify-content: center; gap: 3.5rem; margin-top: 2.4rem; flex-wrap: wrap;
}
.cert-sign { display: flex; flex-direction: column; align-items: center; min-width: 180px; }
.cert-sign .sign-line {
  font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: .95rem;
  padding-bottom: .4rem; border-bottom: 1px solid var(--line); width: 100%;
}
.cert-sign .sign-label { margin-top: .35rem; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.cert-sheet .cert-motto { margin-top: 1.8rem; font-weight: 700; letter-spacing: .12em; font-size: .78rem; color: #8a6d00; text-transform: uppercase; }
@media print {
  body * { visibility: hidden; }
  .cert-sheet, .cert-sheet * { visibility: visible; }
  .cert-sheet { position: fixed; inset: 0; margin: 0; box-shadow: none; border-radius: 0; }
  .cert-modal-close, .cert-print-btn { display: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero .inner { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead, .hero .cta-row, .hero .motto { margin-left: auto; margin-right: auto; justify-content: center; }
  .card-grid, .pillar-grid, .dash-grid { grid-template-columns: 1fr 1fr; }
  .dash-grid-2 { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; }
  .sidebar nav { flex-direction: row; }
  .sidebar nav .group-label, .sidebar .foot { display: none; }
  .stats-bar .inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .card-grid, .pillar-grid, .dash-grid { grid-template-columns: 1fr; }
  .main { padding: 0 1rem 2rem; }
  .welcome-banner { flex-direction: column; text-align: center; }
  .site-header .inner { flex-wrap: wrap; gap: .8rem; }
  .site-header .brand > span, .sidebar .brand > span { display: none; }
  .sidebar .brand { flex-shrink: 0; }
  .site-nav { margin-left: 0; flex-wrap: wrap; gap: .8rem 1rem; }
  .stats-bar .inner { grid-template-columns: 1fr 1fr; }
}
