/* ==========================================================================
   EduDesk UI
   ========================================================================== */

:root {
    --brand: #4f46e5;
    --brand-2: #0f172a;
    --brand-soft: color-mix(in srgb, var(--brand) 10%, #ffffff);
    --brand-100: color-mix(in srgb, var(--brand) 16%, #ffffff);
    --brand-dark: color-mix(in srgb, var(--brand) 82%, #000000);
    --ink: #0f172a;
    --text: #334155;
    --muted: #64748b;
    --faint: #94a3b8;
    --line: #e6eaf2;
    --line-strong: #d3dae7;
    --bg: #f5f7fb;
    --card: #ffffff;
    --green: #059669;
    --green-soft: #ecfdf5;
    --red: #dc2626;
    --red-soft: #fef2f2;
    --amber: #d97706;
    --amber-soft: #fffbeb;
    --blue: #2563eb;
    --blue-soft: #eff6ff;
    --purple: #7c3aed;
    --purple-soft: #f5f3ff;
    --gray-soft: #f1f5f9;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px rgba(15, 23, 42, .05);
    --shadow-lg: 0 18px 50px rgba(15, 23, 42, .14);
    --font: "Segoe UI", Inter, system-ui, -apple-system, "Noto Sans", Roboto, sans-serif;
    --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
    margin: 0;
    color: var(--ink);
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

p {
    margin: 0 0 12px;
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

img {
    max-width: 100%;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

.icon {
    flex: 0 0 auto;
    vertical-align: -3px;
}

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 650; color: var(--ink); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.hide { display: none !important; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.ml-auto { margin-left: auto; }
.flex { display: flex; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ==========================================================================
   Buttons, badges, chips
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 16px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--card);
    color: var(--ink);
    font-weight: 600;
    font-size: 13.5px;
    line-height: 1.2;
    white-space: nowrap;
    transition: .15s ease;
}

.btn:hover {
    border-color: #b9c4d8;
    background: #f8fafc;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 28%, transparent);
}

.btn-primary:hover {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
}

.btn-dark {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.btn-dark:hover {
    background: #1e293b;
    border-color: #1e293b;
}

.btn-soft {
    background: var(--brand-soft);
    border-color: transparent;
    color: var(--brand-dark);
}

.btn-soft:hover {
    background: var(--brand-100);
    border-color: transparent;
}

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--muted);
}

.btn-ghost:hover {
    background: var(--gray-soft);
    border-color: transparent;
    color: var(--ink);
}

.btn-danger {
    background: var(--red-soft);
    border-color: #fecaca;
    color: var(--red);
}

.btn-danger:hover {
    background: #fee2e2;
}

.btn-success {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

.btn-sm {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 12.5px;
    border-radius: 8px;
    gap: 6px;
}

.btn-lg {
    min-height: 48px;
    padding: 12px 22px;
    font-size: 15px;
    border-radius: 12px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 9px;
}

.btn[disabled],
.btn.disabled {
    opacity: .55;
    pointer-events: none;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 650;
    line-height: 1.5;
    white-space: nowrap;
    background: var(--gray-soft);
    color: var(--muted);
}

.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-purple { background: var(--purple-soft); color: var(--purple); }
.badge-gray { background: var(--gray-soft); color: var(--muted); }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 10px;
    border-radius: 8px;
    background: var(--gray-soft);
    color: var(--muted);
    font-size: 12px;
    font-weight: 550;
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}

/* ==========================================================================
   Application shell
   ========================================================================== */

.app-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    width: 264px;
    padding: 18px 14px 14px;
    color: #cbd5e1;
    background:
        radial-gradient(900px 400px at -20% -10%, color-mix(in srgb, var(--brand) 32%, transparent), transparent 60%),
        linear-gradient(180deg, #0b1220 0%, #101b31 100%);
    border-right: 1px solid rgba(148, 163, 184, .08);
    transition: transform .22s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 4px 8px 18px;
    color: #fff;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 55%, #ffffff));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 750;
    font-size: 15px;
    letter-spacing: -.03em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 20px rgba(0, 0, 0, .25);
    flex: 0 0 auto;
    overflow: hidden;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-brand .brand-text {
    min-width: 0;
}

.sidebar-brand .brand-name {
    display: block;
    font-size: 14.5px;
    font-weight: 650;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -.01em;
}

.sidebar-brand .brand-sub {
    display: block;
    font-size: 10.5px;
    color: #94a3b8;
    letter-spacing: .02em;
    margin-top: 1px;
}

.side-nav {
    flex: 1;
    overflow-y: auto;
    padding-right: 2px;
    scrollbar-width: thin;
}

.nav-group {
    margin-bottom: 16px;
}

.nav-label {
    padding: 4px 10px 7px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #64748b;
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 8px 10px;
    margin-bottom: 2px;
    border-radius: 9px;
    color: #aebbd0;
    font-size: 13px;
    font-weight: 500;
    transition: .14s ease;
}

.nav-link .icon {
    color: #7c8ba5;
    width: 18px;
    height: 18px;
}

.nav-link:hover {
    background: rgba(148, 163, 184, .09);
    color: #f1f5f9;
}

.nav-link:hover .icon {
    color: #cbd5e1;
}

.nav-link.is-active {
    background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 38%, transparent), color-mix(in srgb, var(--brand) 16%, transparent));
    color: #fff;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 30%, transparent);
}

.nav-link.is-active .icon {
    color: #fff;
}

.nav-link .nav-badge {
    margin-left: auto;
    min-width: 20px;
    height: 19px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, .18);
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10.5px;
    font-weight: 700;
}

.nav-link.is-active .nav-badge {
    background: rgba(255, 255, 255, .18);
}

.sidebar-foot {
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, .12);
}

.plan-mini {
    padding: 11px 12px;
    border-radius: 11px;
    background: rgba(148, 163, 184, .07);
    border: 1px solid rgba(148, 163, 184, .1);
    margin-bottom: 10px;
}

.plan-mini .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    margin-bottom: 7px;
}

.plan-mini .plan-name {
    color: #f1f5f9;
    font-weight: 650;
    font-size: 12px;
}

.plan-mini .limit {
    color: #94a3b8;
}

.progress {
    height: 5px;
    border-radius: 99px;
    background: rgba(148, 163, 184, .18);
    overflow: hidden;
}

.progress > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 55%, #ffffff));
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 10px;
}

.sidebar-user:hover {
    background: rgba(148, 163, 184, .08);
}

.sidebar-user .meta {
    min-width: 0;
    flex: 1;
}

