/* MIIT design system: tokens, base, components, public site, portals. */

:root {
    --brand-50: #eef4fc;
    --brand-100: #d8e5f7;
    --brand-200: #b3cbee;
    --brand-500: #2563b8;
    --brand-600: #1d4f96;
    --brand-700: #173f7a;
    --brand-900: #0d2449;
    --accent-400: #fbbf24;
    --accent-500: #f59e0b;
    --accent-600: #d97706;
    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --line-2: #cbd5e1;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --surface-3: #f1f5f9;
    --success: #15803d;
    --success-bg: #dcfce7;
    --danger: #b91c1c;
    --danger-bg: #fee2e2;
    --warning: #a16207;
    --warning-bg: #fef9c3;
    --info-bg: #e0f2fe;
    --info: #0369a1;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgb(15 23 42 / 0.06);
    --shadow: 0 4px 16px rgb(15 23 42 / 0.08);
    --shadow-lg: 0 18px 50px rgb(15 23 42 / 0.14);
    --font: "Plus Jakarta Sans", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -0.015em; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent-400); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 24px; } }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .7rem 1.25rem; border-radius: 999px; border: 1px solid transparent;
    font: inherit; font-weight: 700; font-size: .95rem; line-height: 1.2;
    cursor: pointer; transition: background .15s, color .15s, box-shadow .15s, transform .15s;
    text-align: center; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand-600); color: #fff; box-shadow: 0 6px 18px rgb(29 79 150 / .25); }
