@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;700;800;900&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

/* --- Design System & CSS Variables (Premium Light Theme) --- */
:root {
    --bg-dark: #f8fafc;
    --bg-obsidian: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(0, 0, 0, 0.06);
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --primary: #0f2b5c;
    --primary-light: #0000a0;
    --primary-gradient: #0f2b5c;
    --primary-glow: rgba(15, 43, 92, 0.18);
    --brand-navy: #0f2b5c;
    
    --brand-orange: #ff6600;
    --brand-orange-gradient: linear-gradient(135deg, #ff6600 0%, #e65c00 100%);
    --brand-orange-glow: rgba(255, 102, 0, 0.25);

    --success: #10b981;
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --success-glow: rgba(16, 185, 129, 0.15);

    --warning: #f59e0b;
    --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --warning-glow: rgba(245, 158, 11, 0.15);

    --danger: #ef4444;
    --danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --danger-glow: rgba(239, 68, 68, 0.15);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Base Resets & Typography --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 10% 10%, rgba(99, 102, 241, 0.02) 0px, transparent 50%),
        radial-gradient(at 90% 90%, rgba(139, 92, 246, 0.02) 0px, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* --- Scrollbar Customization --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* --- Layout Architecture --- */
.app-container {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    width: 100%;
}

/* Header Top Bar (Brand on left, Profile/Logo on right) */
.app-header {
    width: 100%;
    height: 70px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 998;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    cursor: pointer;
}

.header-profile-img {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--primary-light);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.15);
    background-color: #f1f5f9;
}

.header-profile-avatar-fallback {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.2);
}

/* Sidebar (Desktop Mode) */
.sidebar {
    width: 220px;
    background: #ffffff;
    border-right: 1px solid #e8edf3;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
    box-shadow: 2px 0 12px rgba(0,0,0,0.04);
}

/* Sidebar Brand - Text based (like Fixp.in) */
.sidebar-brand {
    padding: 0 0.75rem 1.25rem 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #e8edf3;
}
.sidebar-brand-name {
    font-family: 'Outfit', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    font-style: normal !important;
    color: #0f2b5c !important;
    letter-spacing: -0.3px !important;
    line-height: 1.2 !important;
}
.sidebar-brand-name span {
    font-family: 'Outfit', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
    font-weight: 700 !important;
    font-style: normal !important;
    color: #ff6600 !important;
    background: none !important;
    -webkit-text-fill-color: initial !important;
}
.sidebar-brand-sub {
    font-size: 0.65rem;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 0.25rem;
}

/* Section label (like MENU, ACTIONS in Fixp.in) */
.nav-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 0.5rem 0.75rem 0.35rem;
    margin-top: 0.5rem;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex-grow: 1;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    color: #64748b;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.88rem;
    transition: all 0.15s;
}

.nav-item a:hover {
    color: #1e293b;
    background: #f1f5f9;
}

.nav-item.active a {
    color: #0f2b5c;
    background: #e0e8ff;
    font-weight: 600;
    box-shadow: none;
}

.nav-footer {
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

/* Content Frame */
.main-content {
    flex-grow: 1;
    padding: 1rem 1.25rem;
    overflow-y: auto;
    padding-bottom: 7.5rem; /* extra spacing for sticky navigation bar space */
}

/* Standardized Page Header Banner matched exactly to Student Directory (students.php) */
.sd-head, .pg-head, .page-header-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 1.25rem !important;
    gap: 0.75rem !important;
    flex-wrap: wrap !important;
}

.sd-title, .pg-title, .page-h1, .page-title {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    line-height: 1.3 !important;
    letter-spacing: normal !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
}

.sd-title i, .pg-title i, .page-h1 i, .page-title i {
    color: #0f2b5c !important;
}

.sd-sub, .pg-sub, .page-sub, .page-subtitle {
    font-size: 0.72rem !important;
    font-weight: 500 !important;
    color: #64748b !important;
    margin-top: 0.1rem !important;
    line-height: 1.35 !important;
}

