:root {
    --primary: #1a56db;
    --primary-dark: #1e40af;
    --primary-light: #dbeafe;
    --secondary: #059669;
    --accent: #f59e0b;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #d97706;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Navbar */
.navbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
}
.logo-highlight { color: var(--primary); }
.mobile-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text); }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a { text-decoration: none; color: var(--text-muted); font-weight: 500; font-size: 0.9rem; padding: 6px 10px; border-radius: var(--radius); transition: all 0.2s; }
.nav-links a:hover { color: var(--text); background: var(--bg); }
.nav-links .btn-primary { color: #fff; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 20px; border-radius: var(--radius); font-weight: 600;
    font-size: 0.9rem; text-decoration: none; cursor: pointer;
    border: 1px solid transparent; transition: all 0.2s; gap: 6px;
    white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { opacity: 0.9; }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: var(--bg); border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.card table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    max-width: 100%;
}

/* Hero */
.hero {
    padding: 60px 0;
    text-align: center;
    color: #fff;
}
.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    backdrop-filter: blur(4px);
}
.hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 12px; line-height: 1.2; }
.hero p { font-size: 1.1rem; opacity: 0.9; max-width: 550px; margin: 0 auto 16px; }
.hero-year {
    display: inline-block;
    background: rgba(255,255,255,0.12);
    padding: 8px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Sections */
.section { padding: 48px 0; }
.section-header { text-align: center; margin-bottom: 32px; }
.section-header h2 { font-size: 1.6rem; font-weight: 700; }
.section-header p { color: var(--text-muted); margin-top: 8px; max-width: 500px; margin-left: auto; margin-right: auto; }

/* CTA Grid */
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 700px; margin: 0 auto 40px; }
.cta-card { text-align: center; text-decoration: none; color: var(--text); transition: transform 0.2s, box-shadow 0.2s; }
.cta-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.cta-icon { font-size: 2.5rem; margin-bottom: 12px; }
.cta-card h3 { margin-bottom: 8px; }
.cta-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 16px; }

/* Programs */
.programs-grid { max-width: 800px; margin: 0 auto; }
.programs-grid h3 { text-align: center; margin-bottom: 20px; font-size: 1.2rem; }
.programs-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.program-card { text-align: center; padding: 20px; margin-bottom: 0; }
.program-code {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 8px;
}
.program-card h4 { font-size: 1rem; margin-bottom: 6px; }
.program-card p { font-size: 0.85rem; color: var(--text-muted); }

/* Search */
.search-form-card { max-width: 600px; margin: 0 auto; }
.form-control-lg { padding: 14px 18px; font-size: 1rem; }

/* Features */
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature-card { text-align: center; padding: 20px; }
.feature-icon { font-size: 2rem; margin-bottom: 10px; }
.feature-card h3 { font-size: 0.95rem; margin-bottom: 6px; }
.feature-card p { font-size: 0.85rem; color: var(--text-muted); }

