/* =====================================================================
   NEW CAMBRIDGE ACADEMY - Admin Portal Styles
   Theme: Navy + Gold (logo colors)
   ===================================================================== */
:root {
    --navy: #14215b;
    --navy-2: #1d2e7a;
    --navy-3: #0d1640;
    --gold: #f6c21c;
    --gold-2: #ffd84d;
    --gold-soft: #fff6d6;
    --purple: #6a2c91;
    --orange: #f39a2b;
    --green: #16a34a;
    --green-soft: #dcfce7;
    --red: #dc2626;
    --red-soft: #fee2e2;
    --blue: #2563eb;
    --blue-soft: #dbeafe;
    --amber-soft: #fef3c7;

    --bg: #f3f5fb;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e8f0;

    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 2px 10px rgba(20, 33, 91, .06);
    --shadow-lg: 0 10px 30px rgba(20, 33, 91, .12);
    --sidebar-w: 260px;
    --topbar-h: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--navy-2); text-decoration: none; }
a:hover { color: var(--purple); }
img { max-width: 100%; }
.text-danger { color: var(--red) !important; }
.text-success { color: var(--green) !important; }
.text-muted { color: var(--muted) !important; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.fw-bold { font-weight: 600; }

/* ============================ LAYOUT ============================ */
.app { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; transition: margin .25s; }
.content { padding: 24px; flex: 1; }
body.sidebar-collapsed .main { margin-left: 0; }
body.sidebar-collapsed .sidebar { transform: translateX(-100%); }

/* ============================ SIDEBAR ============================ */
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-3) 100%);
    color: #cfd6f3; display: flex; flex-direction: column; z-index: 1000;
    transition: transform .25s ease;
}
.sidebar-brand {
    display: flex; align-items: center; gap: 12px; padding: 16px 18px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand img { width: 46px; height: 46px; border-radius: 50%; background: #fff; padding: 2px; flex-shrink: 0; }
.sidebar-brand strong { display: block; color: #fff; font-size: 14px; line-height: 1.25; }
.sidebar-brand small { color: var(--gold); font-size: 11px; letter-spacing: .5px; text-transform: uppercase; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 10px; }
.sidebar-nav::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 5px; }

.nav-link {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 2px;
    color: #cfd6f3; font-size: 13.5px; font-family: inherit;
    background: none; border: none; cursor: pointer; text-align: left;
    transition: background .2s, color .2s;
}
.nav-link i:first-child { width: 18px; text-align: center; font-size: 15px; }
.nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-link.active { background: var(--gold); color: var(--navy); font-weight: 600; box-shadow: 0 4px 12px rgba(246,194,28,.3); }
.nav-link .caret { margin-left: auto; font-size: 10px; transition: transform .2s; }
.nav-badge { margin-left: auto; background: var(--orange); color: #fff; font-size: 11px; padding: 1px 8px; border-radius: 20px; }
.nav-link.soon, .nav-sub .soon { opacity: .45; cursor: not-allowed; }
.nav-link.soon em, .nav-sub .soon em {
    margin-left: auto; font-style: normal; font-size: 9px; text-transform: uppercase;
    background: rgba(255,255,255,.12); padding: 1px 6px; border-radius: 4px;
}

.nav-sub { display: none; padding: 2px 0 6px 44px; }
.nav-group.open .nav-sub { display: block; }
.nav-group.open .caret { transform: rotate(90deg); }
.nav-group.open > .nav-toggle { color: #fff; }
.nav-sub a, .nav-sub .soon {
    display: flex; align-items: center; padding: 7px 10px; font-size: 13px;
    color: #aeb8e0; border-radius: 6px; position: relative;
}
.nav-sub a::before { content: ''; position: absolute; left: -14px; width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.25); }
.nav-sub a:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav-sub a.active { color: var(--gold); font-weight: 500; }
.nav-sub a.active::before { background: var(--gold); }

.sidebar-footer { padding: 12px 18px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-footer a { color: #ffb4b4; font-size: 13px; }
.sidebar-overlay { display: none; }

/* ============================ TOPBAR ============================ */
.topbar {
    height: var(--topbar-h); background: var(--card); display: flex; align-items: center; gap: 14px;
    padding: 0 24px; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 900;
}
.topbar-title { font-size: 18px; font-weight: 600; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
    width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: #fff;
    display: inline-flex; align-items: center; justify-content: center; color: var(--navy);
    cursor: pointer; position: relative; font-size: 16px; flex-shrink: 0;
}
.icon-btn:hover { background: var(--gold-soft); color: var(--navy); }
.dot-badge {
    position: absolute; top: -5px; right: -5px; background: var(--red); color: #fff; font-size: 10px;
    min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

.user-menu { position: relative; }
.user-btn {
    display: flex; align-items: center; gap: 10px; background: none; border: none; cursor: pointer;
    padding: 4px 8px 4px 4px; border-radius: 30px; font-family: inherit; color: var(--text);
}
.user-btn:hover { background: var(--bg); }
.avatar {
    width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: var(--gold);
    display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; flex-shrink: 0;
}
.user-info { text-align: left; line-height: 1.2; }
.user-info strong { display: block; font-size: 13px; }
.user-info small { color: var(--muted); font-size: 11px; }
.user-btn .fa-chevron-down { font-size: 10px; color: var(--muted); }
.user-dropdown {
    position: absolute; right: 0; top: calc(100% + 8px); background: #fff; min-width: 190px;
    border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 1px solid var(--border);
    padding: 6px; display: none; z-index: 1001;
}
.user-menu.open .user-dropdown { display: block; animation: fadeDown .15s ease; }
.user-dropdown a { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 8px; color: var(--text); font-size: 13px; }
.user-dropdown a:hover { background: var(--bg); }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.app-footer {
    padding: 14px 24px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border);
    background: #fff; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px;
}

/* ============================ CARDS ============================ */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); margin-bottom: 22px; }
.card-header {
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.card-title { font-size: 15px; font-weight: 600; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.card-title i { color: var(--gold); }
.card-body { padding: 20px; }
.card-footer { padding: 14px 20px; border-top: 1px solid var(--border); background: #fafbfe; border-radius: 0 0 var(--radius) var(--radius); }

/* Stat cards */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; margin-bottom: 22px; }
.stat-card {
    background: #fff; border-radius: var(--radius); padding: 18px 20px; border: 1px solid var(--border);
    box-shadow: var(--shadow); display: flex; align-items: center; gap: 16px; position: relative; overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}
a.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-card::after {
    content: ''; position: absolute; right: -20px; bottom: -20px; width: 80px; height: 80px;
    border-radius: 50%; background: currentColor; opacity: .06;
}
.stat-icon {
    width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
    font-size: 21px; flex-shrink: 0;
}
.stat-label { font-size: 12.5px; color: var(--muted); }
.stat-value { font-size: 22px; font-weight: 700; color: var(--navy); line-height: 1.2; }
.stat-sub { font-size: 11.5px; color: var(--muted); }
.c-navy  { color: var(--navy); }   .c-navy .stat-icon  { background: #e3e7f7; color: var(--navy); }
.c-gold  { color: #b8860b; }       .c-gold .stat-icon  { background: var(--gold-soft); color: #b8860b; }
.c-green { color: var(--green); }  .c-green .stat-icon { background: var(--green-soft); color: var(--green); }
.c-red   { color: var(--red); }    .c-red .stat-icon   { background: var(--red-soft); color: var(--red); }
.c-purple{ color: var(--purple); } .c-purple .stat-icon{ background: #f0e6f7; color: var(--purple); }
.c-orange{ color: var(--orange); } .c-orange .stat-icon{ background: #fdeedb; color: var(--orange); }
.c-blue  { color: var(--blue); }   .c-blue .stat-icon  { background: var(--blue-soft); color: var(--blue); }

/* Welcome banner */
.welcome {
    background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 55%, var(--purple) 100%);
    color: #fff; border-radius: var(--radius); padding: 24px 28px; margin-bottom: 22px;
    display: flex; align-items: center; justify-content: space-between; gap: 20px; position: relative; overflow: hidden;
}
.welcome::before {
    content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
    border-radius: 50%; border: 30px solid rgba(246,194,28,.18);
}
.welcome h2 { font-size: 21px; font-weight: 600; }
.welcome h2 span { color: var(--gold); }
.welcome p { opacity: .85; font-size: 13px; margin-top: 4px; }
.welcome-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }

/* ============================ GRID ============================ */
.row { display: grid; gap: 22px; }
.row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.row-2-1 { grid-template-columns: 2fr 1fr; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }

/* ============================ BUTTONS ============================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 9px 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
    font-family: inherit; font-size: 13px; font-weight: 500; cursor: pointer; line-height: 1.3;
    transition: all .2s; white-space: nowrap; text-decoration: none;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); color: #fff; box-shadow: 0 4px 12px rgba(20,33,91,.25); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-2); color: var(--navy); box-shadow: 0 4px 12px rgba(246,194,28,.35); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #15803d; color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1ebe57; color: #fff; }
.btn-outline { background: #fff; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--navy); color: var(--navy); }
.btn-light { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.25); }
.btn-light:hover { background: rgba(255,255,255,.25); color: #fff; }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 11px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn-group { display: inline-flex; gap: 5px; flex-wrap: wrap; }

/* ============================ FORMS ============================ */
.form-group { margin-bottom: 0; }
.form-label { display: block; font-size: 12.5px; font-weight: 500; margin-bottom: 6px; color: #374151; }
.form-label .req { color: var(--red); }
.form-control, .form-select {
    width: 100%; padding: 9px 12px; border: 1px solid #d5dae6; border-radius: var(--radius-sm);
    font-family: inherit; font-size: 13.5px; background: #fff; color: var(--text);
    transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus { outline: none; border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(29,46,122,.12); }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon .form-control { padding-left: 38px; }
.form-check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.form-check input { width: 16px; height: 16px; accent-color: var(--navy); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }

/* Toggle switch */
.switch { position: relative; display: inline-block; width: 42px; height: 23px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cbd2e1; border-radius: 23px; cursor: pointer; transition: .2s; }
.switch span::before { content: ''; position: absolute; width: 17px; height: 17px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::before { transform: translateX(19px); }

/* ============================ TABLES ============================ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
    background: #f6f8fd; color: var(--navy); font-weight: 600; text-align: left;
    padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; font-size: 12.5px;
}
.table td { padding: 11px 14px; border-bottom: 1px solid #eef0f6; vertical-align: middle; }
.table tbody tr:hover { background: #fafbff; }
.table tbody tr:last-child td { border-bottom: none; }
.table .actions { white-space: nowrap; text-align: right; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-state i { font-size: 38px; color: #cbd2e1; display: block; margin-bottom: 10px; }

.person { display: flex; align-items: center; gap: 10px; }
.person img, .person .avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.person strong { display: block; font-size: 13px; }
.person small { color: var(--muted); font-size: 11.5px; }

/* ============================ BADGES ============================ */
.badge {
    display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 500; white-space: nowrap;
}
.badge-success { background: var(--green-soft); color: #166534; }
.badge-danger  { background: var(--red-soft); color: #991b1b; }
.badge-warning { background: var(--amber-soft); color: #92400e; }
.badge-info    { background: var(--blue-soft); color: #1e40af; }
.badge-navy    { background: #e3e7f7; color: var(--navy); }
.badge-gold    { background: var(--gold-soft); color: #8a6500; }
.badge-purple  { background: #f0e6f7; color: var(--purple); }
.badge-gray    { background: #eef0f4; color: #4b5563; }

/* ============================ ALERTS ============================ */
.alert {
    display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius-sm);
    margin-bottom: 18px; font-size: 13px; border: 1px solid; animation: fadeDown .25s ease;
}
.alert span { flex: 1; }
.alert-success { background: var(--green-soft); color: #166534; border-color: #bbf7d0; }
.alert-error   { background: var(--red-soft); color: #991b1b; border-color: #fecaca; }
.alert-info    { background: var(--blue-soft); color: #1e40af; border-color: #bfdbfe; }
.alert-warning { background: var(--amber-soft); color: #92400e; border-color: #fde68a; }
.alert-close { background: none; border: none; font-size: 20px; cursor: pointer; color: inherit; opacity: .6; line-height: 1; }

/* ============================ TABS ============================ */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 16px; overflow-x: auto; }
.tab-btn {
    padding: 13px 16px; background: none; border: none; border-bottom: 3px solid transparent;
    font-family: inherit; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap;
    display: flex; align-items: center; gap: 7px;
}
.tab-btn:hover { color: var(--navy); }
.tab-btn.active { color: var(--navy); border-bottom-color: var(--gold); }
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeDown .2s ease; }

/* ============================ MODAL ============================ */
.modal {
    position: fixed; inset: 0; background: rgba(13,22,64,.55); z-index: 2000;
    display: none; align-items: flex-start; justify-content: center; padding: 50px 16px; overflow-y: auto;
}
.modal.open { display: flex; }
.modal-box { background: #fff; border-radius: var(--radius); width: 100%; max-width: 560px; box-shadow: var(--shadow-lg); animation: fadeDown .2s ease; }
.modal-lg { max-width: 820px; }
.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 16px; color: var(--navy); }
.modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--muted); line-height: 1; }
.modal-body { padding: 20px; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ============================ MISC ============================ */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar .form-control, .toolbar .form-select { width: auto; min-width: 160px; }
.list-plain { list-style: none; }
.list-plain li { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--border); gap: 10px; }
.list-plain li:last-child { border-bottom: none; }

.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.quick-item {
    display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px;
    border: 1px solid var(--border); border-radius: var(--radius); text-align: center; font-size: 12.5px;
    color: var(--text); transition: all .2s; background: #fff;
}
.quick-item i { font-size: 22px; color: var(--navy); width: 46px; height: 46px; border-radius: 50%; background: var(--gold-soft); display: flex; align-items: center; justify-content: center; }
.quick-item:hover { border-color: var(--gold); color: var(--navy); transform: translateY(-2px); box-shadow: var(--shadow); }
.quick-item.disabled { opacity: .45; pointer-events: none; }

/* Bar chart (CSS only) */
.bar-chart { display: flex; align-items: flex-end; gap: 14px; height: 200px; padding-top: 20px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar { width: 100%; max-width: 46px; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, var(--gold) 0%, var(--orange) 100%); min-height: 3px; position: relative; transition: height .6s ease; }
.bar.exp { background: linear-gradient(180deg, #8b9ad8 0%, var(--navy-2) 100%); }
.bar-pair { display: flex; gap: 4px; width: 100%; justify-content: center; align-items: flex-end; flex: 1; }
.bar-pair .bar { max-width: 22px; }
.bar-label { font-size: 11px; color: var(--muted); }
.chart-legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); }
.chart-legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.chart-legend .l-inc::before { background: var(--gold); }
.chart-legend .l-exp::before { background: var(--navy-2); }

.logo-preview { width: 90px; height: 90px; border-radius: 50%; border: 2px dashed var(--border); padding: 4px; object-fit: contain; background: #fff; }

/* ============================ LOGIN PAGE ============================ */
.login-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
    background:
        radial-gradient(circle at 15% 20%, rgba(246,194,28,.18) 0, transparent 35%),
        radial-gradient(circle at 85% 80%, rgba(106,44,145,.35) 0, transparent 40%),
        linear-gradient(135deg, var(--navy-3) 0%, var(--navy) 50%, var(--navy-2) 100%);
    position: relative; overflow: hidden;
}
.login-page::before, .login-page::after {
    content: ''; position: absolute; border-radius: 50%; border: 2px solid rgba(246,194,28,.15);
    animation: spin 40s linear infinite;
}
.login-page::before { width: 600px; height: 600px; top: -200px; left: -200px; border-style: dashed; }
.login-page::after  { width: 450px; height: 450px; bottom: -150px; right: -120px; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.login-card {
    width: 100%; max-width: 420px; background: #fff; border-radius: 20px; box-shadow: 0 25px 60px rgba(0,0,0,.35);
    padding: 36px 34px 30px; position: relative; z-index: 1; animation: rise .5s ease;
}
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.login-logo { width: 110px; height: 110px; margin: -90px auto 14px; display: block; border-radius: 50%; background: #fff; padding: 5px; box-shadow: 0 8px 25px rgba(0,0,0,.25); }
.login-card h1 { text-align: center; color: var(--navy); font-size: 20px; }
.login-card .sub { text-align: center; color: var(--muted); font-size: 12.5px; margin-bottom: 24px; }
.login-card .form-group { margin-bottom: 16px; }
.login-card .btn { padding: 12px; font-size: 14px; }
.pass-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--muted); cursor: pointer; }
.login-foot { text-align: center; margin-top: 20px; font-size: 12px; color: var(--muted); }
.login-foot a { color: var(--navy); font-weight: 500; }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 1100px) {
    .row-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .row-2-1 { grid-template-columns: 1fr; }
}
@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    .main { margin-left: 0; }
    body.sidebar-open .sidebar { transform: translateX(0); }
    body.sidebar-open .sidebar-overlay { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 999; }
    body.sidebar-open { overflow: hidden; }
    body.sidebar-collapsed .main { margin-left: 0; }
}
@media (max-width: 768px) {
    html { font-size: 13.5px; }
    .content { padding: 16px; }
    .topbar { padding: 0 14px; gap: 10px; }
    .topbar-title { font-size: 16px; }
    .user-info, .user-btn .fa-chevron-down { display: none; }
    .row-2, .row-3 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .stat-card { padding: 14px; gap: 10px; flex-direction: column; align-items: flex-start; }
    .stat-icon { width: 42px; height: 42px; font-size: 17px; }
    .stat-value { font-size: 18px; }
    .welcome { flex-direction: column; align-items: flex-start; padding: 20px; }
    .card-body { padding: 16px; }
    .toolbar .form-control, .toolbar .form-select { width: 100%; }
    .modal { padding: 20px 10px; }
}
@media (max-width: 380px) {
    .stats-grid { grid-template-columns: 1fr; }
}

/* ============================ PRINT ============================ */
@media print {
    .sidebar, .topbar, .app-footer, .no-print, .btn, .alert { display: none !important; }
    .main { margin: 0 !important; }
    .content { padding: 0 !important; }
    body { background: #fff; }
    .card { box-shadow: none; border: none; }
}

/* ============================ ENROLLMENT ROWS (Phase 3) ============================ */
.enroll-row { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; background: #fbfcff; position: relative; }
.enroll-row .er-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; color: var(--navy); font-size: 13px; }
.enroll-row .er-net { margin-top: 10px; font-size: 12.5px; color: var(--muted); background: #fff; border: 1px dashed var(--border); border-radius: 8px; padding: 7px 12px; }
.enroll-row .er-net:empty { display: none; }
.enroll-row .er-net strong { color: var(--green); font-size: 14px; }
.photo-box { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.photo-box img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold-soft); background: var(--bg); }
.profile-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.profile-head img, .profile-head .avatar { width: 96px !important; height: 96px !important; font-size: 28px; border: 4px solid var(--gold-soft); }
.profile-head h2 { color: var(--navy); font-size: 20px; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px 20px; }
.info-grid div small { display: block; color: var(--muted); font-size: 11.5px; }
.info-grid div span { font-weight: 500; }
.mini-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-left: auto; }
.mini-stat { background: var(--bg); border-radius: 10px; padding: 10px 16px; text-align: center; min-width: 110px; }
.mini-stat small { display: block; color: var(--muted); font-size: 11px; }
.mini-stat strong { font-size: 16px; color: var(--navy); }