@media (max-width: 900px) {
    .sd-head, .pg-head, .page-header-row {
        padding: 0.9rem 1rem 0.75rem !important;
        background: #ffffff !important;
        border-bottom: 1px solid #e8edf3 !important;
        margin-bottom: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .sd-title, .pg-title, .page-h1, .page-title {
        font-size: 0.95rem !important;
    }
    .sd-sub, .pg-sub, .page-sub, .page-subtitle {
        font-size: 0.7rem !important;
    }
}

/* Sticky Bottom Navigation  -  flat full-width bar */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid var(--card-border);
    padding: 0.4rem 0.5rem;
    padding-bottom: calc(0.4rem + env(safe-area-inset-bottom));
    z-index: 999;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.07);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 600;
    transition: var(--transition-smooth);
    padding: 0.4rem 0.5rem;
    border-radius: 12px;
    min-width: 55px;
    text-align: center;
}

.mobile-nav-item i {
    font-size: 1.2rem;
}

.mobile-nav-item.active {
    color: var(--primary);
}

/* Center ID Scan Tab Highlight */
.mobile-nav-item.center-scan {
    background: var(--primary-gradient);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px var(--primary-glow);
    transform: translateY(-8px);
    padding: 0;
    margin-bottom: -8px;
    border: 3px solid #ffffff;
}

.mobile-nav-item.center-scan i {
    font-size: 1.35rem;
}

.mobile-nav-item.center-scan.active {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    border-color: var(--primary-light);
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.03);
    transition: var(--transition-smooth);
}

.card:hover {
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.05);
}

/* --- Financial & Dashboard Metrics --- */
.metrics-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 769px) {
    .metrics-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
}

.metric-card {
    position: relative;
    overflow: hidden;
    padding: 0.75rem 1rem !important;
    border-radius: var(--radius-lg) !important;
    width: 210px;
    flex-shrink: 0;
    box-sizing: border-box;
}

@media (min-width: 769px) {
    .metric-card {
        width: auto !important;
        flex-shrink: 1;
    }
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.metric-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.metric-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
    line-height: 1.2;
}

.metric-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Metric Colors */
.metric-expected .metric-icon { background: rgba(15, 43, 92, 0.1); color: var(--primary); }
.metric-card.metric-expected::before { content: ''; position: absolute; left: 0; top: 0; height: 100%; width: 4px; background: var(--primary); }

