/* ============================================
   FUTURE CAREER INSTITUTE - Mobile-First Stylesheet
   ============================================ */

/* === CUSTOM PROPERTIES === */
:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #e8f0fe;
    --secondary: #6c757d;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --dark: #0f172a;
    --light: #f8fafc;
    --bg-primary: #ffffff;
    --bg-secondary: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.92);
    --glass-border: rgba(226, 232, 240, 0.15);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: all 0.25s ease;
    --header-h: 52px;
    --bottom-nav-h: 64px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --glass-bg: rgba(30, 41, 59, 0.92);
    --glass-border: rgba(51, 65, 85, 0.2);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.4);
}

/* === RESET & BASE === */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 8px);
    padding-top: var(--header-h);
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background 0.3s, color 0.3s;
}

/* === APP HEADER (MOBILE-FIRST) === */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 12px;
    box-shadow: 0 2px 12px rgba(26, 115, 232, 0.3);
    -webkit-backdrop-filter: blur(0);
}

.app-header .header-title {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.app-header .header-title i { font-size: 20px; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.header-btn:active { background: rgba(255,255,255,0.3); }

/* === MAIN CONTENT === */
.main-content {
    min-height: calc(100vh - var(--header-h) - var(--bottom-nav-h));
    overflow-y: auto;
}

.container-fluid {
    padding-left: 12px;
    padding-right: 12px;
}

/* === PAGE HEADER === */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 8px;
}

.page-header h5 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.page-header small {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
}

/* === BOTTOM NAVIGATION (MOBILE-FIRST) === */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--bottom-nav-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-top: 2px solid var(--glass-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    padding: 4px 0;
    min-width: 48px;
    min-height: 44px;
    border-radius: 8px;
    transition: color 0.2s;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.nav-item i {
    font-size: 22px;
    margin-bottom: 2px;
    transition: transform 0.2s;
}

.nav-item span {
    line-height: 1.2;
}

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

.nav-item.active i {
    transform: scale(1.1);
}

.nav-item:active i {
    transform: scale(0.9);
}

/* === BUTTONS === */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    padding: 10px 18px;
    transition: all 0.2s;
    touch-action: manipulation;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 24px;
    font-size: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    border: none;
    color: #fff;
}

.btn-primary:active {
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: #fff;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: none;
    color: #fff;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    color: #fff;
}

.btn-outline-primary {
    border: 1.5px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-glass {
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.2);
    color: #fff;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

/* === CARDS (MOBILE-FIRST) === */
.card {
    background: var(--glass-bg);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s;
    overflow: hidden;
}

.card-body { padding: 14px; }
.card-header { padding: 14px; }
.card-footer { padding: 12px 14px; }

/* DASHBOARD STAT CARDS */
.dashboard-card {
    border-radius: var(--radius-md);
    padding: 16px;
    color: #fff;
    position: relative;
    overflow: hidden;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dashboard-card .icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 8px;
}

.dashboard-card h3 {
    font-size: 22px;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

.dashboard-card small {
    font-size: 11px;
    opacity: 0.85;
    display: block;
}

.card-primary { background: linear-gradient(135deg, #1a73e8, #0d47a1); }
.card-success { background: linear-gradient(135deg, #10b981, #059669); }
.card-warning { background: linear-gradient(135deg, #f59e0b, #d97706); }
.card-danger { background: linear-gradient(135deg, #ef4444, #dc2626); }

/* STUDENT CARDS */
.student-card { border-radius: var(--radius-md); }
.student-card .card-top {
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    padding: 14px;
    color: #fff;
    min-height: 84px;
}

.student-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid rgba(255,255,255,0.5);
}

.student-card .card-body { padding: 12px 14px; }

.status-badge {
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-block;
}

.status-active { background: #10b981; color: #fff; }
.status-inactive { background: #6b7280; color: #fff; }
.status-locked { background: #ef4444; color: #fff; }

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.quick-actions .btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    min-width: unset;
    min-height: unset;
}

/* === STAT BOXES === */
.stat-box { background: #fff; border: 2px solid #e2e8f0; border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.stat-label { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value { font-size: 18px; font-weight: 700; }
.stat-value.text-success { color: var(--success); }
.stat-value.text-danger { color: var(--danger); }

/* Student Row Cards */
.student-row { transition: box-shadow 0.2s; }
.student-row:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

/* Portal Link Bar */
.portal-link-bar { background: linear-gradient(135deg, #1a73e8, #0d47a1); border-radius: var(--radius-md); padding: 14px 16px; }

/* Floating Add Button */
.fab-add {
    position: fixed;
    bottom: calc(var(--bottom-nav-h) + 12px + var(--safe-bottom));
    right: 16px;
    background: linear-gradient(135deg, #e91e63, #c2185b);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(233, 30, 99, 0.4);
    z-index: 1050;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s;
}
.fab-add:active { transform: scale(0.95); }
.fab-add i { font-size: 18px; }

/* === FORMS (MOBILE-FIRST) === */
.form-label {
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 4px;
    color: var(--text-secondary);
    display: block;
}

.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: 2px solid #d1d5db;
    padding: 11px 14px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
    color: var(--text-primary);
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background: #1e293b;
    border-color: #475569 !important;
    color: #f1f5f9;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
    outline: none;
}

textarea.form-control { min-height: 80px; resize: vertical; }

select.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* === SEARCH BAR === */
.search-bar { position: relative; }
.search-bar input {
    padding-left: 38px;
    border-radius: 50px;
    background: var(--glass-bg);
    font-size: 14px;
}
.search-bar i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}

/* === MODALS (MOBILE-FULLSCREEN) === */
.modal-backdrop {
    background: rgba(0,0,0,0.5) !important;
}

.modal-dialog {
    margin: 0;
    max-width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
}
.modal-dialog-scrollable { height: calc(100% - 1rem); }

.modal-content {
    border: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 92vh;
    overflow: hidden;
    background-color: #ffffff;
}

.modal-header {
    background: linear-gradient(135deg, #1a73e8, #0d47a1) !important;
    color: #fff !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 14px 16px;
    min-height: 52px;
    border: none;
}

.modal-header .modal-title { font-size: 16px; font-weight: 700; color: #fff; }
.modal-header .btn-close { filter: brightness(0) invert(1); opacity: 0.8; }
#studentForm { display: flex; flex-direction: column; flex: 1; overflow: hidden; background: #fff; }
.modal-body { padding: 16px; overflow-y: auto; min-height: 0; flex: 1; background: #fff; }
[data-theme="dark"] .modal-body { background: #1e293b; }
.modal-footer { padding: 12px 16px; border-top: 2px solid #e2e8f0; background: #fff; }
[data-theme="dark"] .modal-footer { background: #1e293b; border-top-color: #334155; }

.modal.show .modal-dialog {
    transform: translateY(0);
}

[data-theme="dark"] .modal-content { background-color: #1e293b; }
[data-theme="dark"] .modal-body,
[data-theme="dark"] .modal-footer {
    --glass-bg: rgba(30, 41, 59, 0.96);
}

/* === TABLES (MOBILE) === */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -14px;
    padding: 0 14px;
}

.table-wrap::-webkit-scrollbar { display: none; }

.table {
    width: 100%;
    font-size: 13px;
    border-collapse: collapse;
}

.table th {
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 10px 8px;
    border-bottom: 2px solid var(--glass-border);
    white-space: nowrap;
}

.table td {
    padding: 10px 8px;
    border-bottom: 2px solid var(--glass-border);
    vertical-align: middle;
}

.table > :not(caption) > * > * {
    border-bottom: 2px solid var(--glass-border);
}

[data-theme="dark"] .table { color: var(--text-primary); }

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 32px 16px;
}

.empty-state i {
    font-size: 40px;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: block;
}

.empty-state h6 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px;
}

.empty-state p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 16px;
}

/* === PAGINATION === */
.pagination-wrap {
    display: flex;
    gap: 4px;
    justify-content: center;
    padding: 16px 0;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--glass-bg);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.page-btn.active {
    background: var(--primary);
    color: #fff;
}

.page-btn:active { transform: scale(0.92); }

/* === LOADING SCREEN === */
.loading-screen {
    position: fixed;
    inset: 0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.4s, visibility 0.4s;
}

.loading-screen.hide { opacity: 0; visibility: hidden; }

/* === INSTALL BANNER === */
.install-banner {
    position: fixed;
    bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 4px);
    left: 8px;
    right: 8px;
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: #fff;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

.install-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.install-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.install-text { flex: 1; }
.install-text strong { font-size: 13px; display: block; }
.install-text small { font-size: 11px; opacity: 0.8; }

/* === BACK TO TOP === */
.back-to-top {
    position: fixed;
    bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 12px);
    right: 14px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: 900;
    cursor: pointer;
    touch-action: manipulation;
}

/* === PROFILE CARD === */
.profile-card {
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    border-radius: var(--radius-md);
    padding: 18px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.profile-card .profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid rgba(255,255,255,0.4);
}

/* === INFO ROWS === */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 2px solid var(--glass-border);
    gap: 8px;
}

.info-row:last-child { border-bottom: none; }

.info-label {
    color: var(--text-secondary);
    font-size: 13px;
    flex-shrink: 0;
}

.info-value {
    font-weight: 600;
    font-size: 13px;
    text-align: right;
    word-break: break-word;
}

/* === TIMELINE === */
.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: var(--glass-border);
}

.timeline-item {
    position: relative;
    padding-bottom: 16px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -19px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--bg-primary);
}

.timeline-item:last-child { padding-bottom: 0; }

/* === ATTENDANCE === */
.attendance-student {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 2px solid var(--glass-border);
}

.attendance-student:last-child { border-bottom: none; }

.att-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.att-actions {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.att-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 2px solid var(--glass-border);
    background: var(--glass-bg);
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    touch-action: manipulation;
}

.att-btn.present { background: #10b981; color: #fff; border-color: #10b981; }
.att-btn.absent { background: #ef4444; color: #fff; border-color: #ef4444; }
.att-btn.late { background: #f59e0b; color: #fff; border-color: #f59e0b; }

/* === BADGE STYLES === */
.badge-fee {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary);
}

/* === CHART CONTAINER === */
.chart-wrap {
    position: relative;
    width: 100%;
    height: 220px;
}

/* === STATS ROW (ATTENDANCE) === */
.stat-box {
    background: var(--glass-bg);
    border-radius: var(--radius-sm);
    padding: 10px;
    text-align: center;
}

.stat-box small { font-size: 11px; color: var(--text-muted); display: block; }
.stat-box strong { font-size: 18px; display: block; }

/* === FILTER BAR === */
.filter-scroll {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 0 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.filter-scroll::-webkit-scrollbar { display: none; }

.filter-scroll .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

/* === SKELETON === */
.skel {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

[data-theme="dark"] .skel {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
}

@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* === ANIMATIONS === */
.fade-in { animation: fadeIn 0.3s ease both; }
.slide-up { animation: slideUp 0.3s ease both; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === TOAST === */
.toast-container { z-index: 9999; }

/* === LOGIN PAGE === */
.login-page {
    min-height: 100vh;
    min-height: -webkit-fill-available;
    background: linear-gradient(135deg, #1a73e8, #0d47a1 60%, #0f172a);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: rgba(255,255,255,0.95);
    border-radius: var(--radius-xl);
    padding: 28px 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.login-logo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #fff;
    margin: 0 auto 12px;
    box-shadow: 0 8px 24px rgba(26,115,232,0.35);
}

/* === RECEIPT === */
.receipt-wrap {
    max-width: 600px;
    margin: 0 auto;
}

.receipt-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 24px 20px;
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .receipt-card { background: #1e293b; }

/* Photo Upload */
.photo-upload-wrap { position: relative; display: inline-block; cursor: pointer; }
.photo-upload-wrap img { transition: opacity .2s; }
.photo-upload-wrap:hover img { opacity: .8; }
.photo-upload-badge { position: absolute; bottom: -4px; right: -4px; background: var(--primary); color: #fff; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; border: 2px solid var(--card-bg); pointer-events: none; }

/* === TABLET (576px+) === */
@media (min-width: 576px) {
    .container-fluid { padding-left: 20px; padding-right: 20px; }
    .dashboard-card { min-height: 120px; padding: 20px; }
    .dashboard-card h3 { font-size: 26px; }
    .modal-dialog { margin: 1.75rem auto; max-width: 500px; height: auto; align-items: center; }
    .modal-dialog-scrollable { height: calc(100% - 3.5rem); min-height: 0; }
    .modal-content { border-radius: var(--radius-lg); }
    .modal-header { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
    .student-avatar { width: 60px; height: 60px; }
}

/* === TABLET/DESKTOP (768px+) === */
@media (min-width: 768px) {
    :root { --bottom-nav-h: 0; }
    body { padding-bottom: 0; }
    
    .bottom-nav {
        position: relative;
        max-width: 600px;
        left: auto;
        right: auto;
        margin: 20px auto 0;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        height: auto;
        padding: 8px 0;
    }

    .install-banner { bottom: 12px; left: 50%; transform: translateX(-50%); max-width: 500px; }
    .back-to-top { bottom: 20px; }
    .chart-wrap { height: 260px; }
}

/* === DESKTOP (992px+) === */
@media (min-width: 992px) {
    .container-fluid { padding-left: 24px; padding-right: 24px; }
    .dashboard-card h3 { font-size: 28px; }
}

/* === PWA INSTALLED — hide install UI === */
.pwa-installed .install-banner,
.pwa-installed .more-option-item[onclick*="installApp"] { display: none !important; }

/* === PRINT === */
@media print {
    .app-header, .bottom-nav, .back-to-top, .install-banner, .loading-screen,
    .no-print { display: none !important; }
    body { padding: 0; background: #fff; }
    .card { box-shadow: none; border: 2px solid #ddd; }
}
