/* =====================================================================
   SIM ASET PDAM - MAIN STYLESHEET
   ===================================================================== */
:root{
    --pdam-blue:#0b5ed7;
    --pdam-blue-dark:#0a3d91;
    --pdam-blue-darker:#082c69;
    --pdam-cyan:#12b7d4;
    --sidebar-w:265px;
    --topbar-h:64px;
    --text-muted-2:#8a94a6;
    --card-radius:14px;
}

*{box-sizing:border-box;}
body{
    background:#f3f5fa;
    font-family:'Segoe UI',-apple-system,BlinkMacSystemFont,Roboto,Arial,sans-serif;
    color:#2a2f3a;
}
a{text-decoration:none;}

/* ---------------- SIDEBAR ---------------- */
.sidebar{
    position:fixed;
    top:0; left:0; bottom:0;
    width:var(--sidebar-w);
    background:linear-gradient(180deg,var(--pdam-blue-darker) 0%,var(--pdam-blue-dark) 55%,var(--pdam-blue) 100%);
    color:#eaf1ff;
    overflow-y:auto;
    z-index:1030;
    transition:transform .25s ease;
    scrollbar-width:thin;
    scrollbar-color:rgba(255,255,255,.25) transparent;
}
.sidebar::-webkit-scrollbar{width:6px;}
.sidebar::-webkit-scrollbar-thumb{background:rgba(255,255,255,.25);border-radius:6px;}

.sidebar-brand{
    display:flex;
    align-items:center;
    gap:12px;
    padding:18px 20px;
    border-bottom:1px solid rgba(255,255,255,.12);
}
.sidebar-brand .brand-icon{
    width:42px;height:42px;border-radius:12px;
    background:rgba(255,255,255,.14);
    display:flex;align-items:center;justify-content:center;
    font-size:20px;flex-shrink:0;
}
.sidebar-brand .brand-text b{font-size:15.5px;line-height:1.15;display:block;}
.sidebar-brand .brand-text small{font-size:11px;opacity:.75;display:block;}

.sidebar-user{
    display:flex;align-items:center;gap:10px;
    padding:14px 18px;margin:10px 14px 6px;
    background:rgba(255,255,255,.08);
    border-radius:12px;
}
.sidebar-user .avatar{
    width:38px;height:38px;border-radius:50%;
    background:rgba(255,255,255,.2);
    display:flex;align-items:center;justify-content:center;
    font-weight:600;font-size:14px;flex-shrink:0;
}
.sidebar-user .u-name{font-size:13.5px;font-weight:600;line-height:1.2;}
.sidebar-user .u-role{font-size:11px;opacity:.75;}