.metric-collected .metric-icon { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.metric-card.metric-collected::before { content: ''; position: absolute; left: 0; top: 0; height: 100%; width: 4px; background: var(--success); }

.metric-due .metric-icon { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.metric-card.metric-due::before { content: ''; position: absolute; left: 0; top: 0; height: 100%; width: 4px; background: var(--warning); }

.metric-defaulters .metric-icon { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.metric-card.metric-defaulters::before { content: ''; position: absolute; left: 0; top: 0; height: 100%; width: 4px; background: var(--danger); }

/* --- Forms & Inputs --- */
.form-group {
    margin-bottom: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 769px) {
    .form-grid.two-cols {
        grid-template-columns: 1fr 1fr;
    }
    .form-grid.three-cols {
        grid-template-columns: repeat(3, 1fr);
    }
}

.page-split-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
}

@media (min-width: 992px) {
    .page-split-grid {
        grid-template-columns: 1.15fr 0.85fr;
    }
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

select.form-control option {
    background: #ffffff;
    color: var(--text-primary);
}

/* --- Premium Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.85rem 1.75rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
    text-align: center;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: #0f2b5c !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(15, 43, 92, 0.2) !important;
}

.btn-primary:hover {
    opacity: 0.95;
    background: #0a1c3d !important;
    box-shadow: 0 6px 20px rgba(15, 43, 92, 0.35) !important;
}

.btn-success {
    background: var(--success-gradient);
    color: white;
    box-shadow: 0 4px 15px var(--success-glow);
}

.btn-success:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: var(--danger-gradient);
    color: white;
    box-shadow: 0 4px 15px var(--danger-glow);
}

.btn-secondary {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid #e2e8f0;
    margin-top: 1.5rem;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background: #ffffff;
}

.custom-table th {
    background: #f8fafc;
    padding: 0.5rem 0.75rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    font-weight: 700;
    border-bottom: 1px solid #e2e8f0;
}

.custom-table td {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    border-bottom: 1px solid #e2e8f0;
    color: var(--text-primary);
    vertical-align: middle;
}

.custom-table tr:last-child td {
    border-bottom: none;
}

.custom-table tr:hover {
    background: #f8fafc;
}

.student-row-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.student-avatar {
    width: 26px;
    height: 26px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 1.5px solid #e2e8f0;
    background-color: #f1f5f9;
}

.student-initial-avatar {
    width: 26px;
    height: 26px;
    border-radius: var(--radius-full);
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
}

/* --- Table Action Buttons Panel --- */
.action-btn-group {
    display: flex;
    gap: 0.35rem;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
}

.action-btn-group .btn {
    padding: 0.3rem 0.5rem !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    white-space: nowrap !important;
    width: auto !important;
    box-shadow: none !important;
}

/* --- Badges & Statuses --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-paid {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-partial {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-pending {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* --- Search & Header Bar --- */
.dashboard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex-grow: 1;
    max-width: 450px;
}

.search-box i {
    position: absolute;
    left: 1.15rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box .form-control {
    padding-left: 2.75rem;
}

/* --- Dynamic UPI QR and Fee Screen styling --- */
.payment-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.pay-mode-card {
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 0.65rem 0.5rem;
    text-align: center;
    cursor: pointer;
    background: #f8fafc;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.pay-mode-card input {
    display: none;
}

.pay-mode-card i {
    font-size: 1.15rem;
    color: var(--text-secondary);
}

.pay-mode-card:hover {
    border-color: #cbd5e1;
}

.pay-mode-card.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.pay-mode-card.selected i {
    color: var(--primary);
}

#upi-qr-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 0.85rem;
    border-radius: var(--radius-md);
    margin: 1rem auto;
    width: fit-content;
    border: 1px solid #e2e8f0;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.03);
}

.qr-label {
    text-align: center;
    font-size: 0.82rem;
    color: #1e293b;
    font-weight: 700;
    margin-top: 0.45rem;
}

/* --- Checkout 2-Column Grid Layout for Desktop/Mobile --- */
.checkout-grid {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.checkout-left {
    flex: 1.1;
    min-width: 300px;
}

.checkout-right {
    flex: 0.9;
    min-width: 300px;
    border-left: 1px solid var(--card-border);
    padding-left: 2rem;
}

@media (max-width: 768px) {
    .checkout-grid {
        gap: 1.25rem;
    }
    .checkout-right {
        border-left: none;
        padding-left: 0;
        margin-top: 0.5rem;
    }
}

/* --- Premium ID Card Mockup (Light Elegant) --- */
.id-card-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
}

.digital-id-card {
    width: 350px;
    height: 520px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.digital-id-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: var(--primary-glow);
    border-radius: var(--radius-full);
    filter: blur(40px);
}

.id-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.id-logo {
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: 0.25rem;
}

.id-tagline {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.id-body {
    flex-grow: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.id-photo-container {
    width: 110px;
    height: 110px;
    border-radius: var(--radius-full);
    padding: 4px;
    background: var(--primary-gradient);
    box-shadow: 0 8px 20px var(--primary-glow);
    margin-bottom: 1rem;
}

.id-photo {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid #ffffff;
    background: #f1f5f9;
}

.id-details {
    width: 100%;
    text-align: center;
    margin-bottom: 1rem;
}

.id-name {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.id-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    text-align: left;
    padding: 0 1rem;
}

.id-info-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.id-info-value {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 600;
}

.id-verification-qr {
    background: white;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
}

.id-status-strip {
    height: 10px;
    width: 100%;
    background: var(--danger);
}

.id-status-strip.paid {
    background: var(--success);
}

/* --- Inline Quick Add Batch --- */
.quick-batch-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    display: none;
}

/* --- Mobile optimization media queries --- */
@media (max-width: 900px) {
    .sidebar {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    .mobile-nav {
        display: flex;
    }
    
    .main-content {
        padding: 0.85rem;
        padding-bottom: 5.5rem;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 0.5rem 0.65rem;
        padding-bottom: 5.5rem;
    }

    /* Ã¢â€â‚¬Ã¢â€â‚¬ Global page heading fix for all pages Ã¢â€â‚¬Ã¢â€â‚¬ */
    .main-content h1 {
        font-size: 1.1rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.2rem !important;
    }
    .main-content h1 + p,
    .main-content h1 ~ p {
        font-size: 0.75rem !important;
        margin-top: 0.15rem !important;
    }
    /* Page header wrapper with button  -  stack vertically */
    .main-content > div[style*="justify-content: space-between"] {
        margin-bottom: 1rem !important;
    }

    
    .card {
        padding: 0.75rem;
        border-radius: var(--radius-md);
    }
    
    .app-header {
        padding: 0 0.65rem;
        height: 48px;
    }

    .header-brand img {
        height: 30px !important;
    }

    /* Compact stats cards layout */
    .metrics-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.35rem;
        margin-bottom: 0.75rem;
    }

    .metric-card {
        width: 100% !important;
        padding: 0.5rem 0.65rem !important;
        border-radius: var(--radius-md) !important;
    }

    .metric-header {
        font-size: 0.68rem;
        margin-bottom: 0.25rem;
    }

    .metric-icon {
        width: 22px;
        height: 22px;
        font-size: 0.8rem;
    }

    .metric-value {
        font-size: 1.05rem;
        margin-bottom: 0.05rem;
    }

    .metric-subtitle {
        font-size: 0.6rem;
    }

    /* Transform tabular data into beautiful responsive cards for small screens */
    .table-container {
        border: none;
        background: transparent;
        margin-top: 0.5rem;
    }

    .custom-table, 
    .custom-table thead, 
    .custom-table tbody, 
    .custom-table th, 
    .custom-table td, 
    .custom-table tr {
        display: block;
    }

    .custom-table thead {
        display: none;
    }

    .custom-table tr {
        background: #ffffff;
        border: 1px solid var(--card-border);
        border-radius: var(--radius-md);
        padding: 0.65rem;
        margin-bottom: 0.65rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.01);
    }

    .custom-table td {
        border-bottom: 1px solid #f1f5f9;
        padding: 0.35rem 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 0.78rem;
    }

    .custom-table td:last-child {
        border-bottom: none;
    }

    .custom-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text-secondary);
        font-size: 0.72rem;
    }

    .custom-table td.student-td {
        display: block;
        padding-top: 0;
        padding-bottom: 0.5rem;
        margin-bottom: 0.15rem;
        border-bottom: 1.5px solid #e2e8f0;
    }

    .custom-table td.student-td::before {
        display: none;
    }

    .custom-table td.action-td {
        justify-content: center;
        padding-top: 0.5rem;
        padding-bottom: 0;
        border-bottom: none;
    }

    .custom-table td.action-td::before {
        display: none;
    }
    
    /* Table Action Panel Mobile Layout */
    .action-btn-group {
        justify-content: center;
        width: 100%;
        flex-wrap: nowrap;
        gap: 0.35rem;
    }
    
    .action-btn-group .btn {
        flex: 1;
        justify-content: center;
        padding: 0.35rem 0.25rem !important;
        font-size: 0.7rem !important;
    }
}