.sidebar-user .name {
    color: #f1f5f9;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user .role {
    color: #7f8da3;
    font-size: 10.5px;
}

.sidebar-user form {
    margin: 0;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
}

.icon-btn:hover {
    background: var(--gray-soft);
    color: var(--ink);
}

.main {
    min-height: 100vh;
    margin-left: 264px;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 14px;
    height: 68px;
    padding: 0 28px;
    background: rgba(245, 247, 251, .82);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.topbar-title {
    min-width: 0;
    flex: 1;
}

.topbar-title h1 {
    font-size: 17px;
    font-weight: 650;
}

.topbar-title p {
    margin: 1px 0 0;
    font-size: 11.5px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 11px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--muted);
    font-size: 12px;
    font-weight: 550;
    white-space: nowrap;
}

.topbar-pill .icon {
    color: var(--faint);
}

.menu {
    position: relative;
}

.menu > summary {
    list-style: none;
    cursor: pointer;
}

.menu > summary::-webkit-details-marker {
    display: none;
}

.menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 200px;
    padding: 7px;
    border-radius: 12px;
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    z-index: 50;
}

.menu-panel a,
.menu-panel button {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font-size: 13px;
    text-align: left;
}

.menu-panel a:hover,
.menu-panel button:hover {
    background: var(--gray-soft);
    color: var(--ink);
}

.menu-panel .menu-head {
    padding: 8px 10px 7px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 5px;
}

.menu-panel .menu-head .name {
    font-weight: 650;
    color: var(--ink);
    font-size: 13px;
}

.menu-panel .menu-head .sub {
    font-size: 11px;
    color: var(--muted);
}

.topbar-avatar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 3px 9px 3px 3px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--card);
}

.topbar-avatar .avatar {
    width: 30px;
    height: 30px;
    font-size: 11px;
}

.topbar-avatar .who {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink);
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-toggle {
    display: none;
}

.content {
    flex: 1;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px 28px 48px;
}

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.page-head h1 {
    font-size: 24px;
}

.page-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.scrim {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(15, 23, 42, .5);
    backdrop-filter: blur(2px);
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    letter-spacing: .02em;
    flex: 0 0 auto;
    overflow: hidden;
}

/* ==========================================================================
   Cards & stats
   ========================================================================== */

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.card-pad {
    padding: 20px;
}

.card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 17px 20px;
    border-bottom: 1px solid var(--line);
}

.card-head h2,
.card-head h3 {
    font-size: 15px;
}

.card-head p {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--muted);
}

.card-body {
    padding: 20px;
}

.card-body.flush {
    padding: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.stat {
    position: relative;
    padding: 17px 18px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 11px;
}

.stat-label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: .02em;
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    color: var(--brand);
}

.stat-icon.green { background: var(--green-soft); color: var(--green); }
.stat-icon.red { background: var(--red-soft); color: var(--red); }
.stat-icon.amber { background: var(--amber-soft); color: var(--amber); }
.stat-icon.blue { background: var(--blue-soft); color: var(--blue); }
.stat-icon.purple { background: var(--purple-soft); color: var(--purple); }

.stat-value {
    font-size: 25px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -.03em;
    line-height: 1.15;
}

.stat-foot {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 7px;
    font-size: 11.5px;
    color: var(--muted);
}

.trend-up { color: var(--green); font-weight: 650; }
.trend-down { color: var(--red); font-weight: 650; }

.grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.grid-60-40 {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 18px;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ==========================================================================
   Tables
   ========================================================================== */

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table th {
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    background: #fafbfd;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    text-align: left;
    white-space: nowrap;
}

.table td {
    padding: 12px 14px;
    border-bottom: 1px solid #eef1f6;
    vertical-align: middle;
    color: var(--text);
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.table tbody tr:hover {
    background: #fafbff;
}

.table .primary {
    color: var(--ink);
    font-weight: 600;
}

.table .sub {
    display: block;
    font-size: 11.5px;
    color: var(--muted);
    font-weight: 400;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}

.table th.num,
.table td.num {
    text-align: right;
}

.table-compact td,
.table-compact th {
    padding: 9px 12px;
}

.empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--muted);
}

.empty .empty-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    border-radius: 14px;
    background: var(--gray-soft);
    color: var(--faint);
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty h3 {
    font-size: 15px;
    margin-bottom: 4px;
}

.empty p {
    font-size: 12.5px;
    margin-bottom: 14px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    padding: 14px 16px;
    border-top: 1px solid var(--line);
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border-radius: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.page-link:hover {
    background: var(--gray-soft);
    color: var(--ink);
}

.page-link.current {
    background: var(--brand);
    color: #fff;
}

.page-link.disabled {
    opacity: .4;
    pointer-events: none;
}

.page-gap {
    color: var(--faint);
    padding: 0 3px;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.field > label,
.field-label {
    font-size: 12px;
    font-weight: 650;
    color: var(--ink);
}

.field .req-mark {
    color: var(--red);
}

.input,
.select,
.textarea {
    width: 100%;
    min-height: 41px;
    padding: 9px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    background: #fff;
    color: var(--ink);
    font-size: 13.5px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

.input::placeholder,
.textarea::placeholder {
    color: var(--faint);
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent);
}

.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 34px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
}

.form-grid .span-2 {
    grid-column: span 2;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 14px;
}

.hint {
    font-size: 11.5px;
    color: var(--muted);
}

.field-error {
    font-size: 11.5px;
    color: var(--red);
    font-weight: 550;
}

.check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
}

.check input {
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
}

.segmented {
    display: inline-flex;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    overflow: hidden;
    background: #fff;
}

.segmented label {
    position: relative;
    border-right: 1px solid var(--line);
}

.segmented label:last-child {
    border-right: 0;
}

.segmented input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.segmented span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 650;
    color: var(--muted);
    cursor: pointer;
    transition: .12s;
}

.segmented input:checked + span {
    background: var(--brand);
    color: #fff;
}

.segmented input:focus-visible + span {
    outline: 2px solid var(--brand);
    outline-offset: -2px;
}

.seg-attendance label.seg-p input:checked + span { background: var(--green); }
.seg-attendance label.seg-a input:checked + span { background: var(--red); }
.seg-attendance label.seg-l input:checked + span { background: var(--amber); }
.seg-attendance label.seg-h input:checked + span { background: var(--purple); }

.file-drop {
    border: 1.5px dashed var(--line-strong);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    background: #fbfcfe;
    color: var(--muted);
    font-size: 12.5px;
}

