:root{
  --primary:#2563eb;--primary-600:#1d4ed8;--navy:#0f2554;--navy-2:#081936;
  --ink:#17233d;--muted:#71809a;--line:#e6ebf3;--bg:#f5f7fb;--surface:#fff;
  --success:#16a36a;--warning:#f2a900;--danger:#e24d5b;--info:#159bd1;
  --sidebar-width:292px;--topbar-height:82px;--radius:16px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;min-height:100%;font-family:'Inter','Segoe UI',Arial,sans-serif;color:var(--ink);background:var(--bg);font-size:13px;overflow-x:hidden}
a{transition:all .18s ease}

/* SIDEBAR */
#sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar-width);height:100vh;z-index:1040;display:flex;flex-direction:column;color:#fff;background:linear-gradient(180deg,#112d66 0%,#0b204a 55%,#081733 100%);box-shadow:8px 0 30px rgba(15,37,84,.12);overflow:hidden}
#sidebar:before{content:"";position:absolute;width:330px;height:330px;right:-190px;top:-160px;border-radius:50%;background:rgba(70,130,240,.13)}
#sidebar:after{content:"";position:absolute;width:270px;height:200px;left:-170px;bottom:-100px;border-radius:50%;background:rgba(45,108,225,.12)}
.sidebar-header{position:relative;z-index:1;padding:22px 22px 18px;border-bottom:1px solid rgba(255,255,255,.07)}
.sidebar-brand{display:flex;align-items:center;gap:12px;color:#fff;text-decoration:none}
.brand-icon{width:52px;height:52px;flex:0 0 52px;border-radius:14px;display:grid;place-items:center;background:rgba(255,255,255,.06);overflow:hidden}
.brand-icon i{display:none}.brand-icon:before{content:"";display:block;width:100%;height:100%;background:url('../img/school-logo.png') center/contain no-repeat}
.brand-title{display:block;font-size:16px;font-weight:800;letter-spacing:.35px}.brand-subtitle{display:block;margin-top:4px;color:#a9bde1;font-size:10px}
.sidebar-menu{position:relative;z-index:1;flex:1;overflow-y:auto;padding:14px 14px 10px}.sidebar-menu::-webkit-scrollbar{width:4px}.sidebar-menu::-webkit-scrollbar-thumb{background:rgba(255,255,255,.16);border-radius:10px}
.nav-section-label{padding:15px 12px 7px;color:#82a8ec;font-size:9px;font-weight:800;letter-spacing:1.1px}.nav-list{list-style:none;padding:0;margin:0}.nav-item{margin:2px 0}
.nav-link{position:relative;display:flex;align-items:center;gap:12px;padding:11px 13px;border-radius:11px;color:rgba(255,255,255,.72);text-decoration:none;font-size:12px;font-weight:600}
.nav-link:hover{color:#fff;background:rgba(255,255,255,.07);transform:translateX(2px)}
.nav-link.active{color:#fff;background:linear-gradient(100deg,#2e78ee,#205fd5);box-shadow:0 8px 20px rgba(22,86,196,.26)}
.nav-link.active:after{content:"";position:absolute;right:10px;width:5px;height:5px;border-radius:50%;background:#fff}.nav-icon{width:20px;text-align:center;font-size:14px}
.sidebar-footer{position:relative;z-index:2;padding:12px;background:rgba(3,13,34,.22);border-top:1px solid rgba(255,255,255,.07)}
.sidebar-school-card{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid rgba(125,169,245,.12);border-radius:12px;background:rgba(35,83,158,.25)}
.sidebar-school-icon{width:34px;height:34px;flex:0 0 34px;display:grid;place-items:center;border-radius:10px;background:#2b78ea;color:#fff;font-size:14px}.sidebar-school-card strong{display:block;color:#fff;font-size:10px}.sidebar-school-card span{display:block;margin-top:3px;color:#9fb6df;font-size:8px}

/* TOPBAR */
#content-wrapper{margin-left:var(--sidebar-width);min-width:0;min-height:100vh}
.topbar{height:var(--topbar-height);position:sticky;top:0;z-index:900;display:flex;align-items:center;gap:24px;padding:0 30px;background:rgba(255,255,255,.94);border-bottom:1px solid var(--line);backdrop-filter:blur(14px)}
.topbar-left,.topbar-right{display:flex;align-items:center}.topbar-left{gap:13px}.menu-toggle{display:none;border:0;width:40px;height:40px;border-radius:10px;background:#edf4ff;color:var(--primary)}
.school-identity{display:flex;align-items:center;gap:10px;white-space:nowrap}.school-logo{width:42px;height:42px;display:grid;place-items:center;overflow:hidden}.school-logo img{width:100%;height:100%;object-fit:contain}.school-identity strong{display:block;color:#1b3d79;font-size:13px;font-weight:800}.school-identity span{display:block;color:#8390a8;font-size:9px;margin-top:3px}
.topbar-center{flex:1;display:flex;justify-content:center}.global-search{width:min(540px,100%);height:44px;display:flex;align-items:center;gap:10px;padding:0 14px;border:1px solid #e3eaf4;border-radius:12px;background:#f5f8fc;color:#8190aa}.global-search input{width:100%;border:0;outline:0;background:transparent;color:var(--ink);font-size:11px}.global-search input::placeholder{color:#99a5b8}
.topbar-right{gap:10px}.icon-button{position:relative;width:40px;height:40px;border:0;border-radius:10px;background:transparent;color:#657590}.icon-button:hover{background:#f1f4f9;color:var(--primary)}.notification-dot{position:absolute;top:8px;right:9px;width:6px;height:6px;border:1px solid #fff;border-radius:50%;background:#ed5361}.topbar-divider{width:1px;height:28px;background:var(--line)}
.profile-menu{position:relative;display:flex;align-items:center;gap:9px;padding:4px;cursor:pointer}.profile-avatar{width:40px;height:40px;display:grid;place-items:center;border-radius:50%;background:linear-gradient(135deg,#4b8bf6,#2563d6);color:#fff}.profile-text strong{display:block;font-size:11px}.profile-text span{display:block;margin-top:2px;color:#8a97ad;font-size:9px}.profile-chevron{margin-left:3px;color:#8491a8;font-size:9px}
.profile-dropdown{display:none;position:absolute;right:0;top:50px;width:180px;padding:7px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 18px 40px rgba(25,45,83,.15)}.profile-menu:hover .profile-dropdown{display:block}.profile-dropdown a{display:block;padding:10px;border-radius:8px;color:#51617c;text-decoration:none;font-size:11px}.profile-dropdown a:hover{background:#f3f6fa}.profile-dropdown a i{width:18px}.profile-dropdown .danger{color:var(--danger)}

/* PAGE */
.page-content{min-height:calc(100vh - var(--topbar-height));padding:28px 30px 44px}.page-content>.container-fluid{width:100%;max-width:1480px;margin:0 auto;padding:0}.page-title-row,.page-content>.container-fluid>.d-sm-flex.align-items-center.justify-content-between.mb-4{min-height:58px;margin-bottom:24px!important}
.page-title-row h1,.page-content>.container-fluid>.d-sm-flex.align-items-center.justify-content-between.mb-4 h1{margin:0;color:#1c3158;font-size:25px;font-weight:800;line-height:1.2}.page-title-row p{margin:5px 0 0;color:#8090aa;font-size:11px}.heading-icon{width:54px;height:54px;display:grid;place-items:center;border-radius:15px;background:#e9f1ff;color:var(--primary);font-size:20px}

/* CARDS */
.card{border:1px solid #e5eaf2;border-radius:var(--radius);background:#fff;box-shadow:0 6px 24px rgba(29,51,89,.055);overflow:hidden;transition:box-shadow .2s,transform .2s}.card:hover{box-shadow:0 10px 30px rgba(29,51,89,.08)}
.card-header{min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 19px;background:#fff;border-bottom:1px solid #edf1f6;border-radius:var(--radius) var(--radius) 0 0!important}.card-header h5,.card-header h6{margin:0!important;color:#263858;font-weight:800}.card-body{padding:20px}.page-content .shadow,.page-content .shadow-sm{box-shadow:0 6px 24px rgba(29,51,89,.055)!important}

/* BUTTONS */
.btn{min-height:40px;display:inline-flex;align-items:center;justify-content:center;gap:7px;border-radius:10px;font-size:11px;font-weight:700;padding:9px 14px;white-space:nowrap}.btn i{margin:0!important}.btn-primary{border:0;background:linear-gradient(100deg,#347cf1,#245ed5);box-shadow:0 6px 16px rgba(47,115,232,.2)}.btn-primary:hover{background:linear-gradient(100deg,#2b70e5,#1d55c5);transform:translateY(-1px)}.btn-secondary{border:0;background:#eef2f7;color:#52627c}.btn-secondary:hover{background:#e2e8f0;color:#263858}.btn-warning{border:0;color:#5b4200;background:#ffc928}.btn-danger{border:0;background:#e95361}.btn-success{border:0;background:#19aa73}.btn-outline-primary{border-color:#cbdcf9;color:#2468db}.btn-group{display:inline-flex;gap:6px}.btn-group>.btn{border-radius:9px!important}

/* FORMS */
.form-label{margin-bottom:7px;color:#4c5c77;font-size:11px;font-weight:700}.form-control,.form-select{min-height:42px;border:1px solid #dce4ef;border-radius:10px;background:#fff;padding:9px 12px;color:#263858;font-size:12px}.form-control::placeholder{color:#9aa7b9}.form-control:focus,.form-select:focus{border-color:#6d9ff4;box-shadow:0 0 0 4px rgba(47,115,232,.09)}textarea.form-control{min-height:100px;resize:vertical}.form-check-input:checked{background-color:var(--primary);border-color:var(--primary)}
.form-profesional .nav-tabs{gap:5px;border-bottom:1px solid #e6ebf3;margin-bottom:20px}.form-profesional .nav-tabs .nav-link{border:0;border-radius:10px;color:#667792;font-size:11px;padding:10px 14px;background:transparent}.form-profesional .nav-tabs .nav-link:hover{color:var(--primary);background:#f2f6fc}.form-profesional .nav-tabs .nav-link.active{color:var(--primary);background:#eaf2ff;font-weight:800}

/* TABLES */
.table-responsive{border:1px solid #e9eef5;border-radius:12px;overflow:auto}.table{margin-bottom:0;vertical-align:middle}.table>thead>tr>th{background:#f5f7fb;color:#53647f;border:0;padding:13px 14px;font-size:10px;font-weight:800;letter-spacing:.35px;white-space:nowrap}.table>tbody>tr>td{padding:13px 14px;color:#34435f;border-color:#edf1f6;font-size:11px;vertical-align:middle}.table>tbody>tr:hover{background:#f9fbff}.table tbody tr:last-child td{border-bottom:0}.badge{border-radius:8px;padding:6px 9px;font-size:10px}

/* FILTER / TOOLBAR */
.user-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:9px;margin-bottom:18px}.user-search{width:360px;height:42px;display:flex;align-items:center;gap:9px;padding:0 13px;border:1px solid #dce4ef;border-radius:11px;background:#fff;color:#7890b0}.user-search input{width:100%;border:0;outline:0;font-size:11px}.user-filter{height:42px;border:1px solid #dce4ef;border-radius:11px;background:#fff;color:#56708f;font-size:11px;font-weight:700;padding:0 13px}.user-filter-panel{display:none;position:absolute;right:0;top:49px;z-index:20;padding:12px;background:#fff;border:1px solid #e2e8f2;border-radius:12px;box-shadow:0 15px 35px rgba(31,51,89,.12)}.user-filter-panel select{min-width:150px}
.management-summary{padding:0 0 16px}.summary-item{display:flex;align-items:center;gap:10px}.summary-item small{display:block;color:#8391a8;font-size:9px}.summary-item strong{display:block;margin-top:2px;color:#23385e;font-size:15px}.summary-icon{width:40px;height:40px;border-radius:11px;display:grid;place-items:center}.summary-icon.blue{background:#eaf2ff;color:#347cf1}.summary-icon.green{background:#e7f8f0;color:#20a974}.summary-separator{width:1px;height:28px;background:#e7edf5}.secure-note{padding:9px 12px;border-radius:9px;background:#f5faf8;color:#6f7f99;font-size:10px}.secure-note i{color:#20b77a;margin-right:5px}

/* DASHBOARD */
.dashboard-stats{row-gap:18px}.dashboard-stats .card{height:100%;min-height:118px}.stat-card .card-body{padding:18px 20px}.stat-card .text-xs{font-size:9px;letter-spacing:.55px}.stat-card .h5{margin-top:5px;font-size:24px;color:#1d3154}.stat-icon{width:44px;height:44px;border-radius:13px;display:grid;place-items:center;background:#f0f5fd}.dashboard-chart,.dashboard-activity{height:100%}.dashboard-chart .card-body{min-height:280px}.dashboard-activity .card-body{max-height:320px;overflow:auto}.list-group-item{padding:12px 0;background:transparent;border-color:#edf1f7;font-size:11px}
.border-left-primary,.border-left-success,.border-left-info,.border-left-warning,.border-left-danger,.border-left-secondary{border-left-width:4px!important;border-top:0!important;border-right:0!important;border-bottom:0!important}.border-left-primary{border-left-color:#347cf1!important}.border-left-success{border-left-color:#20b77a!important}.border-left-info{border-left-color:#36a4e8!important}.border-left-warning{border-left-color:#f7b928!important}.border-left-danger{border-left-color:#ed5361!important}.border-left-secondary{border-left-color:#8b97ab!important}
.text-gray-800{color:#24334f!important}.text-gray-300{color:#b7c2d5!important}.text-primary{color:var(--primary)!important}.text-xs{font-size:9px;letter-spacing:.5px}

/* DATATABLES */
.dataTables_wrapper{padding-top:3px}.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter{font-size:10px;color:#6f7f99;margin-bottom:14px}.dataTables_wrapper .dataTables_filter input,.dataTables_wrapper .dataTables_length select{border:1px solid #dce4ef!important;border-radius:9px!important;padding:7px 10px!important;outline:0;margin-left:6px}.dataTables_wrapper .dataTables_info{padding-top:14px;color:#8190a9;font-size:10px}.dataTables_wrapper .dataTables_paginate{padding-top:9px}.dataTables_wrapper .page-link{border:0!important;border-radius:8px!important;margin:0 2px;color:#657590;font-size:10px}.dataTables_wrapper .page-item.active .page-link{background:#347cf1!important;color:#fff}.dataTables_wrapper .page-item.disabled .page-link{background:#f1f4f8}.dataTables_wrapper .dataTables_processing{border:0!important;border-radius:10px;box-shadow:0 10px 25px rgba(30,50,90,.12)}

/* ALERTS */
.modern-alert{border:0;border-radius:11px;box-shadow:0 7px 22px rgba(40,65,110,.07);font-size:11px;margin-bottom:20px}.alert{border-radius:11px}

/* USER MANAGEMENT */
.user-management-card{border-radius:16px}.user-management-card .card-body{padding:18px}.row-number{display:inline-grid;place-items:center;width:26px;height:26px;border-radius:8px;background:#f1f4f9;color:#4d6284;font-weight:700}.username-cell{display:flex;align-items:center;gap:8px;font-weight:600;color:#405371}.mini-avatar{width:28px;height:28px;display:grid;place-items:center;border-radius:8px;background:#edf3ff;color:#3978e8;font-size:10px}.name-cell{font-size:11px;color:#334563}.role-badge,.status-badge{display:inline-flex;align-items:center;gap:6px;border-radius:8px;padding:6px 9px;font-size:9px;font-weight:700}.role-badge{background:#e9f2ff;color:#2770e8}.status-badge.active{background:#e5f8ef;color:#1ca86f}.status-badge.inactive{background:#f0f2f5;color:#78859a}.status-badge span{width:7px;height:7px;border-radius:50%;background:currentColor}.date-cell{display:flex;align-items:center;gap:7px;color:#61728e;font-size:10px}.date-cell>i{color:#7d8ca5}.date-cell small{display:block;color:#9aa6b8;font-size:9px;margin-top:2px}.action-buttons{display:flex;gap:5px}.action-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:0;border-radius:8px;padding:8px 10px;text-decoration:none;font-size:9px;font-weight:700}.action-btn.edit{background:#ffc82b;color:#594300}.action-btn.delete{background:#ed5361;color:#fff}.action-btn:hover{transform:translateY(-1px);filter:brightness(.98)}

/* MISC PAGES */
.page-content .row{--bs-gutter-x:1.25rem;--bs-gutter-y:1.25rem}.page-content .table-responsive+.mt-3{margin-top:16px!important}.page-content hr{border-color:#e9eef5;opacity:1}.page-content .small,.page-content small{font-size:10px}.page-content .text-muted{color:#8190a8!important}

/* MOBILE */
#sidebar-overlay{display:none;position:fixed;inset:0;z-index:1030;background:rgba(7,20,49,.48);backdrop-filter:blur(3px)}
@media(max-width:1200px){:root{--sidebar-width:270px}.topbar{padding:0 22px}.page-content{padding:24px}.topbar-center{display:none}}
@media(max-width:768px){:root{--topbar-height:68px}#sidebar{left:calc(-1 * var(--sidebar-width));transition:left .25s ease}#sidebar.active{left:0}#content-wrapper{margin-left:0}.topbar{height:68px;padding:0 15px}.menu-toggle{display:grid;place-items:center}.school-identity span{display:none}.school-identity strong{font-size:12px}.school-logo{width:36px;height:36px}.topbar-left{flex:1}.profile-text,.profile-chevron{display:none}.page-content{min-height:calc(100vh - 68px);padding:20px 14px 34px}.page-title-row,.page-content>.container-fluid>.d-sm-flex.align-items-center.justify-content-between.mb-4{align-items:flex-start!important}.page-title-row h1,.page-content>.container-fluid>.d-sm-flex.align-items-center.justify-content-between.mb-4 h1{font-size:21px}.page-title-row .btn,.page-content>.container-fluid>.d-sm-flex.align-items-center.justify-content-between.mb-4 .btn{margin-top:8px}.topbar-right{gap:4px}.topbar-divider{display:none}#sidebar-overlay.active{display:block}.user-toolbar{justify-content:stretch}.user-search{width:100%}.user-filter-wrap{flex:0 0 auto}}
@media(max-width:576px){.page-content{padding:16px 12px 28px}.heading-icon{width:46px;height:46px;border-radius:12px;font-size:17px}.page-title-row,.page-content>.container-fluid>.d-sm-flex.align-items-center.justify-content-between.mb-4{min-height:auto;margin-bottom:18px!important}.page-content .card-header{padding:14px 15px}.page-content .card-body{padding:16px}.page-content .btn{min-height:38px;padding:8px 11px}.page-content .table{min-width:680px}.action-btn span{display:none}.action-btn{width:32px;height:32px;padding:0}.summary-separator{display:none}.secure-note{width:100%}.management-summary{align-items:flex-start!important}}
@media print{#sidebar,.topbar,.btn,.no-print{display:none!important}#content-wrapper{margin-left:0!important}.page-content{padding:0}body{background:#fff}.card{box-shadow:none;border:1px solid #ddd}}
