/* ================================================================
   Sistema de Gestión I.E. Inca Garcilaso de la Vega — style.css
   Paleta Institucional: Blue #2b57a7 | Red #d12027 | Gold #b8860b
   ================================================================ */

/* ── Variables ──────────────────────────────────────────────── */
:root {
    --sidebar-w:      280px;
    --topbar-h:       84px;
    --radius:         20px;
    --radius-sm:      12px;
    --shadow:         0 8px 30px rgba(0,0,0,.04);
    --shadow-md:      0 16px 40px rgba(0,0,0,.08);
    --transition:     all .3s cubic-bezier(.4,0,.2,1);

    --navy:     #1a365d;
    --navy-2:   #2d3748;
    --navy-3:   #4a5568;
    --blue:     #2b57a7;
    --blue-lt:  #4c76c7;
    --teal:     #14b8a6;
    --green:    #10b981;
    --amber:    #b8860b;
    --red:      #d12027;
    --indigo:   #4338ca;
    --slate:    #f8fafc;
    --slate-2:  #ffffff;
    --slate-3:  #e2e8f0;
    --text:     #1e293b;
    --text-2:   #475569;
    --text-3:   #94a3b8;
    --white:    #ffffff;

    --sidebar-bg:   rgba(255, 255, 255, 0.9);
    --sidebar-text: #64748b;
    --sidebar-act:  var(--blue);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; }

body {
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
    background: #f0f4f8;
    color: var(--text);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }

/* ── LAYOUT ─────────────────────────────────────────────────── */
.sidebar {
    position: fixed; top: 16px; left: 16px;
    width: var(--sidebar-w); height: calc(100vh - 32px);
    background: var(--sidebar-bg);
    backdrop-filter: blur(25px) saturate(150%);
    -webkit-backdrop-filter: blur(25px) saturate(150%);
    display: flex; flex-direction: column;
    z-index: 1000;
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.06);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius);
    overflow: hidden;
}

.main-wrapper {
    margin-left: calc(var(--sidebar-w) + 16px);
    min-height: 100vh;
    transition: margin .3s cubic-bezier(.4,0,.2,1);
}

/* ── SIDEBAR BRAND ───────────────────────────────────────────── */
.sidebar-brand {
    display: flex; align-items: center; gap: 14px;
    padding: 28px 24px 24px;
    border-bottom: 1px solid var(--slate-3);
}

.sidebar-logo { width: 50px; height: 50px; flex-shrink: 0; }
.sidebar-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: var(--radius-sm); filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05)); }
.sidebar-logo-fallback {
    width: 44px; height: 44px; border-radius: 12px;
    background: linear-gradient(135deg, var(--blue), var(--indigo));
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.4rem;
    box-shadow: 0 4px 12px rgba(43,87,167,0.3);
}

.sidebar-title { flex: 1; }
.sidebar-title-main { display: block; font-size: 1rem; font-weight: 800; color: var(--navy-2); letter-spacing: -0.01em; }
.sidebar-title-sub  { display: block; font-size: .75rem; color: var(--text-3); font-weight: 500; }

.sidebar-toggle { display: none; background: none; border: none; color: var(--sidebar-text); cursor: pointer; font-size: 1.1rem; padding: 4px 6px; border-radius: 6px; }

/* ── SIDEBAR USER ────────────────────────────────────────────── */
.sidebar-user {
    display: flex; align-items: center; gap: 10px;
    padding: 16px;
    background: var(--slate);
    margin: 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--slate-3);
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.5);
}
.sidebar-user-avatar { font-size: 2rem; color: var(--blue); }
.sidebar-user-name  { display: block; font-size: .88rem; font-weight: 700; color: var(--navy-2); line-height: 1.2; }
.sidebar-user-role  { display: block; font-size: .75rem; color: var(--text-3); font-weight: 500; }

