/* School Management ERP — Modern Responsive UI */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Sora:wght@500;600;700&display=swap');

:root {
    --sidebar-width: 268px;
    --brand: #0f766e;
    --brand-dark: #0d5c56;
    --brand-soft: #ccfbf1;
    --ink: #0f172a;
    --muted: #64748b;
    --surface: #ffffff;
    --canvas: #f0f4f8;
    --canvas-2: #e8eef5;
    --border: #e2e8f0;
    --danger: #dc2626;
    --warning: #d97706;
    --success: #059669;
    --info: #0284c8;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.04);
    --radius: 14px;
    --topbar-h: 64px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Manrope', sans-serif;
    color: var(--ink);
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(15, 118, 110, 0.08), transparent 55%),
        radial-gradient(900px 500px at 100% 0%, rgba(2, 132, 200, 0.07), transparent 50%),
        linear-gradient(180deg, var(--canvas) 0%, var(--canvas-2) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    margin: 0;
}

h1, h2, h3, h4, h5, .page-title, .brand-title {
    font-family: 'Sora', sans-serif;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
}

/* ---------- Layout ---------- */
#wrapper {
    min-height: 100vh;
}

#sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    flex-shrink: 0;
    background: linear-gradient(180deg, #0b1c2c 0%, #123047 55%, #0f3d3a 100%);
    color: #fff;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1040;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

#sidebar .sidebar-header {
    padding: 1.25rem 1.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#sidebar .brand-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

#sidebar .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand), #14b8a6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(20, 184, 166, 0.35);
}

#sidebar .nav-section {
    padding: 0.85rem 0.85rem 0.35rem;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 700;
}

#sidebar .nav-link {
    color: rgba(255, 255, 255, 0.78) !important;
    border-radius: 10px;
    margin: 2px 8px;
    padding: 0.65rem 0.85rem;
    font-weight: 500;
    font-size: 0.92rem;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
    display: flex;
    align-items: center;
}

#sidebar .nav-link i {
    width: 1.35rem;
    opacity: 0.9;
}

#sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff !important;
}

#sidebar .nav-link.active {
    background: linear-gradient(90deg, rgba(20, 184, 166, 0.28), rgba(20, 184, 166, 0.08));
    color: #fff !important;
    box-shadow: inset 3px 0 0 #2dd4bf;
}

#page-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-topbar {
    height: var(--topbar-h);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 1.25rem;
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.3rem 0.75rem 0.3rem 0.35rem;
    font-size: 0.875rem;
}

.user-chip .avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), #0ea5e9);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

main.app-main {
    padding: 1.35rem 1.35rem 2rem;
    flex: 1;
}

.app-footer {
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    padding: 1rem;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.5);
}

/* ---------- Cards & stats ---------- */
.stat-card,
.table-card,
.panel-card {
    background: var(--surface);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    position: relative;
}

.stat-card::after {
    content: '';
    position: absolute;
    right: -20px;
    top: -20px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.05;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.stat-card .card-body {
    padding: 1.15rem 1.2rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.table-card {
    padding: 1.25rem;
}

.table-card h5,
.panel-card h5 {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 1rem;
}

.table > :not(caption) > * > * {
    padding: 0.8rem 0.75rem;
}

.table thead th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    font-weight: 700;
    border-bottom-width: 1px;
    white-space: nowrap;
}

.badge-soft {
    font-weight: 600;
    border-radius: 999px;
    padding: 0.35em 0.7em;
}

/* ---------- Forms & buttons ---------- */
.form-control,
.form-select {
    border-radius: 10px;
    border-color: #cbd5e1;
    padding: 0.55rem 0.85rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.2rem rgba(15, 118, 110, 0.15);
}

.btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 0.5rem 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand), #0d9488);
    border-color: var(--brand-dark);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, var(--brand-dark), var(--brand));
    border-color: var(--brand-dark);
}

.btn-outline-primary {
    color: var(--brand);
    border-color: var(--brand);
}

.btn-outline-primary:hover {
    background: var(--brand);
    border-color: var(--brand);
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1035;
}