/* Notice */
.notice-section { background: #fffbeb; }
.notice-card { border-color: #fde68a; max-width: 650px; margin: 0 auto; text-align: center; }
.notice-card h3 { margin-bottom: 12px; color: var(--warning); font-size: 1.05rem; }
.notice-card p { font-size: 0.9rem; color: #92400e; }

/* Forms */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 5px; font-size: 0.85rem; color: var(--text); }
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-row { display: flex; gap: 12px; }
.form-row > .form-group { flex: 1; }
.flex-grow { flex: 3 !important; }

/* Alerts */
.alert { padding: 12px 20px; border-radius: var(--radius); margin-bottom: 16px; font-size: 0.9rem; text-align: center; }
.alert-error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }
.alert-danger { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; text-align: center; }

/* Tables */
.data-table, .info-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.data-table th, .data-table td, .info-table th, .info-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-table th { background: var(--bg); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.3px; color: var(--text-muted); }
.data-table tr:hover { background: var(--bg); }
.data-table td:last-child { white-space: nowrap; }

/* Badges */
.badge {
    display: inline-block; padding: 3px 10px; border-radius: 20px;
    font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px;
}
.badge-submitted { background: #dbeafe; color: #1e40af; }
.badge-pending_review { background: #fef3c7; color: #92400e; }
.badge-approved { background: #d1fae5; color: #065f46; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-enrolled { background: #e0e7ff; color: #3730a3; }
.badge-draft { background: #f1f5f9; color: #475569; }
.badge-paid { background: #d1fae5; color: #065f46; }
.badge-unpaid { background: #fee2e2; color: #991b1b; }
.badge-active { background: #d1fae5; color: #065f46; }
.badge-inactive { background: #f1f5f9; color: #64748b; }
.badge-lg { padding: 6px 16px; font-size: 0.8rem; }

/* Auth */
.auth-section { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 200px); }
.auth-card { max-width: 460px; width: 100%; margin: 0 auto; }
.auth-header { text-align: center; margin-bottom: 24px; }
.auth-header h2 { font-size: 1.3rem; }
.auth-header p { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }
.auth-links { text-align: center; margin-top: 20px; font-size: 0.88rem; }
.auth-links p { margin-bottom: 6px; color: var(--text-muted); }
.auth-links a { color: var(--primary); text-decoration: none; font-weight: 500; }
.auth-links a:hover { text-decoration: underline; }

/* Dashboard */
.dash-header { margin-bottom: 24px; }
.dash-header h2 { font-size: 1.4rem; }
.dash-meta { color: var(--text-muted); font-size: 0.88rem; margin-top: 4px; }
.dash-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; margin-bottom: 20px; }
.dash-card h3 { margin-bottom: 14px; font-size: 1rem; color: var(--text); }
.no-data { color: var(--text-muted); font-size: 0.9rem; padding: 12px 0; }

.app-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0; border-bottom: 1px solid var(--border); gap: 8px;
}
.app-item:last-child { border-bottom: none; }
.app-info { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.app-info small { color: var(--text-muted); font-size: 0.78rem; }
.app-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* Detail pages */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.detail-grid .card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.parent-info { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.parent-info:last-child { border-bottom: none; }
.parent-info p { font-size: 0.9rem; }
.admin-notes { margin-top: 14px; }
.admin-notes pre { background: var(--bg); padding: 12px; border-radius: var(--radius); font-size: 0.85rem; white-space: pre-wrap; }
.status-form .form-row { align-items: flex-end; }
.text-center { text-align: center; }

/* Payment */
.payment-details { margin-bottom: 20px; }
.amount-display { text-align: center; margin: 24px 0; padding: 20px; background: var(--bg); border-radius: var(--radius); }
.amount-currency { font-size: 1rem; font-weight: 600; color: var(--text-muted); vertical-align: top; }
.amount-value { font-size: 2.5rem; font-weight: 800; color: var(--primary); line-height: 1; }
.amount-display p { margin-top: 8px; color: var(--text-muted); font-size: 0.85rem; }
.payment-info { margin-top: 20px; font-size: 0.85rem; color: var(--text-muted); text-align: center; }
.actions-card { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }

/* Enrollment */
#enroll-form h4 { margin: 20px 0 12px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 1rem; }
#enroll-form h4:first-of-type { border-top: none; padding-top: 0; }

/* Documents */
.doc-list { margin-top: 12px; }
.doc-list ul { list-style: none; }
.doc-list li { padding: 5px 0; font-size: 0.88rem; color: var(--text-muted); }

/* Footer */
.footer { background: #1e293b; color: #cbd5e1; padding: 40px 0 20px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 24px; }
.footer-col h4 { color: #fff; margin-bottom: 12px; font-size: 1rem; }
.footer-col p { font-size: 0.85rem; line-height: 1.5; }
.footer-col a { display: block; color: var(--text-light); text-decoration: none; font-size: 0.85rem; margin-bottom: 6px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #334155; padding-top: 20px; text-align: center; font-size: 0.8rem; color: var(--text-light); }

/* ── Admin Layout (SB Admin / Bootstrap 5 Enhanced) ── */

/* Admin Login */
.admin-login-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8f9fc 0%, #eef0f5 100%);
    overflow: hidden;
    position: relative;
}
.admin-login-body::before {
    content: '';
    position: fixed;
    inset: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 15% 20%, rgba(26, 86, 219, 0.06), transparent 50%),
        radial-gradient(ellipse at 85% 30%, rgba(5, 150, 105, 0.04), transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(26, 86, 219, 0.05), transparent 50%);
    pointer-events: none;
    z-index: 0;
}
.login-card-wrap {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-glass-card {
    background: #ffffff;
    border: none !important;
    overflow: hidden;
    border-radius: 16px;
    box-shadow:
        0 4px 12px rgba(26, 86, 219, 0.08),
        0 12px 40px rgba(26, 86, 219, 0.12),
        0 0 60px rgba(26, 86, 219, 0.06);
}
.login-glass-card .card-header {
    background: transparent !important;
    border-bottom: 1px solid #e8ecf2 !important;
}
.login-glass-card .card-header h3 {
    font-weight: 600 !important;
    font-size: 2rem;
    color: #1a2744;
}
.login-glass-card .card-body label {
    color: #4a5568 !important;
}
.login-glass-card .card-body a {
    color: #1a56db !important;
}
.login-glass-card .card-body a:hover {
    color: #1e40af !important;
}
.admin-login-body .form-control {
    height: 58px;
    border-radius: 10px;
    font-size: 15px;
    padding-left: 16px;
    padding-right: 44px;
    border: 1px solid #dce0e8;
    background: #f8f9fc;
    color: #1a2744;
}
.admin-login-body .form-control::placeholder {
    color: #9ca3af;
}
.admin-login-body .form-control:focus {
    border-color: #1a56db;
    box-shadow: 0 0 0 4px rgba(26, 86, 219, 0.1), 0 0 20px rgba(26, 86, 219, 0.06);
    background: #fff;
    color: #1a2744;
}
.admin-login-body .btn-primary {
    min-width: 110px;
    border-radius: 8px;
    padding: 0.7rem 1.4rem;
    background: #1a56db;
    color: #fff;
    border: none;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(26, 86, 219, 0.25), 0 0 30px rgba(26, 86, 219, 0.1);
}
.admin-login-body .btn-primary:hover {
    background: #1e40af;
    box-shadow: 0 6px 20px rgba(26, 86, 219, 0.35), 0 0 40px rgba(26, 86, 219, 0.15);
    transform: translateY(-1px);
}
.admin-login-body footer .text-white-50 {
    color: #8898aa !important;
}
.admin-login-body footer a.text-white-50 {
    color: #8898aa !important;
}
.admin-login-body footer a.text-white {
    color: #1a56db !important;
}

/* Admin Body */
.admin-body {
    background: #f0f2f5;
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    min-height: 100vh;
}

.admin-topbar {
    background: #fff;
    border-bottom: 1px solid #e3e6f0;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999;
}
.admin-topbar h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}
.admin-breadcrumb {
    font-size: 0.75rem;
    color: #8898aa;
}
.admin-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #506680;
    font-weight: 500;
}
.admin-user .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5b9cf5, #1565f7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}
.admin-content {
    padding: 1.5rem;
    flex: 1;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: #fff;
    border: 1px solid #e3e6f0;
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.stat-icon {
    font-size: 1.4rem;
    color: #1565f7;
    margin-bottom: 0.5rem;
}
.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}
.stat-label {
    font-size: 0.72rem;
    color: #8898aa;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Admin Cards */
.admin-card {
    background: #fff;
    border: 1px solid #e3e6f0;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 1.25rem;
}
.admin-card .card-header {
    background: transparent;
    border-bottom: 1px solid #e3e6f0;
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.admin-card .card-body { padding: 1.25rem; }

/* Toolbar */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.toolbar .search-form {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    min-width: 300px;
}
.toolbar .filters { max-width: 800px; }

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.data-table thead th {
    background: #f8f9fc;
    padding: 0.65rem 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6e7d92;
    border-bottom: 2px solid #e3e6f0;
}
.data-table tbody td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #edf0f5;
    vertical-align: middle;
}
.data-table tbody tr:hover { background: #f8f9fc; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table td:last-child { white-space: nowrap; }

/* Badges */
.badge {
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-block;
}
.badge-submitted { background: #dbeafe; color: #1e40af; }
.badge-pending_review { background: #fef3c7; color: #92400e; }
.badge-approved { background: #d1fae5; color: #065f46; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-enrolled { background: #e0e7ff; color: #3730a3; }
.badge-draft { background: #f1f5f9; color: #475569; }
.badge-paid { background: #d1fae5; color: #065f46; }
.badge-unpaid { background: #fee2e2; color: #991b1b; }
.badge-active { background: #d1fae5; color: #065f46; }
.badge-inactive { background: #f1f5f9; color: #64748b; }
.badge-lg { padding: 0.35rem 0.85rem; font-size: 0.75rem; }

/* Inline forms */
.inline-form { display: inline; }
.action-cell { display: flex; gap: 4px; }

/* Pagination */
.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 1.25rem; }

/* Detail Grid */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.detail-grid .admin-card:nth-last-child(2):nth-child(odd) { grid-column: 1 / -1; }
.parent-info { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid #edf0f5; }
.parent-info:last-child { border-bottom: none; }
.parent-info p { font-size: 0.85rem; margin-bottom: 2px; }
.admin-notes { margin-top: 10px; }
.admin-notes pre { background: #f8f9fc; padding: 12px; border-radius: 8px; font-size: 0.85rem; white-space: pre-wrap; }

/* Footer admin */
.admin-footer {
    background: #fff;
    border-top: 1px solid #e3e6f0;
    padding: 0.75rem 1.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: #8898aa;
}
.admin-footer a { color: #506680; text-decoration: none; }
.admin-footer a:hover { color: #1565f7; }

/* Responsive */
@media (max-width: 768px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-grid { grid-template-columns: 1fr; }
    .toolbar .search-form.filters { flex-direction: column; }
    .toolbar .search-form { flex-direction: column; min-width: 0; }
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 1.6rem; }
    .hero p { font-size: 0.95rem; }
    .features-grid { grid-template-columns: 1fr 1fr; }
    .programs-list { grid-template-columns: 1fr; }
    .cta-grid { grid-template-columns: 1fr; }
    .dash-grid { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; gap: 0; }
    .mobile-toggle { display: block; }
    .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg-card); border-bottom: 1px solid var(--border); padding: 12px; gap: 4px; }
    .nav-links.show { display: flex; }
    .toolbar .search-form.filters { flex-direction: column; }
}

/* ── Phone: 480px and below ── */
@media (max-width: 480px) {
    .container { padding: 0 12px; }
    .hero { padding: 32px 0; }
    .hero h1 { font-size: 1.15rem; }
    .hero p { font-size: 0.82rem; }
    .hero-badge { font-size: 0.7rem; padding: 4px 12px; }
    .features-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
    .stat-card { padding: 0.8rem; }
    .stat-value { font-size: 1.3rem; }
    .stat-label { font-size: 0.65rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 20px; }
    .footer { padding: 28px 0 16px; }
    .form-row { flex-direction: column; gap: 0; }
    .data-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .card { padding: 16px; border-radius: var(--radius); }
    .btn-lg { padding: 10px 18px; font-size: 0.85rem; }
    .dash-grid { grid-template-columns: 1fr; }
    .cta-grid { grid-template-columns: 1fr; }
    .programs-list { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .toolbar .search-form { margin-top: 8px; }
    .nav-logo { font-size: 0.95rem; }
    .auth-card { max-width: 100%; margin: 0 12px; }
    .section { padding: 28px 0; }
    .section-header h2 { font-size: 1.2rem; }
    table.data-table, table.datatable, table.info-table, .table-responsive table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .admin-content { padding: 1rem 0.5rem; }
    .admin-topbar { padding: 0.6rem 0.75rem; }
    .admin-topbar h2 { font-size: 0.95rem; }
}

/* ── Portrait phone: 400px and below ── */
@media (max-width: 400px) {
    .container { padding: 0 8px; }
    .hero h1 { font-size: 1rem; }
    .hero p { font-size: 0.78rem; }
    .card { padding: 12px; border-radius: 6px; }
    .stats-grid { grid-template-columns: 1fr; }
    .stat-value { font-size: 1.1rem; }
    .stat-label { font-size: 0.6rem; }
    .nav-logo { font-size: 0.82rem; gap: 6px; }
    .btn { padding: 8px 14px; font-size: 0.8rem; }
    .btn-sm { padding: 5px 10px; font-size: 0.7rem; }
    .form-control { padding: 8px 10px; font-size: 0.85rem; }
    .auth-card { margin: 0 8px; }
    .admin-topbar { padding: 0.5rem; }
    .admin-topbar h2 { font-size: 0.82rem; }
    .admin-user { font-size: 0.72rem; gap: 4px; }
    .admin-content { padding: 0.75rem 0.25rem; }
    .toolbar { gap: 0.4rem; }
    .toolbar .search-form input { font-size: 0.8rem; padding: 8px 10px; }
    h1, h2 { word-break: break-word; }
    img { max-width: 100%; }
}


