/* Nisably - Application Styles */
:root {
    --primary: #2563eb;
    --primary-dark: #1b4fd0;
    --sidebar-bg: #101a4d;
    --sidebar-hover: #1e2a6e;
    --bg: #f2f5f9;
    --card: #ffffff;
    --text: #1f2933;
    --muted: #6b7a8d;
    --border: #dde4ec;
    --success: #1a7f4b;
    --danger: #c0392b;
    --warning: #b7791f;
    --info: #2172ad;
    --purple: #8b2fe0;
    --radius: 10px;

    /* Shared with the public website and the sign-in screens: an editorial
       palette and a serif display face, both system-only (no web fonts). */
    --ink: #0d1533;
    --ink-soft: #23384c;
    --cream: #faf8f4;
    --line: #e6e2da;
    --body: #46586a;
    --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- App shell ---- */
.app { display: flex; min-height: 100vh; }

.sidebar {
    width: 256px; flex-shrink: 0; display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain;
    color: #a9bcd4; font-size: 13.2px;
    background:
        radial-gradient(120% 55% at 0% 0%, rgba(59,91,245,.24), transparent 62%),
        radial-gradient(90% 40% at 100% 100%, rgba(139,45,240,.16), transparent 60%),
        linear-gradient(180deg, #0e2038 0%, #0c1a2e 55%, #0a1626 100%);
    box-shadow: inset -1px 0 0 rgba(255,255,255,.06), 4px 0 24px -12px rgba(8,17,30,.6);
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent;
}
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
.sidebar:hover::-webkit-scrollbar-thumb { background: rgba(255,255,255,.26); background-clip: content-box; }

/* Brand — pinned to the top while the (long) nav scrolls beneath it */
.sidebar .brand {
    position: sticky; top: 0; z-index: 3;
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px;
    padding: 16px 16px 14px;
    background: linear-gradient(180deg, rgba(14,32,56,.97), rgba(13,28,49,.88));
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.sidebar .brand-mark {
    width: 38px; height: 38px; padding: 6px; border-radius: 11px; object-fit: contain;
    background: linear-gradient(140deg, rgba(18,165,245,.22), rgba(139,45,240,.22));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 6px 16px -8px rgba(59,91,245,.9);
}
.sidebar .brand-text { min-width: 0; }
.sidebar .brand-name {
    display: block; font-size: 17px; font-weight: 700; letter-spacing: -.2px; color: #fff; line-height: 1.15;
}
.sidebar .brand small {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    font-size: 10.5px; font-weight: 400; color: #7f96b3; line-height: 1.35; margin-top: 2px;
}
.sidebar .inst-badge { grid-column: 1 / -1; justify-self: start; }

/* Nav */
.sidebar nav { flex: 1; padding: 10px 10px 14px; }
.sidebar .nav-label {
    display: flex; align-items: center; gap: 8px;
    padding: 16px 8px 6px; font-size: 9.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.3px; color: #5f7c9c;
}
.sidebar .nav-label::after {
    content: ''; flex: 1; height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,.13), transparent);
}
.sidebar nav > .nav-label:first-child { padding-top: 4px; }

.sidebar a.nav-link {
    position: relative; display: flex; align-items: center; gap: 10px;
    padding: 8px 11px; margin: 1px 0; border-radius: 9px;
    color: #a9bcd4; line-height: 1.25;
    transition: background .16s ease, color .16s ease, transform .16s ease;
}
.sidebar a.nav-link span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .ni {
    width: 17px; height: 17px; flex-shrink: 0; opacity: .7;
    fill: none; stroke: currentColor; stroke-width: 1.7;
    stroke-linecap: round; stroke-linejoin: round;
    transition: opacity .16s ease;
}
.sidebar a.nav-link:hover {
    background: rgba(255,255,255,.07); color: #fff; text-decoration: none; transform: translateX(2px);
}
.sidebar a.nav-link:hover .ni { opacity: 1; }
.sidebar a.nav-link.active {
    background: linear-gradient(95deg, rgba(59,91,245,.95), rgba(122,58,232,.72));
    color: #fff; font-weight: 600;
    box-shadow: 0 8px 18px -10px rgba(59,91,245,1);
}
.sidebar a.nav-link.active .ni { opacity: 1; stroke-width: 1.9; }
.sidebar a.nav-link.active::before {
    content: ''; position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
    width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: #6ee7ff;
}
.sidebar a.nav-link:focus-visible { outline: 2px solid #6ee7ff; outline-offset: -2px; }

/* User footer — pinned to the bottom of the rail */
.sidebar .user-box {
    position: sticky; bottom: 0; z-index: 3;
    display: flex; align-items: center; gap: 10px; padding: 11px 14px;
    background: linear-gradient(0deg, rgba(10,22,38,.97), rgba(11,25,43,.9));
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255,255,255,.07);
}
.sidebar .avatar {
    width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
    display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: #fff;
    background: linear-gradient(140deg, #12a5f5, #3b5bf5 55%, #8b2df0);
    box-shadow: 0 4px 12px -6px rgba(59,91,245,.9);
}
.sidebar .user-meta { flex: 1; min-width: 0; }
.sidebar .user-meta strong {
    display: block; color: #fff; font-size: 13px; font-weight: 600;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sidebar .user-meta small { color: #7f96b3; font-size: 11px; }
.sidebar a.user-act {
    width: 28px; height: 28px; flex-shrink: 0; border-radius: 8px;
    display: grid; place-items: center; color: #a9bcd4;
    transition: background .16s ease, color .16s ease;
}
.sidebar a.user-act:hover { background: rgba(255,255,255,.1); color: #fff; }
.sidebar a.user-act svg {
    width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
}

/* Burger — only used on narrow screens */
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.sidebar .nav-burger { display: none; }

.main { flex: 1; padding: 24px 28px; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.page-head h1 { font-size: 21px; font-weight: 650; }
.page-head .actions { display: flex; gap: 8px; }

/* ---- Cards ---- */
.card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px;
}
.card h2 { font-size: 15px; font-weight: 650; margin-bottom: 12px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* A tickable row: checkbox beside a label that may carry a second line. */
.check-row {
    display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
    border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
    background: #fff; transition: border-color .12s ease, background .12s ease;
}
.check-row:hover { border-color: var(--primary); }
.check-row input { margin-top: 2px; flex: none; }
.check-row:has(input:checked) { border-color: var(--primary); background: #f5f8ff; }
.check-row small { line-height: 1.35; margin-top: 2px; }

.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.stat .label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.stat .value { font-size: 26px; font-weight: 700; margin-top: 2px; }
.stat .sub { font-size: 12px; color: var(--muted); }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; background: var(--card); }
.table th {
    text-align: left; padding: 9px 12px; font-size: 11.5px; text-transform: uppercase;
    letter-spacing: .5px; color: var(--muted); border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #f7fafc; }
.table .num { text-align: right; }

/* ---- Badges ---- */
.badge {
    display: inline-block; padding: 2px 9px; border-radius: 99px;
    font-size: 11.5px; font-weight: 600;
}
.badge-success { background: #e0f2e9; color: var(--success); }
.badge-danger  { background: #fbe4e0; color: var(--danger); }
.badge-warning { background: #fdf0d8; color: var(--warning); }
.badge-info    { background: #ddedf8; color: var(--info); }
.badge-purple  { background: #eae4f8; color: var(--purple); }
.badge-muted   { background: #e8edf2; color: var(--muted); }

/* ---- Buttons ---- */
.btn {
    display: inline-block; padding: 8px 16px; border-radius: 8px; border: 1px solid transparent;
    font-size: 13.5px; font-weight: 600; cursor: pointer; background: var(--primary); color: #fff;
    font-family: inherit;
}
.btn:hover { background: var(--primary-dark); text-decoration: none; }
.btn-sm { padding: 4px 10px; font-size: 12.5px; border-radius: 6px; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #96281b; }
.btn-success { background: var(--success); }
.btn-success:hover { background: #12613a; }
.btn-muted { background: #e8edf2; color: var(--text); }
.btn-muted:hover { background: #d7dfe8; }

/* ---- Forms ---- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.form-group { margin-bottom: 4px; }
.form-group label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 4px; color: #3d4b5c; }
.form-control, select, textarea {
    width: 100%; padding: 8px 11px; border: 1px solid var(--border); border-radius: 8px;
    font-size: 13.5px; font-family: inherit; background: #fff; color: var(--text);
}
.form-control:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,95,180,.12);
}
textarea { resize: vertical; min-height: 80px; }
.form-actions { margin-top: 16px; display: flex; gap: 10px; }
.filter-bar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.filter-bar .form-group { margin: 0; min-width: 160px; }
.inline-form { display: inline; }

/* ---- Flash messages ---- */
.flash { padding: 11px 16px; border-radius: 8px; margin-bottom: 14px; font-size: 13.5px; font-weight: 500; }
.flash-success { background: #e0f2e9; color: var(--success); border: 1px solid #b8e0c9; }
.flash-error   { background: #fbe4e0; color: var(--danger); border: 1px solid #f2c2ba; }

/* ---- Pipeline tabs ---- */
.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs a {
    padding: 6px 14px; border-radius: 99px; background: var(--card); border: 1px solid var(--border);
    font-size: 13px; font-weight: 600; color: var(--muted);
}
.tabs a:hover { text-decoration: none; border-color: var(--primary); color: var(--primary); }
.tabs a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.tabs .count { opacity: .75; font-weight: 400; }

/* ===============================================================
   Sign-in screens (login, two-factor) and standalone error pages
   =============================================================== */
.auth-body { min-height: 100vh; background: var(--cream); }
.auth-split { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }

/* Brand panel */
.auth-brand {
    position: relative; overflow: hidden; display: flex; flex-direction: column;
    padding: 52px 58px; color: #fff;
    background:
        radial-gradient(85% 60% at 8% 0%, rgba(59,91,245,.30), transparent 62%),
        radial-gradient(70% 50% at 100% 100%, rgba(139,45,240,.24), transparent 60%),
        linear-gradient(160deg, #0e2038 0%, #0c1a2e 55%, #0a1626 100%);
}
.auth-brand::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(rgba(255,255,255,.055) 1px, transparent 1px);
    background-size: 22px 22px; opacity: .8;
}
.auth-brand > * { position: relative; z-index: 1; }
.auth-mark { display: flex; align-items: center; gap: 13px; }
.auth-crest {
    width: 46px; height: 46px; padding: 7px; border-radius: 12px; object-fit: contain;
    background: linear-gradient(140deg, rgba(18,165,245,.22), rgba(139,45,240,.22));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 8px 20px -10px rgba(59,91,245,.9);
}
.auth-wordmark { font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -.3px; line-height: 1.1; }
.auth-wordmark small { display: block; font-family: inherit; font-size: 11.5px; font-weight: 400; letter-spacing: .2px; color: #7f96b3; font-family: 'Segoe UI', system-ui, sans-serif; }
.auth-lead { margin-top: auto; padding-top: 54px; }
.auth-lead h1 {
    font-family: var(--display); font-size: clamp(28px, 3.1vw, 40px); line-height: 1.18;
    font-weight: 700; letter-spacing: -.5px; max-width: 17ch;
}
.auth-lead p { margin-top: 16px; font-size: 15px; line-height: 1.7; color: rgba(255,255,255,.66); max-width: 46ch; }
.auth-points { list-style: none; margin-top: 32px; display: grid; gap: 13px; }
.auth-points li { display: flex; align-items: flex-start; gap: 11px; font-size: 13.8px; color: rgba(255,255,255,.74); }
.auth-points svg {
    width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: #6ee7ff;
    fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.auth-foot { margin-top: auto; padding-top: 46px; font-size: 12.5px; color: rgba(255,255,255,.4); }

/* Form panel */
.auth-panel { display: grid; place-items: center; padding: 44px 28px; }
.auth-card { width: 100%; max-width: 404px; }
.auth-card h2 {
    font-family: var(--display); font-size: 27px; font-weight: 700;
    color: var(--ink); letter-spacing: -.4px; line-height: 1.2;
}
.auth-card .sub { margin-top: 7px; margin-bottom: 26px; font-size: 14px; color: var(--body); line-height: 1.6; }
.auth-card .flash { margin-bottom: 18px; }
.auth-field { margin-bottom: 16px; }
.auth-field label {
    display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 650;
    color: var(--ink-soft); letter-spacing: .2px;
}
.auth-field input {
    width: 100%; padding: 12px 14px; border: 1px solid #dcd7cd; border-radius: 10px;
    font-size: 14.5px; font-family: inherit; background: #fff; color: var(--ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-field input:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(26,95,180,.11);
}
.auth-field input::placeholder { color: #a8b2bd; }
.auth-code input { text-align: center; font-size: 22px; letter-spacing: 6px; font-weight: 600; padding: 14px; }
.auth-submit {
    width: 100%; margin-top: 8px; padding: 13px; border: none; border-radius: 10px; cursor: pointer;
    background: linear-gradient(135deg, #1a5fb4, #12376f);
    color: #fff; font-family: inherit; font-size: 15px; font-weight: 650; letter-spacing: .2px;
    box-shadow: 0 14px 28px -16px rgba(26,95,180,1);
    transition: transform .15s ease, filter .15s ease;
}
.auth-submit:hover { transform: translateY(-1px); filter: brightness(1.08); }
.auth-alt { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; font-size: 13.5px; }
.auth-alt a { font-weight: 600; }
.auth-alt .muted { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.auth-demo {
    margin-top: 20px; padding: 14px 16px; border-radius: 10px;
    background: #fff; border: 1px dashed #dcd7cd; font-size: 12px; color: var(--muted); line-height: 1.75;
}
.auth-demo strong { display: block; color: var(--ink-soft); font-size: 11px; letter-spacing: 1.1px; text-transform: uppercase; margin-bottom: 5px; }
.auth-demo code { background: #f1ede6; padding: 1px 6px; border-radius: 4px; color: var(--ink); }

@media (max-width: 900px) {
    .auth-split { grid-template-columns: 1fr; min-height: 0; }
    .auth-brand { padding: 30px 26px 34px; }
    .auth-lead { padding-top: 30px; }
    .auth-lead h1 { font-size: 26px; max-width: none; }
    .auth-lead p, .auth-points, .auth-foot { display: none; }
    .auth-panel { padding: 34px 22px 56px; }
}

/* ---- Standalone message pages (errors, plan upgrade) ---- */
.login-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 24px; background: var(--cream);
}
.login-card {
    background: #fff; border: 1px solid var(--line); border-radius: 16px;
    padding: 38px 36px; width: 440px; max-width: 100%;
    box-shadow: 0 30px 60px -42px rgba(16,32,47,.55);
}
.login-card h1, .login-card h2 {
    font-family: var(--display); font-weight: 700; color: var(--ink); letter-spacing: -.3px;
}
.login-card h1 { font-size: 25px; margin-bottom: 4px; }
.login-card .sub { color: var(--body); font-size: 13.5px; margin-bottom: 22px; }
.login-card .form-group { margin-bottom: 14px; }
.login-card .btn { padding: 11px 22px; }

/* ---- Report card / receipt (printable) ---- */
.doc { max-width: 800px; margin: 0 auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 30px 36px; }
.doc-head { text-align: center; border-bottom: 2px solid var(--text); padding-bottom: 14px; margin-bottom: 18px; }
.doc-head h1 { font-size: 22px; }
.doc-head p { color: var(--muted); font-size: 12.5px; }
.doc-title { text-align: center; font-size: 16px; font-weight: 700; margin: 10px 0 16px; text-transform: uppercase; letter-spacing: 1px; }
.doc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 30px; margin-bottom: 18px; font-size: 13.5px; }
.doc-meta div span { color: var(--muted); }
.doc-footer { margin-top: 40px; display: flex; justify-content: space-between; font-size: 13px; }
.sign-line { border-top: 1px solid var(--text); padding-top: 4px; width: 180px; text-align: center; }

@media print {
    .sidebar, .page-head .actions, .no-print, .flash { display: none !important; }
    .main { padding: 0; }
    .doc { border: none; }
    body { background: #fff; }
}

/* ===============================================================
   Fee documents — N copies on one sheet
   ---------------------------------------------------------------
   A challan or receipt is handed over as several copies (bank,
   institution, student) printed side by side. The copy count comes
   from the institution's own settings as --copies, and the page
   size/orientation from an @page rule in the document itself.
   =============================================================== */
.print-body { background: #eef1f5; padding: 0 0 24px; }

.print-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    padding: 12px 20px; margin-bottom: 18px; background: var(--sidebar-bg); color: #cfd8e3;
}
.print-bar strong { color: #fff; display: block; font-size: 14px; }
.print-bar span { font-size: 12.5px; color: #8fa3ba; display: block; }
.print-bar .print-hint { color: #f0c674; margin-top: 2px; }
.print-bar-actions { display: flex; gap: 8px; }
.print-bar .btn-outline { color: #cfd8e3; border-color: rgba(255,255,255,.35); }
.print-bar .btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; }
.print-bar .btn-muted { background: rgba(255,255,255,.14); color: #fff; }

/* ---- Fee voucher (bank fee-bill layout) ---- */
.voucher-sheet {
    display: grid;
    grid-template-columns: repeat(var(--copies, 3), 1fr);
    gap: var(--gap, 0);
    max-width: 1180px; margin: 0 auto; padding: 0 4mm;
    align-items: stretch;
}
/* A dashed guide down the middle of each gutter to cut along. */
.voucher-sheet .voucher { position: relative; }
.voucher-sheet .voucher::after {
    content: ''; position: absolute; pointer-events: none;
    top: 0; bottom: 0; right: calc(var(--gap, 0mm) / -2);
    border-left: 0.4px dashed #9aa6b2;
}
.voucher-sheet .voucher:last-child::after { display: none; }
.voucher-sheet.is-stacked .voucher::after {
    top: auto; right: 0; left: 0; bottom: calc(var(--gap, 0mm) / -2);
    border-left: none; border-top: 0.4px dashed #9aa6b2;
}
/* One table per slip. Every row shares the same two columns, so the vertical
   rule is continuous top to bottom and each horizontal rule spans the full
   width. border-collapse merges adjacent cell borders into a single line. */
.voucher {
    width: 100%; border-collapse: collapse; table-layout: fixed;
    background: #fff; color: #000;
    font-family: 'Segoe UI', system-ui, sans-serif; font-size: 9.6px; line-height: 1.35;
    border: 1.2px solid #000;
}
.voucher .v-c1 { width: 56%; }
.voucher .v-c2 { width: 44%; }
.voucher td, .voucher th { border: 0.8px solid #000; padding: 3.6px 5px; vertical-align: middle; }
/* Soaks up the spare height on a fixed-size slip without drawing a stray rule. */
.voucher .v-fill td { height: 100%; border-left: none; border-right: none; padding: 0; }
.voucher .right { text-align: right; }
.voucher .center { text-align: center; }
.voucher .strong { font-weight: 700; }

.voucher .v-title {
    text-align: center; font-weight: 700; font-size: 11.5px; padding: 4px;
}
.voucher .v-copy { padding: 0; }
.voucher .v-copy span {
    display: block; background: #cfcfcf; text-align: center;
    font-weight: 700; font-size: 11.5px; padding: 4px;
}
/* Masthead: crest beside the invoice/date pairs, spanning both columns. */
.voucher .v-head { padding: 4px 5px; }
.voucher .v-head-in { display: flex; align-items: center; gap: 8px; }
.voucher .v-head-pairs { flex: 1; min-width: 0; }
.voucher .v-head-pairs > div {
    display: flex; align-items: baseline; justify-content: space-between; gap: 6px;
    padding: 1.5px 0; border-bottom: 0.6px dotted #9aa6b2;
}
.voucher .v-head-pairs > div:last-child { border-bottom: none; }
.voucher .v-head-pairs .k { font-weight: 700; font-size: 9.2px; white-space: nowrap; }
.voucher .v-head-pairs .v {
    font-size: 10px; text-align: right; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.voucher .v-logo { width: 40px; text-align: center; padding: 4px; }
.voucher .v-crest {
    display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
    background: #17335c; color: #fff; font-size: 15px; font-weight: 700;
}
.voucher .v-logo-img { width: 32px; height: 32px; object-fit: contain; }
.voucher .v-pair { display: flex; align-items: baseline; gap: 6px; }
.voucher .v-pair .k { flex: 0 0 42%; font-weight: 700; font-size: 9.2px; }
.voucher .v-pair .v { flex: 1; font-size: 10px; }

.voucher .v-lbl { width: 40%; font-size: 9px; }
.voucher .v-lbl.big { font-size: 11px; font-weight: 700; }
.voucher .v-val { font-size: 10px; }
.voucher .v-th {
    text-align: left; font-weight: 700; font-size: 9.8px; padding: 4px 5px; background: #fff;
}
.voucher .v-th.right { text-align: right; }
.voucher .v-desc { font-size: 9.6px; }
.voucher .v-amt { text-align: right; font-size: 9.6px; white-space: nowrap; }
.voucher .v-sum td { font-weight: 700; font-size: 10.4px; }
.voucher .v-words { font-style: italic; font-size: 9.6px; padding: 5px; }
.voucher .v-note { font-size: 8.6px; padding: 3px 5px; }

.voucher .v-bank { padding: 4px 5px; }
.voucher .v-bank-logo { float: left; height: 26px; width: auto; margin: 0 6px 0 0; }
.voucher .v-bank-name {
    float: left; margin: 0 6px 0 0; padding: 2px 5px; background: #0a7a3f; color: #fff;
    font-weight: 700; font-size: 11.5px; letter-spacing: .5px;
}
.voucher .v-bank-text { display: block; font-size: 8.6px; line-height: 1.35; overflow: hidden; }
.voucher .v-foot {
    background: #000; color: #fff; text-align: center;
    font-size: 8.6px; padding: 4px; border-color: #000;
}

.slip-sheet {
    display: grid;
    grid-template-columns: repeat(var(--copies, 3), 1fr);
    gap: 0;
    background: #fff;
    max-width: 1180px; margin: 0 auto;
    box-shadow: 0 20px 50px -30px rgba(16,32,47,.6);
}
.slip {
    padding: 10px 11px; border-right: 1px dashed #9aa6b2;
    font-size: 10.5px; line-height: 1.35; color: #1f2933;
    display: flex; flex-direction: column; min-width: 0;
}
.slip:last-child { border-right: none; }

.slip-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 6px;
    padding-bottom: 6px; border-bottom: 1.5px solid #1f2933;
}
.slip-inst { min-width: 0; }
.slip-inst strong { display: block; font-size: 13.5px; line-height: 1.2; }
.slip-inst span { display: block; font-size: 8.5px; color: #5a6a7a; margin-top: 1px; }
.slip-tag {
    flex-shrink: 0; padding: 2px 6px; border: 1px solid #1f2933; border-radius: 3px;
    font-size: 8.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap;
}
.slip-title {
    text-align: center; font-weight: 700; font-size: 12px; letter-spacing: .6px;
    text-transform: uppercase; margin: 6px 0;
}
.slip-title small { display: block; font-weight: 400; font-size: 9px; letter-spacing: 0; text-transform: none; color: #5a6a7a; }

.slip-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 8px; margin-bottom: 6px; }
.slip-meta > div { display: flex; justify-content: space-between; gap: 4px; min-width: 0; }
.slip-meta dt { color: #5a6a7a; font-size: 9px; white-space: nowrap; }
.slip-meta dd { font-size: 9.5px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.slip-table { width: 100%; border-collapse: collapse; margin-bottom: 6px; }
.slip-table th {
    text-align: left; font-size: 8px; text-transform: uppercase; letter-spacing: .4px;
    color: #5a6a7a; padding: 4px 0; border-bottom: 1px solid #cbd3db;
}
.slip-table td { padding: 3.5px 0; border-bottom: 1px dotted #cbd3db; font-size: 10px; }
.slip-table td.num { text-align: right; white-space: nowrap; }
.slip-table tr:last-child td { border-bottom: none; }
.slip-total td { font-weight: 700; border-top: 1.5px solid #1f2933 !important; border-bottom: none; padding-top: 4px; }
.slip-plan td { color: #5a6a7a; }

.slip-amount {
    display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
    padding: 6px 8px; margin: 2px 0 6px; border: 1.5px solid #1f2933; border-radius: 4px;
}
.slip-amount span { font-size: 9px; text-transform: uppercase; letter-spacing: .5px; color: #5a6a7a; }
.slip-amount strong { font-size: 16px; white-space: nowrap; }
.slip-amount-paid { border-color: var(--success); }
.slip-amount-paid strong { color: var(--success); }

.slip-bank { font-size: 9px; color: #1f2933; margin-bottom: 4px; }
.slip-note { font-size: 8.5px; color: #5a6a7a; line-height: 1.4; margin-bottom: 6px; }
.slip-foot {
    margin-top: auto; padding-top: 16px; display: flex; justify-content: space-between; gap: 8px;
}
.slip-foot span {
    flex: 1; border-top: 1px solid #1f2933; padding-top: 2px;
    font-size: 8.5px; color: #5a6a7a; text-align: center;
}

@media print {
    .print-body { background: #fff; padding: 0; }
    .slip-sheet { max-width: none; box-shadow: none; height: 100%; }
    .slip { padding: 4mm; }
    .slip-foot { padding-top: 10mm; }
    /* One sheet only: the voucher table must never be split across pages.
       No fixed width here — the document's own @media print block makes the
       sheet fill whatever paper the printer is using. */
    /* Column widths come from the document's own rule (the configured slip
       size); only reset what the screen layout added. */
    .voucher-sheet { max-width: none; padding: 0; margin: 0; }
    .slip-sheet { grid-template-columns: repeat(var(--copies, 3), 1fr); }
    .voucher { page-break-inside: avoid; break-inside: avoid; }
}
/* SCREEN only. Without the media type this also matches print, where a portrait
   page is ~794px wide — which silently collapsed the copies into one column. */
@media screen and (max-width: 900px) {
    .slip-sheet { grid-template-columns: 1fr; }
    .slip { border-right: none; border-bottom: 1px dashed #9aa6b2; }
    .slip:last-child { border-bottom: none; }
    .voucher-sheet { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .app { flex-direction: column; }
    .sidebar { width: 100%; height: auto; top: 0; z-index: 20; }
    .sidebar .brand { border-bottom: none; }
    .sidebar .brand-mark { width: 34px; height: 34px; }
    .sidebar .nav-burger {
        display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px;
        background: rgba(255,255,255,.08); color: #fff; cursor: pointer;
    }
    .sidebar .nav-burger svg {
        width: 18px; height: 18px; fill: none; stroke: currentColor;
        stroke-width: 1.9; stroke-linecap: round;
    }
    .sidebar nav, .sidebar .user-box { display: none; }
    .nav-toggle:checked ~ .sidebar nav {
        display: block; max-height: 58vh; overflow-y: auto;
        border-top: 1px solid rgba(255,255,255,.07);
    }
    .nav-toggle:checked ~ .sidebar .user-box { display: flex; position: static; }
    .main { padding: 16px; }
}

/* ===============================================================
   Phase 22 — feature permission console
   =============================================================== */
.rule-order { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.rule-step {
    display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px;
    border: 1px solid var(--border); border-radius: var(--radius); background: #f7fafc;
    font-size: 12.5px; color: var(--muted); line-height: 1.45;
}
.rule-step span {
    flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
    display: grid; place-items: center; font-size: 11.5px; font-weight: 700;
    background: var(--primary); color: #fff;
}
.rule-step strong { display: block; color: var(--text); font-size: 13px; margin-bottom: 2px; }

.feature-desc { color: var(--muted); font-size: 12px; line-height: 1.4; margin-top: 2px; max-width: 42ch; }
.feature-key {
    display: inline-block; margin-top: 4px; padding: 1px 6px; border-radius: 5px;
    background: #eef2f7; color: var(--muted); font-size: 11px;
}
.feature-blocked {
    margin-top: 5px; padding: 5px 8px; border-radius: 6px; font-size: 11.5px;
    background: #fdf0d8; color: var(--warning); max-width: 46ch;
}
.feature-matrix .tenant-col { text-align: center; white-space: nowrap; }
.feature-matrix th.tenant-col small { display: block; font-weight: 400; text-transform: none; letter-spacing: 0; }
.row-blocked td { background: #fbfcfd; }

/* Tri-state assignment control */
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.seg-opt { position: relative; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span {
    display: block; padding: 6px 11px; font-size: 12px; font-weight: 600; color: var(--muted);
    cursor: pointer; border-right: 1px solid var(--border); white-space: nowrap;
}
.seg-opt:last-child span { border-right: none; }
.seg-opt span:hover { background: #f2f5f9; }
.seg-opt input:checked + span { color: #fff; }
.seg-plan input:checked + span { background: var(--muted); }
.seg-on   input:checked + span { background: var(--success); }
.seg-off  input:checked + span { background: var(--danger); }
.seg-opt input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: -2px; }

/* Fee & billing rules per type */
.rule-card h2 { display: flex; align-items: center; gap: 9px; }
.rule-impact {
    display: grid; gap: 5px; margin-top: 10px; padding: 10px 12px;
    border-radius: 8px; background: #f7fafc; border: 1px solid var(--border);
    font-size: 12px; color: var(--muted);
}
.rule-impact strong { color: var(--text); }
.rule-impact .warn { color: var(--warning); }
.rule-impact .warn strong { color: var(--warning); }

/* Feature-by-type matrix */
.type-matrix .type-col { text-align: center; white-space: nowrap; width: 130px; }
.type-matrix th.type-col small { display: block; font-weight: 400; text-transform: none; letter-spacing: 0; }
.tick { display: inline-block; cursor: pointer; line-height: 0; }
.tick input { position: absolute; opacity: 0; pointer-events: none; }
.tick span {
    display: block; width: 22px; height: 22px; border-radius: 6px;
    border: 1.5px solid var(--border); background: #fff;
    transition: background .15s ease, border-color .15s ease;
}
.tick:hover span { border-color: var(--primary); }
.tick input:checked + span {
    background: var(--success) no-repeat center;
    border-color: var(--success);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9.5 17 4 11.5'/%3E%3C/svg%3E");
    background-size: 14px;
}
.tick input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.tick-changed span { box-shadow: 0 0 0 3px rgba(183,121,31,.28); }

.markup-help {
    margin-top: 10px; padding: 9px 12px; border-radius: 8px; background: #f7fafc;
    border: 1px solid var(--border); color: var(--muted); font-size: 12px; line-height: 1.6;
}
.markup-help code {
    background: #eef2f7; padding: 1px 5px; border-radius: 4px; font-size: 11.5px; color: var(--text);
}
/* ===============================================================
   Public institution website
   ---------------------------------------------------------------
   A deliberately different visual language from the admin console:
   a serif display face for headings, generous vertical rhythm, and
   an ink/cream palette built around each tenant's accent colour.
   All fonts are system stacks, so nothing depends on the network.
   =============================================================== */
.site-body {
    background: #fff;
    color: var(--body);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
.site-container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.site-body .ui {
    width: 15px; height: 15px; flex-shrink: 0; vertical-align: -2px;
    fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* ---- Kickers and display headings ---- */
.site-kicker {
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
    font-size: 11px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase;
    color: var(--site-accent, #1a5fb4);
}
.site-kicker::before {
    content: ''; width: 26px; height: 2px; background: currentColor; opacity: .55;
}
.site-kicker-light { color: rgba(255,255,255,.75); }

/* ---- Utility bar ---- */
.site-utility { background: var(--ink); color: rgba(255,255,255,.72); font-size: 12.5px; }
.site-utility-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    flex-wrap: wrap; padding: 9px 24px;
}
.site-utility-contact { display: flex; gap: 20px; flex-wrap: wrap; }
.site-utility-contact span { display: inline-flex; align-items: center; gap: 7px; }
.site-utility-links { display: flex; gap: 18px; }
.site-utility-links a { color: rgba(255,255,255,.8); font-weight: 600; }
.site-utility-links a:hover { color: #fff; text-decoration: none; }

/* ---- Masthead ---- */
.site-head {
    background: #fff; border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 40;
}
.site-head-inner { display: flex; align-items: center; gap: 20px; padding-top: 15px; padding-bottom: 15px; }
.site-brand { display: flex; align-items: center; gap: 13px; color: inherit; min-width: 0; }
.site-brand:hover { text-decoration: none; }
.site-crest {
    flex-shrink: 0; width: 44px; height: 44px; border-radius: 10px;
    display: grid; place-items: center;
    background: linear-gradient(150deg, var(--site-accent, #1a5fb4), var(--ink));
    color: #fff; font-family: var(--display); font-size: 22px; font-weight: 700;
    box-shadow: 0 6px 16px -8px rgba(16,32,47,.8);
}
.site-crest-sm { width: 32px; height: 32px; font-size: 16px; border-radius: 8px; }
.site-brand-text { min-width: 0; }
.site-name {
    display: block; font-family: var(--display); font-size: 21px; font-weight: 700;
    color: var(--ink); line-height: 1.15; letter-spacing: -.2px;
}
.site-tagline {
    display: block; font-size: 11.5px; color: #8494a4; letter-spacing: .3px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 42ch;
}
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 26px; font-size: 14px; font-weight: 600; }
.site-nav a { color: var(--ink-soft); position: relative; padding: 4px 0; }
.site-nav a:hover { color: var(--site-accent, #1a5fb4); text-decoration: none; }
.site-nav a.here { color: var(--site-accent, #1a5fb4); }
.site-nav a.here::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
    background: var(--site-accent, #1a5fb4); border-radius: 2px;
}
.site-nav a.site-cta {
    background: var(--site-accent, #1a5fb4); color: #fff; padding: 10px 20px; border-radius: 8px;
    box-shadow: 0 8px 18px -10px var(--site-accent, #1a5fb4);
}
.site-nav a.site-cta:hover { color: #fff; filter: brightness(1.08); }
.site-nav a.site-cta::after { display: none; }
.site-nav-toggle, .site-burger { display: none; }

.site-main { min-height: 50vh; }

/* ---- Buttons ---- */
.btn-solid, .btn-ghost {
    display: inline-flex; align-items: center; gap: 9px; padding: 13px 26px; border-radius: 9px;
    font-size: 14.5px; font-weight: 650; letter-spacing: .1px; border: 1.5px solid transparent;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-solid { background: var(--site-accent, #1a5fb4); color: #fff; box-shadow: 0 12px 26px -14px rgba(0,0,0,.75); }
.btn-solid:hover { text-decoration: none; color: #fff; transform: translateY(-1px); filter: brightness(1.07); }
.btn-ghost { color: #fff; border-color: rgba(255,255,255,.45); }
.btn-ghost:hover { text-decoration: none; color: #fff; background: rgba(255,255,255,.12); }
.btn-ghost-dark { color: var(--ink); border-color: var(--line); }
.btn-ghost-dark:hover { color: var(--ink); background: var(--cream); }
.btn-block { display: flex; justify-content: center; width: 100%; }
.link-more { font-size: 13.5px; font-weight: 650; color: var(--site-accent, #1a5fb4); white-space: nowrap; }

/* ---- Hero ---- */
.hero {
    position: relative; color: #fff; padding: 76px 0 84px;
    background:
        radial-gradient(90% 120% at 100% 0%, rgba(255,255,255,.10), transparent 60%),
        linear-gradient(145deg, var(--ink) 0%, var(--ink) 32%, var(--site-accent, #1a5fb4) 130%);
}
.hero-photo {
    background-image:
        linear-gradient(105deg, rgba(16,32,47,.94) 0%, rgba(16,32,47,.80) 52%, rgba(16,32,47,.45) 100%),
        var(--hero-img);
    background-size: cover; background-position: center;
}
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 46px; align-items: center; }
.hero h1 {
    font-family: var(--display); font-size: clamp(32px, 4.4vw, 52px); line-height: 1.1;
    font-weight: 700; letter-spacing: -.6px; max-width: 15ch;
}
.hero-lead { margin-top: 18px; font-size: 16.5px; line-height: 1.7; color: rgba(255,255,255,.84); max-width: 54ch; }
.hero-actions { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note {
    margin-top: 22px; font-size: 13.5px; color: rgba(255,255,255,.72);
    display: flex; align-items: flex-start; gap: 10px; max-width: 52ch;
}
.hero-note .dot {
    width: 7px; height: 7px; margin-top: .5em; border-radius: 50%;
    background: #5bd98a; flex-shrink: 0; box-shadow: 0 0 0 4px rgba(91,217,138,.18);
}

.hero-facts {
    background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16);
    border-radius: 14px; padding: 26px 26px 20px; backdrop-filter: blur(6px);
}
.hero-facts h2 {
    font-size: 11px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase;
    color: rgba(255,255,255,.6); margin-bottom: 18px;
}
.hero-facts dl { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 18px; }
.hero-facts dt {
    font-family: var(--display); font-size: 32px; font-weight: 700; color: #fff; line-height: 1;
}
.hero-facts dd { margin-top: 5px; font-size: 12.5px; color: rgba(255,255,255,.7); line-height: 1.4; }
.hero-facts-link {
    display: inline-block; margin-top: 22px; padding-top: 16px; width: 100%;
    border-top: 1px solid rgba(255,255,255,.16);
    font-size: 13px; font-weight: 650; color: #fff;
}
.hero-facts-link:hover { text-decoration: none; opacity: .8; }

/* ---- Bands ---- */
.band { padding: 78px 0; }
.band-tint { background: var(--cream); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-ink { background: var(--ink); color: rgba(255,255,255,.8); }
.band-title {
    font-family: var(--display); font-size: clamp(25px, 3vw, 34px); line-height: 1.2;
    font-weight: 700; color: var(--ink); letter-spacing: -.4px; max-width: 22ch;
}
.band-head { margin-bottom: 36px; max-width: 46ch; }
.band-head-row {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
    max-width: none; flex-wrap: wrap;
}
.band-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 56px; align-items: start; }
.band-aside { position: sticky; top: 108px; }
.band-est { margin-top: 12px; font-size: 13.5px; color: #8494a4; }
.band-body { padding-top: 4px; }

/* ---- Feature cards ---- */
.grid-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.feature { background: #fff; padding: 30px 28px; transition: background .18s ease; }
.feature:hover { background: #fff; }
.feature-no {
    display: block; font-family: var(--display); font-size: 15px; font-weight: 700;
    color: var(--site-accent, #1a5fb4); letter-spacing: 1px; margin-bottom: 12px;
}
.feature h3 { font-size: 17px; font-weight: 650; color: var(--ink); margin-bottom: 8px; line-height: 1.35; }
.feature p { font-size: 14px; line-height: 1.65; color: var(--body); }

/* ---- Offerings ---- */
.grid-offer { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 14px; }
.offer {
    padding: 20px 20px 18px; border: 1px solid var(--line); border-radius: 11px; background: #fff;
    border-left: 3px solid var(--site-accent, #1a5fb4);
    transition: transform .15s ease, box-shadow .15s ease;
}
.offer:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -22px rgba(16,32,47,.9); }
.offer strong { display: block; font-size: 15.5px; color: var(--ink); font-weight: 650; line-height: 1.35; }
.offer span { display: block; margin-top: 6px; font-size: 12.5px; color: #8494a4; line-height: 1.5; }

/* ---- Principal's message ---- */
.quote-wrap { display: flex; gap: 44px; align-items: flex-start; }
.quote-photo {
    width: 170px; height: 200px; object-fit: cover; border-radius: 12px; flex-shrink: 0;
    border: 1px solid rgba(255,255,255,.18);
}
.quote-body { min-width: 0; }
.quote-body blockquote {
    font-family: var(--display); font-size: clamp(18px, 2.1vw, 23px); line-height: 1.6;
    color: #fff; max-width: 62ch;
}
.quote-body blockquote p { margin-bottom: 16px; }
.quote-body blockquote p:last-child { margin-bottom: 0; }
.quote-body cite {
    display: block; margin-top: 26px; font-style: normal; font-weight: 650; color: #fff; font-size: 15px;
}
.quote-body cite span { display: block; font-weight: 400; font-size: 13px; color: rgba(255,255,255,.6); margin-top: 2px; }

/* ---- News ---- */
.news-layout { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.news-list { display: grid; gap: 18px; }
.news-list-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.news-card {
    display: flex; gap: 20px; background: #fff; border: 1px solid var(--line);
    border-radius: 12px; padding: 22px 24px;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.news-card:hover { transform: translateY(-2px); border-color: #d6d0c5; box-shadow: 0 18px 36px -26px rgba(16,32,47,.9); }
.news-date {
    flex-shrink: 0; width: 58px; height: 62px; border-radius: 10px;
    display: grid; place-content: center; text-align: center;
    background: var(--ink); color: #fff;
}
.news-date:hover { text-decoration: none; }
.news-date .d { display: block; font-family: var(--display); font-size: 23px; font-weight: 700; line-height: 1; }
.news-date .m { display: block; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; color: rgba(255,255,255,.65); margin-top: 3px; }
.news-body { min-width: 0; }
.tagline {
    display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 1.2px;
    text-transform: uppercase; color: var(--site-accent, #1a5fb4);
}
.news-body h3 { font-size: 17px; font-weight: 650; line-height: 1.35; margin: 7px 0 7px; }
.news-body h3 a { color: var(--ink); }
.news-body h3 a:hover { color: var(--site-accent, #1a5fb4); text-decoration: none; }
.news-body p { font-size: 13.8px; line-height: 1.6; color: var(--body); }
.news-body .link-more { display: inline-block; margin-top: 10px; }
.event-line { margin-top: 9px; font-size: 13px; color: var(--site-accent, #1a5fb4); }

.events-panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.events-panel h3 {
    font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase;
    color: #8494a4; margin-bottom: 16px;
}
.events-panel ul { list-style: none; }
.events-panel li { border-bottom: 1px dashed var(--line); }
.events-panel li:last-child { border-bottom: none; }
.events-panel li a { display: block; padding: 13px 0; color: var(--ink); }
.events-panel li a:hover { text-decoration: none; color: var(--site-accent, #1a5fb4); }
.events-panel li strong { display: block; font-size: 14.5px; font-weight: 620; line-height: 1.4; }
.events-panel li span { display: block; margin-top: 3px; font-size: 12.5px; color: #8494a4; }
.events-empty { font-size: 13.5px; color: #8494a4; }
.events-cta { display: inline-block; margin-top: 18px; font-size: 13px; font-weight: 650; color: var(--site-accent, #1a5fb4); }

/* ---- Call to action ---- */
.cta { background: var(--ink); color: #fff; padding: 56px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 34px; flex-wrap: wrap; }
.cta h2 { font-family: var(--display); font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -.3px; }
.cta p { margin-top: 10px; font-size: 15px; color: rgba(255,255,255,.72); max-width: 56ch; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---- Interior page banner ---- */
.site-banner {
    background: linear-gradient(140deg, var(--ink) 0%, var(--ink-soft) 100%);
    color: #fff; padding: 52px 0 46px;
}
.site-banner h1 {
    font-family: var(--display); font-size: clamp(27px, 3.6vw, 40px); line-height: 1.15;
    font-weight: 700; letter-spacing: -.5px; max-width: 22ch;
}
.site-banner p { margin-top: 12px; font-size: 15.5px; color: rgba(255,255,255,.75); max-width: 62ch; }
.site-page { padding: 52px 24px 76px; }

/* ---- Article + sidebar ---- */
.article-layout { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: 52px; align-items: start; }
.article-lead {
    font-size: 17px; line-height: 1.65; color: var(--ink-soft); font-weight: 500;
    padding-bottom: 20px; margin-bottom: 22px; border-bottom: 1px solid var(--line);
}
.article-side { position: sticky; top: 108px; display: grid; gap: 18px; }
.side-card { border: 1px solid var(--line); border-radius: 12px; padding: 22px; background: #fff; }
.side-card h3 {
    font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase;
    color: #8494a4; margin-bottom: 14px;
}
.side-card p { font-size: 13.5px; line-height: 1.6; margin-bottom: 16px; }
.side-card-accent { background: var(--cream); border-color: #e2ddd2; }
.side-links, .side-contact { list-style: none; }
.side-links li { border-bottom: 1px dashed var(--line); }
.side-links li:last-child { border-bottom: none; }
.side-links a { display: block; padding: 11px 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.side-links a:hover { color: var(--site-accent, #1a5fb4); text-decoration: none; }
.side-date { display: block; font-size: 12px; font-weight: 400; color: #8494a4; margin-top: 2px; }
.side-contact li { padding: 7px 0; font-size: 13.5px; border-bottom: 1px dashed var(--line); }
.side-contact li:last-child { border-bottom: none; }
.side-link-plain { display: block; margin-top: 12px; text-align: center; font-size: 13px; font-weight: 600; }

/* ---- News index ---- */
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 30px; }
.filter-pills a {
    padding: 8px 18px; border-radius: 99px; border: 1px solid var(--line);
    font-size: 13.5px; font-weight: 600; color: var(--ink-soft); background: #fff;
}
.filter-pills a:hover { text-decoration: none; border-color: var(--site-accent, #1a5fb4); color: var(--site-accent, #1a5fb4); }
.filter-pills a.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.feature-post {
    padding: 32px 34px; border: 1px solid var(--line); border-left: 4px solid var(--site-accent, #1a5fb4);
    border-radius: 14px; background: var(--cream); margin-bottom: 26px;
}
.feature-post h2 { font-family: var(--display); font-size: clamp(23px, 2.6vw, 30px); line-height: 1.22; margin: 10px 0 12px; }
.feature-post h2 a { color: var(--ink); }
.feature-post h2 a:hover { color: var(--site-accent, #1a5fb4); text-decoration: none; }
.feature-post p { font-size: 15px; line-height: 1.7; }
.feature-post .link-more { display: inline-block; margin-top: 14px; }
.event-banner {
    display: inline-grid; place-items: center; padding: 16px 26px; border-radius: 12px;
    background: var(--cream); border: 1px solid var(--line); margin-bottom: 26px; text-align: center;
}
.event-banner .d { font-family: var(--display); font-size: 34px; font-weight: 700; color: var(--ink); line-height: 1; }
.event-banner .m { font-size: 13px; font-weight: 650; color: var(--ink-soft); margin-top: 4px; }
.event-banner .t { font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; color: #8494a4; margin-top: 6px; }

/* ---- Prose ---- */
.site-prose { font-size: 15.5px; line-height: 1.78; color: var(--body); }
.site-prose h2 {
    font-family: var(--display); font-size: 25px; font-weight: 700; color: var(--ink);
    margin: 34px 0 12px; letter-spacing: -.2px; line-height: 1.28;
}
.site-prose h3 { font-size: 17.5px; font-weight: 650; color: var(--ink); margin: 26px 0 8px; }
.site-prose p { margin-bottom: 16px; }
.site-prose ul, .site-prose ol { margin: 0 0 18px 4px; padding-left: 20px; }
.site-prose li { margin-bottom: 8px; padding-left: 4px; }
.site-prose ul { list-style: none; padding-left: 0; }
.site-prose ul li { position: relative; padding-left: 24px; }
.site-prose ul li::before {
    content: ''; position: absolute; left: 2px; top: .62em;
    width: 7px; height: 7px; border-radius: 2px; background: var(--site-accent, #1a5fb4); opacity: .55;
}
.site-prose blockquote {
    margin: 0 0 18px; padding: 16px 22px; border-left: 3px solid var(--site-accent, #1a5fb4);
    background: var(--cream); border-radius: 0 10px 10px 0; font-size: 16px;
}
.site-prose a { color: var(--site-accent, #1a5fb4); font-weight: 550; }
.site-prose strong { color: var(--ink); font-weight: 650; }
.site-prose > *:first-child { margin-top: 0; }
.site-updated { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: #8494a4; }

/* ---- Footer ---- */
.site-foot { background: var(--ink); color: rgba(255,255,255,.66); padding: 58px 0 24px; font-size: 13.5px; }
.site-foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.site-foot strong { display: block; color: #fff; margin-bottom: 14px; font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; }
.site-foot-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.site-foot-brand strong { margin: 0; font-family: var(--display); font-size: 18px; letter-spacing: -.2px; text-transform: none; }
.site-foot-about p { font-size: 13.5px; line-height: 1.65; max-width: 34ch; }
.site-foot-est { margin-top: 10px; color: rgba(255,255,255,.45); font-size: 12.5px; }
.site-foot > .site-foot-grid > div > div { margin-bottom: 8px; line-height: 1.55; }
.site-foot a { color: rgba(255,255,255,.72); }
.site-foot a:hover { color: #fff; }
.site-copy {
    margin-top: 44px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12);
    display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    font-size: 12.5px; color: rgba(255,255,255,.42);
}

/* ---- Responsive ---- */
@media (max-width: 980px) {
    .hero-inner { grid-template-columns: 1fr; gap: 34px; }
    .hero-facts dl { grid-template-columns: repeat(4, 1fr); }
    .band-split, .news-layout, .article-layout { grid-template-columns: 1fr; gap: 32px; }
    .band-aside, .article-side { position: static; }
    .site-foot-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
    .quote-wrap { flex-direction: column; gap: 26px; }
    .quote-photo { width: 120px; height: 140px; }
}
@media (max-width: 760px) {
    .site-utility-contact span.hide-sm { display: none; }
    /* wrap is what lets the full-width nav drop onto its own row; the brand
       flexes so the burger stays beside it rather than wrapping too */
    .site-head-inner { flex-wrap: wrap; gap: 12px; }
    .site-brand { flex: 1 1 auto; min-width: 0; }
    .site-tagline { max-width: 30ch; }
    .site-burger { display: grid; place-items: center; flex-shrink: 0; cursor: pointer; color: var(--ink); }
    .site-nav {
        display: none; margin-left: 0; flex-basis: 100%; flex-direction: column;
        align-items: stretch; gap: 0; padding-top: 10px;
    }
    .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
    .site-nav a.here::after { display: none; }
    .site-nav a.site-cta { text-align: center; margin-top: 12px; border-bottom: none; }
    .site-nav-toggle:checked ~ .site-nav { display: flex; }
    .band { padding: 52px 0; }
    .hero { padding: 52px 0 56px; }
    .hero-facts dl { grid-template-columns: 1fr 1fr; }
    .site-page { padding: 36px 24px 56px; }
    .site-foot-grid { grid-template-columns: 1fr; }
    .cta-inner { flex-direction: column; align-items: flex-start; }
}
/* ---- Public admission portal ----
   These pages share the website chrome above; the banner is rendered by the
   public layout, so the view's own hero only carries the supporting line. */
.site-body .public-hero { margin-bottom: 26px; }
.site-body .public-hero h1 { display: none; }
.site-body .public-hero p { font-size: 15.5px; color: var(--body); line-height: 1.7; max-width: 62ch; }
.site-body .card {
    border: 1px solid var(--line); border-radius: 12px; padding: 26px 28px; margin-bottom: 20px;
}
.site-body .card h2 {
    font-family: var(--display); font-size: 19px; font-weight: 700; color: var(--ink);
    margin-bottom: 16px; letter-spacing: -.2px;
}
.site-body .form-group label { font-size: 13px; color: var(--ink-soft); }
.site-body .form-control, .site-body select, .site-body textarea { padding: 10px 12px; font-size: 14px; }
.site-body .btn {
    padding: 12px 24px; border-radius: 9px; font-size: 14.5px; font-weight: 650;
    background: var(--site-accent, var(--primary));
}
.site-body .btn:hover { filter: brightness(1.07); background: var(--site-accent, var(--primary)); }
.site-body .btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.site-body .btn-outline:hover { background: var(--cream); color: var(--ink); }
.status-line { display: flex; align-items: center; gap: 10px; margin: 8px 0; }

/* ---- Institution type badge (Phase 21) ---- */
.inst-badge {
    display: inline-flex; align-items: center; gap: 5px; margin-top: 2px;
    padding: 3px 10px 3px 8px; border-radius: 99px;
    background: linear-gradient(95deg, rgba(18,165,245,.20), rgba(139,45,240,.20));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
    color: #dbe8f8; font-size: 10px; font-weight: 700;
    letter-spacing: .6px; text-transform: uppercase;
}
.inst-badge::before {
    content: ''; width: 5px; height: 5px; border-radius: 50%;
    background: #6ee7ff; box-shadow: 0 0 6px rgba(110,231,255,.9);
}

/* ---- Institution-type dashboard header + module tiles (§9/§15) ---- */
.type-bar {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
    background: linear-gradient(90deg, rgba(26,95,180,.10), rgba(107,70,193,.10));
    border: 1px solid var(--border); border-left: 4px solid var(--primary);
    border-radius: var(--radius); padding: 11px 16px; margin-bottom: 16px; font-size: 13.5px;
}
.type-bar-meta { color: var(--muted); font-size: 12.5px; }
.module-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.module-tile {
    display: block; padding: 14px 12px; text-align: center; border: 1px solid var(--border);
    border-radius: 10px; background: #f7fafc; font-weight: 600; font-size: 13.5px; color: var(--text);
}
.module-tile:hover { background: var(--primary); color: #fff; border-color: var(--primary); text-decoration: none; }

/* ---- Messages & Templates (Phase 30) ---- */
.var-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.var-chip {
    display: flex; align-items: baseline; gap: 8px; padding: 7px 10px;
    border: 1px solid var(--border); border-radius: 8px; background: #fff; font-size: 12.5px;
}
.var-chip.is-campaign { background: var(--cream, #f7f6f3); }
.var-chip code { font-size: 12px; color: var(--primary); white-space: nowrap; }
.var-chip span { color: var(--muted); }

.preview-box {
    background: var(--cream, #f7f6f3); border: 1px solid var(--border);
    border-radius: 10px; padding: 16px 18px;
}
.preview-box h4 {
    font-size: 11.5px; text-transform: uppercase; letter-spacing: .7px;
    color: var(--muted); margin: 0 0 8px;
}
.preview-box p { margin: 0; font-size: 14px; line-height: 1.6; }

.tpl-card {
    display: block; padding: 16px 18px; border: 1px solid var(--border);
    border-radius: 11px; background: #fff; color: inherit;
}
.tpl-card:hover { border-color: var(--primary); text-decoration: none; }
.tpl-card strong { display: block; font-size: 15px; }
.tpl-card small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 4px; line-height: 1.45; }
.tpl-card-meta { margin-top: 10px; display: flex; gap: 5px; }
/* ---- public site: branches (§32) ----------------------------------------
   Shown on an institution's own website when it runs from more than one
   place. Deliberately plain cards: this sits among editorial content on a
   school's site, not in the product's marketing pages. */
.branches { padding: 64px 0; background: var(--cream, #faf8f4); border-top: 1px solid var(--line, #e6e2da); }
.branches h2 { font-family: var(--display, inherit); font-size: clamp(22px, 2.6vw, 32px); margin: 8px 0 28px; }
.branch-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.branch-card {
    background: #fff; border: 1px solid var(--line, #e6e2da); border-radius: 14px;
    padding: 22px 24px; transition: box-shadow .25s ease, transform .25s ease;
}
.branch-card:hover { box-shadow: 0 22px 44px -30px rgba(20, 40, 90, .45); transform: translateY(-2px); }
.branch-card h3 { font-size: 17px; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.branch-main {
    font-size: 10.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
    color: #fff; background: var(--primary); padding: 3px 8px; border-radius: 20px;
}
.branch-where { color: var(--body, #46586a); font-size: 14px; line-height: 1.5; margin: 0 0 6px; }
.branch-head { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.branch-links { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13.5px; font-weight: 600; }
.branch-links a { color: var(--primary); }
