:root{
    --primary:#2563eb;
    --primary2:#06b6d4;
    --dark:#0f172a;
    --sidebar:#0b1220;
    --sidebar2:#111c33;
    --text:#111827;
    --muted:#64748b;
    --bg:#f3f6fb;
    --card:#ffffff;
    --border:#e5e7eb;
    --radius:18px;
    --shadow:0 18px 45px rgba(15,23,42,.08);
}

*{box-sizing:border-box}

body{
    margin:0;
    font-family:Inter,"Segoe UI",Arial,sans-serif;
    background:
        radial-gradient(circle at top right,rgba(37,99,235,.08),transparent 28%),
        linear-gradient(180deg,#f8fbff,#eef3f9);
    color:var(--text);
}

.navbar{
    height:74px;
    background:rgba(255,255,255,.88)!important;
    backdrop-filter:blur(16px);
    border-bottom:1px solid rgba(226,232,240,.85);
    box-shadow:0 8px 30px rgba(15,23,42,.04)!important;
    color:#0f172a!important;
    position:sticky;
    top:0;
    z-index:50;
}

.navbar .navbar-brand{
    color:#0f172a!important;
    font-size:18px;
    letter-spacing:-.3px;
}

.brand-icon{
    width:42px;
    height:42px;
    border-radius:14px;
    background:linear-gradient(135deg,#2563eb,#06b6d4);
    color:#fff;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    box-shadow:0 12px 24px rgba(37,99,235,.28);
}

.year-select{
    min-width:190px;
    border-radius:14px;
    border:1px solid #dbe4f0;
    padding:9px 38px 9px 14px;
    font-weight:700;
    color:#0f172a;
    box-shadow:0 10px 25px rgba(15,23,42,.05);
}

.user-box{
    padding:7px 12px;
    border-radius:16px;
    background:#f1f5f9;
    border:1px solid #e2e8f0;
}

.user-avatar{
    width:38px;
    height:38px;
    border-radius:14px;
    background:linear-gradient(135deg,#2563eb,#06b6d4);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:900;
    margin-right:10px;
}

.user-name{
    color:#0f172a;
    font-size:13px;
    font-weight:800;
    line-height:1.1;
}

.user-role{
    color:#64748b;
    font-size:11px;
    font-weight:600;
}

.logout-btn{
    border-radius:14px;
    font-weight:800;
    padding:9px 14px;
    border:1px solid #e2e8f0;
    background:#fff;
    color:#0f172a;
}

.app{
    display:grid;
    grid-template-columns:250px 1fr;
    min-height:calc(100vh - 74px);
}

.sidebar{
    background:
        linear-gradient(180deg,rgba(17,28,51,.98),rgba(11,18,32,.98)),
        radial-gradient(circle at top,rgba(37,99,235,.35),transparent 35%);
    border-right:1px solid rgba(255,255,255,.08);
    padding:22px 14px;
    position:sticky;
    top:74px;
    height:calc(100vh - 74px);
    overflow-y:auto;
    box-shadow:18px 0 40px rgba(15,23,42,.10);
}

.sidebar:before{
    content:"MENU";
    display:block;
    color:#94a3b8;
    font-size:11px;
    font-weight:900;
    letter-spacing:1.8px;
    margin:4px 12px 14px;
}

.sidebar a{
    display:flex;
    align-items:center;
    gap:11px;
    color:#cbd5e1;
    padding:11px 12px;
    margin-bottom:5px;
    border-radius:14px;
    font-size:13px;
    font-weight:700;
    transition:.18s ease;
    text-decoration:none;
    border:1px solid transparent;
}

.sidebar a i{
    width:20px;
    height:20px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:14px;
    color:#93c5fd;
}

.sidebar a:hover{
    background:rgba(255,255,255,.08);
    color:#fff;
    border-color:rgba(255,255,255,.08);
    transform:translateX(3px);
}

.sidebar a.active{
    color:#fff;
    background:linear-gradient(135deg,#2563eb,#06b6d4);
    box-shadow:0 14px 28px rgba(37,99,235,.28);
}

.sidebar a.active i{
    color:#fff;
}

.content{
    padding:34px;
}

.content h1,
.content h2,
.page-title{
    font-size:34px;
    font-weight:900;
    letter-spacing:-1px;
    color:#0f172a;
    margin-bottom:26px;
}

.card{
    border:1px solid rgba(226,232,240,.85);
    border-radius:22px;
    background:rgba(255,255,255,.92);
    box-shadow:var(--shadow);
    overflow:hidden;
}

.card-body{
    padding:24px;
}

.stat-card{
    position:relative;
    min-height:145px;
    padding:24px;
    border-radius:24px;
    background:
        linear-gradient(145deg,#fff,#f8fbff);
    border:1px solid rgba(226,232,240,.9);
    box-shadow:var(--shadow);
    overflow:hidden;
}

.stat-card:after{
    content:"";
    position:absolute;
    right:-34px;
    bottom:-42px;
    width:140px;
    height:140px;
    border-radius:50%;
    background:linear-gradient(135deg,rgba(37,99,235,.15),rgba(6,182,212,.12));
}

.stat-card .label{
    color:#64748b;
    font-size:13px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.5px;
    margin-bottom:10px;
}

.stat-card .number{
    font-size:42px;
    line-height:1;
    font-weight:950;
    color:#0f172a;
}

.stat-card .icon{
    position:absolute;
    right:20px;
    top:20px;
    z-index:2;
    width:54px;
    height:54px;
    border-radius:18px;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    font-size:24px;
    background:linear-gradient(135deg,#2563eb,#06b6d4);
    box-shadow:0 14px 28px rgba(37,99,235,.25);
}

.stat-card.success .icon{background:linear-gradient(135deg,#16a34a,#22c55e)}
.stat-card.warning .icon{background:linear-gradient(135deg,#f59e0b,#f97316)}
.stat-card.danger .icon{background:linear-gradient(135deg,#dc2626,#f43f5e)}

.table{
    margin-bottom:0;
}

.table thead th{
    background:#f8fafc;
    color:#334155;
    font-size:13px;
    text-transform:uppercase;
    letter-spacing:.4px;
    font-weight:900;
    border-bottom:1px solid #e2e8f0;
    padding:15px;
}

.table tbody td{
    padding:15px;
    vertical-align:middle;
    border-color:#eef2f7;
    color:#334155;
}

.table tbody tr:hover{
    background:#f8fbff;
}

.btn{
    border-radius:14px;
    font-weight:800;
    padding:9px 15px;
}

.btn-primary{
    background:linear-gradient(135deg,#2563eb,#06b6d4);
    border:0;
    box-shadow:0 12px 24px rgba(37,99,235,.25);
}

.btn-success{
    background:linear-gradient(135deg,#16a34a,#22c55e);
    border:0;
}

.btn-danger{
    background:linear-gradient(135deg,#dc2626,#f43f5e);
    border:0;
}

.form-control,
.form-select{
    border-radius:14px;
    border:1px solid #dbe4f0;
    padding:11px 14px;
}

.form-control:focus,
.form-select:focus{
    border-color:#60a5fa;
    box-shadow:0 0 0 4px rgba(37,99,235,.12);
}

.badge{
    border-radius:999px;
    padding:8px 11px;
    font-weight:800;
}

.login-page{
    min-height:100vh;
    display:flex;
    align-items:center;
    background:
        radial-gradient(circle at top left,rgba(6,182,212,.35),transparent 35%),
        radial-gradient(circle at bottom right,rgba(37,99,235,.38),transparent 35%),
        linear-gradient(135deg,#0f172a,#172554);
}

.login-card{
    border-radius:30px;
    border:1px solid rgba(255,255,255,.18);
    box-shadow:0 35px 90px rgba(0,0,0,.32);
}

.login-logo{
    width:78px;
    height:78px;
    border-radius:26px;
    background:linear-gradient(135deg,#2563eb,#06b6d4);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:34px;
    margin:0 auto 18px;
    box-shadow:0 20px 45px rgba(37,99,235,.35);
}

footer{
    margin-top:34px;
    color:#64748b;
    font-size:13px;
}

@media(max-width:992px){
    .app{
        grid-template-columns:1fr;
    }

    .sidebar{
        position:relative;
        top:0;
        height:auto;
        display:flex;
        overflow-x:auto;
        padding:12px;
    }

    .sidebar:before{
        display:none;
    }

    .sidebar a{
        white-space:nowrap;
        margin-right:8px;
    }

    .content{
        padding:22px;
    }
}