:root{
  --navy-950:#081b3a;
  --navy-900:#0b2447;
  --navy-800:#123367;
  --navy-700:#1a4488;
  --gold-500:#c9a227;
  --gold-400:#d9b84a;
  --gold-100:#f7ecc9;
  --bg:#f2f4f9;
  --ok:#1fa971;
  --warn:#e0a72a;
  --danger:#e35657;
}
*{font-family:'Inter',sans-serif;}
h1,h2,h3,h4,h5,.brand,.nav-link,.card-title,.section-title{font-family:'Poppins',sans-serif;}
body{background:var(--bg); color:#1f2937;}

/* Sidebar */
.sidebar{
  width:260px; min-height:100vh; position:fixed; top:0; left:0;
  background:linear-gradient(180deg,var(--navy-950) 0%, var(--navy-900) 100%);
  color:#dbe4f5; z-index:1000; display:flex; flex-direction:column;
  border-right:3px solid var(--gold-500);
}
.sidebar .brand{padding:22px 20px; display:flex; align-items:center; gap:12px; border-bottom:1px solid rgba(255,255,255,.08);}
.sidebar .brand .logo{
  width:42px;height:42px;border-radius:10px;background:var(--gold-500);
  display:flex;align-items:center;justify-content:center;color:var(--navy-950);font-weight:800;font-size:15px;
}
.sidebar .brand-text{line-height:1.1;}
.sidebar .brand-text strong{font-size:16px;color:#fff;letter-spacing:.5px;}
.sidebar .brand-text small{font-size:10px;color:var(--gold-400);text-transform:uppercase;letter-spacing:1px;}
.sidebar-nav{padding:16px 12px; flex:1; overflow-y:auto;}
.sidebar-nav .nav-section{font-size:10.5px; text-transform:uppercase; letter-spacing:1.2px; color:#7c8db5; margin:16px 10px 8px;}
.sidebar-nav .nav-link{
  color:#c4d0ea; padding:10px 14px; border-radius:10px; margin-bottom:4px;
  display:flex; align-items:center; gap:12px; font-size:14px; font-weight:500; transition:.15s;
}
.sidebar-nav .nav-link i{width:18px; text-align:center; font-size:15px;}
.sidebar-nav .nav-link:hover{background:rgba(255,255,255,.06); color:#fff;}
.sidebar-nav .nav-link.active{background:var(--gold-500); color:var(--navy-950); font-weight:600; box-shadow:0 4px 12px rgba(201,162,39,.35);}
.sidebar-foot{padding:14px 20px; border-top:1px solid rgba(255,255,255,.08); font-size:11px; color:#7c8db5;}

/* Main */
.main{margin-left:260px;}
.topbar{
  background:#fff; padding:14px 26px; display:flex; align-items:center; justify-content:space-between;
  border-bottom:1px solid #e6e9f2; position:sticky; top:0; z-index:900;
}
.topbar .search{background:#f2f4f9; border-radius:10px; padding:8px 14px; display:flex; align-items:center; gap:8px; width:340px;}
.topbar .search input{border:0; background:transparent; outline:none; font-size:13.5px; width:100%;}
.topbar .user{display:flex; align-items:center; gap:10px;}
.topbar .user .avatar{width:38px;height:38px;border-radius:50%;background:var(--navy-900);color:var(--gold-400);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;}
.topbar .user .meta{line-height:1.15;}
.topbar .user .meta strong{font-size:13px; display:block;}
.topbar .user .meta span{font-size:11px; color:#8a94a6;}
.icon-btn{width:38px;height:38px;border-radius:10px;background:#f2f4f9;display:flex;align-items:center;justify-content:center;color:#4b5568;position:relative;}
.icon-btn .dot{position:absolute;top:6px;right:7px;width:8px;height:8px;background:var(--danger);border-radius:50%;border:1.5px solid #fff;}

.page{padding:26px;}
.page-header{display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; flex-wrap:wrap; gap:10px;}
.page-header h4{margin:0; font-weight:700; color:var(--navy-900);}
.page-header .breadcrumb{font-size:12px; color:#8a94a6; margin:0;}
.btn-gold{background:var(--gold-500); border:none; color:var(--navy-950); font-weight:600;}
.btn-gold:hover{background:var(--gold-400); color:var(--navy-950);}
.btn-navy{background:var(--navy-900); border:none; color:#fff; font-weight:600;}
.btn-navy:hover{background:var(--navy-800); color:#fff;}

.card{border:none; border-radius:16px; box-shadow:0 4px 18px rgba(20,30,60,.06);}
.stat-card{padding:20px; display:flex; align-items:center; gap:14px; border-radius:16px; background:#fff;}
.stat-card .ic{width:52px;height:52px;border-radius:14px;display:flex;align-items:center;justify-content:center;font-size:20px;}
.stat-card .num{font-size:24px; font-weight:800; color:var(--navy-900); line-height:1;}
.stat-card .lbl{font-size:12.5px; color:#8a94a6; margin-top:4px;}
.stat-card .trend{font-size:11.5px; font-weight:600; margin-left:auto;}

.badge-kondisi-baik{background:#e6f8f1; color:var(--ok);}
.badge-kondisi-ringan{background:#fdf3dc; color:var(--warn);}
.badge-kondisi-berat{background:#fde8e8; color:var(--danger);}
.badge-status-aktif{background:#e7f0ff; color:var(--navy-700);}
.badge-status-pinjam{background:#f7ecc9; color:#9c7a10;}
.badge-status-nonaktif{background:#eee; color:#666;}
.badge{font-weight:600; font-size:11px; padding:5px 10px; border-radius:20px;}

.table-card thead th{background:#f7f9fc; color:#5b6577; font-size:11.5px; text-transform:uppercase; letter-spacing:.4px; border:none; padding:12px 14px;}
.table-card tbody td{padding:12px 14px; font-size:13.5px; vertical-align:middle; border-color:#eef1f6;}
.plate{
  display:inline-block; background:#111; color:#fff; font-weight:700; font-size:12px;
  padding:4px 10px; border-radius:5px; letter-spacing:1px; border:2px solid #fff; box-shadow:0 0 0 1px #000;
}
.section-title{font-weight:700; color:var(--navy-900); font-size:15px;}
.qr-box{width:56px;height:56px;border-radius:8px;background:repeating-conic-gradient(#0b2447 0% 25%, #fff 0% 50%) 0/10px 10px; border:2px solid #0b2447;}

.progress{height:8px; border-radius:6px; background:#eef1f6;}

.legend-dot{width:10px;height:10px;border-radius:3px;display:inline-block; margin-right:6px;}

.app-footer{margin-left:0; padding:16px 26px; border-top:1px solid #e6e9f2; background:#fff; font-size:12px; color:#8a94a6; display:flex; justify-content:space-between; flex-wrap:wrap; gap:6px;}

@media (max-width: 991px){
  .sidebar{transform:translateX(-100%);}
  .main{margin-left:0;}
}

/* =========================================================
   TOPBAR AUTH & USER DROPDOWN
   ========================================================= */

.topbar {
    position: relative;
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.topbar-search {
    display: flex;
    align-items: center;
    gap: 11px;
    width: min(420px, 46vw);
    height: 44px;
    padding: 0 15px;
    border: 1px solid transparent;
    border-radius: 13px;
    background: #f3f5fa;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
}

.topbar-search:focus-within {
    border-color: rgba(23, 69, 132, 0.18);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(23, 69, 132, 0.06);
}

.topbar-search > i {
    flex-shrink: 0;
    color: #8a94a6;
    font-size: 14px;
}

.topbar-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #263752;
    font-family: "Inter", sans-serif;
    font-size: 12.5px;
}

.topbar-search input::placeholder {
    color: #8a94a6;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.topbar-icon-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f3f5fa;
    color: #536176;
    font-size: 15px;
    text-decoration: none;
    transition:
        background 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease;
}

.topbar-icon-button:hover {
    background: #eaf1fb;
    color: var(--navy-700, #174584);
    transform: translateY(-1px);
}

.topbar-notification-dot {
    position: absolute;
    top: 8px;
    right: 9px;
    width: 6px;
    height: 6px;
    border: 1.5px solid #fff;
    border-radius: 50%;
    background: #e35657;
}

.topbar-user-button {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 250px;
    padding: 4px 8px 4px 5px;
    border: 0;
    border-radius: 13px;
    background: transparent;
    text-align: left;
    transition: background 0.15s ease;
}

.topbar-user-button:hover,
.topbar-user-button[aria-expanded="true"] {
    background: #f4f6fa;
}

.topbar-avatar,
.topbar-dropdown-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    background: #082b52;
    color: #d8b12c;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.topbar-avatar {
    width: 43px;
    height: 43px;
    font-size: 12px;
}

.topbar-user-meta {
    flex: 1;
    min-width: 0;
}

.topbar-user-meta strong,
.topbar-user-meta span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-user-meta strong {
    color: #263752;
    font-size: 12px;
    font-weight: 600;
}

.topbar-user-meta span {
    margin-top: 2px;
    color: #8390a3;
    font-family: "Inter", sans-serif;
    font-size: 10px;
}

.topbar-chevron {
    margin-left: 3px;
    color: #98a2b3;
    font-size: 9px;
    transition: transform 0.18s ease;
}

.topbar-user-button[aria-expanded="true"]
.topbar-chevron {
    transform: rotate(180deg);
}

.topbar-user-menu {
    width: 315px;
    margin-top: 10px !important;
    padding: 10px;
    border: 1px solid #e4e8ef;
    border-radius: 15px;
    box-shadow: 0 18px 45px rgba(13, 39, 72, 0.14);
}

.topbar-dropdown-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 8px 10px;
}

.topbar-dropdown-avatar {
    width: 46px;
    height: 46px;
    font-size: 13px;
}

.topbar-dropdown-profile > div:last-child {
    min-width: 0;
}

.topbar-dropdown-profile strong,
.topbar-dropdown-profile span,
.topbar-dropdown-profile small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-dropdown-profile strong {
    color: #263752;
    font-size: 11.5px;
}

.topbar-dropdown-profile span {
    margin-top: 2px;
    color: #7c8799;
    font-family: "Inter", sans-serif;
    font-size: 9.5px;
}

.topbar-dropdown-profile small {
    margin-top: 3px;
    color: #9aa3b1;
    font-size: 9px;
}

.topbar-user-menu .dropdown-divider {
    margin: 7px 0;
    border-color: #edf0f5;
}

.topbar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #344054;
}

.topbar-dropdown-item:hover {
    background: #f3f6fa;
    color: #174584;
}

.topbar-dropdown-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #edf3fc;
    color: #174584;
    font-size: 12px;
}

.topbar-dropdown-item > span:last-child {
    min-width: 0;
}

.topbar-dropdown-item strong,
.topbar-dropdown-item small {
    display: block;
}

.topbar-dropdown-item strong {
    font-size: 10.5px;
    font-weight: 600;
}

.topbar-dropdown-item small {
    margin-top: 2px;
    color: #98a2b3;
    font-size: 8.5px;
}

.topbar-logout {
    width: 100%;
    text-align: left;
}

.topbar-logout:hover {
    background: #fff1f1;
    color: #d6454d;
}

.topbar-logout .topbar-dropdown-icon {
    background: #fde8e8;
    color: #d6454d;
}

@media (max-width: 900px) {
    .topbar-user-button {
        min-width: 0;
    }

    .topbar-user-meta,
    .topbar-chevron {
        display: none;
    }

    .topbar-search {
        width: min(400px, 55vw);
    }
}

@media (max-width: 600px) {
    .topbar {
        gap: 10px;
    }

    .topbar-search {
        flex: 1;
        width: auto;
    }

    .topbar-search input::placeholder {
        color: transparent;
    }

    .topbar-icon-button:first-of-type {
        display: none;
    }

    .topbar-user-menu {
        width: min(315px, calc(100vw - 24px));
    }
}
.logo.logo-pemprov {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    padding: 4px;
    overflow: hidden;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(15, 39, 71, 0.14);
}

.logo.logo-pemprov img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
/* ==================================================
   SIDEBAR MOBILE
================================================== */

.sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 11px;
    background: #f3f6fb;
    color: #0b2a50;
    font-size: 18px;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.sidebar-toggle:hover {
    background: #e7eef8;
    color: #174584;
}

.sidebar-close {
    display: none;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 17px;
    cursor: pointer;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 1090;
    visibility: hidden;
    background: rgba(6, 19, 38, 0.55);
    opacity: 0;
    backdrop-filter: blur(2px);
    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

.sidebar-overlay.show {
    visibility: visible;
    opacity: 1;
}

body.sidebar-active {
    overflow: hidden;
}

@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1100;
        width: min(290px, 86vw);
        height: 100vh;
        overflow-y: auto;
        transform: translateX(-105%);
        box-shadow: 18px 0 45px rgba(4, 18, 39, 0.25);
        transition: transform 0.28s ease;
    }

    .sidebar.sidebar-open {
        transform: translateX(0);
    }

    .main {
        width: 100%;
        min-width: 0;
        margin-left: 0 !important;
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    .sidebar-close {
        display: inline-flex;
    }

    .topbar {
        position: sticky;
        top: 0;
        z-index: 1030;
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
    }

    .page {
        width: 100%;
        min-width: 0;
    }

    .brand {
        position: sticky;
        top: 0;
        z-index: 2;
    }
}

@media (max-width: 575.98px) {
    .sidebar {
        width: min(285px, 88vw);
    }

    .topbar {
        padding-right: 16px;
        padding-left: 16px;
    }

    .page {
        padding-right: 16px;
        padding-left: 16px;
    }
}