/* ── SIDEBAR NAV ─────────────────────────────────────────────── */
.sidebar-nav { flex: 1; overflow-y: auto; padding: 4px 0; scrollbar-width: thin; scrollbar-color: var(--slate-3) transparent; }

.nav-section-label {
    padding: 16px 24px 8px;
    font-size: .7rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: .12em;
    color: var(--text-3);
}

.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 20px;
    margin: 4px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-size: .9rem; font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
}

.nav-item:hover { background: var(--slate); color: var(--blue); transform: translateX(5px); }
.nav-item.active { background: linear-gradient(135deg, var(--blue), var(--indigo)); color: white; box-shadow: 0 8px 16px rgba(43,87,167,.3); border-bottom: none; }
.nav-item.active i { color: white; }
.nav-icon { width: 22px; font-size: 1rem; flex-shrink: 0; color: var(--text-3); transition: var(--transition); }
.nav-item:hover .nav-icon { color: var(--blue); }

.sidebar-footer { padding: 12px 0 20px; border-top: 1px solid var(--slate-3); }
.logout-item { color: var(--red); }
.logout-item .nav-icon { color: var(--red); }
.logout-item:hover { background: #fee2e2; color: #b91c1c; }

/* ── OVERLAY ─────────────────────────────────────────────────── */
.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.5); z-index: 999;
    backdrop-filter: blur(2px);
}

/* ── TOPBAR ──────────────────────────────────────────────────── */
.topbar {
    height: var(--topbar-h);
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 32px;
    position: sticky; top: 0; z-index: 900;
}

/* Mac Window Controls */
.mac-controls {
    display: flex;
    gap: 8px;
    margin-right: 20px;
}
.mac-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.mac-dot.red    { background: #ff5f56; }
.mac-dot.yellow { background: #ffbd2e; }
.mac-dot.green  { background: #27c93f; }

.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-toggle {
    width: 36px; height: 36px; border-radius: var(--radius-sm);
    background: var(--slate-2); border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-2); font-size: 1rem;
    transition: var(--transition);
}
.topbar-toggle:hover { background: var(--slate-3); color: var(--text); }

.breadcrumb-nav { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--text-3); }
.breadcrumb-item.active { color: var(--text); font-weight: 500; }
.breadcrumb-sep { color: var(--text-3); }

.topbar-right { display: flex; align-items: center; gap: 12px; }

.topbar-btn {
    position: relative; width: 38px; height: 38px;
    border-radius: var(--radius-sm); background: var(--slate-2); border: none;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: var(--text-2); font-size: 1rem; text-decoration: none;
    transition: var(--transition);
}
.topbar-btn:hover { background: var(--blue); color: white; }

.notif-badge {
    position: absolute; top: 4px; right: 4px;
    background: var(--red); color: white;
    font-size: .6rem; font-weight: 700;
    width: 16px; height: 16px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid white;
}

.topbar-user {
    display: flex; align-items: center; gap: 8px;
    font-size: .83rem; font-weight: 500; color: var(--text-2);
    padding: 6px 12px; border-radius: var(--radius-sm);
    background: var(--slate-2);
}

/* ── PAGE CONTENT ────────────────────────────────────────────── */
.page-content { padding: 28px 28px 40px; }

.page-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    margin-bottom: 28px; flex-wrap: wrap; gap: 12px;
}
.page-title { font-size: 1.8rem; font-weight: 800; color: var(--navy-2); letter-spacing: -0.02em; }
.page-subtitle { font-size: .9rem; color: var(--text-3); margin-top: 4px; font-weight: 500; }
.badge-role {
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, var(--blue), var(--indigo));
    color: white; padding: 8px 16px; border-radius: 20px;
    font-size: .8rem; font-weight: 700; shadow: 0 4px 10px rgba(99,102,241,.3);
}

