/* =====================================================================
   สพป.สุรินทร์ เขต 1 — แพลตฟอร์มกลางยกระดับผลสัมฤทธิ์ RT • NT • O-NET
   Modern Clean UI • Responsive • Fast • Zero Framework Overhead
   ===================================================================== */
:root {
  --pri: #1d4ed8;
  --pri-d: #1e3a8a;
  --acc: #f59e0b;
  --ok: #059669;
  --bad: #dc2626;
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #0f172a;
  --ink2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --rad: 16px;
  --rad-sm: 10px;
  --sh: 0 4px 20px rgba(15, 23, 42, .05);
  --sh-lg: 0 14px 36px rgba(15, 23, 42, .10);
  --font: 'Sarabun', system-ui, -apple-system, sans-serif;
  --head: 'Prompt', 'Sarabun', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(900px 460px at 8% -6%, rgba(59, 130, 246, .11), transparent 60%),
    radial-gradient(760px 420px at 94% 2%, rgba(139, 92, 246, .09), transparent 58%),
    radial-gradient(640px 380px at 50% 100%, rgba(245, 158, 11, .06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.3; margin: 0 0 .5rem; color: var(--ink); }
p { margin: 0 0 .75rem; }
a { color: var(--pri); text-decoration: none; }
img { max-width: 100%; display: block; }
code { background: #eef2ff; color: #3730a3; padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.ic { flex-shrink: 0; vertical-align: middle; }

/* Layout helpers */
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 860px; }
.main { min-height: calc(100vh - 220px); padding: 26px 0 64px; }
.sec { margin-top: 40px; }
.sec-head { margin-bottom: 22px; }
.sec-head.center { text-align: center; max-width: 720px; margin: 0 auto 28px; }
.sec-head h1 { font-size: clamp(24px, 3vw, 34px); }
.sec-head h2 { font-size: clamp(21px, 2.4vw, 28px); }
.sec-head p { color: var(--muted); }
.eyebrow { display: inline-block; font-family: var(--head); font-size: 13px; font-weight: 600; color: var(--pri); background: color-mix(in srgb, var(--pri) 10%, #fff); padding: 4px 12px; border-radius: 99px; margin-bottom: 8px; }

.mt { margin-top: 20px; } .mt-sm { margin-top: 12px; } .mt-xs { margin-top: 6px; }
.mb { margin-bottom: 20px; } .mb-sm { margin-bottom: 12px; } .mb-xs { margin-bottom: 6px; }
.muted { color: var(--muted); }
.text-ok { color: var(--ok); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.dim { opacity: .55; }

.row-gap { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap-gap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.stack-sm { display: flex; flex-direction: column; gap: 12px; }
.stack-xs { display: flex; flex-direction: column; gap: 8px; }

/* Card & Surface */
.card {
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px);
  border: 1px solid rgba(226, 232, 240, .9); border-radius: var(--rad); padding: 22px;
  box-shadow: 0 6px 24px rgba(15, 23, 42, .05), 0 1px 2px rgba(15, 23, 42, .03);
}
.sub-box { background: #f8fafc; border: 1px solid var(--line); border-radius: var(--rad-sm); padding: 14px; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-14px, 12px) scale(1.06); }
}
.blk, .exam-card, .subject-card, .link-card, .quiz-card, .video-card, .guide-step {
  animation: fadeUp .42s cubic-bezier(.22, 1, .36, 1) both;
}
.exam-card:nth-child(2), .subject-card:nth-child(2), .guide-step:nth-child(2) { animation-delay: .07s; }
.exam-card:nth-child(3), .subject-card:nth-child(3), .guide-step:nth-child(3) { animation-delay: .14s; }
.exam-card:nth-child(4), .subject-card:nth-child(4), .guide-step:nth-child(4) { animation-delay: .21s; }

/* Glossy shine sweep on primary & accent buttons */
.btn.primary, .btn.accent { position: relative; overflow: hidden; }
.btn.primary::after, .btn.accent::after {
  content: ''; position: absolute; top: 0; left: -120%; width: 70%; height: 100%;
  background: linear-gradient(110deg, transparent, rgba(255,255,255,.32), transparent);
  transition: left .55s ease; pointer-events: none;
}
.btn.primary:hover::after, .btn.accent:hover::after { left: 140%; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-family: var(--head); font-size: 14.5px; font-weight: 500;
  padding: 9px 16px; border-radius: var(--rad-sm); border: 1px solid transparent;
  cursor: pointer; transition: .18s ease; white-space: nowrap; text-decoration: none;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.sm { padding: 6px 11px; font-size: 13.5px; }
.btn.lg { padding: 12px 22px; font-size: 15.5px; }
.btn.full { width: 100%; }
.btn.primary { background: var(--pri); color: #fff; }
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.btn.accent { background: var(--acc); color: #0f172a; font-weight: 600; }
.btn.accent:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn.success { background: var(--ok); color: #fff; }
.btn.success:hover { filter: brightness(1.08); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.danger:hover { filter: brightness(1.08); }
.btn.ghost { background: #fff; color: var(--ink2); border-color: var(--line); }
.btn.ghost:hover { background: #f8fafc; border-color: #cbd5e1; }
.btn.ghost-light { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.35); backdrop-filter: blur(6px); }
.btn.ghost-light:hover { background: rgba(255,255,255,.24); }
.upload-btn { cursor: pointer; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink2);
  cursor: pointer; transition: .15s;
}
.icon-btn:hover:not(:disabled) { background: #f1f5f9; color: var(--ink); }
.icon-btn.danger:hover { background: #fef2f2; color: var(--bad); border-color: #fecaca; }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }

/* Badges & Alerts */
.badge { display: inline-flex; align-items: center; gap: 4px; font-family: var(--head); font-size: 12.5px; font-weight: 500; padding: 3px 10px; border-radius: 99px; background: #f1f5f9; color: var(--ink2); }
.badge.ok { background: #dcfce7; color: #166534; }
.badge.bad { background: #fee2e2; color: #991b1b; }
.badge.gold { background: #fef3c7; color: #92400e; }

.alert { padding: 12px 16px; border-radius: var(--rad-sm); font-size: 14.5px; border: 1px solid; }
.alert.info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.alert.warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert.danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 5px; width: 100%; }
.field > span { font-size: 13.5px; font-weight: 600; color: var(--ink2); }
input, textarea, select {
  font-family: var(--font); font-size: 15px; color: var(--ink); background: #fff;
  border: 1px solid #cbd5e1; border-radius: 9px; padding: 9px 12px; width: 100%; transition: .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--pri); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pri) 15%, transparent); }
input[type="color"] { padding: 3px 5px; height: 40px; cursor: pointer; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--pri); cursor: pointer; }
.input-sm { padding: 6px 10px; font-size: 14px; }
.check-row { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.checks-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.link-pick { margin-top: 4px; font-size: 13px; padding: 5px 8px; background: #f8fafc; color: var(--muted); }
.logo-prev { width: 42px; height: 42px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: #fff; padding: 2px; flex-shrink: 0; }
.file-row-wrap { display: flex; flex-direction: column; }
.res-inline-img { max-height: 460px; border-radius: 12px; border: 1px solid var(--line); margin: 0 auto; }

/* Visual Icon Picker */
.ic-picker { width: 100%; }
.ic-pick-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px;
  border: 1px solid #cbd5e1; border-radius: 9px; background: #fff; cursor: pointer;
  font-family: var(--font); font-size: 14.5px; color: var(--ink); transition: .15s;
}
.ic-pick-btn:hover { border-color: var(--pri); background: #f8fbff; }
.ic-pick-preview { width: 28px; height: 28px; border-radius: 7px; background: #eff6ff; color: var(--pri); display: grid; place-items: center; flex-shrink: 0; }
.ic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.ic-opt {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 6px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
  cursor: pointer; color: var(--ink2); font-family: var(--font); font-size: 12px; transition: .15s;
}
.ic-opt:hover { border-color: var(--pri); background: #eff6ff; color: var(--pri); transform: translateY(-2px); }
.ic-opt.active { border-color: var(--pri); background: var(--pri); color: #fff; }
.ic-opt.none { border-style: dashed; color: var(--bad); }
.ic-opt.none.active { background: var(--bad); border-color: var(--bad); color: #fff; }

/* Demo Banner */
.demo-bar {
  background: linear-gradient(90deg, #0f172a, #1e3a8a); color: #e2e8f0;
  font-size: 13.5px; padding: 8px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.demo-bar span { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.demo-bar code { background: rgba(255,255,255,.15); color: #fde68a; }
.demo-bar a { color: #fde68a; font-family: var(--head); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .9); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.tb-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--pri), var(--pri-d)); color: #fff; flex-shrink: 0;
}
.brand-mark.lg { width: 54px; height: 54px; border-radius: 15px; margin: 0 auto 12px; }
.brand-logo { width: 42px; height: 42px; object-fit: contain; border-radius: 8px; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.2; }
.brand-txt strong { font-family: var(--head); font-size: 15.5px; color: var(--ink); }
.brand-txt span { font-size: 12.5px; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  font-family: var(--head); font-size: 14.5px; font-weight: 500; color: var(--ink2);
  padding: 7px 12px; border-radius: 9px; transition: .15s; white-space: nowrap;
}
.nav-link:hover, .nav-link.active { background: color-mix(in srgb, var(--pri) 10%, #fff); color: var(--pri); }
.nav-admin { margin-left: 6px; }
.nav-toggle { display: none; }

/* Breadcrumb */
.crumb { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); margin-bottom: 16px; flex-wrap: wrap; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--pri); }

/* Blocks */
.blocks { display: flex; flex-direction: column; gap: 24px; }
.blk-hero {
  border-radius: 24px; padding: clamp(34px, 5vw, 58px) clamp(24px, 4vw, 50px);
  background: linear-gradient(130deg, #0b1437 0%, var(--pri-d) 48%, var(--pri) 100%);
  color: #fff; position: relative; overflow: hidden;
  box-shadow: 0 22px 50px rgba(29, 78, 216, .22), inset 0 1px 0 rgba(255,255,255,.22);
  background-size: cover; background-position: center;
}
.blk-hero::before {
  content: ''; position: absolute; left: -120px; bottom: -140px; width: 380px; height: 380px;
  border-radius: 50%; background: radial-gradient(circle, rgba(56, 189, 248, .28), transparent 68%); pointer-events: none;
  animation: floatOrb 10s ease-in-out infinite;
}
.blk-hero::after {
  content: ''; position: absolute; right: -80px; top: -80px; width: 360px; height: 360px;
  border-radius: 50%; background: radial-gradient(circle, rgba(245, 158, 11, .34), transparent 68%); pointer-events: none;
  animation: floatOrb 12s ease-in-out infinite reverse;
}
.hero-inner { position: relative; z-index: 1; max-width: 780px; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--head); font-size: 13px; font-weight: 500; background: rgba(255,255,255,.15); color: #fde68a; padding: 5px 13px; border-radius: 99px; margin-bottom: 14px; backdrop-filter: blur(6px); }
.blk-hero h1 { color: #fff; font-size: clamp(26px, 3.8vw, 40px); margin-bottom: 12px; }
.hero-sub { font-size: clamp(15.5px, 1.5vw, 18px); color: rgba(255,255,255,.88); max-width: 680px; margin-bottom: 22px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.stats-grid { display: grid; gap: 14px; grid-template-columns: repeat(4, 1fr); }
.stats-grid.cols-1 { grid-template-columns: 1fr; }
.stats-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.stats-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.stat-pill {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--rad); padding: 16px 18px;
  display: flex; align-items: center; gap: 14px; box-shadow: var(--sh);
}
.stat-ico { width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--pri) 10%, #fff); color: var(--pri); display: grid; place-items: center; flex-shrink: 0; }
.stat-val { font-family: var(--head); font-weight: 700; font-size: 18px; color: var(--ink); line-height: 1.2; }
.stat-lbl { font-size: 13.5px; color: var(--muted); }

/* Exam Showcase Grid */
.exam-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.exam-card {
  background: rgba(255, 255, 255, .96); border: 1px solid rgba(226, 232, 240, .95); border-radius: 22px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .06); display: flex; flex-direction: column;
  transition: transform .26s cubic-bezier(.22, 1, .36, 1), box-shadow .26s ease, border-color .26s ease;
}
.exam-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px color-mix(in srgb, var(--ec) 18%, rgba(15, 23, 42, .10));
  border-color: color-mix(in srgb, var(--ec) 48%, var(--line));
}
.ec-head {
  background: linear-gradient(135deg, var(--ec), color-mix(in srgb, var(--ec) 56%, #0b1437));
  color: #fff; padding: 26px 22px; display: flex; align-items: center; gap: 14px;
  background-size: cover; background-position: center; position: relative; overflow: hidden;
}
.ec-pattern {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  pointer-events: none; transition: transform .5s cubic-bezier(.22, 1, .36, 1), opacity .35s ease; opacity: .95;
}
.exam-card:hover .ec-pattern { transform: scale(1.06) translate(-4px, -2px); opacity: 1; }
.ec-head > *:not(.ec-pattern) { position: relative; z-index: 1; }
.ec-head::after {
  content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.26), transparent 70%); pointer-events: none;
}
.ec-ico {
  width: 54px; height: 54px; border-radius: 16px; background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.26); backdrop-filter: blur(8px);
  display: grid; place-items: center; flex-shrink: 0; transition: transform .25s ease;
}
.exam-card:hover .ec-ico { transform: scale(1.07); }
.ec-titles { flex: 1; }
.ec-lvl { font-size: 12.5px; opacity: .88; display: block; }
.ec-titles h3 { color: #fff; font-size: 24px; margin: 0; }
.ec-arrow { opacity: .8; transition: .2s; }
.exam-card:hover .ec-arrow { transform: translateX(4px); opacity: 1; }
.ec-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.ec-full { font-family: var(--head); font-weight: 600; font-size: 14.5px; color: var(--ink); margin-bottom: 6px; }
.ec-desc { font-size: 14.5px; color: var(--muted); margin-bottom: 14px; flex: 1; }
.ec-subs-lbl { font-size: 13px; font-weight: 600; color: var(--ink2); display: block; margin-bottom: 8px; }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.sub-chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 500;
  padding: 5px 11px; border-radius: 99px; background: color-mix(in srgb, var(--ec) 9%, #fff);
  color: color-mix(in srgb, var(--ec) 85%, #0f172a); border: 1px solid color-mix(in srgb, var(--ec) 22%, #fff);
  transition: .15s;
}
.sub-chip:hover { background: var(--ec); color: #fff; }

/* Page Hero (Exam / Subject) */
.page-hero {
  border-radius: 20px; padding: 28px 30px; color: #fff; display: flex; align-items: center; gap: 20px;
  background: linear-gradient(135deg, var(--ec), color-mix(in srgb, var(--ec) 68%, #0f172a));
  background-size: cover; background-position: center; box-shadow: var(--sh-lg); margin-bottom: 24px;
}
.ph-ico { width: 66px; height: 66px; border-radius: 18px; background: rgba(255,255,255,.18); display: grid; place-items: center; flex-shrink: 0; }
.page-hero h1 { color: #fff; font-size: clamp(22px, 3vw, 30px); margin-bottom: 4px; }
.page-hero p { color: rgba(255,255,255,.88); margin: 0; }

/* Subject Grid */
.subject-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.subject-card {
  background: rgba(255, 255, 255, .96); border: 1px solid var(--line); border-radius: 20px; padding: 22px;
  color: var(--ink); box-shadow: 0 8px 24px rgba(15, 23, 42, .05); position: relative; overflow: hidden;
  transition: transform .25s cubic-bezier(.22, 1, .36, 1), box-shadow .25s ease, border-color .25s ease;
  display: flex; flex-direction: column;
}
.subject-card::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--sc), color-mix(in srgb, var(--sc) 55%, #fff));
}
.subject-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 38px color-mix(in srgb, var(--sc) 18%, rgba(15, 23, 42, .08));
  border-color: color-mix(in srgb, var(--sc) 55%, var(--line));
}
.sc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sc-ico {
  width: 52px; height: 52px; border-radius: 15px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--sc) 16%, #fff), color-mix(in srgb, var(--sc) 6%, #fff));
  border: 1px solid color-mix(in srgb, var(--sc) 22%, #fff);
  color: var(--sc); display: grid; place-items: center; transition: transform .22s ease;
}
.subject-card:hover .sc-ico { transform: scale(1.08); }
.sc-go { color: var(--muted); transition: .18s; }
.subject-card:hover .sc-go { color: var(--sc); transform: translateX(4px); }
.subject-card h3 { font-size: 19px; margin-bottom: 6px; }
.subject-card p { font-size: 14.5px; color: var(--muted); flex: 1; margin-bottom: 14px; }
.sc-counts { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.sc-counts span { display: inline-flex; align-items: center; gap: 4px; }

/* Link Cards Block */
.card-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.link-card {
  background: rgba(255, 255, 255, .96); border: 1px solid var(--line); border-radius: 20px; padding: 22px;
  color: var(--ink); box-shadow: 0 8px 24px rgba(15, 23, 42, .05); position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .25s cubic-bezier(.22, 1, .36, 1), box-shadow .25s ease, border-color .25s ease;
}
.link-card::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--cc, var(--pri)), transparent); opacity: .75;
}
a.link-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 36px color-mix(in srgb, var(--cc, var(--pri)) 16%, rgba(15, 23, 42, .08));
  border-color: color-mix(in srgb, var(--cc, var(--pri)) 50%, var(--line));
}
.lc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.lc-ico { width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--cc, var(--pri)) 12%, #fff); color: var(--cc, var(--pri)); display: grid; place-items: center; }
.link-card h3 { font-size: 17px; margin-bottom: 6px; }
.link-card p { font-size: 14.5px; color: var(--muted); flex: 1; }
.lc-go { display: inline-flex; align-items: center; gap: 4px; font-family: var(--head); font-size: 13.5px; font-weight: 600; color: var(--cc, var(--pri)); margin-top: 8px; }

/* Banner / Graphic Announcement Card */
.blk-banner {
  border-radius: 24px; padding: clamp(28px, 4vw, 46px) clamp(24px, 4vw, 44px);
  background-size: cover; background-position: center;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .16), inset 0 1px 0 rgba(255,255,255,.22);
  position: relative; overflow: hidden;
}
.blk-banner.sz-sm { padding: 20px 26px; border-radius: 18px; }
.blk-banner.sz-lg { padding: clamp(44px, 6vw, 72px) clamp(26px, 5vw, 56px); }
.blk-banner.has-glow::before {
  content: ''; position: absolute; left: -90px; bottom: -110px; width: 300px; height: 300px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.22), transparent 68%); pointer-events: none;
}
.blk-banner.has-glow::after {
  content: ''; position: absolute; right: -70px; top: -80px; width: 320px; height: 320px;
  border-radius: 50%; background: radial-gradient(circle, rgba(253,224,71,.24), transparent 68%); pointer-events: none;
}
.blk-banner.pure-img { padding: 0; background: #fff; border: 1px solid var(--line); }
.bn-pure-img { width: 100%; max-height: 560px; object-fit: cover; display: block; border-radius: 23px; }
.blk-banner.align-center { text-align: center; }
.blk-banner.align-right { text-align: right; }
.blk-banner.align-center .bn-inner { margin: 0 auto; }
.blk-banner.align-right .bn-inner { margin-left: auto; }
.blk-banner.align-center .bn-act { justify-content: center; }
.blk-banner.align-right .bn-act { justify-content: flex-end; }
.bn-inner { max-width: 780px; position: relative; z-index: 1; }
.bn-badge {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--head); font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.26); backdrop-filter: blur(8px);
  padding: 5px 14px; border-radius: 99px; margin-bottom: 12px;
}
.blk-banner h2 { font-size: clamp(22px, 3vw, 34px); margin-bottom: 8px; }
.bn-text { font-size: 16.5px; opacity: .93; margin: 0; }
.bn-act { margin-top: 20px; display: flex; gap: 12px; flex-wrap: wrap; }
.bn-preview-wrap { background: #f1f5f9; border: 1px dashed #cbd5e1; border-radius: 14px; padding: 12px; }
.bn-preview-wrap .blk-banner { padding: 22px 24px; }
.grad-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.grad-swatch {
  border: 2px solid rgba(255,255,255,.8); border-radius: 9px; padding: 8px 6px; color: #fff;
  font-family: var(--head); font-size: 12px; font-weight: 500; cursor: pointer; text-shadow: 0 1px 2px rgba(0,0,0,.35); transition: .15s;
}
.grad-swatch:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.18); }

/* Embed Iframe Block */
.embed-frame { width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #f8fafc; }
.embed-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* CTA, Image, Prose, Divider */
.blk-h { display: flex; align-items: center; gap: 8px; font-size: 20px; margin-bottom: 14px; }
.blk-cta {
  border-radius: 18px; padding: 26px 30px; background: linear-gradient(135deg, var(--pri-d), var(--pri));
  color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.blk-cta h3 { color: #fff; font-size: 21px; margin-bottom: 4px; }
.blk-cta p { color: rgba(255,255,255,.86); margin: 0; }
.blk-div { border-bottom: 2px solid var(--line); padding-bottom: 8px; margin-top: 8px; }
.blk-div p { color: var(--muted); margin: 0; }
.img-fig { margin: 0; text-align: center; }
.img-fig img { margin: 0 auto; border-radius: 12px; max-height: 540px; object-fit: contain; }
.img-fig figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.img-zoom { border: 0; background: none; padding: 0; cursor: zoom-in; width: 100%; }
.prose p { margin-bottom: 12px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 12px; }

/* Tabs & Subject Sections */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.tab {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--head); font-size: 14.5px; font-weight: 500;
  padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--ink2); cursor: pointer; transition: .15s;
}
.tab:hover { border-color: var(--pri); color: var(--pri); }
.tab.active { background: var(--pri); color: #fff; border-color: var(--pri); }
.tab .cnt { font-size: 12px; background: rgba(15,23,42,.08); padding: 1px 7px; border-radius: 99px; }
.tab.active .cnt { background: rgba(255,255,255,.22); color: #fff; }
.sub-sec { margin-top: 24px; }
.sub-sec-h h2 { display: flex; align-items: center; gap: 8px; font-size: 20px; margin-bottom: 14px; }

/* File & Video & Quiz Cards */
.file-list { display: flex; flex-direction: column; gap: 10px; }
.file-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: .15s;
}
.file-row:hover { border-color: #cbd5e1; background: #fafcff; }
.file-ico { width: 42px; height: 42px; border-radius: 10px; background: #eff6ff; color: var(--pri); display: grid; place-items: center; flex-shrink: 0; }
.file-info { flex: 1; min-width: 0; }
.file-title { font-family: var(--head); font-weight: 600; font-size: 15px; color: var(--ink); }
.file-desc { font-size: 14px; color: var(--ink2); }
.file-meta { font-size: 12.5px; color: var(--muted); }
.file-act { display: flex; gap: 8px; flex-shrink: 0; }

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.video-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--rad); overflow: hidden; box-shadow: var(--sh); display: flex; flex-direction: column; }
.vc-thumb { position: relative; aspect-ratio: 16/9; background: #0f172a; border: 0; padding: 0; cursor: pointer; width: 100%; overflow: hidden; }
.vc-thumb img { width: 100%; height: 100%; object-fit: cover; transition: .3s; }
.vc-thumb:hover img { transform: scale(1.04); opacity: .88; }
.vc-ph { height: 100%; display: grid; place-items: center; color: #94a3b8; }
.vc-play { position: absolute; inset: 0; margin: auto; width: 58px; height: 58px; border-radius: 50%; background: rgba(15,23,42,.75); color: #fff; display: grid; place-items: center; transition: .2s; }
.vc-thumb:hover .vc-play { background: var(--pri); transform: scale(1.08); }
.vc-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.vc-body h4 { font-size: 16px; margin-bottom: 6px; }
.vc-body p { font-size: 14px; color: var(--muted); flex: 1; }
.vc-foot { display: flex; gap: 8px; margin-top: 10px; }

.quiz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.quiz-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--rad); overflow: hidden; box-shadow: var(--sh); display: flex; flex-direction: column; }
.qzc-img img { width: 100%; height: 170px; object-fit: cover; }
.qzc-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.qzc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.qzc-body h3 { font-size: 18px; margin-bottom: 6px; }
.qzc-body p { font-size: 14.5px; color: var(--muted); flex: 1; }
.qzc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); margin-top: 10px; }

/* Quiz Runner */
.quiz-intro { padding: 0; overflow: hidden; }
.qi-cover img { width: 100%; max-height: 280px; object-fit: cover; }
.qi-body { padding: 28px; }
.qi-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.lead { font-size: 16.5px; color: var(--ink2); }
.qi-note { background: #f8fafc; border-left: 4px solid var(--pri); padding: 14px 16px; border-radius: 0 10px 10px 0; margin: 16px 0; font-size: 15px; }
.qi-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0; }
.qim { background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; }
.qim span { display: block; font-size: 13px; color: var(--muted); }
.qim strong { font-family: var(--head); font-size: 17px; color: var(--ink); }
.qi-form { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.qi-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; }

.quiz-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.qtb-left { display: flex; flex-direction: column; }
.qtb-right { display: flex; align-items: center; gap: 8px; }
.timer-pill { display: inline-flex; align-items: center; gap: 5px; font-family: var(--head); font-weight: 600; padding: 5px 12px; border-radius: 99px; background: #eff6ff; color: var(--pri); }
.timer-pill.danger { background: #fee2e2; color: var(--bad); }
.progress-bar { height: 8px; background: #e2e8f0; border-radius: 99px; overflow: hidden; margin-bottom: 14px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--pri), #3b82f6); transition: width .25s; }
.q-dots { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.q-dot { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-family: var(--head); font-size: 13.5px; cursor: pointer; }
.q-dot.done { background: #dbeafe; border-color: #93c5fd; color: var(--pri-d); font-weight: 600; }
.q-dot.active { background: var(--pri); color: #fff; border-color: var(--pri); }
.q-num { font-family: var(--head); font-size: 13.5px; font-weight: 600; color: var(--pri); margin-bottom: 8px; }
.q-text { font-size: 18.5px; font-weight: 600; color: var(--ink); margin-bottom: 16px; }
.q-img { margin-bottom: 16px; text-align: center; }
.q-img img { max-height: 300px; border-radius: 10px; margin: 0 auto; border: 1px solid var(--line); }
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice {
  display: flex; align-items: flex-start; gap: 12px; text-align: left; width: 100%;
  padding: 13px 16px; border-radius: 12px; border: 2px solid var(--line); background: #fff;
  cursor: pointer; font-family: var(--font); font-size: 16px; transition: .15s;
}
.choice:hover { border-color: #93c5fd; background: #f8fbff; }
.choice.selected { border-color: var(--pri); background: #eff6ff; }
.ch-key { width: 28px; height: 28px; border-radius: 8px; background: #f1f5f9; color: var(--ink2); display: grid; place-items: center; font-family: var(--head); font-weight: 600; font-size: 14px; flex-shrink: 0; }
.choice.selected .ch-key { background: var(--pri); color: #fff; }
.q-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }

/* Result & Certificate */
.result-card { text-align: center; padding: 34px 24px; }
.res-ico { width: 78px; height: 78px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; }
.result-card.passed .res-ico { background: #dcfce7; color: var(--ok); }
.result-card.failed .res-ico { background: #fee2e2; color: var(--bad); }
.res-score { margin: 16px 0; }
.rs-big { font-family: var(--head); font-size: 46px; font-weight: 700; color: var(--ink); line-height: 1.1; }
.rs-big span { font-size: 24px; color: var(--muted); }
.cert-no-pill { display: inline-flex; align-items: center; gap: 7px; background: #fef3c7; color: #92400e; padding: 8px 18px; border-radius: 99px; font-size: 15px; margin-bottom: 18px; }
.res-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.cb-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.cert-preview-wrap { background: #f1f5f9; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.cert-preview-wrap canvas { width: 100%; height: auto; display: block; border-radius: 6px; box-shadow: var(--sh); }

.review-list { display: flex; flex-direction: column; gap: 12px; }
.rev-item { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); border-left: 4px solid; }
.rev-item.ok { border-left-color: var(--ok); background: #f0fdf4; }
.rev-item.bad { border-left-color: var(--bad); background: #fef2f2; }
.rev-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; margin-right: 8px; }
.rev-ans { margin-top: 8px; font-size: 14.5px; }
.rev-exp { margin-top: 6px; font-size: 14px; color: var(--ink2); display: flex; align-items: flex-start; gap: 6px; }

/* Verify Page */
.vb-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.vb-ico { width: 58px; height: 58px; border-radius: 15px; background: #eff6ff; color: var(--pri); display: grid; place-items: center; flex-shrink: 0; }
.verify-form { display: flex; gap: 10px; }
.verify-found { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 14px; padding: 20px; }
.vf-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--ok); color: #fff; font-family: var(--head); font-size: 13.5px; font-weight: 600; padding: 4px 12px; border-radius: 99px; margin-bottom: 14px; }
.vf-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.vf-grid span { display: block; font-size: 12.5px; color: var(--muted); }
.vf-grid strong { font-size: 15.5px; }

/* Footer */
.footer { background: #0f172a; color: #cbd5e1; margin-top: 40px; }
.ft-inner { display: flex; justify-content: space-between; gap: 24px; padding: 34px 20px; flex-wrap: wrap; }
.ft-brand strong { color: #fff; font-family: var(--head); font-size: 16.5px; display: block; margin-bottom: 6px; }
.ft-brand p { font-size: 14px; color: #94a3b8; max-width: 520px; margin: 0; }
.ft-contact { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.ft-contact div { display: flex; align-items: center; gap: 8px; }
.ft-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 14px 0; font-size: 13.5px; color: #94a3b8; }
.ft-b-in { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ft-bottom a { color: #cbd5e1; }
.ft-bottom a:hover { color: #fff; }

/* Modal, Media, Toast, Loader, Empty */
.modal-wrap {
  position: fixed; inset: 0; z-index: 90; background: rgba(15, 23, 42, .58); backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 18px; opacity: 0; transition: .18s; overflow-y: auto;
}
.modal-wrap.show { opacity: 1; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 580px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0,0,0,.25); overflow: hidden; }
.modal.sm { max-width: 420px; } .modal.lg { max-width: 760px; } .modal.xl { max-width: 980px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; background: #f8fafc; }

.ratio { position: relative; aspect-ratio: 16/9; width: 100%; border-radius: 10px; overflow: hidden; background: #000; }
.ratio.tall { aspect-ratio: 4/3; min-height: 62vh; }
.ratio iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media-video { width: 100%; max-height: 70vh; border-radius: 10px; background: #000; }
.media-img { max-height: 75vh; margin: 0 auto; border-radius: 10px; }

.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.toast {
  display: flex; align-items: center; gap: 9px; padding: 11px 16px; border-radius: 12px;
  background: #0f172a; color: #fff; font-size: 14.5px; box-shadow: var(--sh-lg);
  transform: translateY(12px); opacity: 0; transition: .22s;
}
.toast.show { transform: none; opacity: 1; }
.toast.ok { background: #065f46; } .toast.warn { background: #92400e; } .toast.error { background: #991b1b; }

.loader { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 48px 16px; color: var(--muted); }
.spinner { width: 24px; height: 24px; border: 3px solid #cbd5e1; border-top-color: var(--pri); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty { text-align: center; padding: 38px 18px; color: var(--muted); }
.empty-ico { width: 58px; height: 58px; border-radius: 16px; background: #f1f5f9; color: var(--muted); display: grid; place-items: center; margin: 0 auto 12px; }
.empty h4 { color: var(--ink); font-size: 17px; }

/* =====================================================================
   ADMIN PANEL
   ===================================================================== */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(135deg, #0f172a, #1e3a8a); }
.login-card { width: 100%; max-width: 430px; padding: 32px 28px; }
.lc-head { text-align: center; margin-bottom: 20px; }

.adm-shell { display: flex; min-height: 100vh; }
.adm-side {
  width: 264px; background: #0f172a; color: #cbd5e1; display: flex; flex-direction: column;
  padding: 18px 14px; position: sticky; top: 0; height: 100vh; flex-shrink: 0;
}
.adm-brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.adm-brand strong { color: #fff; font-family: var(--head); font-size: 15px; display: block; }
.adm-brand span { font-size: 12px; color: #94a3b8; }
.adm-mode {
  margin: 12px 6px; padding: 7px 11px; border-radius: 9px; font-size: 12.5px; font-weight: 600;
  display: flex; align-items: center; gap: 7px;
}
.adm-mode.demo { background: rgba(245,158,11,.15); color: #fde68a; }
.adm-mode.supabase { background: rgba(16,185,129,.15); color: #6ee7b7; }
.adm-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }
.adm-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  color: #cbd5e1; font-family: var(--head); font-size: 14px; background: none; border: 0; width: 100%; text-align: left; cursor: pointer; transition: .15s;
}
.adm-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.adm-link.active { background: var(--pri); color: #fff; font-weight: 500; }
.adm-foot { padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 3px; }

.adm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.adm-mob-bar { display: none; align-items: center; justify-content: space-between; padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.adm-body { padding: 26px 28px 60px; max-width: 1260px; width: 100%; transition: opacity .14s ease; }
.adm-body.adm-loading { opacity: .6; }
.adm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.adm-head h1 { display: flex; align-items: center; gap: 9px; font-size: 24px; margin-bottom: 2px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--rad); padding: 18px; display: flex; align-items: center; gap: 14px; box-shadow: var(--sh); }
.kpi-ico { width: 46px; height: 46px; border-radius: 12px; background: color-mix(in srgb, var(--kc) 12%, #fff); color: var(--kc); display: grid; place-items: center; flex-shrink: 0; }
.kpi-v { font-family: var(--head); font-size: 24px; font-weight: 700; line-height: 1.1; }
.kpi-l { font-size: 13px; color: var(--muted); }
.dash-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }

.sub-adm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.sub-adm-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.dot-ico { width: 32px; height: 32px; border-radius: 9px; color: #fff; display: grid; place-items: center; flex-shrink: 0; }

.filter-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { text-align: left; font-family: var(--head); font-size: 13px; color: var(--muted); padding: 10px 12px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:hover td { background: #f8fafc; }

.q-thumb { max-height: 110px; border-radius: 8px; border: 1px solid var(--line); }
.q-ch-preview { display: flex; flex-wrap: wrap; gap: 6px; }

/* Page Builder Admin */
.blk-adm-list { display: flex; flex-direction: column; gap: 10px; }
.blk-adm-row { display: flex; align-items: center; gap: 14px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.ba-ico { width: 40px; height: 40px; border-radius: 10px; background: #eff6ff; color: var(--pri); display: grid; place-items: center; flex-shrink: 0; }
.ba-info { flex: 1; min-width: 0; }
.ba-act { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.btype-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.btype-card {
  text-align: left; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 16px;
  cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: .15s; font-family: var(--font);
}
.btype-card:hover { background: #eff6ff; border-color: var(--pri); }
.bt-ico { color: var(--pri); }
.btype-card strong { font-family: var(--head); font-size: 14.5px; color: var(--ink); }
.btype-card span { font-size: 12.5px; color: var(--muted); }

/* Certificate Studio */
.cert-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 18px; }
.cb-select { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 260px; }
.cb-select label { font-weight: 600; white-space: nowrap; }
.cert-studio { display: grid; grid-template-columns: 1.25fr .95fr; gap: 18px; align-items: start; }
.cs-stage { position: relative; background: #e2e8f0; border-radius: 10px; overflow: hidden; user-select: none; touch-action: none; }
.cs-stage canvas { width: 100%; height: auto; display: block; }
.cs-pins { position: absolute; inset: 0; }
.cs-pin {
  position: absolute; transform: translate(-50%, -50%); padding: 2px 8px; border-radius: 99px;
  font-size: 11px; font-family: var(--head); font-weight: 600; border: 1.5px solid #fff;
  background: rgba(15, 23, 42, .62); color: #fff; cursor: grab; white-space: nowrap; transition: background .15s;
}
.cs-pin.active { background: var(--pri); box-shadow: 0 0 0 3px rgba(29,78,216,.35); z-index: 5; }
.cs-pin:active { cursor: grabbing; }
.field-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.fchip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font-size: 13px; cursor: pointer; }
.fchip.active { background: var(--pri); color: #fff; border-color: var(--pri); }
.cert-el-list { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; padding-right: 2px; }
.cert-el-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; transition: .15s;
}
.cert-el-row:hover { border-color: #93c5fd; background: #f8fbff; }
.cert-el-row.active { border-color: var(--pri); background: #eff6ff; }
.cel-main { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.cel-ico { width: 30px; height: 30px; border-radius: 8px; background: #f1f5f9; color: var(--pri); display: grid; place-items: center; flex-shrink: 0; }
.cert-el-row.active .cel-ico { background: var(--pri); color: #fff; }
.cel-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.cel-txt strong { font-size: 14px; color: var(--ink); }
.cel-txt small { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.cel-act { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ph-wrap { display: flex; flex-wrap: wrap; gap: 5px; }
.ph-btn { font-size: 12px; padding: 3px 8px; border-radius: 6px; border: 1px solid #cbd5e1; background: #f8fafc; cursor: pointer; color: var(--pri-d); }
.ph-btn:hover { background: #dbeafe; }

/* User Guide Steps & FAQ */
.guide-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.guide-step {
  background: rgba(255, 255, 255, .96); border: 1px solid var(--line); border-radius: 20px; padding: 22px;
  position: relative; overflow: hidden; box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
  transition: transform .25s cubic-bezier(.22, 1, .36, 1), box-shadow .25s ease;
}
.guide-step::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--gs, var(--pri)); }
.guide-step:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); }
.gs-num {
  position: absolute; right: 16px; top: 14px; font-family: var(--head); font-size: 36px; font-weight: 700;
  color: color-mix(in srgb, var(--gs, var(--pri)) 14%, transparent); line-height: 1;
}
.gs-ico {
  width: 48px; height: 48px; border-radius: 14px; margin-bottom: 14px;
  background: color-mix(in srgb, var(--gs, var(--pri)) 12%, #fff); color: var(--gs, var(--pri));
  display: grid; place-items: center;
}
.guide-step h3 { font-size: 17px; margin-bottom: 8px; }
.guide-step p { font-size: 14.5px; color: var(--ink2); margin: 0; }
.faq-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.faq-item { background: #f8fafc; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.faq-item strong { display: block; font-family: var(--head); font-size: 15.5px; color: var(--ink); margin-bottom: 6px; }
.faq-item p { font-size: 14.5px; color: var(--ink2); margin: 0; }

/* Admin Analytics Bar Charts & Donut */
.an-hero-grid { display: grid; grid-template-columns: 300px 1fr; gap: 16px; }
.donut-card, .vchart-card {
  background: linear-gradient(180deg, #ffffff, #f8fafc); border: 1px solid var(--line);
  border-radius: 16px; padding: 18px; display: flex; flex-direction: column; justify-content: center;
}
.donut-card { align-items: center; gap: 14px; }
.donut-wrap { position: relative; width: 132px; height: 132px; }
.donut-svg { width: 100%; height: 100%; }
.donut-center {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1.15;
}
.donut-center strong { font-family: var(--head); font-size: 26px; color: var(--ink); }
.donut-center span { font-size: 12px; color: var(--muted); }
.donut-meta { width: 100%; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.dm-row { display: flex; align-items: center; gap: 8px; }
.dm-row strong { margin-left: auto; font-family: var(--head); }
.dm-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dm-dot.ok { background: #10b981; } .dm-dot.bad { background: #cbd5e1; } .dm-dot.pri { background: var(--pri); }

.vbar-chart { display: flex; align-items: flex-end; gap: 10px; height: 210px; padding: 10px 4px 8px; overflow-x: auto; }
.vbar-col {
  flex: 1 0 82px; min-width: 82px; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: transparent; border: 1.5px solid transparent; border-radius: 12px; padding: 6px 4px;
  cursor: pointer; font-family: var(--font); transition: .18s ease;
}
.vbar-col:hover { background: #f1f5f9; }
.vbar-col.active { background: #eff6ff; border-color: var(--pri); }
.vbar-num { font-family: var(--head); font-size: 13px; font-weight: 700; color: var(--ink); }
.vbar-track {
  flex: 1; width: 32px; background: #e2e8f0; border-radius: 10px 10px 4px 4px;
  display: flex; align-items: flex-end; overflow: hidden;
}
.vbar-fill { width: 100%; border-radius: 10px 10px 4px 4px; transition: height .45s cubic-bezier(.22, 1, .36, 1); }
.vbar-lbl {
  font-size: 11.5px; color: var(--ink2); text-align: center; width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.an-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 16px; align-items: start; }
.bar-chart { display: flex; flex-direction: column; gap: 8px; }
.net-scroll { max-height: 680px; overflow-y: auto; padding-right: 4px; }
.bar-row {
  text-align: left; width: 100%; background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 10px 12px; cursor: pointer; font-family: var(--font); transition: .18s ease;
}
.bar-row:hover { border-color: #93c5fd; background: #f8fbff; transform: translateX(2px); }
.bar-row.active { border-color: var(--pri); background: #eff6ff; box-shadow: 0 0 0 3px rgba(29, 78, 216, .12); }
.bar-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; font-size: 14px; }
.bar-lbl { color: var(--ink); font-weight: 500; min-width: 0; }
.bar-val { white-space: nowrap; font-size: 13.5px; color: var(--ink2); }
.bar-track { height: 10px; background: #e2e8f0; border-radius: 99px; overflow: hidden; }
.bar-track.sm { height: 7px; }
.bar-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--pri), #38bdf8);
  transition: width .45s cubic-bezier(.22, 1, .36, 1);
}
.bar-fill.ok { background: linear-gradient(90deg, #059669, #34d399); }
.sch-chart-list { display: flex; flex-direction: column; gap: 10px; max-height: 680px; overflow-y: auto; padding-right: 4px; }
.sch-bar-item { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }

/* Responsive */
@media (max-width: 980px) {
  .exam-grid, .kpi-grid, .stats-grid, .guide-steps { grid-template-columns: repeat(2, 1fr); }
  .cert-studio, .dash-grid, .an-grid, .an-hero-grid { grid-template-columns: 1fr; }
  .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 780px) {
  .guide-steps, .faq-list { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff;
    border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 12px 20px; box-shadow: var(--sh-lg);
  }
  .nav.open { display: flex; }
  .nav-admin { margin-left: 0; margin-top: 6px; }
  .exam-grid, .card-grid, .card-grid.cols-2, .card-grid.cols-4, .stats-grid, .kpi-grid,
  .form-grid, .form-grid-3, .filter-bar, .qi-meta, .vf-grid, .btype-grid { grid-template-columns: 1fr; }
  .page-hero { flex-direction: column; align-items: flex-start; }
  .file-row { flex-direction: column; align-items: flex-start; }
  .file-act { width: 100%; }
  .verify-form { flex-direction: column; }

  .adm-side { position: fixed; left: -280px; top: 0; bottom: 0; z-index: 60; transition: .22s; }
  .adm-side.open { left: 0; box-shadow: 0 0 0 100vw rgba(15,23,42,.5); }
  .adm-mob-bar { display: flex; }
  .adm-body { padding: 18px 16px 48px; }
}