@media (max-width: 480px) {
    .dashboard-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .search-box {
        max-width: 100%;
    }

    .btn {
        width: 100%;
    }

    .digital-id-card {
        width: 100%;
        max-width: 290px;
    }
    
    .payment-selection {
        grid-template-columns: 1fr;
    }
}

/* --- Premium Horizontal ID Card (Credit Card Ratio) --- */
.digital-id-card-horizontal {
    width: 550px;
    height: 350px;
    background: #f0f6ff;
    border: 1px solid #d0e1fd;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.05);
    display: flex;
    flex-direction: row;
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
    box-sizing: border-box;
    text-align: left;
}

.id-card-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 2;
    text-align: left;
}

.id-card-right {
    width: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-left: 1.25rem;
    z-index: 2;
    flex-shrink: 0;
}

.id-card-logo-container {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.5rem;
}

.id-card-logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
    align-self: flex-start;
}

.id-card-tagline {
    font-size: 0.72rem;
    color: #64748b;
    letter-spacing: 0.5px;
    margin-top: 0.15rem;
}

.id-card-name-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.id-card-student-name {
    font-size: 1.35rem;
    font-weight: 800;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: -0.2px;
}

.id-card-active-badge {
    background: #10b981;
    color: white;
    border-radius: 50px;
    padding: 0.2rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.id-card-class-badge {
    font-size: 0.82rem;
    font-weight: 600;
    color: #4f46e5;
    font-style: italic;
    margin-bottom: 0.85rem;
}

.id-card-details-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.id-card-detail-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.85rem;
    color: #334155;
    text-align: left;
}

