/* =========================================================================
   SKV Student Portal — Design System
   A modern, school-friendly, app-like UI shared by every student-facing
   page (auth, admission application, payment, academics).
   ========================================================================= */

:root {
    /* Brand */
    --brand-1: #4f46e5;
    --brand-2: #7c3aed;
    --brand-grad: linear-gradient(135deg, var(--brand-1), var(--brand-2));

    /* Module accents (match the mobile app's palette) */
    --a-attendance: #3b82f6;
    --a-homework: #f59e0b;
    --a-activities: #10b981;
    --a-syllabus: #8b5cf6;
    --a-timetable: #6366f1;
    --a-exams: #ef4444;
    --a-weekly: #0d9488;
    --a-revision: #ea580c;
    --a-notices: #ec4899;
    --a-calendar: #06b6d4;
    --a-profile: #64748b;

    /* Semantic */
    --ok: #16a34a;
    --ok-bg: #dcfce7;
    --bad: #dc2626;
    --bad-bg: #fee2e2;
    --warn: #d97706;
    --warn-bg: #fef3c7;
    --info: #2563eb;
    --info-bg: #dbeafe;

    /* Neutrals */
    --ink: #1e293b;
    --ink-soft: #475569;
    --muted: #94a3b8;
    --line: #e7ecf3;
    --surface: #ffffff;
    --bg: #f4f6fb;

    /* Metrics */
    --radius: 18px;
    --radius-sm: 12px;
    --radius-lg: 26px;
    --shadow-sm: 0 2px 8px rgba(30, 41, 59, .05);
    --shadow: 0 10px 30px rgba(30, 41, 59, .08);
    --shadow-lift: 0 16px 40px rgba(79, 70, 229, .16);
    --sidebar-w: 264px;
    --topbar-h: 68px;
    --bottomnav-h: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: 'Outfit', 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    font-size: 14.5px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font-family: inherit; }