/* ---------- Login ---------- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    background: #0b1c2c;
}

.login-visual {
    flex: 1.1;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(160deg, rgba(15, 118, 110, 0.55), rgba(11, 28, 44, 0.85)),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(145deg, #0f766e 0%, #0b1c2c 55%, #0284c8 120%);
    color: #fff;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.login-visual h1 {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 700;
    max-width: 14ch;
    line-height: 1.15;
    margin-bottom: 0.75rem;
}

.login-visual p {
    max-width: 36ch;
    opacity: 0.85;
    font-size: 1.05rem;
}

.login-panel {
    flex: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(500px 300px at 80% 10%, rgba(15, 118, 110, 0.08), transparent),
        #f8fafc;
    padding: 2rem 1.25rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.1);
    background: #fff;
}

.login-card .card-body {
    padding: 2rem;
}

.login-brand {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand), #14b8a6);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1rem;
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.3);
}

/* ---------- Empty / misc ---------- */
.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--muted);
}

.empty-state i {
    font-size: 2.2rem;
    opacity: 0.45;
    display: block;
    margin-bottom: 0.5rem;
}

.alert {
    border-radius: 12px;
    border: none;
}

.pagination .page-link {
    border-radius: 8px !important;
    margin: 0 2px;
    color: var(--brand);
}