/* ── STAT CARDS ──────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--white); border-radius: 24px;
    padding: 24px; display: flex; align-items: center; gap: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03), 0 1px 2px rgba(0,0,0,0.01);
    position: relative; overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--slate-3);
}
.stat-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(43,87,167,0.08); border-color: var(--blue-lt); }
.stat-blue::before   { background: var(--blue-lt); }
.stat-indigo::before { background: var(--indigo); }
.stat-green::before  { background: var(--green); }
.stat-amber::before  { background: var(--amber); }
.stat-red::before    { background: var(--red); }
.stat-teal::before   { background: var(--teal); }

.stat-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; flex-shrink: 0;
}
.stat-blue   .stat-icon { background: #dbeafe; color: var(--blue-lt); }
.stat-indigo .stat-icon { background: #e0e7ff; color: var(--indigo); }
.stat-green  .stat-icon { background: #d1fae5; color: var(--green); }
.stat-amber  .stat-icon { background: #fef3c7; color: var(--amber); }
.stat-red    .stat-icon { background: #fee2e2; color: var(--red); }
.stat-teal   .stat-icon { background: #cffafe; color: var(--teal); }

.stat-number { font-size: 1.9rem; font-weight: 800; color: var(--navy-2); line-height: 1; }
.stat-label  { font-size: .75rem; color: var(--text-3); margin-top: 4px; font-weight: 500; }

/* ── CARDS ───────────────────────────────────────────────────── */
.card {
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden;
    border: 1px solid rgba(0,0,0,0.04);
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; border-bottom: 1px solid var(--slate-2);
}
.card-title { font-size: 1.1rem; font-weight: 700; color: var(--navy-2); display: flex; align-items: center; gap: 10px; }
.card-action { font-size: .78rem; color: var(--blue-lt); font-weight: 600; }
.card-action:hover { text-decoration: underline; }
.card-body { padding: 22px; }
.card-body.p-0 { padding: 0; }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 22px;
}

/* ── QUICK ACTIONS ───────────────────────────────────────────── */
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick-action-btn {
    display: flex; align-items: center; gap: 10px;
    padding: 14px; border-radius: var(--radius-sm);
    background: var(--slate-2); color: var(--text);
    font-size: .83rem; font-weight: 500;
    transition: var(--transition); border: 1px solid var(--slate-3);
}
.quick-action-btn i { font-size: 1.1rem; color: var(--blue-lt); }
.quick-action-btn:hover { background: var(--blue); color: white; border-color: var(--blue); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(59,130,246,.3); }
.quick-action-btn:hover i { color: white; }

