/* ============================================
   CornerStone EMS - Premium 2026 Design
   Glassmorphism + Gradients + Animations
   ============================================ */

:root {
    --primary: #5B6CF0;
    --primary-dark: #4451D9;
    --primary-light: #EEF0FF;
    --primary-gradient: linear-gradient(135deg, #5B6CF0 0%, #7C3AED 100%);
    --success-gradient: linear-gradient(135deg, #10B981 0%, #059669 100%);
    --warning-gradient: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    --danger-gradient: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    --info-gradient: linear-gradient(135deg, #06B6D4 0%, #0891B2 100%);
    --dark: #0F172A;
    --text: #334155;
    --text-light: #94A3B8;
    --white: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    --glass-shadow-hover: 0 12px 40px rgba(91, 108, 240, 0.12);
    --radius: 18px;
    --radius-sm: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #F0F4FF 0%, #FAFBFC 50%, #F5F3FF 100%);
    background-attachment: fixed;
    color: var(--dark);
    min-height: 100vh;
}

    body::before {
        content: '';
        position: fixed;
        top: -200px;
        right: -200px;
        width: 600px;
        height: 600px;
        background: radial-gradient(circle, rgba(91, 108, 240, 0.08) 0%, transparent 70%);
        border-radius: 50%;
        z-index: -1;
        animation: float 20s ease-in-out infinite;
    }

    body::after {
        content: '';
        position: fixed;
        bottom: -150px;
        left: -150px;
        width: 500px;
        height: 500px;
        background: radial-gradient(circle, rgba(124, 58, 237, 0.06) 0%, transparent 70%);
        border-radius: 50%;
        z-index: -1;
        animation: float 15s ease-in-out infinite reverse;
    }

@keyframes float {

    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -30px) scale(1.05);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }

    75% {
        transform: translate(10px, 10px) scale(1.02);
    }
}

/* ============ SIDEBAR ============ */
.sidebar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid rgba(0, 0, 0, 0.04);
    position: fixed;
    top: 0;
    left: 0;
    width: 270px;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
    box-shadow: 4px 0 40px rgba(0, 0, 0, 0.03), 1px 0 0 rgba(0, 0, 0, 0.02);
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.08) transparent;
}

.main-content {
    margin-left: 270px;
    padding: 24px;
    min-height: 100vh;
}

.sidebar .p-3.border-bottom {
    border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
    background: transparent !important;
    padding: 24px 20px !important;
    position: relative;
}

    .sidebar .p-3.border-bottom::after {
        content: '';
        position: absolute;
        bottom: -1px;
        left: 20px;
        right: 20px;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(91, 108, 240, 0.3), transparent);
    }