.sidebar-nav{padding:8px 12px 30px;}
.nav-section-label{
    font-size:10.5px;letter-spacing:.08em;
    text-transform:uppercase;
    color:rgba(255,255,255,.45);
    padding:14px 12px 6px;
    font-weight:700;
}
.sidebar-nav .nav-link{
    display:flex;align-items:center;gap:11px;
    color:rgba(255,255,255,.85);
    padding:10px 12px;
    border-radius:10px;
    font-size:13.8px;
    font-weight:500;
    margin-bottom:2px;
    position:relative;
}
.sidebar-nav .nav-link .bi{font-size:16px;width:20px;text-align:center;flex-shrink:0;}
.sidebar-nav .nav-link:hover{background:rgba(255,255,255,.10);color:#fff;}
.sidebar-nav .nav-link.active{
    background:rgba(255,255,255,.16);
    color:#fff;
    box-shadow:inset 3px 0 0 #6fe3ff;
}
.sidebar-nav .nav-link .chevron{
    margin-left:auto;font-size:11px;
    transition:transform .2s ease;
}
.sidebar-nav .nav-link[aria-expanded="true"] .chevron{transform:rotate(90deg);}

.sidebar-submenu{padding-left:14px;}
.sidebar-submenu .nav-link{
    font-size:13px;padding:8px 12px 8px 30px;
    color:rgba(255,255,255,.7);
}
.sidebar-submenu .nav-link::before{
    content:"";position:absolute;left:16px;
    width:5px;height:5px;border-radius:50%;
    background:rgba(255,255,255,.4);
}
.sidebar-submenu .nav-link.active{
    background:rgba(255,255,255,.14);color:#fff;
    box-shadow:none;
}
.sidebar-submenu .nav-link.active::before{background:#6fe3ff;}

/* ---------------- TOPBAR ---------------- */
.topbar{
    position:fixed;top:0;right:0;left:var(--sidebar-w);
    height:var(--topbar-h);
    background:#fff;
    display:flex;align-items:center;justify-content:space-between;
    padding:0 22px;
    box-shadow:0 2px 10px rgba(20,30,60,.05);
    z-index:1020;
    transition:left .25s ease;
}
.topbar .btn-toggle{
    border:none;background:#f1f3f8;width:38px;height:38px;border-radius:10px;
    display:flex;align-items:center;justify-content:center;font-size:17px;color:#33415c;
}
.topbar .breadcrumb-wrap b{font-size:15px;color:#1c2434;}
.topbar .breadcrumb-wrap .text-path{font-size:12px;color:var(--text-muted-2);}
.topbar-right{display:flex;align-items:center;gap:16px;}
.topbar-right .icon-btn{
    width:38px;height:38px;border-radius:10px;background:#f1f3f8;
    display:flex;align-items:center;justify-content:center;color:#33415c;position:relative;font-size:16px;
}
.topbar-right .icon-btn .dot{
    position:absolute;top:6px;right:6px;width:8px;height:8px;border-radius:50%;
    background:#ff5a5f;border:2px solid #fff;
}
.topbar-user{display:flex;align-items:center;gap:10px;cursor:pointer;}
.topbar-user .avatar-sm{
    width:36px;height:36px;border-radius:50%;
    background:linear-gradient(135deg,var(--pdam-blue),var(--pdam-cyan));
    color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;
}
.topbar-user .u-name{font-size:13px;font-weight:600;color:#1c2434;line-height:1.15;}
.topbar-user .u-role{font-size:11px;color:var(--text-muted-2);}

/* ---------------- CONTENT ---------------- */
.content-wrap{
    margin-left:var(--sidebar-w);
    padding:calc(var(--topbar-h) + 22px) 24px 40px;
    min-height:100vh;
    transition:margin-left .25s ease;
}

body.sidebar-collapsed .sidebar{transform:translateX(-100%);}
body.sidebar-collapsed .topbar{left:0;}
body.sidebar-collapsed .content-wrap{margin-left:0;}

@media (max-width:991.98px){
    .sidebar{transform:translateX(-100%);}
    .topbar{left:0;}
    .content-wrap{margin-left:0;}
    body.sidebar-collapsed .sidebar{transform:translateX(0);}
}

/* ---------------- CARDS / STAT WIDGETS ---------------- */
.stat-card{
    background:#fff;border-radius:var(--card-radius);
    padding:20px;box-shadow:0 4px 18px rgba(20,30,60,.06);
    border:1px solid #eef0f5;
    height:100%;
}
.stat-card .stat-icon{
    width:46px;height:46px;border-radius:12px;
    display:flex;align-items:center;justify-content:center;
    font-size:20px;color:#fff;margin-bottom:14px;
}
.stat-card .stat-value{font-size:24px;font-weight:700;color:#1c2434;line-height:1.1;}
.stat-card .stat-label{font-size:12.5px;color:var(--text-muted-2);margin-top:3px;}
.stat-card .stat-trend{font-size:12px;font-weight:600;margin-top:10px;display:inline-flex;align-items:center;gap:4px;}

.bg-grad-blue{background:linear-gradient(135deg,#0b5ed7,#3b8dfa);}
.bg-grad-cyan{background:linear-gradient(135deg,#0fb7c9,#4fd8e8);}
.bg-grad-orange{background:linear-gradient(135deg,#f5943a,#ffb56b);}
.bg-grad-green{background:linear-gradient(135deg,#17a673,#3fd39b);}
.bg-grad-red{background:linear-gradient(135deg,#e0533f,#f27b62);}
.bg-grad-purple{background:linear-gradient(135deg,#7b57e0,#a58af0);}

.panel{
    background:#fff;border-radius:var(--card-radius);
    box-shadow:0 4px 18px rgba(20,30,60,.06);
    border:1px solid #eef0f5;
    padding:20px 22px;
}
.panel-title{font-size:15px;font-weight:700;color:#1c2434;margin-bottom:2px;}
.panel-sub{font-size:12px;color:var(--text-muted-2);margin-bottom:16px;}

/* ---------------- BADGES ---------------- */
.badge-soft-success{background:#e6f7ef;color:#17a673;padding:5px 10px;border-radius:7px;font-weight:600;font-size:11.5px;}
.badge-soft-warning{background:#fff4e2;color:#c8791b;padding:5px 10px;border-radius:7px;font-weight:600;font-size:11.5px;}
.badge-soft-danger{background:#fdeaea;color:#d0392a;padding:5px 10px;border-radius:7px;font-weight:600;font-size:11.5px;}
.badge-soft-info{background:#e5f4fb;color:#1584b8;padding:5px 10px;border-radius:7px;font-weight:600;font-size:11.5px;}
.badge-soft-primary{background:#e8effd;color:#0b5ed7;padding:5px 10px;border-radius:7px;font-weight:600;font-size:11.5px;}
.badge-soft-secondary{background:#eef0f5;color:#5c6579;padding:5px 10px;border-radius:7px;font-weight:600;font-size:11.5px;}
.badge-soft-dark{background:#e6e8ec;color:#2a2f3a;padding:5px 10px;border-radius:7px;font-weight:600;font-size:11.5px;}

/* ---------------- TABLE ---------------- */
.table-clean thead th{
    font-size:11.5px;text-transform:uppercase;letter-spacing:.04em;
    color:var(--text-muted-2);border-bottom:1px solid #eef0f5;
    font-weight:700;padding:10px 12px;background:#fafbfd;
}
.table-clean tbody td{padding:12px;font-size:13.5px;vertical-align:middle;border-bottom:1px solid #f2f3f7;}
.table-clean tbody tr:hover{background:#f9fbff;}

/* ---------------- MISC ---------------- */
.page-placeholder{
    text-align:center;padding:70px 20px;
    background:#fff;border-radius:var(--card-radius);
    border:1px dashed #d7dceb;
}
.page-placeholder .ph-icon{
    width:74px;height:74px;border-radius:20px;
    background:linear-gradient(135deg,var(--pdam-blue),var(--pdam-cyan));
    color:#fff;font-size:32px;
    display:flex;align-items:center;justify-content:center;margin:0 auto 18px;
}
.btn-pdam{
    background:linear-gradient(135deg,var(--pdam-blue),var(--pdam-cyan));
    color:#fff;border:none;font-weight:600;
}
.btn-pdam:hover{color:#fff;opacity:.92;}

.login-shell{
    min-height:100vh;
    background:linear-gradient(135deg,var(--pdam-blue-darker),var(--pdam-blue) 60%,var(--pdam-cyan));
    display:flex;align-items:center;justify-content:center;padding:20px;
}
.login-card{
    background:#fff;border-radius:18px;overflow:hidden;
    max-width:920px;width:100%;
    box-shadow:0 20px 60px rgba(0,0,0,.25);
    display:flex;min-height:520px;
}
.login-side{
    flex:1;background:linear-gradient(160deg,var(--pdam-blue-dark),var(--pdam-cyan));
    color:#fff;padding:44px;display:flex;flex-direction:column;justify-content:center;
}
.login-form-side{flex:1;padding:48px 44px;display:flex;flex-direction:column;justify-content:center;}
@media (max-width:768px){.login-side{display:none;}}

/* ---------------- PRINT (Laporan) ---------------- */
@media print{
    .sidebar,.topbar,.btn,form,.no-print{display:none !important;}
    .content-wrap{margin-left:0 !important;padding:0 !important;}
    body{background:#fff;}
    .panel{box-shadow:none;border:none;padding:0;}
    .table-clean thead th{background:#f1f3f8 !important;-webkit-print-color-adjust:exact;print-color-adjust:exact;}
}
.btn-cetak{background:#1c2434;color:#fff;border:none;font-weight:600;}
.btn-cetak:hover{color:#fff;opacity:.9;}
