/* backend/admin/style.css - Premium Dashboard Redesign */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #00AEEF; /* BMD Cyan */
    --primary-hover: #009BD6;
    --secondary: #ED1C24; /* BMD Red */
    --navy: #0A1F44; /* BMD Navy */
    --navy-light: #152C5B; 
    --bg-page: #F8F9FA; /* Softer background */
    --white: #ffffff;
    --error: #E63946;
    --success: #10B981;
    --warning: #F59E0B;
    --text-dark: #1E293B;
    --text-muted: #64748B;
    --border-color: rgba(0,0,0,0.08);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 12px 24px rgba(10, 31, 68, 0.08);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.text-muted { color: var(--text-muted); }
.text-navy { color: var(--navy); }
.text-primary { color: var(--primary); }

/* Typography & Layout Utilities */
.page-header, .page-header-action {
    margin-bottom: 40px;
}

.page-header h1, .page-header-action h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--navy);
}

.page-header-action {
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* Grid Systems */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    margin-bottom: 40px;
}

.grid-2-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* Cards & Components */
.toolbar-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    background: white;
    padding: 20px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.search-form {
    display: flex;
    gap: 8px;
    flex: 1;
    max-width: 500px;
}

.modal-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
    box-shadow: var(--shadow-lg);
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--navy);
}

.bulk-actions-card {
    background: white;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 600;
    color: var(--navy);
    font-size: 14px;
}

.custom-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.table-header {
    padding: 24px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-actions-full {
    grid-column: span 2;
    display: flex;
    gap: 12px;
    margin-top: 12px;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

/* Button Variants */
.btn-lg {
    padding: 14px 40px;
    width: auto;
}

.btn-sm-alt {
    padding: 8px 16px;
    font-size: 12px;
    background: var(--bg-page);
    color: var(--navy);
}

.btn-icon-only {
    padding: 12px 20px;
}

.btn-light {
    background: var(--bg-page);
    color: var(--navy);
}

.btn-danger {
    background: var(--error);
    color: white;
}

/* Submissions & Registration Cards */
.submissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 32px;
    margin-bottom: 40px;
}

.submission-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    position: relative;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.submission-card.type-registration { border-top: 4px solid var(--primary); }
.submission-card.type-contact { border-top: 4px solid var(--secondary); }

.submission-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 24px;
}

.submission-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.meta-text {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    font-weight: 700;
}

.submission-body .student-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 4px;
}

.contact-info {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
}

.contact-info i {
    width: 14px;
    vertical-align: middle;
    margin-right: 4px;
}

.registration-details {
    margin-bottom: 24px;
    padding: 20px;
    background: var(--bg-page);
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.detail-label {
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    font-size: 10px;
    font-weight: 700;
}

.full-width-detail {
    grid-column: span 2;
    padding-top: 10px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.message-bubble {
    padding: 20px;
    border-left: 3px solid var(--primary);
    background: var(--bg-page);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--navy);
    margin-bottom: 24px;
}

.message-subject {
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
    font-size: 12px;
    text-transform: uppercase;
}

.submission-actions {
    display: flex;
    gap: 12px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.btn-wide {
    width: auto !important;
    padding: 10px 24px;
}

.btn-delete-alt {
    color: var(--error);
    padding: 10px;
    background: #FEE2E2;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.btn-delete-alt:hover {
    background: #ef4444;
    color: white;
}

/* Region Cards */
.region-card {
    padding: 0 !important;
    overflow: hidden;
}

.region-bg {
    height: 120px;
    background-position: center;
    background-size: cover;
    position: relative;
}

.region-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 31, 68, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.region-overlay h3 {
    color: white;
    font-size: 24px;
}

.region-delete {
    position: absolute;
    top: 12px;
    right: 12px;
    color: white;
    opacity: 0.6;
    transition: 0.3s;
}

.region-delete:hover { opacity: 1; }

.region-content { padding: 24px; }

/* Enhanced Partners Section Styles */
.container {
    max-width: 1400px;
    margin: 0 auto;
}

.region-card-premium {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.region-card-premium:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.region-image-container {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
    cursor: pointer;
}

.region-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(10,31,68,0.4), rgba(10,31,68,0.8));
    opacity: 0;
    transition: var(--transition);
}

.region-card-premium:hover .region-overlay {
    opacity: 1;
}

.region-header-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    color: white;
    z-index: 2;
}

.region-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.partners-count {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
}

.add-partner-btn, .delete-region-btn {
    position: absolute;
    top: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    transition: var(--transition);
    z-index: 3;
    cursor: pointer;
}