.file-drop input[type=file] {
    display: block;
    margin: 8px auto 0;
    font-size: 12px;
}

/* ==========================================================================
   Panels, tabs, misc components
   ========================================================================== */

.panel {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.panel + .panel {
    margin-top: 12px;
}

.panel > summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    color: var(--ink);
    font-size: 13px;
}

.panel > summary::-webkit-details-marker {
    display: none;
}

.panel > summary .icon {
    color: var(--muted);
    transition: transform .2s;
}

.panel[open] > summary .icon.chev {
    transform: rotate(90deg);
}

.panel-body {
    padding: 16px;
    border-top: 1px solid var(--line);
    background: #fdfdff;
}

.tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 11px;
    background: #eef1f7;
    margin-bottom: 18px;
    overflow-x: auto;
    scrollbar-width: none;
}

.tabs a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

.tabs a:hover {
    color: var(--ink);
}

.tabs a.active {
    background: #fff;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}

.filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    background: #fcfdff;
}

.filter-bar .field {
    margin: 0;
    min-width: 140px;
}

.filter-bar .field.grow {
    flex: 1;
    min-width: 200px;
}

.filter-bar .input,
.filter-bar .select {
    min-height: 36px;
    font-size: 12.5px;
    border-radius: 8px;
}

.search-field {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-field .icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--faint);
}

.search-field .input {
    padding-left: 34px;
}

.avatar-stack {
    display: flex;
    align-items: center;
}

.avatar-stack .avatar + .avatar {
    margin-left: -8px;
    box-shadow: 0 0 0 2px #fff;
}

.stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 0;
    border-bottom: 1px solid #eef1f6;
    font-size: 13px;
}

.stat-row:last-child {
    border-bottom: 0;
}

.list-clean {
    list-style: none;
    margin: 0;
    padding: 0;
}

.list-clean li {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 0;
    border-bottom: 1px solid #eef1f6;
}

.list-clean li:last-child {
    border-bottom: 0;
}

.list-clean .meta {
    min-width: 0;
    flex: 1;
}

.list-clean .title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-clean .sub {
    font-size: 11.5px;
    color: var(--muted);
    display: block;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 170px;
    padding-top: 10px;
}

.chart-bars .bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    height: 100%;
    justify-content: flex-end;
}

.chart-bars .bar-track {
    width: 100%;
    max-width: 36px;
    height: 100%;
    display: flex;
    align-items: flex-end;
    border-radius: 8px;
    background: #f1f4fa;
    overflow: hidden;
}

.chart-bars .bar-fill {
    width: 100%;
    min-height: 4px;
    border-radius: 8px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 78%, #fff), var(--brand));
    transition: height .4s ease;
}

.chart-bars .bar-label {
    font-size: 10.5px;
    color: var(--muted);
    font-weight: 550;
}

.chart-bars .bar-value {
    font-size: 9.5px;
    color: var(--faint);
}

.hbar {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 12px;
}

.hbar-head {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--muted);
}

.hbar-track {
    height: 7px;
    border-radius: 99px;
    background: #f1f4fa;
    overflow: hidden;
}

.hbar-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 55%, #fff));
}

.flash-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.flash {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 13px;
    border-radius: 10px;
    border: 1px solid;
    font-size: 13px;
    font-weight: 500;
    animation: flashIn .25s ease;
}

@keyframes flashIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
}

.flash .icon {
    margin-top: 1px;
}

.flash span {
    flex: 1;
}

.flash-close {
    border: 0;
    background: transparent;
    color: inherit;
    opacity: .55;
    padding: 0;
    display: inline-flex;
}

.flash-close:hover {
    opacity: 1;
}

.flash-success {
    background: #f0fdf9;
    border-color: #c7f0e1;
    color: #047857;
}

.flash-error {
    background: #fff5f5;
    border-color: #fbd5d5;
    color: #b91c1c;
}

.flash-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #b45309;
}

.flash-info {
    background: #eff6ff;
    border-color: #d6e4ff;
    color: #1d4ed8;
}

.note {
    display: flex;
    gap: 10px;
    padding: 13px 15px;
    border-radius: 11px;
    background: var(--blue-soft);
    border: 1px solid #dbeafe;
    color: #1e40af;
    font-size: 12.5px;
    line-height: 1.55;
}

.note.warn {
    background: var(--amber-soft);
    border-color: #fde68a;
    color: #92400e;
}

.note .icon {
    margin-top: 1px;
    flex: 0 0 auto;
}

.pill-row {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.kv {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 8px 16px;
    font-size: 12.5px;
}

.kv dt {
    color: var(--muted);
}

.kv dd {
    margin: 0;
    color: var(--ink);
    font-weight: 550;
}

/* ==========================================================================
   Auth pages
   ========================================================================== */

.auth-body {
    min-height: 100vh;
    background:
        radial-gradient(1000px 500px at 10% -10%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 60%),
        #eef1f8;
    display: flex;
    align-items: stretch;
}

.auth-shell {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    width: 100%;
    min-height: 100vh;
}

.auth-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 42px 48px;
    color: #fff;
    overflow: hidden;
    background:
        radial-gradient(800px 500px at 110% 0%, color-mix(in srgb, var(--brand) 60%, transparent), transparent 55%),
        radial-gradient(600px 400px at -10% 100%, rgba(37, 99, 235, .35), transparent 60%),
        linear-gradient(160deg, #0b1220, #172554 70%, #312e81);
}

.auth-aside::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    right: -140px;
    bottom: -160px;
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 0 0 70px rgba(255, 255, 255, .03), 0 0 0 140px rgba(255, 255, 255, .02);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -.02em;
    color: #fff;
    position: relative;
    z-index: 1;
}

.auth-hero {
    position: relative;
    z-index: 1;
    max-width: 460px;
}

.auth-hero h2 {
    font-size: 34px;
    line-height: 1.15;
    color: #fff;
    letter-spacing: -.035em;
    margin-bottom: 14px;
}

.auth-hero p {
    color: #c7d2fe;
    font-size: 14px;
    line-height: 1.7;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 26px;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 13px;
    color: #e0e7ff;
}

.auth-feature .tick {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #a5b4fc;
}

.auth-foot {
    color: #94a3b8;
    font-size: 11.5px;
    position: relative;
    z-index: 1;
}

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 24px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 34px;
    background: #fff;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, .6);
}

.auth-card h1 {
    font-size: 23px;
    margin-bottom: 5px;
}

.auth-card .auth-sub {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 24px;
}

.auth-card .field {
    margin-bottom: 15px;
}