.pagination .page-item.active .page-link {
    background: var(--brand);
    border-color: var(--brand);
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    #sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-105%);
        transition: transform 0.28s ease;
        box-shadow: 12px 0 40px rgba(0, 0, 0, 0.25);
    }

    #sidebar.show {
        transform: translateX(0);
    }

    .sidebar-backdrop.show {
        display: block;
    }

    main.app-main {
        padding: 1rem;
    }

    .app-topbar {
        padding: 0 0.85rem;
    }

    .page-title {
        font-size: 1rem;
    }

    .user-chip .user-meta {
        display: none;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar .btn,
    .toolbar form {
        width: 100%;
    }

    .login-visual {
        display: none;
    }

    .login-page {
        background: linear-gradient(160deg, #0f766e, #0b1c2c 60%);
    }

    .login-panel {
        background: transparent;
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .stat-card h3,
    .stat-card h4 {
        font-size: 1.25rem;
    }

    .table-card {
        padding: 0.85rem;
    }

    .btn-group-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .btn-group-actions .btn {
        flex: 1 1 auto;
    }
}

.photo-thumb {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
    border: 2px solid #e2e8f0;
    background: #f1f5f9;
}

.photo-placeholder {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #0f766e;
    background: #ccfbf1 !important;
    font-size: 0.85rem;
}

.badge.bg-teal-soft {
    background: #ccfbf1;
    color: #0f766e;
}

.flash-alert {
    border: none;
    border-left: 4px solid currentColor;
    font-weight: 600;
}

.toast-stack {
    position: fixed;
    top: 76px;
    right: 16px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-width: min(420px, calc(100vw - 24px));
    pointer-events: none;
}

.app-toast {
    pointer-events: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
    border: 1px solid #e2e8f0;
    padding: 0.85rem 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    animation: toast-in 0.28s ease;
}

.app-toast.success { border-left: 4px solid #059669; }
.app-toast.danger,
.app-toast.error { border-left: 4px solid #dc2626; }
.app-toast.warning { border-left: 4px solid #d97706; }
.app-toast.info { border-left: 4px solid #0284c8; }

.app-toast .toast-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.app-toast.success .toast-icon { color: #059669; }
.app-toast.danger .toast-icon,
.app-toast.error .toast-icon { color: #dc2626; }
.app-toast.warning .toast-icon { color: #d97706; }
.app-toast.info .toast-icon { color: #0284c8; }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media print {
    #sidebar,
    .app-topbar,
    .app-footer,
    .sidebar-backdrop,
    .toast-stack,
    .flash-alert,
    .no-print {
        display: none !important;
    }

    #page-content,
    main.app-main {
        padding: 0 !important;
    }

    /* Keep receipt fee heads visible when printing */
    .fee-receipt-table thead { display: table-header-group !important; }
    .fee-receipt-table tbody { display: table-row-group !important; }
    .fee-receipt-table th,
    .fee-receipt-table td {
        color: #000 !important;
        visibility: visible !important;
    }
}

/* Student extended form tabs */
.student-form-tabs {
    gap: 0.25rem;
    border-bottom: 1px solid var(--border);
}
.student-form-tabs .nav-link {
    border: 0;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    background: transparent;
}
.student-form-tabs .nav-link:hover {
    color: var(--brand);
    background: var(--brand-soft);
}
.student-form-tabs .nav-link.active {
    color: #fff;
    background: var(--brand);
}

/* ---------- Student form (modern admission UI) ---------- */
.sf-shell {
    max-width: 1120px;
    margin: 0 auto 2rem;
    animation: sf-rise 0.45s ease both;
}

@keyframes sf-rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.sf-hero {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    padding: 1.6rem 1.7rem;
    margin-bottom: 1.15rem;
    color: #ecfeff;
    background:
        radial-gradient(720px 280px at 90% -20%, rgba(45, 212, 191, 0.35), transparent 55%),
        linear-gradient(135deg, #0b3d3a 0%, #0f766e 48%, #0e7490 100%);
    box-shadow: 0 18px 40px rgba(15, 118, 110, 0.22);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.sf-hero-edit {
    background:
        radial-gradient(720px 280px at 90% -20%, rgba(56, 189, 248, 0.28), transparent 55%),
        linear-gradient(135deg, #0f172a 0%, #134e4a 55%, #0f766e 100%);
}

.sf-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.85;
}

.sf-hero h1 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.45rem, 2.4vw, 1.9rem);
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.sf-hero p:last-child {
    margin: 0;
    max-width: 42ch;
    opacity: 0.88;
    font-size: 0.95rem;
}

.sf-hero-art {
    position: relative;
    width: 96px;
    height: 96px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    font-size: 2.4rem;
}

.sf-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(0.5px);
    animation: sf-float 5s ease-in-out infinite;
}

.sf-orb-1 {
    width: 88px;
    height: 88px;
    background: rgba(255, 255, 255, 0.12);
}

.sf-orb-2 {
    width: 54px;
    height: 54px;
    background: rgba(45, 212, 191, 0.35);
    animation-delay: -1.5s;
}

@keyframes sf-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.sf-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sf-panel {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 20px;
    padding: 1.35rem 1.4rem 1.5rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    animation: sf-rise 0.4s ease both;
}

.sf-panel-admission {
    background:
        linear-gradient(180deg, rgba(204, 251, 241, 0.35), rgba(255, 255, 255, 0.95));
}

.sf-section-head {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1.15rem;
}

.sf-section-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--brand-soft), #e0f2fe);
    color: var(--brand-dark);
    font-size: 1.15rem;
    flex-shrink: 0;
}

.sf-section-title {
    margin: 0;
    font-size: 1.05rem;
    font-family: 'Sora', sans-serif;
    font-weight: 650;
}

.sf-section-sub {
    margin: 0.15rem 0 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.sf-divider {
    height: 1px;
    margin: 1.15rem 0;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.sf-chip-title {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-dark);
    background: var(--brand-soft);
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
}

.sf-note {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    background: #f0f9ff;
    color: #0c4a6e;
    font-size: 0.88rem;
    border: 1px solid #bae6fd;
}

.sf-steps {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding: 0.35rem 0.15rem 0.65rem;
    margin: 0 0 0.25rem;
    scrollbar-width: thin;
}

.sf-step {
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.75);
    color: var(--muted);
    border-radius: 16px;
    padding: 0.55rem 0.7rem;
    min-width: 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.sf-step:hover {
    transform: translateY(-2px);
    color: var(--brand-dark);
    border-color: rgba(15, 118, 110, 0.2);
}

.sf-step.active {
    background: linear-gradient(160deg, #0f766e, #0d9488);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 10px 22px rgba(15, 118, 110, 0.28);
}

.sf-step-num {
    font-size: 0.65rem;
    font-weight: 800;
    opacity: 0.7;
}

.sf-step-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.sf-step-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.sf-panels .tab-pane {
    outline: none;
}

.sf-photo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    text-align: center;
}

.sf-photo-frame {
    position: relative;
    width: 132px;
    height: 132px;
    border-radius: 28px;
    overflow: hidden;
    background:
        linear-gradient(145deg, #ecfeff, #f8fafc);
    border: 2px dashed rgba(15, 118, 110, 0.35);
    display: grid;
    place-items: center;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.sf-photo:hover .sf-photo-frame,
.sf-photo:focus-within .sf-photo-frame {
    border-color: var(--brand);
    border-style: solid;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.16);
}

.sf-photo-img,
.sf-photo-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sf-photo-placeholder {
    display: grid;
    place-items: center;
    font-family: 'Sora', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--brand);
    background: linear-gradient(160deg, #ccfbf1, #e0f2fe);
}

.sf-photo-overlay {
    position: absolute;
    inset: auto 0 0 0;
    height: 34%;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.55));
    color: #fff;
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sf-photo:hover .sf-photo-overlay {
    opacity: 1;
}

.sf-photo-label {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--ink);
}

.sf-photo-hint {
    font-size: 0.75rem;
    color: var(--muted);
}

.sf-form .form-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #334155;
    margin-bottom: 0.35rem;
}

.sf-form .form-control,
.sf-form .form-select {
    border-radius: 12px;
    border-color: #dbe3ee;
    padding: 0.62rem 0.8rem;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sf-form .form-control:focus,
.sf-form .form-select:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.15);
}

.sf-docs-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.sf-doc-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid var(--border);
}

.sf-doc-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 1.15rem;
}

.sf-upload-grid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.sf-upload-row {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 0.65rem;
    padding: 0.75rem;
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fafc, #fff);
    border: 1px dashed #cbd5e1;
}

.sf-actions {
    position: sticky;
    bottom: 0.75rem;
    z-index: 20;
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
}

.sf-actions .btn-primary {
    min-width: 160px;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(15, 118, 110, 0.25);
}

.sf-actions .btn-light {
    border-radius: 12px;
    border: 1px solid var(--border);
}

@media (max-width: 767.98px) {
    .sf-hero {
        padding: 1.25rem;
    }
    .sf-hero-art {
        display: none;
    }
    .sf-upload-row {
        grid-template-columns: 1fr;
    }
    .sf-actions {
        flex-direction: column-reverse;
    }
    .sf-actions .btn {
        width: 100%;
    }
}

.student-profile-card {
    position: relative;
    overflow: hidden;
}

.student-profile-glow {
    position: absolute;
    inset: -40% -20% auto;
    height: 180px;
    background: radial-gradient(circle at 50% 40%, rgba(15, 118, 110, 0.22), transparent 70%);
    pointer-events: none;
}

.student-profile-photo .photo-thumb {
    width: 120px !important;
    height: 120px !important;
    border: 3px solid #fff;
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.2);
}

/* ---------- Quick fee collection ---------- */
.fee-collect-shell { max-width: 960px; margin: 0 auto 2rem; }
.fee-collect-hero {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    padding: 1.35rem 1.5rem; border-radius: 20px; margin-bottom: 1rem; color: #ecfeff;
    background: linear-gradient(135deg, #0f766e, #0e7490);
    box-shadow: 0 14px 32px rgba(15, 118, 110, 0.22);
}
.fee-collect-hero-transport {
    background: linear-gradient(135deg, #0f172a, #0369a1 60%, #0e7490);
}
.fee-collect-hero h1 { font-family: 'Sora', sans-serif; font-size: 1.45rem; margin: 0 0 0.25rem; }
.fee-collect-hero p { margin: 0; opacity: 0.9; font-size: 0.92rem; max-width: 46ch; }
.fee-eyebrow {
    margin: 0 0 0.35rem; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em;
    text-transform: uppercase; opacity: 0.85;
}
.fee-search-card, .fee-sheet {
    background: #fff; border: 1px solid var(--border); border-radius: 18px;
    padding: 1.2rem 1.3rem; box-shadow: var(--shadow);
}
.fee-student-list .list-group-item { border-radius: 12px !important; margin-bottom: 0.4rem; border: 1px solid var(--border); }
.fee-student-banner {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    padding: 1rem 1.1rem; border-radius: 14px; margin-bottom: 1rem; color: #fff;
    background: linear-gradient(135deg, #134e4a, #0f766e);
}
.fee-student-banner-transport { background: linear-gradient(135deg, #0c4a6e, #0284c8); }
.fee-heads-table thead th {
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted);
}
.fee-prev-row { background: #fff7ed; }
.fee-totals { margin-top: 0.5rem; }
.fee-launch-card {
    display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem 1.35rem;
    border-radius: 18px; background: #fff; border: 1px solid var(--border);
    box-shadow: var(--shadow); color: inherit; transition: transform 0.18s ease, box-shadow 0.18s ease;
    height: 100%;
}
.fee-launch-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15,23,42,0.08); color: inherit; }
.fee-launch-card h3 { font-family: 'Sora', sans-serif; font-size: 1.1rem; margin: 0 0 0.3rem; }
.fee-launch-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.fee-launch-icon {
    width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand-dark); font-size: 1.35rem; flex-shrink: 0;
}
.fee-launch-transport .fee-launch-icon { background: #e0f2fe; color: #0369a1; }

.fee-receipt {
    max-width: 780px; margin: 0 auto; background: #fff; border: 1px solid var(--border);
    border-radius: 16px; padding: 1.5rem 1.6rem; box-shadow: var(--shadow);
}
.fee-receipt-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.fee-receipt-brand { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 1.2rem; color: var(--brand-dark); }
.fee-receipt-title { font-weight: 800; letter-spacing: 0.02em; }
.fee-receipt-student {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem;
    padding: 0.85rem 1rem; border-radius: 12px; background: #f8fafc; margin-bottom: 1rem;
}
.fee-receipt-student span { display: block; font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.fee-receipt-table td, .fee-receipt-table th { padding: 0.55rem 0.4rem; }
.fee-receipt-foot { display: flex; justify-content: space-between; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px dashed var(--border); }

@media (max-width: 767.98px) {
    .fee-receipt-student { grid-template-columns: 1fr 1fr; }
    .fee-collect-hero { flex-direction: column; align-items: flex-start; }
}

.fee-month-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
}
.fee-month-chip {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0.35rem 0.45rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    background: #fff;
}
.fee-month-chip:has(input:checked) {
    border-color: var(--brand);
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-weight: 600;
}
.theme-swatch-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.85rem;
}
.theme-swatch-row label { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.theme-preview-bar {
    height: 48px;
    border-radius: 12px;
    margin-top: 0.75rem;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    box-shadow: var(--shadow);
}

/* MCQ exams */
.mcq-thumb, .mcq-media {
    max-width: 100%;
    max-height: 180px;
    border-radius: 10px;
    border: 1px solid var(--border);
}
.mcq-option-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.85rem;
    background: #fff;
    height: 100%;
}
.mcq-option-card.is-correct {
    border-color: var(--success);
    background: #ecfdf5;
}
.mcq-select-list { max-height: 420px; overflow: auto; }
.mcq-select-item {
    display: flex; gap: 0.65rem; align-items: flex-start;
    padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--border); cursor: pointer;
}
.mcq-preview-opt { padding: 0.35rem 0.5rem; border-radius: 8px; margin-bottom: 0.25rem; }
.mcq-preview-opt.correct { background: #ecfdf5; border: 1px solid #a7f3d0; }
.mcq-preview-opt.wrong { background: #fef2f2; border: 1px solid #fecaca; }
.mcq-take-options { display: grid; gap: 0.5rem; }
.mcq-take-opt {
    display: flex; gap: 0.65rem; align-items: flex-start;
    padding: 0.7rem 0.85rem; border: 1px solid var(--border); border-radius: 12px;
    cursor: pointer; background: #fff;
}
.mcq-take-opt:has(input:checked) {
    border-color: var(--brand);
    background: var(--brand-soft);
}

@media print {
    .receipt-actions, .no-print { display: none !important; }
    .fee-receipt { box-shadow: none; border: 0; max-width: 100%; }
    .fee-receipt-table thead { display: table-header-group !important; }
    .fee-receipt-table th, .fee-receipt-table td { color: #000 !important; }
}