.sidebar h4 {
    font-weight: 800;
    font-size: 1.15rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .sidebar h4 i {
        font-size: 1.4rem;
        background: var(--primary-gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

.sidebar nav {
    padding: 8px 0;
}

.sidebar .nav {
    gap: 2px;
}

.sidebar .nav-link {
    color: var(--text) !important;
    border-radius: var(--radius-sm);
    margin: 2px 14px;
    padding: 11px 16px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .sidebar .nav-link i:first-child {
        font-size: 1.1rem;
        width: 22px;
        text-align: center;
        flex-shrink: 0;
        transition: transform 0.3s ease;
    }

    .sidebar .nav-link::before {
        content: '';
        position: absolute;
        inset: 0;
        background: var(--primary-gradient);
        opacity: 0;
        transition: opacity 0.4s ease;
        border-radius: var(--radius-sm);
        z-index: -1;
    }

    .sidebar .nav-link:hover {
        color: var(--primary) !important;
        transform: translateX(6px);
        background: rgba(91, 108, 240, 0.04);
    }

        .sidebar .nav-link:hover i:first-child {
            transform: scale(1.15);
        }

    .sidebar .nav-link.active {
        color: white !important;
        font-weight: 600;
        box-shadow: 0 6px 20px rgba(91, 108, 240, 0.35), 0 0 0 1px rgba(91, 108, 240, 0.2);
        transform: translateX(2px);
    }

        .sidebar .nav-link.active::before {
            opacity: 1;
            z-index: -1;
        }

        .sidebar .nav-link.active i:first-child {
            transform: scale(1.1);
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
        }

        .sidebar .nav-link.active::after {
            content: '';
            position: absolute;
            right: 14px;
            top: 50%;
            transform: translateY(-50%);
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: white;
            box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
            animation: pulse-dot 2s ease-in-out infinite;
        }

@keyframes pulse-dot {

    0%, 100% {
        box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
    }

    50% {
        box-shadow: 0 0 16px rgba(255, 255, 255, 0.8);
    }
}

/* ============ SIDEBAR DROPDOWN ============ */
.sidebar .nav-link[data-bs-toggle="collapse"] {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .sidebar .nav-link[data-bs-toggle="collapse"] i.bi-chevron-down {
        font-size: 0.65rem;
        transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        opacity: 0.45;
        flex-shrink: 0;
        margin-left: auto;
        width: auto !important;
    }

    .sidebar .nav-link[data-bs-toggle="collapse"]:hover i.bi-chevron-down {
        opacity: 0.8;
        transform: translateY(1px);
    }

    .sidebar .nav-link[data-bs-toggle="collapse"]:not(.collapsed) {
        background: rgba(91, 108, 240, 0.04);
        font-weight: 600;
    }

        .sidebar .nav-link[data-bs-toggle="collapse"]:not(.collapsed) i.bi-chevron-down {
            transform: rotate(180deg);
            opacity: 0.8;
        }

.sidebar .collapse {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

    .sidebar .collapse.show {
        background: rgba(248, 250, 252, 0.5);
        border-radius: 0 0 var(--radius-sm) var(--radius-sm);
        margin: 0 14px;
        padding: 4px 0;
    }

    .sidebar .collapse .nav-link {
        padding: 10px 16px 10px 48px !important;
        font-size: 0.82rem;
        font-weight: 500;
        position: relative;
        border-radius: 8px;
        margin: 1px 8px;
    }

        .sidebar .collapse .nav-link::before {
            content: '';
            position: absolute;
            left: 28px;
            top: 0;
            bottom: 0;
            width: 1.5px;
            background: linear-gradient(180deg, rgba(91, 108, 240, 0.15), rgba(91, 108, 240, 0.05));
            opacity: 0;
            transition: opacity 0.3s;
        }

        .sidebar .collapse .nav-link::after {
            content: '';
            position: absolute;
            left: 25px;
            top: 50%;
            transform: translate(-50%, -50%);
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: var(--text-light);
            opacity: 0.25;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            border: 2px solid transparent;
        }

        .sidebar .collapse .nav-link:hover {
            background: rgba(91, 108, 240, 0.04);
            color: var(--primary) !important;
            padding-left: 52px !important;
        }

            .sidebar .collapse .nav-link:hover::after {
                background: var(--primary);
                opacity: 0.8;
                border-color: rgba(91, 108, 240, 0.2);
                box-shadow: 0 0 0 4px rgba(91, 108, 240, 0.1);
                width: 9px;
                height: 9px;
            }

        .sidebar .collapse .nav-link.active {
            background: rgba(91, 108, 240, 0.08);
            color: var(--primary) !important;
            font-weight: 600;
            box-shadow: none;
            transform: none;
        }

            .sidebar .collapse .nav-link.active::after {
                background: var(--primary);
                opacity: 1;
                border-color: white;
                box-shadow: 0 0 0 4px rgba(91, 108, 240, 0.2);
                width: 10px;
                height: 10px;
                animation: pulse-dot-sub 2s ease-in-out infinite;
            }

            .sidebar .collapse .nav-link.active::before {
                opacity: 1;
            }

@keyframes pulse-dot-sub {

    0%, 100% {
        box-shadow: 0 0 0 4px rgba(91, 108, 240, 0.15);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(91, 108, 240, 0.05);
    }
}

.sidebar .collapse .nav-link .badge {
    margin-left: auto;
    font-size: 0.65rem;
    padding: 4px 8px;
}

.sidebar .px-3.pb-2 .nav-link {
    font-size: 0.82rem !important;
    opacity: 0.7;
    margin: 4px 14px !important;
    padding: 10px 16px !important;
}

    .sidebar .px-3.pb-2 .nav-link:hover {
        opacity: 1;
        color: var(--primary) !important;
    }

.sidebar .p-3.border-top {
    border-top: 1px solid rgba(0, 0, 0, 0.04) !important;
    padding: 16px 20px !important;
    position: relative;
}

    .sidebar .p-3.border-top::before {
        content: '';
        position: absolute;
        top: -1px;
        left: 20px;
        right: 20px;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.06), transparent);
    }

.sidebar .btn-danger {
    border-radius: var(--radius-sm);
    padding: 10px;
    font-weight: 600;
    font-size: 0.82rem;
    transition: all 0.3s;
    background: linear-gradient(135deg, #FEE2E2, #FEF2F2) !important;
    color: #DC2626 !important;
    border: 1px solid rgba(220, 38, 38, 0.1);
    box-shadow: none;
}

    .sidebar .btn-danger:hover {
        background: var(--danger-gradient) !important;
        color: white !important;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
    }

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 10px;
}

    .sidebar::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.15);
    }

/* ============ TOP BAR ============ */
.top-bar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04), 0 1px 0 rgba(0, 0, 0, 0.02);
    margin-bottom: 24px;
    padding: 16px 24px;
    position: sticky;
    top: 16px;
    z-index: 50;
    transition: all 0.3s ease;
}

    .top-bar.scrolled {
        padding: 12px 24px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
        border-radius: var(--radius-sm);
    }

    .top-bar .breadcrumb {
        font-size: 0.88rem;
    }

    .top-bar .breadcrumb-item + .breadcrumb-item::before {
        content: '\F285';
        font-family: 'bootstrap-icons';
        font-size: 0.65rem;
        color: var(--text-light);
        opacity: 0.5;
    }

    .top-bar .breadcrumb a {
        color: var(--primary);
        transition: var(--transition);
        font-weight: 500;
        padding: 4px 8px;
        border-radius: 8px;
    }

        .top-bar .breadcrumb a:hover {
            color: var(--primary-dark);
            background: rgba(91, 108, 240, 0.06);
        }

    .top-bar .breadcrumb-item .badge {
        font-weight: 600;
        font-size: 0.7rem;
        padding: 5px 12px;
        border-radius: 8px;
        background: rgba(91, 108, 240, 0.08) !important;
        color: var(--primary) !important;
        letter-spacing: 0.3px;
    }

    .top-bar .fw-semibold {
        background: var(--primary-gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .top-bar .text-muted {
        font-size: 0.72rem;
        font-weight: 500;
        letter-spacing: 0.3px;
        text-transform: uppercase;
        opacity: 0.6;
    }

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(91, 108, 240, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

    .avatar-circle:hover {
        transform: scale(1.08);
        box-shadow: 0 6px 20px rgba(91, 108, 240, 0.4);
    }

    .avatar-circle::after {
        content: '';
        position: absolute;
        bottom: 2px;
        right: 2px;
        width: 10px;
        height: 10px;
        background: #10B981;
        border-radius: 50%;
        border: 2px solid white;
        box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
    }

.breadcrumb-item.active {
    font-weight: 700 !important;
    color: var(--dark) !important;
    font-size: 0.9rem;
}

    .breadcrumb-item.active::before {
        color: var(--text-light) !important;
        font-weight: 400 !important;
    }

.top-bar .d-flex.align-items-center.gap-3 {
    gap: 16px !important;
}

/* ============ CARDS ============ */
.card {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
    overflow: hidden;
}

    .card:hover {
        box-shadow: var(--glass-shadow-hover);
        transform: translateY(-2px);
    }

.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    font-weight: 700;
    color: var(--dark);
    border-radius: var(--radius) var(--radius) 0 0 !important;
    padding: 18px 24px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 24px;
}

.border-left-primary {
    border-left: 4px solid #5B6CF0;
}

.border-left-danger {
    border-left: 4px solid #EF4444;
}

.border-left-success {
    border-left: 4px solid #10B981;
}

.border-left-warning {
    border-left: 4px solid #F59E0B;
}

.border-left-info {
    border-left: 4px solid #06B6D4;
}

/* ============ BUTTONS ============ */
.btn {
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}

    .btn::after {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(255, 255, 255, 0.2);
        opacity: 0;
        transition: opacity 0.3s;
    }

    .btn:hover::after {
        opacity: 1;
    }

    .btn:hover {
        transform: translateY(-2px);
    }

    .btn:active {
        transform: scale(0.97);
    }

.btn-primary {
    background: var(--primary-gradient);
    box-shadow: 0 4px 16px rgba(91, 108, 240, 0.3);
    color: white;
}

.btn-success {
    background: var(--success-gradient);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
    color: white;
}

.btn-warning {
    background: var(--warning-gradient);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
    color: white;
}

.btn-danger {
    background: var(--danger-gradient);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
    color: white;
}

.btn-info {
    background: var(--info-gradient);
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.3);
    color: white;
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

    .btn-outline-primary:hover {
        background: var(--primary-gradient);
        color: white;
        border-color: transparent;
    }

.btn-outline-success {
    background: transparent;
    border: 2px solid #10B981;
    color: #10B981;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition);
}

    .btn-outline-success:hover {
        background: var(--success-gradient);
        color: white;
        border-color: transparent;
        transform: translateY(-2px);
    }

.btn-sm {
    padding: 7px 14px;
    font-size: 0.78rem;
    border-radius: 10px;
}

.btn-lg {
    padding: 14px 30px;
    font-size: 1rem;
    border-radius: var(--radius);
}

/* ============ WIZARD BUTTONS ============ */
.btn-outline-secondary {
    background: transparent;
    border: 2px solid #E2E8F0 !important;
    color: #64748B;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition);
}

    .btn-outline-secondary:hover {
        background: #F8FAFC;
        border-color: #CBD5E1;
        color: #334155;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    }

    .btn-outline-secondary:active {
        transform: scale(0.97);
    }

    .btn-outline-secondary i {
        margin-right: 4px;
    }

/* ============ TABLES ============ */
.table {
    border-radius: var(--radius-sm);
    overflow: hidden;
    width: 100%;
}

    .table thead {
        background: linear-gradient(180deg, #F8FAFC 0%, #F1F5F9 100%);
    }

        .table thead th {
            font-weight: 700;
            color: var(--text);
            font-size: 0.78rem;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            border-bottom: 2px solid rgba(0, 0, 0, 0.05);
            padding: 14px 18px;
        }

    .table tbody td {
        padding: 14px 18px;
        color: var(--text);
        font-weight: 500;
    }

    .table tbody tr {
        border-bottom: 1px solid rgba(0, 0, 0, 0.03);
        transition: background 0.2s;
    }

        .table tbody tr:hover {
            background: rgba(91, 108, 240, 0.03);
        }

/* ============ BADGES ============ */
.badge {
    border-radius: 30px;
    padding: 6px 14px;
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.3px;
}

.bg-success {
    background: var(--success-gradient) !important;
}

.bg-warning {
    background: var(--warning-gradient) !important;
}

.bg-danger {
    background: var(--danger-gradient) !important;
}

.bg-info {
    background: var(--info-gradient) !important;
}

/* ============ FORMS ============ */
.form-control,
.form-select {
    border-radius: var(--radius-sm);
    border: 2px solid rgba(0, 0, 0, 0.06);
    padding: 12px 16px;
    font-size: 0.9rem;
    transition: var(--transition);
    background: var(--white);
    font-weight: 500;
}

    .form-control:focus,
    .form-select:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 4px rgba(91, 108, 240, 0.1);
        outline: none;
    }

.form-label {
    font-weight: 600;
    color: var(--text);
    font-size: 0.85rem;
    margin-bottom: 6px;
}

/* ============ PROGRESS ============ */
.progress {
    border-radius: 20px;
    background: #F1F5F9;
    height: 12px;
    overflow: hidden;
}

.progress-bar {
    border-radius: 20px;
    background: var(--primary-gradient);
}

/* ============ ALERTS ============ */
.alert {
    border-radius: var(--radius-sm);
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 16px 20px;
}

.alert-success {
    background: linear-gradient(135deg, #ECFDF5, #D1FAE5);
    color: #065F46;
}

.alert-danger {
    background: linear-gradient(135deg, #FEF2F2, #FEE2E2);
    color: #991B1B;
}

/* ============ NAVBAR ============ */
.navbar {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--dark) !important;
}

/* ============ MODAL ============ */
.modal-content {
    border-radius: var(--radius);
    border: none;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 700;
    padding: 20px 24px;
}

/* ============ HOME PAGE ============ */
.home-hero {
    padding: 60px 0;
}

    .home-hero h1 {
        font-size: 3rem;
        font-weight: 800;
        background: var(--primary-gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin-bottom: 10px;
    }

.home-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.04);
    cursor: pointer;
}

    .home-card:hover {
        box-shadow: var(--glass-shadow-hover);
        transform: translateY(-4px);
    }

.home-icon {
    font-size: 3.5rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.icon-green {
    color: #10B981;
}

.icon-cyan {
    color: #06B6D4;
}

.icon-blue {
    color: #5B6CF0;
}

.icon-amber {
    color: #F59E0B;
}

.card-apply {
    border-top: 4px solid #10B981;
}

.card-parent {
    border-top: 4px solid #06B6D4;
}

.card-login {
    border-top: 4px solid #5B6CF0;
}

/* ============ STATS ============ */
.stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
}

.stat-icon {
    font-size: 2.8rem;
    opacity: 0.9;
}

.empty-icon {
    font-size: 3rem;
    opacity: 0.3;
}

/* ============ MISC ============ */
.portal-icon {
    font-size: 3.5rem;
}

.success-icon {
    font-size: 6rem;
    color: #10B981;
    animation: scaleIn 0.5s ease-out;
}

.error-icon {
    font-size: 6rem;
    color: #EF4444;
}

.no-profile-icon {
    font-size: 6rem;
    color: #EF4444;
    animation: scaleIn 0.5s ease-out;
}

.finance-icon {
    font-size: 3.5rem;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============ PAGES ============ */
.admission-page,
.parent-register-page {
    padding: 40px 0;
}

.admission-card,
.parent-card {
    border-top: 4px solid;
}

.admission-card {
    border-top-color: var(--primary);
}

.parent-card {
    border-top-color: #06B6D4;
}

    .admission-card .card-header,
    .parent-card .card-header {
        font-weight: 700;
    }

.admission-note {
    color: var(--text-light);
    font-size: 0.85rem;
}

.success-page,
.error-page {
    padding: 80px 0;
    text-align: center;
}

/* ============ AUTH SPLIT ============ */
.auth-split {
    display: flex;
    height: 100vh;
}

.auth-split-image {
    flex: 1;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-split-overlay {
    text-align: center;
    color: white;
    padding: 40px;
}

    .auth-split-overlay h2 {
        font-weight: 800;
        font-size: 2rem;
        margin-bottom: 8px;
    }

    .auth-split-overlay p {
        font-size: 0.95rem;
        opacity: 0.9;
    }

.auth-split-form {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--white);
}

    .auth-split-form .auth-card {
        max-width: 420px;
        width: 100%;
    }

.auth-body .form-control {
    padding: 10px 14px !important;
    font-size: 0.9rem;
    height: 44px !important;
    min-height: 44px !important;
}

@media (max-width: 768px) {
    .auth-split {
        flex-direction: column;
    }

    .auth-split-image {
        min-height: 200px;
    }

    .auth-split-form {
        padding: 20px;
    }
}

/* ============ AUTH PAGES (OLD - KEEP FOR REGISTER) ============ */
.auth-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 460px;
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out;
}

.auth-header {
    background: var(--primary-gradient);
    color: white;
    padding: 40px 30px 30px;
    text-align: center;
}

    .auth-header h2 {
        font-weight: 800;
        font-size: 1.5rem;
        margin-top: 12px;
    }

    .auth-header p {
        opacity: 0.8;
        font-size: 0.9rem;
        margin-bottom: 0;
    }

.auth-logo {
    font-size: 2.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 16px;
    border-radius: 50%;
    display: inline-block;
}

.auth-body {
    padding: 30px;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .auth-links a {
        color: var(--text-light);
        font-size: 0.85rem;
        font-weight: 500;
        text-decoration: none;
        transition: color 0.2s;
    }

        .auth-links a:hover {
            color: var(--primary);
        }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 20px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.2);
    }

/* ============ ACTION BUTTONS ============ */
.action-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: white;
    margin: 0 2px;
    text-decoration: none;
}

    .action-btn:hover {
        transform: scale(1.15);
        color: white;
    }

.btn-view {
    background: #34C759;
}

.btn-edit {
    background: #FF9500;
}

.btn-delete {
    background: #FF3B30;
}

/* ============ WIZARD ============ */
.wizard-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
}