/* ── NOTIFICATION LIST ───────────────────────────────────────── */
.notif-list { list-style: none; }
.notif-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 20px; border-bottom: 1px solid var(--slate-2);
    transition: var(--transition);
}
.notif-item:hover { background: var(--slate-2); }
.notif-item.unread { background: #eff6ff; }
.notif-icon {
    width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .85rem; flex-shrink: 0;
}
.notif-info       { background: #dbeafe; color: var(--blue-lt); }
.notif-aprobacion { background: #d1fae5; color: var(--green); }
.notif-rechazo    { background: #fee2e2; color: var(--red); }
.notif-alerta     { background: #fef3c7; color: var(--amber); }
.notif-incidencia { background: #fce7f3; color: #db2777; }
.notif-title { font-size: .82rem; font-weight: 500; color: var(--navy-2); }
.notif-time  { font-size: .72rem; color: var(--text-3); margin-top: 2px; }

/* ── FORMS ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
    display: flex; align-items: center; gap: 6px;
    font-size: .82rem; font-weight: 600; color: var(--navy-2);
    margin-bottom: 7px;
}
.form-label i { color: var(--blue-lt); font-size: .78rem; }

.form-control {
    width: 100%; padding: 12px 16px;
    border: 2px solid var(--slate-3); border-radius: var(--radius-sm);
    font-size: .95rem; font-family: inherit; color: var(--text);
    background: var(--slate-2); transition: var(--transition);
    outline: none; font-weight: 500;
}
.form-control:focus {
    border-color: var(--blue);
    background: var(--white);
    box-shadow: 0 4px 12px rgba(59,130,246,.15);
}
.form-control:hover { border-color: #94a3b8; }

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

.input-password-wrapper { position: relative; }
.input-password-wrapper .form-control { padding-right: 44px; }
.password-toggle {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: var(--text-3);
    font-size: .9rem; padding: 4px;
}
.password-toggle:hover { color: var(--blue-lt); }

.form-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border-radius: 12px;
    font-size: .95rem; font-weight: 700; font-family: inherit;
    cursor: pointer; border: none; transition: var(--transition);
    text-decoration: none; white-space: nowrap;
}
.btn-sm { padding: 8px 16px; font-size: .85rem; border-radius: 10px; }
.btn-block { width: 100%; }

.btn-primary { background: linear-gradient(135deg, var(--blue), var(--indigo)); color: white; box-shadow: 0 4px 12px rgba(43,87,167,.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(43,87,167,.4); opacity: 0.95; }

.btn-success { background: linear-gradient(135deg, var(--green), #059669); color: white; box-shadow: 0 4px 12px rgba(16,185,129,.3); }
.btn-success:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(16,185,129,.4); }

.btn-danger { background: linear-gradient(135deg, var(--red), #dc2626); color: white; box-shadow: 0 4px 12px rgba(239,68,68,.3); }
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(239,68,68,.4); }

.btn-warning { background: linear-gradient(135deg, var(--amber), #92400e); color: white; box-shadow: 0 4px 12px rgba(184,134,11,.3); }
.btn-warning:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(184,134,11,.4); }

.btn-outline {
    background: transparent; color: var(--blue);
    border: 2px solid var(--blue);
}
.btn-outline:hover { background: var(--blue); color: white; transform: translateY(-2px); }

.btn-secondary { background: var(--slate-3); color: var(--navy-2); }
.btn-secondary:hover { background: #cbd5e1; transform: translateY(-2px); }

.btn-login { padding: 13px 20px; font-size: .95rem; }

/* ── ALERTS ──────────────────────────────────────────────────── */
.alert {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 16px 20px; border-radius: var(--radius-sm);
    font-size: .9rem; font-weight: 600;
    border-left: 6px solid;
    position: relative; box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}
.alert-success { background: #d1fae5; color: #065f46; border-color: var(--green); }
.alert-error,
.alert-danger  { background: #fee2e2; color: #991b1b; border-color: var(--red); }
.alert-warning { background: #fef3c7; color: #92400e; border-color: var(--amber); }
.alert-info    { background: #dbeafe; color: #1e40af; border-color: var(--blue-lt); }

.alert-close {
    position: absolute; right: 12px; top: 10px;
    background: none; border: none; cursor: pointer;
    opacity: .6; font-size: .8rem; padding: 2px;
}
.alert-close:hover { opacity: 1; }

.flash-container { padding: 16px 28px 0; }
.mb-4 { margin-bottom: 18px; }

/* ── TABLE ───────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.data-table {
    width: 100%; border-collapse: collapse;
    font-size: .84rem; background: var(--white);
}
.data-table thead { background: linear-gradient(135deg, var(--navy-2), var(--navy-3)); }
.data-table thead th {
    padding: 13px 16px; text-align: left;
    color: rgba(255,255,255,.9); font-weight: 600; font-size: .78rem;
    text-transform: uppercase; letter-spacing: .03em; white-space: nowrap;
}
.data-table tbody tr { border-bottom: 1px solid var(--slate-2); transition: var(--transition); }
.data-table tbody tr:hover { background: var(--slate-2); }
.data-table tbody td { padding: 12px 16px; color: var(--text-2); vertical-align: middle; }
.data-table tbody tr:last-child { border-bottom: none; }

/* ── BADGES / STATUS ─────────────────────────────────────────── */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 20px;
    font-size: .72rem; font-weight: 700;
}
.badge-success  { background: #d1fae5; color: #065f46; }
.badge-danger   { background: #fee2e2; color: #991b1b; }
.badge-warning  { background: #fef3c7; color: #92400e; }
.badge-info     { background: #dbeafe; color: #1e40af; }
.badge-secondary{ background: var(--slate-3); color: var(--text-2); }
.badge-sm { background: var(--red); color: white; font-size: .65rem; padding: 1px 6px; border-radius: 10px; }

/* ── EMPTY STATE ─────────────────────────────────────────────── */
.empty-state {
    text-align: center; padding: 60px 20px; color: var(--text-3);
}
.empty-state i { font-size: 3rem; margin-bottom: 16px; display: block; }
.empty-state p { font-size: .9rem; }
.empty-state-sm {
    text-align: center; padding: 28px; color: var(--text-3); font-size: .85rem;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}

/* ── ACTION BAR ──────────────────────────────────────────────── */
.action-bar {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
}
.action-bar-left, .action-bar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ── FILTER BAR ──────────────────────────────────────────────── */
.filter-bar {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: var(--white); padding: 14px 20px;
    border-radius: var(--radius); box-shadow: var(--shadow);
    margin-bottom: 20px;
}
.filter-bar .form-control { width: auto; min-width: 160px; padding: 8px 12px; }

/* ── MODAL OVERLAY ───────────────────────────────────────────── */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(15,23,42,.6); z-index: 2000;
    align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow-md); width: 90%; max-width: 520px;
    max-height: 90vh; overflow-y: auto;
    animation: modalIn .25s cubic-bezier(.34,1.56,.64,1);
}
@keyframes modalIn { from { opacity:0; transform:scale(.9) translateY(20px); } to { opacity:1; transform:scale(1) translateY(0); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--slate-3); }
.modal-title  { font-size: 1rem; font-weight: 700; color: var(--navy-2); }
.modal-close  { background: none; border: none; cursor: pointer; font-size: 1rem; color: var(--text-3); padding: 4px 6px; border-radius: 6px; }
.modal-close:hover { background: var(--slate-2); }
.modal-body   { padding: 22px; }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 22px; border-top: 1px solid var(--slate-3); }

/* ── QR SCANNER ──────────────────────────────────────────────── */
.qr-container {
    max-width: 500px; margin: 0 auto; text-align: center;
}
.qr-preview {
    position: relative; border-radius: var(--radius); overflow: hidden;
    border: 3px solid var(--blue-lt); background: var(--navy);
    aspect-ratio: 1; margin: 16px 0;
}
.qr-result { padding: 16px; background: var(--slate-2); border-radius: var(--radius-sm); margin-top: 12px; }

/* ── SCHEDULE GRID ───────────────────────────────────────────── */
.schedule-grid { overflow-x: auto; }
.schedule-table { border-collapse: collapse; width: 100%; min-width: 600px; font-size: .82rem; }
.schedule-table th, .schedule-table td { padding: 10px 12px; border: 1px solid var(--slate-3); }
.schedule-table thead th { background: var(--navy-2); color: white; text-align: center; font-weight: 600; }
.schedule-table .time-col { background: var(--slate-2); font-weight: 600; color: var(--text-2); font-size: .75rem; text-align: center; }
.schedule-cell { background: var(--white); min-height: 52px; }
.schedule-cell.filled { background: linear-gradient(135deg, #e0f2fe, #dbeafe); border-left: 3px solid var(--blue-lt); }
.schedule-cell.recreo  { background: #fef9c3; text-align: center; }
.schedule-cell.almuerzo{ background: #dcfce7; text-align: center; }

/* ── AUTH PAGE ───────────────────────────────────────────────── */
.auth-body { background: var(--navy); min-height: 100vh; margin: 0; }

.auth-container { display: flex; min-height: 100vh; }

.auth-left {
    width: 420px; flex-shrink: 0; position: relative;
    background: linear-gradient(160deg, var(--navy) 0%, var(--blue) 50%, var(--navy) 100%);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.auth-left-bg {
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232b57a7' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.auth-left-content { position: relative; z-index: 1; padding: 48px 40px; text-align: center; }

.auth-crest { margin-bottom: 28px; display: flex; justify-content: center; }
.auth-logo-circle {
    width: 110px; height: 110px;
    background: var(--white);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    padding: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15), inset 0 2px 4px rgba(255,255,255,0.8);
    overflow: hidden;
    transition: var(--transition);
}
.auth-logo-circle:hover { transform: scale(1.05); box-shadow: 0 15px 35px rgba(0,0,0,0.3); }
.auth-logo { max-width: 100%; max-height: 100%; object-fit: contain; display: none; }
.auth-logo-fallback {
    font-size: 2.8rem; color: var(--navy);
    display: flex; align-items: center; justify-content: center;
}

.auth-school-name {
    font-size: 1.6rem; font-weight: 800; color: white;
    line-height: 1.2; margin-bottom: 8px;
}
.auth-school-sub { font-size: .9rem; color: rgba(255,255,255,.6); margin-bottom: 36px; }

.auth-features { text-align: left; }
.auth-feature-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 0; color: rgba(255,255,255,.75); font-size: .85rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.auth-feature-item i { color: var(--blue-lt); font-size: .9rem; width: 18px; }

.auth-right {
    flex: 1; background: var(--white);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 40px;
}
.auth-form-container { width: 100%; max-width: 400px; }

.auth-form-header { margin-bottom: 32px; }
.auth-form-header h2 { font-size: 1.8rem; font-weight: 800; color: var(--navy-2); }
.auth-form-header p  { color: var(--text-3); font-size: .9rem; margin-top: 6px; }

.auth-form { margin-bottom: 20px; }

.auth-help {
    display: flex; align-items: center; gap: 8px;
    color: var(--text-3); font-size: .8rem; margin-top: 20px;
    padding: 12px; background: var(--slate-2); border-radius: var(--radius-sm);
}



.auth-footer { margin-top: auto; font-size: .75rem; color: var(--text-3); text-align: center; padding-top: 32px; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .auth-left { width: 340px; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(calc(-100% - 20px)); top: 0; left: 0; height: 100vh; border-radius: 0; box-shadow: none; border-right: 1px solid rgba(0,0,0,0.1); border-left: none; border-top: none; }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.open { display: block; }
    .sidebar-toggle { display: flex; }
    .main-wrapper { margin-left: 0; padding: 0; }

    .auth-left { display: none; }
    .auth-right { padding: 28px 20px; }

    .stats-grid { grid-template-columns: 1fr 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .page-content { padding: 16px; }
    .form-row { grid-template-columns: 1fr; }
    .quick-actions { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .action-bar { flex-direction: column; align-items: stretch; }
}

/* ── UTILITIES ───────────────────────────────────────────────── */
.d-flex { display: flex; }
.gap-2  { gap: 8px; }
.gap-3  { gap: 12px; }
.mt-4   { margin-top: 20px; }
.mb-4   { margin-bottom: 20px; }
.text-center { text-align: center; }
.text-muted  { color: var(--text-3) !important; }
.fw-600      { font-weight: 600; }
.w-100       { width: 100%; }

/* ── DROPDOWNS ──────────────────────────────────────────────── */
.dropdown-menu {
    position: absolute;
    top: 100%;
    margin-top: 8px;
    background: white;
    min-width: 180px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--slate-3);
    z-index: 1000;
    display: none;
    overflow: hidden;
    animation: fadeIn .2s ease-out;
}
.dropdown-menu.show { display: block; }
.dropdown-menu a, .dropdown-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: .88rem;
    color: var(--text-2);
    font-weight: 500;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}
.dropdown-menu a:hover, .dropdown-menu button:hover {
    background: var(--slate);
    color: var(--blue);
}
.dropdown-divider {
    height: 1px;
    background: var(--slate-3);
    margin: 4px 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