.auth-card .btn {
    margin-top: 4px;
}

.auth-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    font-size: 12.5px;
    color: var(--muted);
    flex-wrap: wrap;
}

.auth-demo {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f8faff;
    border: 1px dashed #c7d2fe;
    font-size: 12px;
    color: #4338ca;
    line-height: 1.6;
}

.auth-demo strong {
    color: #3730a3;
}

.otp-input {
    letter-spacing: .5em;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    font-family: var(--mono);
}

.otp-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 13px;
    border-radius: 10px;
    background: var(--amber-soft);
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 12px;
    margin-bottom: 16px;
}

/* ==========================================================================
   Public site
   ========================================================================== */

.public-body {
    background: #fff;
}

.public-nav {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 26px;
    height: 74px;
    padding: 0 6vw;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.public-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 750;
    font-size: 17px;
    color: var(--ink);
    letter-spacing: -.03em;
}

.public-nav .links {
    display: flex;
    gap: 22px;
    margin-left: 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
}

.public-nav .links a {
    color: inherit;
}

.public-nav .links a:hover {
    color: var(--ink);
}

.public-nav .actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero {
    position: relative;
    padding: 86px 6vw 64px;
    overflow: hidden;
    background:
        radial-gradient(900px 460px at 80% -10%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 60%),
        radial-gradient(700px 420px at -10% 20%, rgba(8, 145, 178, .1), transparent 60%),
        #fff;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
    gap: 54px;
    align-items: center;
    max-width: 1260px;
    margin: 0 auto;
}

.eyebrow-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--brand-soft);
    border: 1px solid color-mix(in srgb, var(--brand) 16%, #fff);
    color: var(--brand-dark);
    font-size: 11.5px;
    font-weight: 650;
    letter-spacing: .01em;
}

.hero h1 {
    font-size: clamp(36px, 4.4vw, 58px);
    line-height: 1.06;
    letter-spacing: -.045em;
    margin: 18px 0;
    color: var(--ink);
}

.hero h1 .grad {
    background: linear-gradient(100deg, var(--brand), #0891b2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero .lede {
    font-size: 16px;
    line-height: 1.65;
    color: var(--muted);
    max-width: 540px;
}

.hero-cta {
    display: flex;
    gap: 10px;
    margin-top: 26px;
    flex-wrap: wrap;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 26px;
    color: var(--muted);
    font-size: 12px;
    flex-wrap: wrap;
}

.hero-meta .item {
    display: flex;
    align-items: center;
    gap: 7px;
}

.hero-meta .icon {
    color: var(--green);
}

.hero-visual {
    position: relative;
}

.mock-window {
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 30px 80px rgba(15, 23, 42, .16);
    overflow: hidden;
    transform: perspective(1200px) rotateY(-3deg) rotateX(1deg);
}

.mock-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 13px;
    background: #0f172a;
}

.mock-bar i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #334155;
}

.mock-bar .url {
    margin-left: 10px;
    height: 16px;
    flex: 1;
    border-radius: 4px;
    background: #1e293b;
}

.mock-body {
    display: grid;
    grid-template-columns: 148px 1fr;
    min-height: 330px;
    background: #f7f9fd;
}

.mock-side {
    padding: 16px 11px;
    background: linear-gradient(180deg, #0b1220, #14203a);
    color: #94a3b8;
}

.mock-side .m-brand {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 16px;
    padding: 0 5px;
}

.mock-side .m-logo {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--brand);
}

.mock-side .m-name {
    width: 70px;
    height: 7px;
    border-radius: 3px;
    background: #334155;
}

.mock-nav {
    height: 8px;
    border-radius: 3px;
    background: #1e293b;
    margin: 10px 5px;
}

.mock-nav.active {
    background: color-mix(in srgb, var(--brand) 60%, #1e293b);
}

.mock-main {
    padding: 18px;
}

.mock-title {
    width: 120px;
    height: 11px;
    border-radius: 4px;
    background: #cbd5e1;
    margin-bottom: 14px;
}

.mock-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.mock-stat {
    height: 58px;
    border-radius: 9px;
    background: #fff;
    border: 1px solid #e8edf6;
    padding: 9px;
}

.mock-stat i {
    display: block;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--brand-soft);
    margin-bottom: 6px;
}

.mock-stat b {
    display: block;
    width: 40px;
    height: 7px;
    border-radius: 3px;
    background: #dbe3f0;
}

.mock-chart {
    height: 108px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e8edf6;
    padding: 12px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 12px;
}

.mock-chart span {
    flex: 1;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 55%, #fff), var(--brand));
}

.mock-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mock-row {
    height: 26px;
    border-radius: 7px;
    background: #fff;
    border: 1px solid #e8edf6;
}

.mobile-badge {
    position: absolute;
    right: -14px;
    bottom: -26px;
    width: 122px;
    border-radius: 18px;
    background: #0f172a;
    padding: 6px;
    box-shadow: var(--shadow-lg);
}

.mobile-badge .screen {
    background: #f8fafc;
    border-radius: 13px;
    padding: 9px;
    min-height: 168px;
}

.mobile-badge .m-head {
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--brand), #0891b2);
    margin-bottom: 7px;
}

.mobile-badge .m-line {
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    margin: 6px 0;
}

.mobile-badge .m-line.short {
    width: 60%;
}

.section {
    padding: 72px 6vw;
}

.section-inner {
    max-width: 1160px;
    margin: 0 auto;
}

.section-head {
    max-width: 660px;
    margin-bottom: 38px;
}

.section-head h2 {
    font-size: clamp(26px, 3vw, 36px);
    letter-spacing: -.035em;
    margin: 10px 0 10px;
}

.section-head p {
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.7;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.feature {
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fff;
    transition: .18s ease;
}

.feature:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: color-mix(in srgb, var(--brand) 22%, var(--line));
}

.feature .f-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: var(--brand-soft);
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.feature h3 {
    font-size: 15px;
    margin-bottom: 6px;
}

.feature p {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.65;
    margin: 0;
}

.india-band {
    background: linear-gradient(120deg, #0b1220, #172554 60%, #1e1b4b);
    color: #e2e8f0;
    border-radius: 22px;
    padding: 44px;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 36px;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.india-band h2 {
    color: #fff;
    font-size: 28px;
    letter-spacing: -.03em;
    margin-bottom: 10px;
}

.india-band p {
    color: #cbd5e1;
    font-size: 13.5px;
    line-height: 1.7;
}

.india-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 11px;
}

.india-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #e2e8f0;
}