.add-partner-btn {
    right: 20px;
    background: rgba(0,174,239,0.9);
}

.add-partner-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.delete-region-btn {
    left: 20px;
    background: rgba(231,28,36,0.9);
}

.delete-region-btn:hover {
    background: var(--error);
    transform: scale(1.1);
}

.region-content-enhanced {
    padding: 32px;
}

.region-meta {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.region-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}

.region-desc {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

.inline-partner-form {
    background: linear-gradient(135deg, var(--bg-page), white);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    border: 1px solid var(--primary)/0.2;
    transition: var(--transition);
}

.partner-inline-form .form-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: end;
}

.form-control-sm {
    padding: 10px 12px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.btn-add-partner {
    background: var(--success);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
}

.partners-list {
    min-height: 80px;
}

.partner-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-page);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    border-left: 4px solid var(--primary);
    transition: var(--transition);
}

.partner-item:hover {
    background: white;
    box-shadow: var(--shadow-sm);
    transform: translateX(4px);
}

.partner-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.partner-name {
    font-weight: 600;
    color: var(--navy);
}

.partner-link {
    color: var(--primary);
    font-size: 12px;
    text-decoration: none;
}

.partner-actions {
    display: flex;
    gap: 8px;
}

.btn-edit-partner, .btn-delete-partner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.btn-edit-partner {
    background: var(--primary)/0.1;
    color: var(--primary);
}

.btn-edit-partner:hover {
    background: var(--primary);
    color: white;
}

.btn-delete-partner {
    background: var(--error)/0.1;
    color: var(--error);
}

.btn-delete-partner:hover {
    background: var(--error);
    color: white;
}

.empty-partners {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-partners p {
    margin-top: 12px;
    font-style: italic;
}

.edit-partner-hero {
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .partner-hero-title {
        font-size: 32px;
    }
    
    .region-image-container {
        height: 180px;
    }
    
    .region-title {
        font-size: 22px;
    }
    
    .partner-inline-form .form-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .partner-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .partner-actions {
        align-self: flex-end;
    }
}

.region-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.btn-add-inline {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary);
    background: none;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
}

.inline-form-card {
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-page);
    border-radius: 4px;
}

.stack-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.uni-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.uni-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    font-size: 13px;
    font-weight: 500;
}

.uni-delete {
    color: var(--error);
    opacity: 0.4;
    transition: 0.3s;
}

.uni-delete:hover { opacity: 1; }

.font-serif { font-family: 'Playfair Display', serif; }
.font-bold { font-weight: 700; }
.full-width { width: 100% !important; }
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    font-size: 14px;
}

h1, h2, h3, h4, .font-serif {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.5px;
}

/* Forms & Inputs */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-dark);
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 174, 239, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn i { width: 18px; height: 18px; }

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(0, 174, 239, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 174, 239, 0.4);
}

/* Login Page Styles */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at top right, #0A1F44 0%, #040C1A 100%);
    position: relative;
    padding: 20px;
}

.login-card {
    background: var(--white);
    width: 100%;
    max-width: 420px;
    padding: 48px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 10;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}

/* Dashboard Sidebar & Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: #061124; /* Very dark navy */
    position: fixed;
    height: 100vh;
    padding: 32px 20px;
    box-shadow: 4px 0 24px rgba(0,0,0,0.1);
}

.main-content {
    margin-left: 260px;
    flex: 1;
    padding: 48px;
}

.nav-links {
    list-style: none;
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link i { width: 20px; height: 20px; }

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    transform: translateX(4px);
}

