/* ============================================================
   Intranet Educativa - Estilos principales
   ============================================================ */

:root {
    --primary: #1a73e8;
    --primary-dark: #1456b8;
    --primary-light: #eaf1fe;
    --secondary: #5f6368;
    --success: #22a463;
    --warning: #f2a20c;
    --danger: #e5484d;
    --info: #3b82f6;
    --bg: #f2f5fb;
    --bg-card: #ffffff;
    --surface-2: #f6f8fc;
    --text: #1a1f2b;
    --text-light: #5b6472;
    --text-muted: #98a1b2;
    --border: #e5e9f1;
    --border-light: #eef1f7;
    --shadow: 0 1px 2px rgba(20,28,46,0.04), 0 1px 3px rgba(20,28,46,0.06);
    --shadow-md: 0 6px 16px -4px rgba(20,28,46,0.10), 0 2px 6px -2px rgba(20,28,46,0.06);
    --shadow-lg: 0 18px 42px -10px rgba(20,28,46,0.20);
    --radius: 14px;
    --radius-sm: 9px;
    --sidebar-width: 260px;
    --header-height: 62px;
    --transition: 0.18s ease;
    --font: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html { font-size: 14px; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ---- Layout ---- */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding-top: var(--header-height);
    min-height: 100vh;
}

.content-wrapper {
    padding: 26px;
    max-width: 1440px;
}

/* ---- Header ---- */
.app-header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background: rgba(255,255,255,0.85);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 26px;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

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

.page-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
}

/* ---- Notification Bell ---- */
.notification-bell {
    position: relative;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-light);
    background: none;
    border: none;
    padding: 8px;
    border-radius: 50%;
    transition: background var(--transition), color var(--transition);
}

.notification-bell:hover { background: var(--surface-2); color: var(--primary); }

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 0 0 2px var(--bg-card);
}

.notification-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 340px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 8px;
}

.notification-dropdown.show { display: block; }

.notif-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.notif-item {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition);
    cursor: pointer;
}

.notif-item:hover { background: var(--primary-light); }
.notif-item.unread { border-left: 3px solid var(--primary); }
.notif-item .notif-title { font-weight: 600; font-size: 0.85rem; }
.notif-item .notif-time { font-size: 0.75rem; color: var(--text-muted); }

/* ---- User Menu ---- */
.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px 4px 6px;
    border-radius: 99px;
    transition: background var(--transition);
}

.user-menu-btn:hover { background: var(--surface-2); }

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2a83f0, #1557b0);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    overflow: hidden;
    box-shadow: 0 2px 6px -1px rgba(26,115,232,.5);
}

.user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.user-menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    padding: 6px;
    margin-top: 8px;
}

.user-menu-dropdown.show { display: block; }

.user-menu-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    color: var(--text);
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.user-menu-dropdown a:hover {
    background: var(--surface-2);
    text-decoration: none;
}

/* ---- Sidebar ---- */
.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 150;
    transition: transform var(--transition);
    overflow-y: auto;
}

.sidebar-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: var(--header-height);
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    object-fit: contain;
    box-shadow: var(--shadow);
}

.sidebar-institution {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.2;
}

.sidebar-type {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.sidebar-nav {
    flex: 1;
    padding: 10px 0 16px;
}

.nav-section {
    padding: 15px 24px 6px;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 2px 12px;
    padding: 9px 12px;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: background var(--transition), color var(--transition);
}

.nav-item:hover {
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(26,115,232,.10);
}

.nav-item .nav-icon { font-size: 1.15rem; width: 20px; text-align: center; }

/* ---- Cards ---- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    margin-bottom: 18px;
}

a.card, a.stat-card { transition: transform var(--transition), box-shadow var(--transition); }
a.card:hover, a.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
}

.card-title {
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

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

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 20px 22px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform var(--transition), box-shadow var(--transition);
}

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

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    color: #fff;
    flex: none;
}

.stat-icon.blue   { background: linear-gradient(135deg,#2a83f0,#1557b0); box-shadow: 0 7px 16px -5px rgba(26,115,232,.55); }
.stat-icon.green  { background: linear-gradient(135deg,#2fb56e,#1c8a4e); box-shadow: 0 7px 16px -5px rgba(34,164,99,.5); }
.stat-icon.orange { background: linear-gradient(135deg,#f7bd45,#e08e00); color: #5a3d00; box-shadow: 0 7px 16px -5px rgba(242,162,12,.5); }
.stat-icon.red    { background: linear-gradient(135deg,#f2595d,#d13b40); box-shadow: 0 7px 16px -5px rgba(229,72,77,.5); }
.stat-icon.purple { background: linear-gradient(135deg,#9163f0,#6d28d9); box-shadow: 0 7px 16px -5px rgba(124,58,237,.5); }

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.05;
    color: var(--text);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.stat-label {
    font-size: 0.74rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.045em;
    font-weight: 600;
    margin-top: 3px;
}

/* ---- Tables ---- */
.table-wrapper { overflow-x: auto; }

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

table th, table td {
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
}

table th {
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface-2);
    white-space: nowrap;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

table tbody tr { transition: background var(--transition); }
table tr:hover { background: var(--surface-2); }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}