.india-item .icon {
    color: #a5b4fc;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.price-card {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    position: relative;
}

.price-card.featured {
    border-color: var(--brand);
    box-shadow: 0 16px 44px color-mix(in srgb, var(--brand) 16%, transparent);
}

.price-card .tag {
    position: absolute;
    top: -11px;
    left: 24px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.price {
    font-size: 34px;
    font-weight: 750;
    color: var(--ink);
    letter-spacing: -.04em;
    margin: 12px 0 2px;
}

.price small {
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0;
}

.price-card ul {
    list-style: none;
    padding: 0;
    margin: 18px 0 22px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    font-size: 12.5px;
    color: var(--text);
}

.price-card li {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.price-card li .icon {
    color: var(--green);
    margin-top: 1px;
}

.demo-strip {
    border-radius: 18px;
    border: 1px solid var(--line);
    background: #f8faff;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.demo-strip .creds {
    flex: 1;
    min-width: 260px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    font-size: 11.5px;
}

.cred {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
}

.cred b {
    display: block;
    color: var(--ink);
    font-size: 11.5px;
    margin-bottom: 2px;
}

.cred span {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 10.5px;
}

.public-footer {
    padding: 40px 6vw;
    border-top: 1px solid var(--line);
    background: #fafbfe;
    color: var(--muted);
    font-size: 12px;
}

.public-footer-inner {
    max-width: 1160px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.admission-hero {
    min-height: calc(100vh - 74px);
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 0;
    background: #f5f7fb;
}

.admission-aside {
    padding: 54px 6vw;
    color: #fff;
    background:
        radial-gradient(700px 500px at 100% 0%, color-mix(in srgb, var(--brand) 55%, transparent), transparent 60%),
        linear-gradient(160deg, var(--brand-2), color-mix(in srgb, var(--brand) 40%, #0f172a));
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.admission-aside h1 {
    color: #fff;
    font-size: 34px;
    letter-spacing: -.035em;
    margin: 16px 0 12px;
}

.admission-aside p {
    color: rgba(255, 255, 255, .76);
    font-size: 14px;
    line-height: 1.7;
    max-width: 420px;
}

.admission-form-wrap {
    padding: 48px 6vw;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admission-form {
    width: 100%;
    max-width: 500px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.admission-form h2 {
    font-size: 20px;
    margin-bottom: 4px;
}

.admission-form .sub {
    color: var(--muted);
    font-size: 12.5px;
    margin-bottom: 20px;
}

/* ==========================================================================
   Parent app
   ========================================================================== */

.parent-body {
    min-height: 100vh;
    background: #e9edf4;
    padding: 0;
}

.parent-shell {
    position: relative;
    width: 100%;
    max-width: 520px;
    min-height: 100vh;
    margin: 0 auto;
    background: #f4f6fb;
    box-shadow: 0 0 60px rgba(15, 23, 42, .08);
    display: flex;
    flex-direction: column;
}

.parent-header {
    position: relative;
    padding: 18px 18px 20px;
    color: #fff;
    background:
        radial-gradient(500px 260px at 110% -20%, rgba(255, 255, 255, .18), transparent 60%),
        linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 62%, #0f172a));
    border-radius: 0 0 24px 24px;
    overflow: hidden;
}

.parent-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.parent-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.parent-brand .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 13px;
    background: rgba(255, 255, 255, .16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}

.parent-brand .name {
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 190px;
}

.parent-brand .sub {
    font-size: 10px;
    color: rgba(255, 255, 255, .7);
}

.parent-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.parent-icon-btn {
    position: relative;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 0;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.parent-icon-btn:hover {
    background: rgba(255, 255, 255, .22);
}

.parent-icon-btn .count {
    position: absolute;
    top: -4px;
    right: -3px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #f97316;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #fff;
}

.parent-greeting {
    margin-top: 18px;
    font-size: 11.5px;
    color: rgba(255, 255, 255, .72);
}

.parent-greeting h1 {
    color: #fff;
    font-size: 21px;
    margin-top: 2px;
    letter-spacing: -.025em;
}

.child-switcher {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.child-switcher::-webkit-scrollbar {
    display: none;
}

.child-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    padding: 7px 11px 7px 7px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .14);
    color: rgba(255, 255, 255, .85);
    font-size: 11.5px;
    font-weight: 550;
    transition: .15s;
}

.child-chip .avatar {
    width: 26px;
    height: 26px;
    font-size: 10px;
    background: rgba(255, 255, 255, .24) !important;
}

.child-chip.active {
    background: #fff;
    color: var(--ink);
    box-shadow: 0 6px 20px rgba(15, 23, 42, .18);
}

.child-chip.active .avatar {
    background: var(--brand) !important;
}

.parent-content {
    flex: 1;
    padding: 16px 16px 96px;
}

.parent-card {
    background: #fff;
    border: 1px solid #e8ecf4;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
    padding: 16px;
    margin-bottom: 12px;
}

.parent-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.parent-card-head h2 {
    font-size: 14px;
}

.parent-card-head a {
    font-size: 11.5px;
    font-weight: 600;
}

.parent-hero-card {
    position: relative;
    padding: 18px;
    border-radius: 18px;
    color: #fff;
    background:
        radial-gradient(400px 200px at 100% 0%, rgba(255, 255, 255, .22), transparent 60%),
        linear-gradient(135deg, #0f172a, #1e293b);
    overflow: hidden;
    margin-bottom: 12px;
}

.parent-hero-card .label {
    font-size: 10.5px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.parent-hero-card .amount {
    font-size: 27px;
    font-weight: 750;
    letter-spacing: -.03em;
    margin: 4px 0 2px;
}

.parent-hero-card .due {
    font-size: 11.5px;
    color: #cbd5e1;
}

.parent-hero-card .btn {
    margin-top: 12px;
    background: #fff;
    color: var(--ink);
    border-color: #fff;
}

.parent-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.parent-stat {
    background: #fff;
    border: 1px solid #e8ecf4;
    border-radius: 14px;
    padding: 13px 14px;
}

.parent-stat .label {
    font-size: 10.5px;
    color: var(--muted);
    font-weight: 550;
    display: flex;
    align-items: center;
    gap: 5px;
}

.parent-stat .value {
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -.03em;
    margin-top: 3px;
}

.parent-quick {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.parent-quick a {
    background: #fff;
    border: 1px solid #e8ecf4;
    border-radius: 13px;
    padding: 12px 6px;
    text-align: center;
    color: var(--text);
    font-size: 10.5px;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
}

.parent-quick a .q-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--brand-soft);
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.parent-list-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 0;
    border-bottom: 1px solid #eef1f6;
}

.parent-list-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.parent-list-item .meta {
    flex: 1;
    min-width: 0;
}

.parent-list-item .title {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink);
}

.parent-list-item .sub {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-top: 1px;
}

.parent-list-item .amount {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
}

.parent-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    margin-bottom: 12px;
    scrollbar-width: none;
}

.parent-tabs::-webkit-scrollbar { display: none; }

.parent-tabs a {
    flex: 0 0 auto;
    padding: 7px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e8ecf4;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 600;
}

.parent-tabs a.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.parent-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    width: 100%;
    max-width: 520px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(14px);
    border-top: 1px solid #e6eaf2;
    padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
}

.parent-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 5px 0;
    color: #94a3b8;
    font-size: 9.5px;
    font-weight: 600;
    border-radius: 10px;
}

.parent-bottom-nav a.active {
    color: var(--brand);
}

.parent-bottom-nav a .nav-ind {
    width: 22px;
    height: 3px;
    border-radius: 99px;
    background: transparent;
    margin-bottom: 1px;
}

.parent-bottom-nav a.active .nav-ind {
    background: var(--brand);
}

.parent-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 18px 2px 9px;
}

.parent-section-title h2 {
    font-size: 14.5px;
}

.parent-section-title a {
    font-size: 11.5px;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.fee-row {
    padding: 13px 0;
    border-bottom: 1px solid #eef1f6;
}

.fee-row:last-child {
    border-bottom: 0;
}

.fee-row-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 12.5px;
}

.fee-row-top b {
    color: var(--ink);
}

.fee-row .meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 3px;
    font-size: 11px;
    color: var(--muted);
}

.parent-att-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #eef1f6;
    font-size: 12.5px;
}

.parent-att-row:last-child {
    border-bottom: 0;
}

.parent-att-row .date {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--ink);
    font-weight: 550;
}

.date-tile {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f4f6fb;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 9px;
    color: var(--muted);
    font-weight: 650;
}

.date-tile b {
    font-size: 14px;
    color: var(--ink);
    margin-top: 2px;
}

.parent-notice {
    padding: 13px 0;
    border-bottom: 1px solid #eef1f6;
}

.parent-notice:last-child {
    border-bottom: 0;
}

.parent-notice h3 {
    font-size: 12.5px;
    margin-bottom: 3px;
}

.parent-notice p {
    font-size: 11.5px;
    color: var(--muted);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.parent-notice .date {
    font-size: 10px;
    color: var(--faint);
    margin-top: 4px;
    display: block;
}

.pay-sheet {
    background: #fff;
    border-radius: 18px;
    padding: 18px;
    border: 1px solid #e8ecf4;
}

.pay-amount {
    text-align: center;
    padding: 16px 0 10px;
}

.pay-amount .amt {
    font-size: 32px;
    font-weight: 750;
    letter-spacing: -.04em;
    color: var(--ink);
}

.pay-amount .sub {
    font-size: 11.5px;
    color: var(--muted);
}

.qr-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 13px;
    background: #f8faff;
    border: 1px solid #e2e8fb;
}

.qr-box {
    width: 88px;
    height: 88px;
    padding: 6px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.qr-box img,
.qr-box canvas {
    max-width: 100%;
    height: auto;
}

.qr-box svg {
    width: 100%;
    height: 100%;
}

.pay-methods {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 14px 0;
}

.pay-method {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 13px;
    border: 1px solid #e3e8f2;
    border-radius: 11px;
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 550;
    color: var(--ink);
    background: #fff;
}

.pay-method input {
    accent-color: var(--brand);
    width: 16px;
    height: 16px;
}

.pay-method:has(input:checked) {
    border-color: var(--brand);
    background: var(--brand-soft);
    box-shadow: 0 0 0 1px var(--brand);
}

.parent-empty {
    text-align: center;
    padding: 40px 16px;
    color: var(--muted);
    font-size: 12.5px;
}

.parent-empty .empty-icon {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    background: #f1f4fa;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

/* ==========================================================================
   Print layout, receipts, report cards, ID cards
   ========================================================================== */

.print-body {
    background: #eef1f6;
    color: #0f172a;
}

.print-toolbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #0f172a;
    color: #fff;
}

.print-toolbar .title {
    font-size: 13px;
    font-weight: 600;
    margin-right: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.print-toolbar .btn {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

.print-toolbar .btn-primary {
    background: #fff;
    border-color: #fff;
    color: #0f172a;
}

.sheet {
    width: 100%;
    max-width: 820px;
    margin: 24px auto 60px;
    background: #fff;
    padding: 40px 44px;
    border-radius: 6px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, .12);
}

.sheet.landscape {
    max-width: 1000px;
}

.receipt-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 22px;
    border-bottom: 2px solid #0f172a;
}

.receipt-head .school {
    display: flex;
    gap: 13px;
}

.receipt-head .logo {
    width: 54px;
    height: 54px;
    border-radius: 11px;
    background: var(--brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 750;
    font-size: 17px;
    overflow: hidden;
    flex: 0 0 auto;
}

.receipt-head .logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.receipt-head h1 {
    font-size: 20px;
    letter-spacing: -.02em;
}

.receipt-head .addr {
    font-size: 11px;
    color: #64748b;
    line-height: 1.55;
    margin-top: 3px;
    max-width: 330px;
}

.receipt-title {
    text-align: right;
}

.receipt-title h2 {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #334155;
}

.receipt-title .no {
    font-family: var(--mono);
    font-size: 12px;
    color: #0f172a;
    font-weight: 600;
    margin-top: 4px;
}

.receipt-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 20px 0;
    border-bottom: 1px solid #e2e8f0;
}

.receipt-meta h4 {
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #94a3b8;
    margin-bottom: 6px;
}

.receipt-meta p {
    font-size: 12px;
    line-height: 1.65;
    margin: 0;
    color: #334155;
}

.receipt-meta .big {
    font-size: 14px;
    font-weight: 650;
    color: #0f172a;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
}

.receipt-table th {
    text-align: left;
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #64748b;
    padding: 9px 10px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.receipt-table td {
    padding: 12px 10px;
    font-size: 12.5px;
    border-bottom: 1px solid #edf1f6;
}

.receipt-table td.amount,
.receipt-table th.amount {
    text-align: right;
}

.receipt-summary {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.receipt-summary table {
    width: 300px;
    border-collapse: collapse;
    font-size: 12px;
}

.receipt-summary td {
    padding: 6px 4px;
    color: #475569;
}

.receipt-summary td.value {
    text-align: right;
    font-weight: 600;
    color: #0f172a;
}

.receipt-summary tr.total td {
    border-top: 2px solid #0f172a;
    padding-top: 9px;
    font-size: 15px;
    font-weight: 750;
    color: #0f172a;
}

.receipt-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
}

.receipt-words {
    font-size: 11.5px;
    color: #475569;
    max-width: 420px;
    line-height: 1.6;
}

.receipt-sign {
    text-align: center;
    font-size: 10.5px;
    color: #64748b;
    min-width: 150px;
}

.receipt-sign .line {
    height: 34px;
    border-bottom: 1px solid #cbd5e1;
    margin-bottom: 5px;
}

.receipt-qr {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: #fbfcfe;
}

.receipt-qr .qr {
    width: 74px;
    height: 74px;
    background: #fff;
    padding: 3px;
    border-radius: 6px;
}

.receipt-qr .qr canvas,
.receipt-qr .qr img,
.receipt-qr .qr svg {
    width: 100% !important;
    height: 100% !important;
}

.receipt-qr .txt {
    font-size: 10px;
    color: #475569;
    line-height: 1.55;
    max-width: 130px;
}

.receipt-qr .txt b {
    display: block;
    color: #0f172a;
    font-size: 11px;
}

.void-stamp {
    display: inline-block;
    border: 2px solid #dc2626;
    color: #dc2626;
    padding: 4px 12px;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: .16em;
    font-size: 11px;
    font-weight: 700;
    transform: rotate(-6deg);
}

.reportcard-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #0f172a;
}

.reportcard-head h1 {
    font-size: 21px;
}

.reportcard-head .school-meta {
    font-size: 10.5px;
    color: #64748b;
    line-height: 1.6;
    margin-top: 3px;
}

.reportcard-title {
    text-align: right;
}

.reportcard-title h2 {
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #334155;
}

.student-strip {
    display: grid;
    grid-template-columns: 1.4fr 1fr .8fr .8fr;
    gap: 12px;
    padding: 16px 0;
}

.student-strip .lab {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #94a3b8;
    margin-bottom: 2px;
}

.student-strip .val {
    font-size: 12.5px;
    font-weight: 600;
    color: #0f172a;
}

.grade-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 30px;
    padding: 0 9px;
    border-radius: 8px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-weight: 750;
    font-size: 12px;
}

.report-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.report-summary .box {
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    padding: 11px 13px;
    background: #fbfcfe;
}

.report-summary .box .lab {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #94a3b8;
}

.report-summary .box .val {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-top: 2px;
}

.reportcard-foot {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 40px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    font-size: 10.5px;
    color: #64748b;
}

.signature-line {
    width: 170px;
    text-align: center;
}

.signature-line .line {
    height: 40px;
    border-bottom: 1px solid #94a3b8;
    margin-bottom: 5px;
}

.idcard {
    position: relative;
    width: 360px;
    height: 220px;
    border-radius: 14px;
    color: #fff;
    background:
        radial-gradient(260px 160px at 110% -10%, rgba(255, 255, 255, .2), transparent 60%),
        linear-gradient(140deg, var(--brand-2), color-mix(in srgb, var(--brand) 65%, #0f172a));
    overflow: hidden;
    padding: 20px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .25);
}

.idcard::after {
    content: "";
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    right: -70px;
    bottom: -90px;
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow: 0 0 0 28px rgba(255, 255, 255, .03);
}

.idcard .id-head {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.idcard .id-logo {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    overflow: hidden;
}

.idcard .id-school {
    font-size: 10.5px;
    font-weight: 650;
    letter-spacing: .02em;
}

.idcard .id-type {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: rgba(255, 255, 255, .6);
}

.idcard .id-body {
    display: flex;
    align-items: center;
    gap: 13px;
    position: relative;
    z-index: 1;
}

.idcard .id-photo {
    width: 66px;
    height: 76px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    overflow: hidden;
    flex: 0 0 auto;
}

.idcard .id-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.idcard .id-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.idcard .id-meta {
    font-size: 9.5px;
    color: rgba(255, 255, 255, .75);
    margin-top: 3px;
    line-height: 1.6;
}

.idcard .id-foot {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 15px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    font-size: 8.5px;
    color: rgba(255, 255, 255, .6);
    z-index: 1;
}

.idcard .id-no {
    font-family: var(--mono);
    font-size: 9.5px;
    color: #fff;
    letter-spacing: .04em;
}

/* ==========================================================================
   Specific screens
   ========================================================================== */

.attendance-toolbar {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.attendance-toolbar .field {
    margin: 0;
}

.attendance-table td {
    padding: 8px 12px;
}

.attendance-table .student-cell {
    min-width: 190px;
}

.attendance-save {
    position: sticky;
    bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 13px;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(10px);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    z-index: 15;
}

.marks-table th.sticky,
.marks-table td.sticky {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 2;
    min-width: 190px;
}

.marks-table th.sticky {
    background: #fafbfd;
    z-index: 3;
}

.marks-table input.marks-input {
    width: 80px;
    height: 34px;
    padding: 4px 8px;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    text-align: center;
    font-size: 12.5px;
    font-weight: 600;
}

.marks-table input.marks-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 13%, transparent);
    outline: none;
}

.marks-table .max-note {
    font-size: 9px;
    color: var(--faint);
    display: block;
    margin-top: 2px;
}

.static-url {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 9px;
    background: #f8faff;
    border: 1px solid #e2e8fb;
    font-family: var(--mono);
    font-size: 11.5px;
    color: #3730a3;
    overflow-wrap: anywhere;
}

.settings-grid {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.settings-nav {
    position: sticky;
    top: 88px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 13px;
}

.settings-nav a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 550;
}

.settings-nav a:hover {
    background: var(--gray-soft);
    color: var(--ink);
}

.settings-nav a.active {
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-weight: 650;
}

.perm-table th,
.perm-table td {
    font-size: 11.5px;
    padding: 8px 10px;
}

.perm-table td.check-cell {
    text-align: center;
}

.perm-table input {
    width: 15px;
    height: 15px;
    accent-color: var(--brand);
}

.role-block {
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

.role-block .role-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: #fafbfd;
    border-bottom: 1px solid var(--line);
}

.role-block .role-head h3 {
    font-size: 13.5px;
}

.perm-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px 16px;
    padding: 15px;
}

.perm-grid label {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 11.5px;
    color: var(--text);
    line-height: 1.35;
}

.perm-grid input {
    margin-top: 1px;
    accent-color: var(--brand);
}

.integration-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--muted);
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--gray-soft);
}