::selection { background: #c7d2fe; }

/* Decorative ambient background blobs (pure CSS, no assets) */
.bg-blobs { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bg-blobs i {
    position: absolute; border-radius: 50%; filter: blur(70px); opacity: .35;
}
.bg-blobs i:nth-child(1) { width: 380px; height: 380px; top: -120px; right: -100px; background: #a5b4fc; }
.bg-blobs i:nth-child(2) { width: 320px; height: 320px; bottom: -100px; left: -80px; background: #fbcfe8; }

/* =========================================================================
   Scaffold: sidebar + topbar + content
   ========================================================================= */

.shell { position: relative; z-index: 1; min-height: 100vh; }

.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w);
    background: var(--surface); border-right: 1px solid var(--line);
    display: flex; flex-direction: column; z-index: 40;
    transition: transform .28s ease;
}
.sidebar-brand {
    display: flex; align-items: center; gap: 12px; padding: 20px 20px 16px;
}
.sidebar-brand .mark {
    width: 42px; height: 42px; border-radius: 50%; background: #fff;
    object-fit: contain; flex-shrink: 0; box-shadow: 0 4px 12px rgba(15, 23, 42, .14);
}
.sidebar-brand .txt { font-weight: 800; font-size: 15px; color: var(--ink); line-height: 1.15; }
.sidebar-brand .txt small { display: block; font-weight: 500; font-size: 10.5px; color: var(--muted); letter-spacing: .04em; }

.sidebar-close { display: none; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 6px 14px 14px; }
.sidebar-nav .grp-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 14px 12px 6px; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 13px;
    color: var(--ink-soft); font-weight: 600; font-size: 13.5px; margin-bottom: 2px;
    position: relative; transition: background .15s, color .15s;
}
.sidebar-nav a svg { width: 19px; height: 19px; flex-shrink: 0; opacity: .85; }
.sidebar-nav a:hover { background: #f1f3fb; color: var(--ink); }
.sidebar-nav a.on { background: var(--brand-grad); color: #fff; box-shadow: 0 8px 18px rgba(79, 70, 229, .28); }
.sidebar-nav a.on svg { opacity: 1; }
.sidebar-nav a .dot { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); }

.sidebar-foot { padding: 14px; border-top: 1px solid var(--line); }
.sidebar-foot a {
    display: flex; align-items: center; gap: 10px; padding: 10px 13px; border-radius: 12px;
    font-weight: 600; font-size: 13px; color: var(--bad); background: var(--bad-bg);
}
.sidebar-foot a svg { width: 17px; height: 17px; }

.sidebar-scrim { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 39; }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
    height: var(--topbar-h); background: rgba(255, 255, 255, .85); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px;
    padding: 0 24px; position: sticky; top: 0; z-index: 30;
}
.hbtn {
    display: none; width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line);
    background: #fff; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
.hbtn svg { width: 19px; height: 19px; }
.topbar-title { font-weight: 800; font-size: 17px; }
.topbar-sub { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.child-pill {
    display: flex; align-items: center; gap: 9px; padding: 6px 14px 6px 6px; border-radius: 100px;
    background: #f1f3fb; border: 1px solid var(--line); cursor: pointer; position: relative;
}
/* The name/roll block must be able to shrink inside the pill (flex min-width
   trap) — otherwise long names poke out of the rounded container. */
.child-pill > div { min-width: 0; }
.child-pill .nm, .child-pill .gd { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Page title block: take the leftover space and ellipsize, never wrap/crush. */
.topbar-heading { min-width: 0; flex: 1; }
.topbar-title, .topbar-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.child-pill img, .child-pill .ph {
    width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--brand-grad);
    color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12.5px;
}
.child-pill .nm { font-weight: 700; font-size: 12.5px; line-height: 1.15; }
.child-pill .gd { font-size: 10px; color: var(--muted); }
.child-pill svg { width: 14px; height: 14px; color: var(--muted); }

.child-menu {
    display: none; position: absolute; top: calc(100% + 8px); right: 0; min-width: 240px;
    background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
    padding: 8px; z-index: 50;
}
.child-menu.open { display: block; }
.child-menu a {
    display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 11px; font-size: 13px; font-weight: 600;
}
.child-menu a:hover { background: #f1f3fb; }
.child-menu a.on { background: #eef0fd; color: var(--brand-1); }
.child-menu a img, .child-menu a .ph {
    width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--brand-grad); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 11.5px; flex-shrink: 0;
}

.icon-btn {
    width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: #fff;
    display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; flex-shrink: 0;
}
.icon-btn svg { width: 18px; height: 18px; color: var(--ink-soft); }
.icon-btn .badge {
    position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; border-radius: 8px;
    background: var(--bad); color: #fff; font-size: 9.5px; font-weight: 800; display: flex;
    align-items: center; justify-content: center; padding: 0 3px; border: 2px solid #fff;
}

.content { padding: 22px 24px 90px; flex: 1; animation: fadeUp .35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Bottom tab bar (mobile app parity) */
.bottomnav {
    display: none; position: fixed; left: 0; right: 0; bottom: 0; height: var(--bottomnav-h);
    background: rgba(255, 255, 255, .95); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
    z-index: 35; align-items: stretch; padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; font-size: 10px; font-weight: 700; color: var(--muted);
}
.bottomnav a svg { width: 20px; height: 20px; }
.bottomnav a.on { color: var(--brand-1); }
.bottomnav a.more svg { width: 20px; height: 20px; }

/* =========================================================================
   Toasts (replace flat flash-message divs)
   ========================================================================= */
.toasts { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: 340px; }
.toast {
    background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 13px 16px; display: flex;
    gap: 11px; align-items: flex-start; border-left: 4px solid var(--info); animation: toastIn .35s ease both;
}
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--bad); }
.toast svg { width: 19px; height: 19px; flex-shrink: 0; margin-top: 1px; }
.toast.ok svg { color: var(--ok); }
.toast.err svg { color: var(--bad); }
.toast .tx { font-size: 12.8px; font-weight: 600; color: var(--ink-soft); line-height: 1.45; }
.toast .cl { margin-left: auto; cursor: pointer; color: var(--muted); background: none; border: none; padding: 2px; }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

/* =========================================================================
   Building blocks
   ========================================================================= */

.card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow-sm);
}
.card-h {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 16px;
}
.card-h h2 { font-size: 15.5px; font-weight: 800; margin: 0; display: flex; align-items: center; gap: 8px; }
.card-h h2 svg { width: 18px; height: 18px; }
.card-h .right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.grid2 { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
/* Let grid items shrink below their content's min-content, so wide children
   (Chart.js canvases, tables, long unbroken text) can't force overflow. */
.grid2 > *, .grid3 > *, .grid4 > * { min-width: 0; }
/* Two-up chart pair (dashboard insights): side-by-side on desktop, stacked on phones. */
.chart-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chart-pair > * { min-width: 0; }
@media (max-width: 600px) { .chart-pair { grid-template-columns: 1fr; } }

.hero {
    background: var(--brand-grad); border-radius: var(--radius-lg); padding: 26px 28px; color: #fff;
    position: relative; overflow: hidden; margin-bottom: 20px;
}
.hero::after {
    content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%;
    background: rgba(255, 255, 255, .12); top: -100px; right: -60px;
}
.hero h1 { font-size: 21px; font-weight: 800; margin: 0 0 4px; position: relative; }
.hero p { font-size: 13px; opacity: .92; margin: 0; position: relative; }

/* Module quick-launch tiles */
.mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 13px; margin-bottom: 22px; }
.mod {
    background: #fff; border: 1px solid var(--line); border-radius: 17px; padding: 16px;
    display: flex; flex-direction: column; gap: 10px; transition: transform .18s, box-shadow .18s, border-color .18s;
    position: relative; overflow: hidden;
}
.mod:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.mod .ic {
    width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff;
}
.mod .ic svg { width: 20px; height: 20px; }
.mod .t { font-weight: 700; font-size: 13.3px; color: var(--ink); }
.mod .s { font-size: 10.8px; color: var(--muted); font-weight: 500; margin-top: -6px; }