.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(26,115,232,.35); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; box-shadow: 0 4px 12px -3px rgba(26,115,232,.5); }

.btn-success { background: var(--success); color: #fff; box-shadow: 0 1px 2px rgba(34,164,99,.3); }
.btn-success:hover { background: #1c8a4e; color: #fff; }

.btn-danger { background: var(--danger); color: #fff; box-shadow: 0 1px 2px rgba(229,72,77,.3); }
.btn-danger:hover { background: #d13b40; color: #fff; }

.btn-secondary { background: var(--bg-card); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--text-muted); }

.btn-sm { padding: 5px 11px; font-size: 0.8rem; }
.btn-lg { padding: 12px 24px; font-size: 1rem; }

/* ---- Forms ---- */
.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-light);
}

.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: var(--font);
    transition: border-color var(--transition), box-shadow var(--transition);
    background: var(--bg-card);
    color: var(--text);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

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

select.form-control { cursor: pointer; }

/* ---- Badges ---- */
.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: #e3f6ec; color: #157a45; }
.badge-warning { background: #fdf1d8; color: #9a6800; }
.badge-danger  { background: #fde7e7; color: #c5292e; }
.badge-info    { background: #e8f0fe; color: var(--info); }

/* ---- Alerts ---- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.9rem;
    border: 1px solid transparent;
    border-left-width: 3px;
}

.alert-success { background: #e6f6ee; color: #12703f; border-color: #b9e6cd; border-left-color: var(--success); }
.alert-danger  { background: #fdeaea; color: #b32026; border-color: #f6c9c9; border-left-color: var(--danger); }
.alert-warning { background: #fdf3de; color: #8a5c00; border-color: #f7e0ac; border-left-color: var(--warning); }
.alert-info    { background: #e8f1fe; color: #1456b8; border-color: #cadefb; border-left-color: var(--primary); }

/* ---- Pagination ---- */
.pagination {
    display: flex;
    gap: 5px;
    list-style: none;
    margin-top: 18px;
}

.pagination a, .pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text);
    background: var(--bg-card);
    transition: all var(--transition);
}

.pagination a:hover { background: var(--primary-light); border-color: var(--primary); text-decoration: none; }
.pagination .active span { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---- Modal ---- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,22,38,0.5);
    backdrop-filter: blur(2px);
    z-index: 500;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show { display: flex; }

.modal {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 { font-size: 1.1rem; }

.modal-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
}

.modal-body { padding: 20px; }
.modal-footer { padding: 12px 20px; border-top: 1px solid var(--border-light); display: flex; justify-content: flex-end; gap: 8px; }

/* ---- Toggle Switch ---- */
.toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 22px;
    cursor: pointer;
    transition: background var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    top: 3px;
    left: 3px;
    transition: transform var(--transition);
}

.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ---- Grid Helpers ---- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* ---- Login Page ---- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 55%, #0e3d85 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 520px; height: 520px;
    top: -180px; right: -140px;
    background: radial-gradient(circle, rgba(255,255,255,0.14), transparent 70%);
    border-radius: 50%;
}

.login-card {
    background: var(--bg-card);
    border-radius: 18px;
    box-shadow: 0 24px 60px -12px rgba(9,30,66,0.4);
    padding: 42px 40px;
    width: 100%;
    max-width: 410px;
    text-align: center;
    position: relative;
}

.login-logo {
    width: 84px;
    height: 84px;
    border-radius: 18px;
    margin: 0 auto 18px;
    object-fit: contain;
    box-shadow: var(--shadow-md);
}

.login-title { font-size: 1.35rem; font-weight: 700; margin-bottom: 4px; letter-spacing: -0.01em; }
.login-subtitle { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 26px; }