.id-card-detail-icon-box {
    width: 28px;
    height: 28px;
    background: #e0ebff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.id-card-detail-item strong {
    color: #1e293b;
    font-weight: 700;
    width: 95px;
    flex-shrink: 0;
    display: inline-block;
}

.id-card-qr-container {
    border: 3px solid #3b82f6;
    border-radius: 16px;
    padding: 6px;
    background: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08);
}

.id-card-qr-box {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.id-card-qr-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.id-card-pill-btn {
    background: #0f2b5c !important;
    color: white;
    border-radius: 8px;
    padding: 0.45rem 0.8rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-align: center;
    margin-top: 0.75rem;
    box-shadow: 0 4px 10px rgba(3, 40, 108, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    display: inline-block;
    white-space: nowrap;
}

.id-card-footer-text {
    font-size: 0.62rem;
    color: #94a3b8;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Responsive adjustments for mobile screen */
@media (max-width: 600px) {
    .id-card-wrapper {
        overflow: hidden;
        padding: 1rem 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .digital-id-card-horizontal {
        transform: scale(0.62);
        transform-origin: center center;
        margin: -55px 0;
        flex-shrink: 0;
    }
}

@media (max-width: 400px) {
    .digital-id-card-horizontal {
        transform: scale(0.52);
        margin: -75px 0;
    }
}

/* Sidebar Logo - hidden on mobile, shown on desktop */
.sidebar-logo {
    display: none;
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1rem;
}
.sidebar-logo img {
    height: 44px;
    width: auto;
    display: inline-block;
    object-fit: contain;
}

/* ==========================================
   MOBILE TOP HEADER
   ========================================== */
.mobile-header {
    display: none;
    position: sticky;
    top: 0;
    z-index: 1100;
    width: 100%;
    height: 56px;
    background: #ffffff;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid #e2e8f0;
}

.mobile-header-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #f97316, #ef4444);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: white;
    font-weight: 800;
    box-shadow: 0 3px 10px rgba(249, 115, 22, 0.35);
    flex-shrink: 0;
    text-decoration: none;
}

.mobile-header-title {
    font-family: 'Outfit', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    font-style: normal;
    color: #061a45;
    letter-spacing: -0.3px;
    text-decoration: none;
    line-height: 1;
    text-align: left;
}
.mobile-header-title span {
    font-family: 'Outfit', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    font-weight: 800;
    font-style: normal;
    color: #ff6600;
    background: none;
    -webkit-text-fill-color: initial;
}

.mobile-header-toggle {
    width: 36px;
    height: 36px;
    background: #f0f4ff;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f2b5c;
    font-size: 1.1rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
.mobile-header-toggle:hover,
.mobile-header-toggle:active {
    background: #0f2b5c;
    color: #ffffff;
}

/* Sidebar Overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 10, 60, 0.55);
    z-index: 1099;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.sidebar-overlay.active {
    display: block;
}.mobile-sidebar-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 290px;
    height: 100vh;
    background: #ffffff;
    z-index: 1200;
    transform: translateX(-110%);
    visibility: hidden;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s;
    display: flex;
    flex-direction: column;
    padding: 0;
    box-shadow: none;
    overflow-y: auto;
}
.mobile-sidebar-drawer.open {
    transform: translateX(0) !important;
    visibility: visible !important;
    box-shadow: 10px 0 40px rgba(15, 23, 42, 0.2) !important;
}

/* Drawer Top Bar */
.drawer-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem 0.85rem;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
}
.drawer-brand-wrap {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}
.drawer-brand-title {
    font-family: 'Exo 2', 'Montserrat', 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 900;
    font-style: italic;
    color: #061a45;
    line-height: 1;
}
.drawer-brand-title span {
    color: #ff6600;
}
.drawer-brand-sub {
    font-size: 0.62rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-top: 0.2rem;
}
.drawer-close-btn {
    width: 34px;
    height: 34px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #64748b;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.drawer-close-btn:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fca5a5;
}

/* Drawer Profile Card */
.drawer-profile-card {
    margin: 1rem 1.1rem 0.5rem;
    padding: 0.85rem 0.95rem;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    border: 1px solid #e0e7ff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.05);
}
.drawer-avatar-circle {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #0f2b5c !important;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(15, 43, 92, 0.25);
    flex-shrink: 0;
}
.drawer-profile-info {
    min-width: 0;
    flex: 1;
}
.drawer-coaching-name {
    font-size: 0.85rem;
    font-weight: 800;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.drawer-owner-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    margin-top: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Drawer Navigation List */
.drawer-content {
    padding: 0.5rem 1.1rem 1.5rem;
    flex: 1;
    overflow-y: auto;
}
.drawer-nav-section {
    font-size: 0.62rem;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin: 1.1rem 0 0.4rem 0.5rem;
}
.drawer-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.drawer-menu-item a {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 0.95rem;
    color: #334155;
    text-decoration: none;
    border-radius: 11px;
    font-weight: 600;
    font-size: 0.86rem;
    transition: all 0.2s ease;
}
.drawer-menu-item a i {
    width: 22px;
    font-size: 0.95rem;
    text-align: center;
    color: #64748b;
    transition: color 0.2s ease;
}
.drawer-menu-item a:hover {
    background: #f1f5f9;
    color: #1e293b;
}
.drawer-menu-item a:hover i {
    color: #0f2b5c !important;
}
.drawer-menu-item.active a {
    background: #0f2b5c !important;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 43, 92, 0.3);
}
.drawer-menu-item.active a i {
    color: #ffffff;
}

/* Drawer Footer */
.drawer-bottom-footer {
    padding: 0.85rem 1.1rem;
    border-top: 1px solid #f1f5f9;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.68rem;
    color: #94a3b8;
    font-weight: 600;
}


/* Show mobile header only on mobile */
@media (min-width: 901px) {
    .app-header            { display: none !important; }
    .mobile-header         { display: none !important; }
    .mobile-sidebar-drawer { display: none !important; }
    .sidebar-overlay       { display: none !important; }
    .sidebar               { top: 0 !important; height: 100vh !important; }
    .sidebar-logo          { display: block !important; }
}

@media (max-width: 900px) {
    html, body, .app-container, .main-content, .fee-page-wrapper {
        border-left: none !important;
        outline: none !important;
    }
    body::before, body::after, .app-container::before, .app-container::after, .main-content::before, .main-content::after {
        display: none !important;
        content: none !important;
    }
    .mobile-header { display: flex !important; }
    .main-content {
        padding: 0.45rem 0.45rem 6.5rem 0.45rem !important;
        border-left: none !important;
        border-right: none !important;
    }
    .app-container {
        border-left: none !important;
        border-right: none !important;
    }
}

/* --- Shared Load More Button --- */
.load-more-btn-container {
    display: flex;
    justify-content: center;
    margin-top: 1.25rem;
    margin-bottom: 1rem;
    width: 100%;
}
.load-more-btn {
    background: #ffffff;
    color: #4f46e5;
    border: 1px solid #cbd5e1;
    padding: 0.45rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    outline: none;
}
.load-more-btn:hover {
    background: #f8fafc;
    border-color: #a78bfa;
}