.wizard-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #F1F5F9;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition);
}

.wizard-step.active .wizard-circle {
    background: var(--primary-gradient);
    color: white;
}

.wizard-step.completed .wizard-circle {
    background: #10B981;
    color: white;
}

.wizard-step.active {
    color: var(--primary);
}

.wizard-line {
    flex: 1;
    height: 2px;
    background: #E2E8F0;
    max-width: 40px;
}

.wizard-step.completed + .wizard-line {
    background: #10B981;
}

@media (max-width: 768px) {
    .wizard-steps {
        flex-wrap: wrap;
    }

    .wizard-line {
        display: none;
    }
}

/* ============ TOAST ============ */
.toast-container {
    z-index: 1050;
}

.toast {
    backdrop-filter: blur(10px);
    border: none;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    min-width: 280px;
}

    .toast.bg-success {
        background: var(--success-gradient) !important;
    }

    .toast.bg-danger {
        background: var(--danger-gradient) !important;
    }

    .toast .toast-body {
        font-weight: 500;
        font-size: 0.85rem;
        padding: 12px 16px;
    }

/* ============ MOBILE ============ */
.mobile-menu {
    display: none !important;
}

@media (max-width: 768px) {
    .sidebar {
        display: none !important;
    }

    .top-bar .text-end {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 16px;
        padding-bottom: 80px;
    }

    .top-bar {
        padding: 12px 16px;
        margin-bottom: 16px;
        border-radius: var(--radius-sm);
    }

        .top-bar .breadcrumb {
            font-size: 0.75rem;
        }

        .top-bar .avatar-circle {
            width: 30px;
            height: 30px;
            font-size: 0.7rem;
        }

    .card-body {
        padding: 16px;
    }

    .card-header {
        padding: 14px 16px;
        font-size: 0.9rem;
    }

    .btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .table-responsive {
        -webkit-overflow-scrolling: touch;
        border-radius: var(--radius-sm);
        overflow-x: auto;
        background: linear-gradient(to right, white 30%, rgba(255, 255, 255, 0)), linear-gradient(to right, rgba(255, 255, 255, 0), white 70%) 100% 0, radial-gradient(farthest-side at 0% 50%, rgba(0, 0, 0, 0.08), transparent), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.08), transparent) 100% 0;
        background-repeat: no-repeat;
        background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
        background-attachment: local, local, scroll, scroll;
    }

    .table {
        min-width: 600px;
    }

        .table thead th {
            font-size: 0.68rem;
            padding: 10px 8px;
            white-space: nowrap;
            position: sticky;
            top: 0;
            z-index: 1;
        }

        .table tbody td {
            font-size: 0.78rem;
            padding: 10px 8px;
            white-space: nowrap;
        }

        .table tbody tr:active {
            background: rgba(91, 108, 240, 0.06);
        }

        .table tbody tr {
            -webkit-tap-highlight-color: transparent;
            position: relative;
        }

            .table tbody tr::after {
                content: '';
                position: absolute;
                inset: 0;
                background: rgba(91, 108, 240, 0.04);
                opacity: 0;
                transition: opacity 0.2s;
                pointer-events: none;
            }

            .table tbody tr:active::after {
                opacity: 1;
            }

        .table .action-btn {
            width: 30px;
            height: 30px;
            font-size: 0.75rem;
        }

        .table .badge {
            font-size: 0.65rem;
            padding: 4px 10px;
            white-space: nowrap;
        }

    .row.mb-3 .col-md-4,
    .row.mb-3 .col-md-8 {
        width: 100%;
    }

        .row.mb-3 .col-md-8.text-end {
            text-align: left !important;
            margin-top: 8px;
        }

        .row.mb-3 .col-md-4 form {
            margin-bottom: 8px;
        }

    .d-flex.justify-content-end {
        flex-wrap: wrap;
        gap: 6px;
    }

        .d-flex.justify-content-end .btn {
            flex: 1 1 auto;
            min-width: 0;
            font-size: 0.75rem;
            padding: 8px 12px;
        }

        .d-flex.justify-content-end.mb-4 {
            margin-bottom: 12px !important;
        }

    .toast-container {
        left: 12px !important;
        right: 12px !important;
        bottom: 80px !important;
    }

    .toast {
        min-width: auto !important;
        width: 100%;
    }

    .modal-dialog {
        margin: 12px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 14px 16px;
    }

        .modal-body p {
            font-size: 0.9rem;
        }

    .col-md-5,
    .col-md-7 {
        width: 100%;
        margin-bottom: 16px;
    }

    .empty-icon {
        font-size: 2.5rem;
    }

    .mobile-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        z-index: 999;
        justify-content: space-around;
        padding: 6px 0;
        padding-bottom: max(6px, env(safe-area-inset-bottom));
        box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.06);
    }

        .mobile-nav a {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
            color: var(--text-light);
            text-decoration: none;
            font-size: 0.6rem;
            font-weight: 500;
            padding: 6px 4px;
            border-radius: 12px;
            transition: all 0.25s ease;
            position: relative;
            min-width: 48px;
        }

            .mobile-nav a i {
                font-size: 1.3rem;
                transition: all 0.25s ease;
            }

            .mobile-nav a.active {
                color: var(--primary);
                font-weight: 700;
            }

                .mobile-nav a.active::before {
                    content: '';
                    position: absolute;
                    top: -6px;
                    left: 50%;
                    transform: translateX(-50%);
                    width: 20px;
                    height: 3px;
                    background: var(--primary-gradient);
                    border-radius: 0 0 3px 3px;
                }

            .mobile-nav a:hover {
                color: var(--primary);
            }

            .mobile-nav a:active i {
                transform: scale(0.9);
            }

    .mobile-nav-btn {
        background: none;
        border: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        color: var(--text-light);
        font-size: 0.6rem;
        font-weight: 500;
        padding: 6px 4px;
        cursor: pointer;
        border-radius: 12px;
        transition: all 0.25s ease;
        min-width: 48px;
    }

        .mobile-nav-btn i {
            font-size: 1.3rem;
            transition: all 0.25s ease;
        }

        .mobile-nav-btn:hover {
            color: var(--primary);
        }

        .mobile-nav-btn:active i {
            transform: scale(0.9);
        }

    .mobile-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        z-index: 1000;
        padding: 0;
        overflow-y: auto;
        flex-direction: column;
        animation: slideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

        .mobile-menu.show {
            display: flex !important;
        }

    @keyframes slideUp {
        from {
            transform: translateY(100%);
            opacity: 0;
        }

        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        padding-bottom: 16px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        position: sticky;
        top: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        z-index: 2;
    }

        .mobile-menu-header h5 {
            font-weight: 800;
            font-size: 1.1rem;
            background: var(--primary-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .mobile-menu-header button {
            background: rgba(0, 0, 0, 0.04);
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: var(--text);
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }

            .mobile-menu-header button:hover {
                background: rgba(0, 0, 0, 0.08);
                transform: rotate(90deg);
            }

    .mobile-menu a {
        padding: 14px 20px;
        color: var(--text);
        text-decoration: none;
        border-radius: 0;
        font-weight: 500;
        font-size: 0.9rem;
        transition: all 0.25s ease;
        display: flex;
        align-items: center;
        gap: 12px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    }

        .mobile-menu a i {
            font-size: 1.1rem;
            width: 24px;
            text-align: center;
            color: var(--text-light);
            transition: color 0.2s;
        }

        .mobile-menu a:hover {
            background: var(--primary-light);
            color: var(--primary);
            padding-left: 24px;
        }

            .mobile-menu a:hover i {
                color: var(--primary);
            }

    .mobile-menu form {
        margin-top: auto;
        padding: 16px 20px;
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        position: sticky;
        bottom: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
    }
}

@media (min-width: 769px) {
    .mobile-nav {
        display: none !important;
    }
}