.integration-status.on {
    color: var(--green);
    background: var(--green-soft);
}

.detail-hero {
    position: relative;
    padding: 24px;
    border-radius: var(--radius);
    color: #fff;
    overflow: hidden;
    background:
        radial-gradient(600px 300px at 100% -30%, color-mix(in srgb, var(--brand) 65%, transparent), transparent 60%),
        linear-gradient(135deg, #0f172a, #1e293b);
}

.detail-hero h1 {
    color: #fff;
    font-size: 24px;
}

.detail-hero p {
    color: #cbd5e1;
    font-size: 12.5px;
    margin: 4px 0 0;
}

.detail-hero .pill-row {
    margin-top: 14px;
}

.detail-hero .badge {
    background: rgba(255, 255, 255, .14);
    color: #fff;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    color: var(--ink);
    font-size: 12.5px;
    font-weight: 550;
}

.quick-action:hover {
    border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
    background: var(--brand-soft);
}

.quick-action .q-ico {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--brand-soft);
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.timeline {
    position: relative;
    padding-left: 22px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 6px;
    bottom: 6px;
    width: 1px;
    background: var(--line-strong);
}

.timeline-item {
    position: relative;
    padding: 0 0 16px;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -20px;
    top: 5px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--brand);
}

.timeline-item .t-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 3px;
}