/* Stat cards */
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 15px; text-align: center; }
.stat .v { font-size: 23px; font-weight: 800; }
.stat .l { font-size: 10.8px; color: var(--muted); font-weight: 600; margin-top: 2px; text-transform: uppercase; letter-spacing: .03em; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 7px; background: var(--brand-grad); color: #fff; border: none;
    cursor: pointer; font-weight: 700; font-size: 13px; padding: 10px 20px; border-radius: 100px;
    transition: transform .15s, box-shadow .15s; box-shadow: 0 6px 16px rgba(79, 70, 229, .25);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(79, 70, 229, .32); }
.btn:active { transform: translateY(0); }
.btn svg { width: 15px; height: 15px; }
.btn.ghost { background: #fff; color: var(--ink-soft); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { background: #f8fafc; box-shadow: none; }
.btn.danger { background: var(--bad); box-shadow: 0 6px 16px rgba(220, 38, 38, .25); }
.btn.green { background: linear-gradient(135deg, #16a34a, #15803d); box-shadow: 0 6px 16px rgba(22, 163, 74, .25); }
.btn.sm { padding: 7px 14px; font-size: 11.8px; }
.btn.block { width: 100%; justify-content: center; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }

.iconbox {
    display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
    border-radius: 11px; border: 1px solid var(--line); background: #fff; cursor: pointer;
}
.iconbox svg { width: 16px; height: 16px; }

/* Chips / badges */
.chip {
    display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 100px;
    font-size: 10.8px; font-weight: 700; white-space: nowrap;
}
.chip.blue { background: var(--info-bg); color: var(--info); }
.chip.green { background: var(--ok-bg); color: var(--ok); }
.chip.red { background: var(--bad-bg); color: var(--bad); }
.chip.amber { background: var(--warn-bg); color: var(--warn); }
.chip.gray { background: #f1f5f9; color: var(--muted); }
.chip.purple { background: #ede9fe; color: #6d28d9; }
.chip.pink { background: #fce7f3; color: #be185d; }

/* Progress bars */
.bar { height: 8px; border-radius: 6px; background: #eef1f8; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 6px; transition: width 1s cubic-bezier(.22, 1, .36, 1); }

/* Radial ring (pure CSS, conic-gradient) */
.ring {
    --p: 0; --c: var(--brand-1); width: 96px; height: 96px; border-radius: 50%; position: relative;
    background: conic-gradient(var(--c) calc(var(--p) * 1%), #eef1f8 0);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #fff; }
.ring b { position: relative; font-size: 18px; font-weight: 800; }
.ring.sm { width: 60px; height: 60px; }
.ring.sm b { font-size: 12px; }
.ring.sm::before { inset: 6px; }

/* Table → responsive card-list */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--line); font-weight: 700; }
.tbl td { padding: 12px; border-bottom: 1px solid #f1f4f9; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: #fafbff; }

.empty { text-align: center; padding: 46px 16px; color: var(--muted); }
.empty svg { width: 46px; height: 46px; margin-bottom: 10px; opacity: .5; }
.empty .t { font-weight: 700; font-size: 13.5px; color: var(--ink-soft); margin-bottom: 3px; }
.empty .s { font-size: 12px; }

.muted { color: var(--muted); font-size: 12px; }
.list-item { display: flex; gap: 13px; align-items: flex-start; padding: 13px 4px; border-bottom: 1px solid #f1f4f9; }
.list-item:last-child { border-bottom: none; }
.list-item .dot {
    width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; color: #fff; font-weight: 800; font-size: 15px;
}
.list-item .body { flex: 1; min-width: 0; }
.list-item .ttl { font-weight: 700; font-size: 13.2px; }
.list-item .sub { font-size: 11.3px; color: var(--muted); margin-top: 2px; }

/* Filter bars / forms */
.filterbar { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 11px; font-weight: 700; color: var(--ink-soft); }
input[type=text], input[type=date], input[type=email], input[type=number], input[type=password], input[type=file], select, textarea {
    font-family: inherit; padding: 10px 13px; border: 1.5px solid var(--line); border-radius: 12px; font-size: 13px;
    background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-1); box-shadow: 0 0 0 4px rgba(79, 70, 229, .1); }
textarea { resize: vertical; min-height: 68px; }
select { cursor: pointer; }

.tabbar { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tabbar a, .tabbar button {
    padding: 9px 17px; border-radius: 100px; font-size: 12.5px; font-weight: 700; border: 1.5px solid var(--line);
    background: #fff; color: var(--ink-soft); cursor: pointer;
}
.tabbar a.on, .tabbar button.on { background: var(--brand-grad); color: #fff; border-color: transparent; }

/* Content HTML (teacher-authored rich text blocks) */
.rich {
    background: #f8fafc; border: 1px solid #eef2f7; border-radius: 14px; padding: 16px; font-size: 13.3px;
    line-height: 1.75; color: var(--ink-soft);
}
.rich img { border-radius: 10px; margin: 6px 0; }
.rich table { width: 100%; border-collapse: collapse; }
.rich table td, .rich table th { border: 1px solid #e2e8f0; padding: 6px 9px; }

/* Withheld result banner */
.withheld {
    background: linear-gradient(135deg, #fef2f2, #fee2e2); border: 1px solid #fecaca; border-radius: var(--radius);
    padding: 30px; text-align: center;
}
.withheld svg { width: 40px; height: 40px; color: var(--bad); margin-bottom: 8px; }
.withheld .t { font-weight: 800; color: var(--bad); font-size: 16px; letter-spacing: .03em; }
.withheld .s { color: #7f1d1d; font-size: 13px; margin-top: 6px; }

/* Responsive */
@media (max-width: 1080px) {
    .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
    .sidebar { transform: translateX(-100%); box-shadow: 0 0 0 transparent; }
    .sidebar.open { transform: none; box-shadow: 20px 0 60px rgba(15, 23, 42, .25); }
    .sidebar-scrim.open { display: block; }
    .sidebar-close { display: flex; margin-left: auto; }
    .main { margin-left: 0; }
    .hbtn { display: flex; }
    .content { padding: 16px 14px 90px; }
    .grid3 { grid-template-columns: repeat(2, 1fr); }
    .grid4 { grid-template-columns: repeat(2, 1fr); }
    .bottomnav { display: flex; }
    body { padding-bottom: 0; }
    .topbar { padding: 0 14px; gap: 9px; }
    .child-pill { max-width: 45vw; }
    .child-pill .nm { max-width: 100%; }
    .child-pill .nm .nm-rest { display: none; }   /* first name only on mobile */
    .topbar-right { flex-shrink: 0; max-width: 60vw; }
    .topbar-title { font-size: 14px; }
    .topbar-sub { font-size: 10px; }
}
@media (max-width: 620px) {
    .grid3 { grid-template-columns: 1fr 1fr; }
    table.tbl.stackable, table.tbl.stackable thead { display: none; }
    table.tbl.stackable, table.tbl.stackable tbody, table.tbl.stackable tr, table.tbl.stackable td { display: block; width: 100%; }
    table.tbl.stackable tr { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; padding: 10px 12px; }
    table.tbl.stackable td { border: none; padding: 5px 0; }
    table.tbl.stackable td::before { content: attr(data-label); display: block; font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
    .card-h { flex-direction: column; align-items: flex-start; }
}

@media print {
    .sidebar, .topbar, .bottomnav, .no-print { display: none !important; }
    .main { margin-left: 0; }
    body { background: #fff; }
}

/* =========================================================================
   DataTables skin (student portal tables: search / sort / pagination)
   ========================================================================= */
.dt-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.dt-bot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.dataTables_length label, .dataTables_filter label, .dataTables_info { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 7px; margin: 0; }
.dataTables_length select { padding: 7px 10px; border-radius: 10px; font-size: 12px; }
.dataTables_filter input { padding: 9px 13px; border-radius: 11px; font-size: 12.5px; min-width: 190px; }
.dataTables_paginate { display: flex; gap: 5px; flex-wrap: wrap; }
.dataTables_paginate .paginate_button {
    padding: 6px 12px; border-radius: 9px; border: 1px solid var(--line); background: #fff;
    font-size: 12px; font-weight: 700; color: var(--ink-soft) !important; cursor: pointer; text-decoration: none;
}
.dataTables_paginate .paginate_button.current { background: var(--brand-grad); color: #fff !important; border-color: transparent; }
.dataTables_paginate .paginate_button.disabled { opacity: .4; pointer-events: none; }
.dataTables_paginate .paginate_button:hover:not(.current):not(.disabled) { background: #f1f3fb; }
table.dataTable thead th { cursor: pointer; user-select: none; position: relative; padding-right: 20px !important; white-space: nowrap; }
table.dataTable thead th.sorting::after, table.dataTable thead th.sorting_asc::after, table.dataTable thead th.sorting_desc::after {
    content: "⇅"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 10px; opacity: .35;
}
table.dataTable thead th.sorting_asc::after { content: "↑"; opacity: .9; color: var(--brand-1); }
table.dataTable thead th.sorting_desc::after { content: "↓"; opacity: .9; color: var(--brand-1); }
table.dataTable thead th.sorting_disabled::after { content: ""; }
.dataTables_empty { text-align: center; color: var(--muted); padding: 30px !important; }
.dt-filters { display: flex; gap: 9px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
@media (max-width: 620px) {
    .dt-top, .dt-bot { flex-direction: column; align-items: stretch; }
    .dataTables_filter input { width: 100%; }
}

/* =========================================================================
   Admission application wizard (views/student/application_form/*)
   Class names below are load-bearing for _step1_general.php, _step1_senior.php,
   _step2_docs.php, _step3_review.php — kept stable, only the visual tokens changed.
   ========================================================================= */

.steps { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.steps a {
    flex: 1; min-width: 140px; text-align: center; padding: 13px 10px; border-radius: 14px;
    background: #fff; border: 1.5px solid var(--line); color: var(--muted); font-size: 12.8px; font-weight: 700;
    pointer-events: none; transition: all .2s;
}
.steps a.done { color: var(--ok); border-color: #bbf7d0; background: var(--ok-bg); pointer-events: auto; }
.steps a.active { color: #fff; background: var(--brand-grad); border-color: transparent; pointer-events: auto; box-shadow: 0 8px 18px rgba(79, 70, 229, .28); }

.panel { display: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; animation: fadeUp .3s ease both; }
.panel.show { display: block; }
.panel h2 { font-size: 16.5px; font-weight: 800; margin-bottom: 4px; }
.panel .sub { font-size: 12.5px; color: var(--muted); margin-bottom: 22px; }

.sec {
    font-size: 12px; font-weight: 800; color: var(--brand-1); text-transform: uppercase; letter-spacing: .06em;
    margin: 28px 0 13px; padding-bottom: 8px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 7px;
}
.sec:first-of-type { margin-top: 0; }

.row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px 16px; margin-bottom: 14px; }
.row.c2 { grid-template-columns: 1fr 1fr; }
.row.c4 { grid-template-columns: repeat(4, 1fr); }
/* Grid cells may shrink below their content (long <option> text would otherwise
   set the cell width), and every control fills its cell instead of auto-sizing. */
.row > * { min-width: 0; }
.f input:not([type=radio]):not([type=checkbox]), .f select, .f textarea { width: 100%; max-width: 100%; }
@media (max-width: 760px) { .row, .row.c4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .row, .row.c4, .row.c2 { grid-template-columns: 1fr; } }
.full { grid-column: 1 / -1; }

.f label { display: block; font-size: 11.8px; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; }
.f label .req { color: var(--bad); }
.f .radios { display: flex; gap: 18px; padding: 10px 0; }
.f .radios label { display: flex; align-items: center; gap: 7px; font-weight: 500; font-size: 13.3px; color: var(--ink-soft); margin: 0; cursor: pointer; }

.doc { border: 1.5px dashed var(--line); border-radius: 14px; padding: 17px; text-align: center; transition: all .2s; }
.doc.uploaded { border-style: solid; border-color: #bbf7d0; background: var(--ok-bg); }
.doc label { display: block; font-size: 12px; font-weight: 700; color: var(--ink-soft); margin-bottom: 7px; }
.doc .req { color: var(--bad); }
.doc img { max-width: 100%; max-height: 108px; border-radius: 9px; margin-bottom: 8px; }
.doc input[type=file] { width: 100%; font-size: 11.5px; }
.doc .st { display: block; font-size: 10.8px; margin-top: 7px; color: var(--ok); font-weight: 700; }

.rv { width: 100%; border-collapse: collapse; font-size: 13px; }
.rv td { padding: 9px 10px; border-bottom: 1px solid #f1f4f9; vertical-align: top; }
.rv td:first-child { width: 38%; color: var(--muted); font-weight: 600; }

.decl {
    background: var(--warn-bg); border: 1px solid #fde68a; border-radius: 13px; padding: 15px 17px;
    font-size: 12.8px; color: #92400e; margin-top: 22px; display: flex; gap: 10px; align-items: flex-start;
}

.actions { margin-top: 26px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