.nav-link.active {
    background: linear-gradient(90deg, var(--primary) 0%, #008cc0 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(0, 174, 239, 0.3);
}

/* Stats / Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.stat-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--navy);
}

/* Tables */
.table-container {
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 40px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #FAFAFB;
    text-align: left;
    padding: 16px 24px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 20px 24px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
    vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: #F8FAFC; }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}

.badge-pending { background: #FEF3C7; color: #D97706; }
.badge-success { background: #D1FAE5; color: #059669; }
.badge-error { background: #FEE2E2; color: #DC2626; }

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

/* =====================================================
   HAMBURGER MENU BUTTON (hidden on desktop)
   ===================================================== */
.hamburger-btn {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1001;
    width: 44px;
    height: 44px;
    background: var(--navy);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    color: white;
    transition: var(--transition);
}

.hamburger-btn:hover {
    background: var(--primary);
}

.hamburger-btn i {
    width: 22px;
    height: 22px;
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* =====================================================
   RESPONSIVE: TABLET (≤1024px)
   ===================================================== */
@media (max-width: 1024px) {
    .main-content {
        padding: 32px 24px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    th, td {
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* =====================================================
   RESPONSIVE: MOBILE (≤768px)
   ===================================================== */
@media (max-width: 768px) {
    .hamburger-btn {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1000;
        width: 280px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.open {
        display: block;
    }

    .main-content {
        margin-left: 0;
        padding: 90px 16px 24px;
    }

    /* Stats grid: stack on mobile */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        margin-bottom: 24px;
    }

    @media (max-width: 480px) {
        .stats-grid {
            grid-template-columns: 1fr;
        }
        
        .stats-grid .stat-card {
            display: flex;
            justify-content: space-between;
            align-items: center;
            text-align: left;
            padding: 16px 20px;
            margin-bottom: 0;
        }
        
        .stat-value {
            font-size: 28px;
        }
        
        .stat-label {
            margin-bottom: 0;
        }
    }

    .region-card .region-bg {
        height: 100px;
    }

    .region-overlay h3 {
        font-size: 20px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 24px;
    }

    .stat-label {
        font-size: 11px;
    }

    /* Tables: horizontal scroll */
    .table-container {
        margin-left: -16px;
        margin-right: -16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        background: linear-gradient(to right, white 30%, rgba(255,255,255,0)), 
                    linear-gradient(to right, rgba(255,255,255,0), white 70%) 0 100%, 
                    radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.1), rgba(0,0,0,0)), 
                    radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.1), rgba(0,0,0,0)) 0 100%;
        background-repeat: no-repeat;
        background-color: white;
        background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
        background-attachment: local, local, scroll, scroll;
    }

    table {
        min-width: 600px;
    }

    th, td {
        padding: 10px 12px;
        font-size: 12px;
        white-space: nowrap;
    }
   /* Refactored Classes Overrides */
    .page-header-action {
        flex-direction: column;
        gap: 16px;
        margin-bottom: 24px;
    }

    .page-header h1, .page-header-action h1 {
        font-size: 24px;
    }

    .toolbar-card {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }

    .search-form {
        max-width: 100%;
        width: 100%;
    }

    .bulk-actions-card {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }

    .modal-card {
        padding: 24px 16px;
    }

    .grid-2-col {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .form-actions-full {
        grid-column: span 1;
        flex-direction: column;
    }

    .form-actions-full .btn {
        width: 100%;
    }

    .submissions-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .submission-card {
        padding: 24px 16px;
    }

    .submission-header {
        flex-direction: column;
        gap: 12px;
    }

    .contact-info {
        flex-direction: column;
        gap: 8px;
    }

    .registration-details {
        grid-template-columns: 1fr;
    }

    .full-width-detail {
        grid-column: span 1;
    }

    .submission-actions {
        flex-direction: column;
    }

    .submission-actions .btn {
        width: 100% !important;
    }
    /* Page titles */
    h1 {
        font-size: 22px !important;
    }

    /* Charts grid: stack */
    .charts-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* Forms: stack to single column */
    form[style*="grid-template-columns: repeat(2"] {
        grid-template-columns: 1fr !important;
    }

    form[style*="grid-template-columns: repeat(2"] div[style*="grid-column: span 2"] {
        grid-column: span 1 !important;
    }

    /* Toolbar: stack on mobile */
    div[style*="display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; background: white"] {
        flex-direction: column !important;
        gap: 12px !important;
        padding: 16px !important;
    }

    div[style*="display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; background: white"] form {
        max-width: 100% !important;
        width: 100%;
    }

    /* Page header: stack title and button */
    div[style*="display: flex; justify-content: space-between; align-items: start; margin-bottom: 40px"] {
        flex-direction: column !important;
        gap: 16px !important;
        margin-bottom: 24px !important;
    }

    /* Select all row */
    div[style*="display: flex; align-items: center; justify-content: space-between; box-shadow"] {
        flex-direction: column !important;
        gap: 12px !important;
        padding: 12px 16px !important;
    }

    /* Pagination */
    .pagination-container {
        display: flex; 
        justify-content: center; 
        gap: 8px; 
        margin-top: 40px;
        flex-wrap: wrap;
        padding: 0 16px;
    }

    @media (max-width: 768px) {
        .pagination-container {
            margin-top: 24px !important;
        }
    }

    /* Buttons */
    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    /* Login */
    .login-card {
        padding: 32px 24px;
    }

    .login-header h1 {
        font-size: 22px;
    }

    /* Modal form */
    #add-modal,
    div[id$="-modal"] {
        padding: 24px 16px !important;
        margin-bottom: 24px !important;
    }

    /* Settings sections: any 2-col grids */
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}