.btn-primary:hover { background: var(--brand-700); color: #fff; }
.btn-accent { background: var(--accent-500); color: #1f1300; box-shadow: 0 6px 18px rgb(245 158 11 / .3); }
.btn-accent:hover { background: var(--accent-400); color: #1f1300; }
.btn-outline { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-outline:hover { border-color: var(--brand-600); color: var(--brand-600); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--ink); }
.btn-light { background: #fff; color: var(--brand-700); }
.btn-light:hover { background: var(--brand-50); color: var(--brand-700); }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: .45rem .85rem; font-size: .85rem; }
.btn-lg { padding: .95rem 1.6rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Header */
.topbar { background: var(--brand-900); color: #c7d6ee; font-size: .85rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 38px; flex-wrap: wrap; }
.topbar a { color: #fff; }
.topbar-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.topbar-links span { display: inline-flex; align-items: center; gap: .4rem; }
.topbar svg { width: 15px; height: 15px; }
@media (max-width: 767px) { .topbar .hide-sm { display: none; } }

.site-header { position: sticky; top: 0; z-index: 50; background: rgb(255 255 255 / .92); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .75rem; color: var(--ink); }
.brand img { height: 46px; width: auto; border-radius: 6px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.05rem; font-weight: 800; color: var(--brand-700); }
.brand-text small { font-size: .72rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
@media (max-width: 480px) { .brand-text small { display: none; } }

.main-nav { display: none; }
.main-nav ul { list-style: none; display: flex; gap: .15rem; margin: 0; padding: 0; align-items: center; }
.main-nav a { display: block; padding: .5rem .7rem; border-radius: 8px; color: var(--ink-2); font-weight: 600; font-size: .92rem; }
.main-nav a:hover, .main-nav a.active { color: var(--brand-600); background: var(--brand-50); }
.nav-actions { display: none; gap: .5rem; align-items: center; }
@media (min-width: 1100px) {
    .main-nav, .nav-actions { display: flex; }
    .nav-toggle { display: none; }
}
.nav-toggle { background: none; border: 1px solid var(--line); border-radius: 10px; padding: .55rem; cursor: pointer; color: var(--ink); }
.nav-toggle svg { width: 22px; height: 22px; display: block; }
.mobile-nav { display: none; border-top: 1px solid var(--line); background: #fff; padding: .75rem 0 1.25rem; }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: .7rem 0; font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--surface-3); }
.mobile-nav a.active { color: var(--brand-600); }
.mobile-nav .btn { margin-top: .75rem; }
@media (min-width: 1100px) { .mobile-nav { display: none !important; } }

/* Notice ticker */
.ticker { background: var(--accent-400); color: #3b2500; font-size: .9rem; font-weight: 600; }
.ticker .container { display: flex; align-items: center; gap: .75rem; min-height: 40px; }
.ticker-label { background: #3b2500; color: var(--accent-400); padding: .15rem .6rem; border-radius: 999px; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; flex: none; }
.ticker-track { overflow: hidden; white-space: nowrap; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-track ul { display: inline-flex; margin: 0; padding: 0; list-style: none; animation: ticker 40s linear infinite; }
.ticker-track li { padding-right: 4rem; }
.ticker-track a { color: #3b2500; }
.ticker-track:hover ul { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track ul { animation: none; } }

/* Hero */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 500px at 85% -10%, #2f6fd0 0%, transparent 60%), linear-gradient(135deg, var(--brand-900) 0%, var(--brand-700) 55%, var(--brand-600) 100%); color: #fff; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgb(255 255 255 / .08) 1px, transparent 1px); background-size: 22px 22px; pointer-events: none; }
.hero .container { position: relative; z-index: 1; display: grid; gap: 2.5rem; padding-top: 4rem; padding-bottom: 4.5rem; }
@media (min-width: 960px) { .hero .container { grid-template-columns: 1.15fr .85fr; align-items: center; padding-top: 5.5rem; padding-bottom: 6rem; } }
.hero h1 { color: #fff; }
.hero p.lead { font-size: 1.15rem; color: #d3e0f5; max-width: 38rem; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .85rem; border-radius: 999px; background: rgb(255 255 255 / .12); border: 1px solid rgb(255 255 255 / .2); font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 1.25rem; color: #fff; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-400); box-shadow: 0 0 0 4px rgb(251 191 36 / .25); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 2rem; font-size: .9rem; color: #c7d6ee; }
.hero-badges span { display: inline-flex; gap: .45rem; align-items: center; }
.hero-badges svg { width: 18px; height: 18px; color: var(--accent-400); }

.verify-card { background: #fff; color: var(--ink); border-radius: var(--radius-lg); padding: 1.75rem; box-shadow: var(--shadow-lg); }
.verify-card h2 { font-size: 1.35rem; margin-bottom: .25rem; }
.verify-card .hint { color: var(--muted); font-size: .9rem; margin-bottom: 1.25rem; }
.verify-card .card-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); margin-bottom: 1rem; }
.verify-card .card-icon svg { width: 26px; height: 26px; }

/* Sections */
.section { padding: 4.5rem 0; }
.section-sm { padding: 3rem 0; }
.section-alt { background: var(--surface-2); }
.section-head { max-width: 44rem; margin-bottom: 2.5rem; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.kicker, .section-head .kicker { color: var(--brand-600); font-weight: 800; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .5rem; display: block; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

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

/* Stats */
.stats { margin-top: -2.75rem; position: relative; z-index: 2; }
.stats .grid { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 1.5rem; border: 1px solid var(--line); }
.stat { text-align: center; padding: .5rem; }
.stat strong { display: block; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; color: var(--brand-700); line-height: 1.1; }
.stat span { color: var(--muted); font-size: .9rem; font-weight: 600; }

/* Cards */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.card-hover { transition: transform .2s, box-shadow .2s, border-color .2s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-200); }
.feature-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); margin-bottom: 1.1rem; }
.feature-icon svg { width: 26px; height: 26px; }
.feature-icon.accent { background: #fff7e6; color: var(--accent-600); }
.card p { color: var(--ink-2); }
.card .more { font-weight: 700; display: inline-flex; gap: .35rem; align-items: center; }

.course-card { display: flex; flex-direction: column; height: 100%; }
.course-card .code { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .04em; color: var(--brand-700); background: var(--brand-50); padding: .2rem .6rem; border-radius: 999px; margin-bottom: .75rem; align-self: flex-start; }
.course-card h3 { font-size: 1.08rem; }
.course-card .meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; color: var(--muted); font-size: .88rem; margin-bottom: 1rem; }
.course-card .price { margin-top: auto; display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; padding-top: 1rem; border-top: 1px dashed var(--line); }
.price .now { font-size: 1.25rem; font-weight: 800; color: var(--ink); }
.price .was { color: var(--muted); text-decoration: line-through; font-size: .9rem; }
.price .note { width: 100%; font-size: .8rem; color: var(--success); font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.75rem; }
.chip { font: inherit; padding: .45rem 1rem; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; font-weight: 600; font-size: .88rem; color: var(--ink-2); cursor: pointer; }
.chip.active, .chip:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }

/* Split / CTA */
.split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.split-media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3; background: var(--brand-100); }
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.check-list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .65rem; }
.check-list li { display: flex; gap: .65rem; align-items: flex-start; color: var(--ink-2); }
.check-list li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--success-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315803d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 13px no-repeat; }

.cta-band { background: linear-gradient(120deg, var(--brand-700), var(--brand-500)); color: #fff; border-radius: var(--radius-lg); padding: 2.5rem; display: grid; gap: 1.5rem; align-items: center; position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; margin-bottom: .35rem; }
.cta-band p { color: #d3e0f5; margin: 0; }
@media (min-width: 860px) { .cta-band { grid-template-columns: 1fr auto; padding: 3rem; } }

/* Page hero */
.page-hero { background: linear-gradient(135deg, var(--brand-900), var(--brand-700)); color: #fff; padding: 3.25rem 0 3rem; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgb(255 255 255 / .07) 1px, transparent 1px); background-size: 22px 22px; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: .35rem; }
.page-hero p { color: #c7d6ee; margin: 0; font-size: 1.05rem; }
.breadcrumb { display: flex; gap: .5rem; font-size: .85rem; color: #9fb5d8; margin-bottom: .85rem; flex-wrap: wrap; }
.breadcrumb a { color: #dbe6f7; }

/* Prose (CMS content) */
.prose { color: var(--ink-2); max-width: 48rem; }
.prose h2 { font-size: 1.45rem; margin-top: 2rem; color: var(--ink); }
.prose h3 { margin-top: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1.25rem; }
.prose li { margin-bottom: .4rem; }
.prose strong { color: var(--ink); }
.prose .callout, .callout { background: #fff7e6; border: 1px solid #fde3a7; border-left: 4px solid var(--accent-500); border-radius: var(--radius-sm); padding: 1rem 1.25rem; margin: 1.5rem 0; }
.callout p:last-child { margin-bottom: 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: .7rem .85rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--surface-3); font-weight: 700; color: var(--ink); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin: 1rem 0 1.5rem; }
.table-wrap table { min-width: 560px; }

.content-layout { display: grid; gap: 2.5rem; }
@media (min-width: 960px) { .content-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 3.5rem; } }
.sidebar-stack { display: grid; gap: 1.25rem; align-content: start; }
@media (min-width: 960px) { .sidebar-stack { position: sticky; top: 96px; } }

/* Forms */
.form-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } .form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .span-2 { grid-column: span 2; } .span-all { grid-column: 1 / -1; } }
.field label, .label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: .35rem; color: var(--ink); }
.field .req { color: var(--danger); }
.input, .field input[type=text], .field input[type=email], .field input[type=tel], .field input[type=password], .field input[type=number], .field input[type=date], .field input[type=search], .field input[type=url], .field select, .field textarea {
    width: 100%; padding: .7rem .9rem; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
    font: inherit; font-size: .95rem; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 4px rgb(37 99 184 / .15); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .82rem; margin: .3rem 0 0; font-weight: 600; }
.field-help { color: var(--muted); font-size: .8rem; margin: .3rem 0 0; }
.checkbox { display: flex; gap: .55rem; align-items: flex-start; font-size: .92rem; color: var(--ink-2); cursor: pointer; }
.checkbox input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand-600); }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.form-actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-top: 1.5rem; }

/* Alerts */
.alert { padding: .9rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: 1.25rem; font-weight: 600; font-size: .93rem; display: flex; gap: .65rem; align-items: flex-start; }
.alert svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-info { background: var(--info-bg); color: var(--info); }
.alert-warning { background: var(--warning-bg); color: var(--warning); }

/* Verification result */
.result-card { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; }
.result-head { padding: 1.1rem 1.5rem; display: flex; align-items: center; gap: .75rem; font-weight: 800; }
.result-head svg { width: 26px; height: 26px; }
.result-head.ok { background: var(--success-bg); color: var(--success); }
.result-head.fail { background: var(--danger-bg); color: var(--danger); }
.result-body { padding: 1.5rem; display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .result-body { grid-template-columns: 140px 1fr; } }
.result-photo { width: 140px; height: 170px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-3); }
.photo-placeholder { width: 140px; height: 170px; border-radius: var(--radius-sm); background: var(--surface-3); display: grid; place-items: center; color: var(--muted); font-size: .8rem; text-align: center; padding: .5rem; border: 1px dashed var(--line-2); }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1.25rem; margin: 0; font-size: .95rem; }
.dl dt { color: var(--muted); font-weight: 600; }
.dl dd { margin: 0; font-weight: 700; color: var(--ink); word-break: break-word; }

/* Center list */
.center-card { display: flex; flex-direction: column; gap: .35rem; }
.center-card .code { font-size: .78rem; font-weight: 800; color: var(--accent-600); letter-spacing: .05em; }
.center-card .line { display: flex; gap: .5rem; color: var(--ink-2); font-size: .92rem; align-items: flex-start; }
.center-card .line svg { width: 16px; height: 16px; margin-top: 4px; flex: none; color: var(--muted); }
.search-bar { display: flex; gap: .5rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.search-bar .input { flex: 1; min-width: 220px; border-radius: 999px; padding-left: 1.2rem; }

/* Downloads */
.download-row { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.download-row + .download-row { margin-top: .65rem; }
.download-row .file-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--danger-bg); color: var(--danger); display: grid; place-items: center; flex: none; font-size: .7rem; font-weight: 800; }
.download-row .grow { flex: 1; min-width: 0; font-weight: 700; }

/* Footer */
.site-footer { background: var(--brand-900); color: #b3c5e2; padding: 4rem 0 0; font-size: .93rem; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.site-footer a { color: #dbe6f7; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.footer-brand img { height: 44px; border-radius: 6px; margin-bottom: 1rem; }
.footer-contact { display: grid; gap: .75rem; }
.footer-contact div { display: flex; gap: .6rem; }
.footer-contact svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--accent-400); }
.socials { display: flex; gap: .5rem; margin-top: 1rem; }
.socials a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / .08); }
.socials svg { width: 18px; height: 18px; }
.footer-bottom { border-top: 1px solid rgb(255 255 255 / .1); margin-top: 3rem; padding: 1.25rem 0; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; }

.whatsapp-fab { position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-lg); }
.whatsapp-fab svg { width: 30px; height: 30px; }

/* Shared utilities */
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; } .gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; } .wrap { flex-wrap: wrap; }
.nowrap { white-space: nowrap; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty svg { width: 44px; height: 44px; margin: 0 auto .75rem; color: var(--line-2); }

.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; background: var(--surface-3); color: var(--ink-2); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-brand { background: var(--brand-50); color: var(--brand-700); }

/* Pagination */
.pagination { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-top: 1.25rem; font-size: .88rem; }
.pagination .pages { display: flex; gap: .3rem; flex-wrap: wrap; }
.pagination a, .pagination span.current { min-width: 36px; height: 36px; padding: 0 .6rem; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-weight: 600; }
.pagination a:hover { border-color: var(--brand-500); color: var(--brand-600); }
.pagination span.current { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.pagination .gap { padding: 0 .25rem; color: var(--muted); }

/* Auth pages */
.auth-page { min-height: 100vh; display: grid; background: linear-gradient(135deg, var(--brand-900), var(--brand-600)); }
@media (min-width: 960px) { .auth-page { grid-template-columns: 1fr 1fr; } }
.auth-side { display: none; color: #fff; padding: 3rem; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgb(255 255 255 / .08) 1px, transparent 1px); background-size: 22px 22px; }
.auth-side > * { position: relative; z-index: 1; }
.auth-side h1 { color: #fff; font-size: 2.3rem; }
.auth-side p { color: #c7d6ee; font-size: 1.05rem; max-width: 30rem; }
@media (min-width: 960px) { .auth-side { display: flex; } }
.auth-main { background: var(--surface-2); display: grid; place-items: center; padding: 2rem 16px; }
.auth-card { width: 100%; max-width: 420px; background: #fff; padding: 2.25rem; border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid var(--line); }
.auth-card h2 { font-size: 1.6rem; margin-bottom: .25rem; }
.auth-card .brand { margin-bottom: 1.75rem; }

/* ========== Portal (admin + center) ========== */
.portal { background: var(--surface-2); min-height: 100vh; }
.portal-shell { display: grid; min-height: 100vh; }
@media (min-width: 1024px) { .portal-shell { grid-template-columns: 260px minmax(0, 1fr); } }
.portal-sidebar { background: var(--brand-900); color: #b3c5e2; position: fixed; inset: 0 auto 0 0; width: 270px; transform: translateX(-100%); transition: transform .2s; z-index: 70; display: flex; flex-direction: column; overflow-y: auto; }
.portal-sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
@media (min-width: 1024px) { .portal-sidebar { position: sticky; top: 0; height: 100vh; transform: none; width: auto; } }
.portal-brand { display: flex; align-items: center; gap: .75rem; padding: 1.25rem 1.25rem 1rem; color: #fff; }
.portal-brand img { height: 36px; border-radius: 6px; }
.portal-brand strong { display: block; font-size: .98rem; }
.portal-brand small { color: #8fa6cc; font-size: .75rem; }
.portal-nav { padding: .5rem .75rem 1.5rem; display: grid; gap: .15rem; }
.portal-nav .group { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #6f88b3; font-weight: 800; padding: 1rem .75rem .4rem; }
.portal-nav a { display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; border-radius: 8px; color: #c7d6ee; font-weight: 600; font-size: .92rem; }
.portal-nav a svg { width: 19px; height: 19px; opacity: .85; }
.portal-nav a:hover { background: rgb(255 255 255 / .07); color: #fff; }
.portal-nav a.active { background: var(--brand-600); color: #fff; }
.portal-nav .count { margin-left: auto; background: var(--accent-500); color: #1f1300; font-size: .7rem; font-weight: 800; padding: .05rem .45rem; border-radius: 999px; }
.portal-backdrop { display: none; position: fixed; inset: 0; background: rgb(15 23 42 / .45); z-index: 65; }
.portal-backdrop.open { display: block; }

.portal-top { position: sticky; top: 0; z-index: 40; background: rgb(255 255 255 / .95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.portal-top .bar { display: flex; align-items: center; gap: .75rem; padding: .75rem 16px; min-height: 64px; }
@media (min-width: 768px) { .portal-top .bar { padding: .75rem 28px; } }
.portal-top .title { font-weight: 800; font-size: 1.05rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-top .who { display: flex; align-items: center; gap: .6rem; font-size: .88rem; }
.portal-top .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-100); color: var(--brand-700); display: grid; place-items: center; font-weight: 800; }
.portal-top .who-name { display: none; }
@media (min-width: 640px) { .portal-top .who-name { display: block; } }
.portal-menu-btn { display: inline-flex; }
@media (min-width: 1024px) { .portal-menu-btn { display: none; } }
.portal-main { padding: 20px 16px 48px; min-width: 0; }
@media (min-width: 768px) { .portal-main { padding: 28px 28px 56px; } }

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head h1 { font-size: 1.55rem; margin: 0; }
.page-head p { margin: .25rem 0 0; color: var(--muted); }
.page-head .actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.kpis { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; margin-bottom: 1.5rem; }
@media (min-width: 1100px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem 1.25rem; display: flex; gap: 1rem; align-items: center; box-shadow: var(--shadow-sm); }
.kpi .icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--brand-50); color: var(--brand-600); }
.kpi .icon svg { width: 23px; height: 23px; }
.kpi .icon.amber { background: #fff7e6; color: var(--accent-600); }
.kpi .icon.green { background: var(--success-bg); color: var(--success); }
.kpi .icon.red { background: var(--danger-bg); color: var(--danger); }
.kpi strong { display: block; font-size: 1.45rem; line-height: 1.1; font-weight: 800; }
.kpi span { color: var(--muted); font-size: .82rem; font-weight: 600; }
@media (max-width: 480px) { .kpi { flex-direction: column; align-items: flex-start; gap: .6rem; } }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 1.5rem; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h2 { font-size: 1.02rem; margin: 0; }
.panel-body { padding: 1.25rem; }
.panel-body.flush { padding: 0; }
.panels-2 { display: grid; gap: 1.5rem; }
@media (min-width: 1100px) { .panels-2 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } .panels-2 .panel { margin-bottom: 0; } }

.filters { display: flex; gap: .6rem; flex-wrap: wrap; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.filters .input, .filters select { width: auto; flex: 1 1 160px; padding: .55rem .8rem; border: 1px solid var(--line-2); border-radius: var(--radius-sm); font: inherit; font-size: .9rem; background: #fff; }
.filters .search { flex: 3 1 240px; }

.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 800; padding: .75rem 1rem; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: .75rem 1rem; border-bottom: 1px solid var(--surface-3); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfdff; }
.data-table .thumb { width: 38px; min-width: 38px; height: 46px; object-fit: cover; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--line); }
.data-table .thumb-empty { width: 38px; min-width: 38px; height: 46px; border-radius: 6px; background: var(--surface-3); border: 1px dashed var(--line-2); }
.data-table .primary { font-weight: 700; color: var(--ink); }
.data-table .sub { color: var(--muted); font-size: .8rem; }
.row-actions { display: flex; gap: .35rem; justify-content: flex-end; flex-wrap: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; }

.detail-grid { display: grid; gap: 1.5rem; }
@media (min-width: 1100px) { .detail-grid { grid-template-columns: minmax(0, 1fr) 320px; } }
.photo-box { width: 150px; }
.photo-box img { width: 150px; height: 180px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.photo-upload { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.photo-upload .preview { width: 96px; height: 116px; border-radius: var(--radius-sm); border: 1px dashed var(--line-2); background: var(--surface-3) center / cover no-repeat; flex: none; display: grid; place-items: center; color: var(--muted); font-size: .72rem; text-align: center; }

.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: .75rem 1.25rem; border-bottom: 1px solid var(--surface-3); display: flex; justify-content: space-between; gap: 1rem; align-items: center; font-size: .9rem; }
.list-plain li:last-child { border-bottom: 0; }

.bar-chart { display: grid; gap: .6rem; }
.bar-chart .row { display: grid; grid-template-columns: 110px 1fr 46px; gap: .75rem; align-items: center; font-size: .85rem; }
.bar-chart .track { display: block; height: 10px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.bar-chart .fill { display: block; height: 100%; background: var(--brand-500); border-radius: 999px; }
.bar-chart .val { text-align: right; font-weight: 700; }

.inline-form { display: inline; }
details.disclosure summary { cursor: pointer; font-weight: 700; color: var(--brand-600); }

@media print {
    .no-print { display: none !important; }
}

.icon-inline { width: 15px; height: 15px; display: inline-block; vertical-align: -2px; }

a.kpi { color: inherit; transition: border-color .15s, box-shadow .15s; }
a.kpi:hover { border-color: var(--brand-200); box-shadow: var(--shadow); color: inherit; }
.icon-md { width: 22px; height: 22px; flex: none; }

/* Marks entry */
.marks-table .input { width: 100%; padding: .45rem .6rem; border: 1px solid var(--line-2); border-radius: var(--radius-sm); font: inherit; font-size: .9rem; background: #fff; }
.marks-table .input:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px rgb(37 99 184 / .15); }
.marks-table .input.is-wrong { border-color: var(--danger); background: var(--danger-bg); }
.marks-table tfoot th { background: var(--surface-2); font-size: .85rem; color: var(--ink); padding: .75rem 1rem; }
.result-pass { color: var(--success); font-weight: 800; }
.result-fail { color: var(--danger); font-weight: 800; }
@media (min-width: 640px) { .form-grid.cols-3 .span-2 { grid-column: span 2; } }
.marks-table input[name$="[subject_name]"] { min-width: 240px; }
.stamp-field { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.stamp-preview { width: 120px; height: 90px; border: 1px dashed var(--line-2); border-radius: var(--radius-sm); flex: none; display: grid; place-items: center; color: var(--muted); font-size: .75rem;
    background: center / contain no-repeat, repeating-conic-gradient(#f1f5f9 0 25%, #fff 0 50%) 0 0 / 12px 12px; }

.course-picker { max-height: 300px; overflow-y: auto; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: .35rem .6rem; margin-top: .5rem; display: grid; gap: .1rem; background: #fff; }
.course-picker .checkbox { padding: .35rem .2rem; border-bottom: 1px solid var(--surface-3); font-size: .88rem; }
.course-picker .checkbox:last-child { border-bottom: 0; }

/* Student lookup */
.lookup-panel { border-color: var(--brand-200); background: var(--brand-50); }
.lookup-panel .input { font-size: 1rem; padding: .8rem 1rem; }
.lookup { position: relative; }
.lookup-results { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: .3rem; list-style: none; background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow-lg); max-height: 420px; overflow-y: auto; }
.lookup-results li[role=option] { display: flex; gap: .75rem; align-items: center; padding: .55rem .65rem; border-radius: var(--radius-sm); cursor: pointer; }
.lookup-results li.active, .lookup-results li[role=option]:hover { background: var(--brand-50); }
.lookup-results img, .lookup-nophoto { width: 36px; height: 44px; object-fit: cover; border-radius: 6px; flex: none; background: var(--surface-3); border: 1px solid var(--line); }
.lookup-text { display: flex; flex-direction: column; min-width: 0; font-size: .9rem; }
.lookup-number { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; color: var(--brand-700); }
.lookup-details { color: var(--muted); font-size: .8rem; }
.lookup-note { color: var(--warning); font-size: .78rem; font-weight: 700; }
.lookup-empty { padding: .8rem; color: var(--muted); font-size: .9rem; }