.timeline-item .t-body {
    font-size: 12.5px;
    color: var(--text);
    line-height: 1.55;
}

.profile-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 18px;
}

.profile-photo {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: var(--brand-soft);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    overflow: hidden;
    flex: 0 0 auto;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.doc-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.doc-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 9px;
    font-size: 12px;
    color: var(--text);
    background: #fff;
}

.doc-item .meta {
    flex: 1;
    min-width: 0;
}

.doc-item .title {
    display: block;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-item .sub {
    display: block;
    font-size: 10.5px;
    color: var(--muted);
}

.mode-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.mode-tab {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 600;
}

.mode-tab.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.install-shell {
    min-height: 100vh;
    padding: 40px 20px;
    background:
        radial-gradient(900px 500px at 80% -10%, color-mix(in srgb, #4f46e5 18%, transparent), transparent 60%),
        #f4f6fb;
}

.install-wrap {
    max-width: 880px;
    margin: 0 auto;
}

.install-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin-bottom: 8px;
    font-weight: 750;
    color: var(--ink);
    font-size: 20px;
    letter-spacing: -.03em;
}

.install-sub {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 26px;
}

.install-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.install-step {
    padding: 22px 26px;
    border-bottom: 1px solid var(--line);
}

.install-step:last-child {
    border-bottom: 0;
}

.install-step h2 {
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 3px;
}

.step-no {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: var(--brand);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.install-step .desc {
    color: var(--muted);
    font-size: 12px;
    margin-left: 33px;
    margin-bottom: 16px;
}

.req-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-left: 33px;
}

.req {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
}

.req .res {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.req .res.ok {
    background: var(--green-soft);
    color: var(--green);
}

.req .res.bad {
    background: var(--red-soft);
    color: var(--red);
}

.req .detail {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 10px;
    color: var(--faint);
}

.install-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 26px;
    background: #fafbfd;
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
}

.success-box {
    max-width: 620px;
    margin: 50px auto;
    padding: 34px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
    text-align: center;
}

.success-tick {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--green-soft);
    color: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1180px) {
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-60-40 { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
    }
    .sidebar.open { transform: none; }
    .main { margin-left: 0; }
    .menu-toggle { display: inline-flex; }
    .topbar { padding: 0 16px; }
    .content { padding: 20px 16px 40px; }
    .scrim.show { display: block; }
    .settings-grid { grid-template-columns: 1fr; }
    .settings-nav {
        position: static;
        flex-direction: row;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .settings-nav a { white-space: nowrap; }
}

@media (max-width: 860px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .auth-main { min-height: 100vh; background: #eef1f8; }
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero { padding-top: 56px; }
    .hero-visual { max-width: 540px; }
    .feature-grid,
    .pricing-grid { grid-template-columns: 1fr; }
    .india-band { grid-template-columns: 1fr; padding: 30px; }
    .admission-hero { grid-template-columns: 1fr; }
    .admission-aside { padding: 44px 6vw; }
    .admission-form-wrap { padding: 32px 16px 60px; }
    .public-nav .links { display: none; }
    .public-nav { height: 64px; padding: 0 16px; }
    .section { padding: 54px 16px; }
    .hero { padding-left: 16px; padding-right: 16px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .span-2 { grid-column: span 1; }
    .form-grid-3 { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .demo-strip .creds { grid-template-columns: 1fr; }
    .topbar-pill.hide-mobile { display: none; }
    .page-head { flex-direction: column; gap: 12px; }
    .page-actions { width: 100%; }
    .sheet { margin: 0; border-radius: 0; padding: 24px 18px; }
    .print-toolbar { position: static; }
    .receipt-meta { grid-template-columns: 1fr; gap: 14px; }
    .report-summary { grid-template-columns: repeat(2, 1fr); }
    .student-strip { grid-template-columns: 1fr 1fr; }
    .perm-grid { grid-template-columns: 1fr 1fr; }
    .quick-actions { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .stats-grid { grid-template-columns: 1fr; }
    .topbar-avatar .who { display: none; }
    .content { padding: 16px 12px 36px; }
    .card-pad { padding: 16px; }
    .card-head { padding: 14px 16px; }
    .card-body { padding: 16px; }
    .page-head h1 { font-size: 21px; }
    .table th, .table td { padding: 10px 11px; }
    .auth-card { padding: 24px; }
    .parent-content { padding-left: 12px; padding-right: 12px; }
    .idcard { transform: scale(.92); transform-origin: top center; }
    .receipt-head { flex-direction: column; }
    .receipt-title { text-align: left; }
    .receipt-foot { flex-direction: column; align-items: flex-start; }
    .receipt-summary { justify-content: flex-start; }
}

@media print {
    html, body { background: #fff !important; }
    .print-toolbar, .no-print, .flash-list { display: none !important; }
    .sheet {
        max-width: none;
        margin: 0;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
    }
    a { color: inherit; text-decoration: none; }
    .badge { border: 1px solid #ddd; }
    .parent-bottom-nav { display: none; }
    @page { margin: 14mm; }
}