.login-card .form-group { text-align: left; }
.login-card .btn { width: 100%; justify-content: center; padding: 11px; font-size: 1rem; margin-top: 4px; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .app-sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    .app-sidebar.open { transform: translateX(0); }
    .app-main { margin-left: 0; }
    .app-header { left: 0; }
    .btn-sidebar-toggle { display: block; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
    .content-wrapper { padding: 16px; }
    .notification-dropdown { width: 300px; right: -60px; }
}

/* ============================================================
   Extras: fecha/hora, botón de tema, mejoras visuales y MODO OSCURO
   ============================================================ */

/* Fondo con un leve resplandor (no plano) */
body {
    background-image: radial-gradient(1100px 480px at 100% -8%, rgba(26,115,232,0.06), transparent 60%);
    background-attachment: fixed;
}

/* Reloj en la cabecera */
.header-clock {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.12;
    padding-right: 6px;
    margin-right: 4px;
    border-right: 1px solid var(--border);
}
.header-clock .clock-time {
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.header-clock .clock-date {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: capitalize;
    font-weight: 500;
}

/* Botón de tema claro/oscuro */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 1.18rem;
    padding: 8px;
    border-radius: 50%;
    transition: background var(--transition), color var(--transition), transform var(--transition);
}
.theme-toggle:hover { background: var(--surface-2); color: var(--primary); }
.theme-toggle:active { transform: scale(0.92); }

@media (max-width: 768px) {
    .header-clock .clock-date { display: none; }
    .header-clock { border-right: none; padding-right: 0; }
}

/* ---- MODO OSCURO ---- */
:root[data-theme="dark"] {
    --primary: #4f8ef1;
    --primary-dark: #6ba2f5;
    --primary-light: #1b2b45;
    --secondary: #8b93a2;
    --success: #34c17b;
    --warning: #f0b24a;
    --danger: #f2686c;
    --info: #5b9bf5;
    --bg: #0e131b;
    --bg-card: #171f2b;
    --surface-2: #1e2734;
    --text: #e7ecf3;
    --text-light: #aeb9c8;
    --text-muted: #7d8798;
    --border: #29323f;
    --border-light: #222b38;
    --shadow: 0 1px 2px rgba(0,0,0,0.45), 0 1px 3px rgba(0,0,0,0.35);
    --shadow-md: 0 8px 20px -6px rgba(0,0,0,0.55);
    --shadow-lg: 0 22px 48px -12px rgba(0,0,0,0.7);
}

:root[data-theme="dark"] body {
    background-image: radial-gradient(1100px 480px at 100% -8%, rgba(79,142,241,0.10), transparent 60%);
}

/* Cabecera translúcida en oscuro (si no, saldría barra blanca) */
:root[data-theme="dark"] .app-header { background: rgba(23,31,43,0.82); }

/* Badges legibles en oscuro */
:root[data-theme="dark"] .badge-primary { background:#1b2b45; color:#88b4f8; }
:root[data-theme="dark"] .badge-success { background:#12301f; color:#4ecb8b; }
:root[data-theme="dark"] .badge-warning { background:#312611; color:#e6b45c; }
:root[data-theme="dark"] .badge-danger  { background:#331a1c; color:#f28b8e; }
:root[data-theme="dark"] .badge-info    { background:#16263c; color:#7fb0f7; }

/* Alertas en oscuro */
:root[data-theme="dark"] .alert-success { background:#12271b; color:#5ccf92; border-color:#1e4630; border-left-color:#34c17b; }
:root[data-theme="dark"] .alert-danger  { background:#2a1516; color:#f39699; border-color:#4a2224; border-left-color:#f2686c; }
:root[data-theme="dark"] .alert-warning { background:#2a2110; color:#e6b45c; border-color:#4a3a15; border-left-color:#f0b24a; }
:root[data-theme="dark"] .alert-info    { background:#132238; color:#88b4f8; border-color:#223b5e; border-left-color:#4f8ef1; }

/* En oscuro, atenúa un pelín el borde interno del nav activo */
:root[data-theme="dark"] .nav-item.active { box-shadow: inset 0 0 0 1px rgba(79,142,241,0.18); }

/* Transición suave al cambiar de tema */
body, .app-header, .app-sidebar, .card, .stat-card, .form-control, .btn, table th, .nav-item {
    transition: background-color var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
}

/* ---- Barra lateral azul (identidad) ---- */
.app-sidebar {
    background: linear-gradient(180deg, #1a3c73 0%, #12294f 100%);
    border-right: none;
    box-shadow: 2px 0 14px -6px rgba(9,22,45,0.35);
}
.app-sidebar .sidebar-header { border-bottom-color: rgba(255,255,255,0.10); }
.app-sidebar .sidebar-institution { color: #ffffff; }
.app-sidebar .sidebar-type { color: rgba(255,255,255,0.58); }
.app-sidebar .nav-section { color: rgba(255,255,255,0.42); }
.app-sidebar .nav-item { color: rgba(255,255,255,0.80); }
.app-sidebar .nav-item .nav-icon { color: rgba(255,255,255,0.72); }
.app-sidebar .nav-item:hover { background: rgba(255,255,255,0.09); color: #ffffff; }
.app-sidebar .nav-item:hover .nav-icon { color: #ffffff; }
.app-sidebar .nav-item.active {
    background: rgba(255,255,255,0.16);
    color: #ffffff;
    box-shadow: none;
    font-weight: 600;
}
.app-sidebar .nav-item.active .nav-icon { color: #ffffff; }
/* barra de scroll discreta dentro del sidebar */
.app-sidebar::-webkit-scrollbar { width: 8px; }
.app-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 8px; }

/* En modo oscuro, un azul aún más profundo */
:root[data-theme="dark"] .app-sidebar {
    background: linear-gradient(180deg, #132a4f 0%, #0d1e3b 100%);
}

/* ---- Campo de contraseña con ojito ---- */
.input-with-icon { position: relative; }
.input-with-icon .form-control { padding-right: 40px; }
.input-icon-btn {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.05rem;
    padding: 7px 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition), background var(--transition);
}
.input-icon-btn:hover { color: var(--primary); background: var(--surface-2); }
