:root {
    --vdm-yellow: #FFEB00;
    --vdm-yellow-dark: #F5B800;
    --vdm-black: #000000;
    --vdm-dark: #111827;
    --vdm-muted: #6B7280;
    --vdm-line: #E5E7EB;
    --vdm-bg: #F8FAFC;
    --vdm-card: #FFFFFF;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--vdm-bg);
    color: var(--vdm-dark);
}

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 275px;
    background: #fff;
    border-right: 1px solid var(--vdm-line);
    padding: 22px 16px;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    overflow-y: auto;
    z-index: 50;
}

.brand {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 24px;
    padding: 0 6px;
}

.brand-mark {
    width: 42px; height: 42px;
    background: var(--vdm-yellow);
    color: #000;
    font-weight: 900;
    display:flex; align-items:center; justify-content:center;
    border-radius: 12px;
    border: 1px solid #e2c600;
}

.brand strong { display:block; font-size: 18px; letter-spacing: -0.03em; }
.brand small { color: var(--vdm-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }

.nav-section {
    margin: 18px 10px 8px;
    font-size: 11px;
    color: var(--vdm-muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    color: #374151;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 3px;
    border: 1px solid transparent;
}

.nav-link:hover {
    background: #FFFBE6;
    color: #111;
}

.nav-link.active {
    background: #FFF8CE;
    border-color: #FFD54A;
    color: #B77900;
}

.app-main {
    margin-left: 275px;
    width: calc(100% - 275px);
    min-height: 100vh;
}

.topbar {
    height: 78px;
    background: #fff;
    border-bottom: 1px solid var(--vdm-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 34px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar-search {
    width: 500px;
    border: 1px solid var(--vdm-line);
    border-radius: 12px;
    display:flex;
    align-items:center;
    gap: 10px;
    padding: 11px 14px;
    color: var(--vdm-muted);
    background:#fff;
}

.topbar-search input {
    border: 0;
    outline: 0;
    flex:1;
    background: transparent;
}

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

.notification-dot { position:relative; font-size:20px; }
.notification-dot em {
    position:absolute; top:-9px; right:-8px;
    background:#FBBF24; color:#111; border-radius:50%;
    font-size:10px; font-style: normal;
    width:18px;height:18px; display:flex;align-items:center;justify-content:center;
    font-weight:800;
}

.profile { display:flex; align-items:center; gap:10px; }
.avatar {
    width: 38px; height:38px;
    border-radius:50%;
    background: var(--vdm-yellow);
    color:#111;
    font-weight:900;
    display:flex; align-items:center; justify-content:center;
}
.profile strong { display:block; font-size: 14px; }
.profile small { display:block; color: var(--vdm-muted); font-size: 12px; }

.content {
    padding: 28px 34px 48px;
}

.page-head {
    display:flex;
    align-items:start;
    justify-content:space-between;
    margin-bottom: 22px;
}

.page-head h1 {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin:0;
}

.page-head p {
    color: var(--vdm-muted);
    margin: 4px 0 0;
}

.btn-vdm {
    background: linear-gradient(135deg, #FFD54A, #FFB800);
    border: 0;
    color:#111;
    font-weight: 800;
    border-radius: 10px;
    padding: 10px 16px;
    box-shadow: 0 8px 18px rgba(245,184,0,.25);
}

.btn-vdm:hover { filter: brightness(.97); color:#111; }

.metric-card, .panel {
    background: var(--vdm-card);
    border: 1px solid var(--vdm-line);
    border-radius: 16px;
    box-shadow: 0 6px 16px rgba(15,23,42,.04);
}

.metric-card {
    padding: 18px;
    height: 100%;
}

.metric-icon {
    width: 42px; height:42px;
    border-radius: 12px;
    display:flex; align-items:center; justify-content:center;
    background: #FFF8CE;
    color:#B77900;
    font-size: 20px;
    margin-bottom: 12px;
}

.metric-card span {
    color: var(--vdm-muted);
    font-size: 13px;
    font-weight: 600;
}

.metric-card h3 {
    font-size: 26px;
    margin: 5px 0;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.metric-card small { color: #16A34A; font-weight: 700; }

.panel { padding: 18px; }

.filters {
    background:#fff;
    border:1px solid var(--vdm-line);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.table-card {
    background:#fff;
    border:1px solid var(--vdm-line);
    border-radius: 16px;
    overflow:hidden;
}

.table th {
    font-size: 12px;
    text-transform: uppercase;
    color: #6B7280;
    background:#FAFAFA;
    letter-spacing:.04em;
    white-space:nowrap;
}

.table td { vertical-align: middle; font-size: 14px; }
.form-label { font-weight: 700; font-size: 13px; color:#374151; }
.form-control, .form-select {
    border-radius: 10px;
    border-color:#DDE3EA;
    min-height: 42px;
}

.auth-page {
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    background: radial-gradient(circle at top, #FFF8CE, #F8FAFC 45%);
    padding: 24px;
}

.auth-card {
    width:100%;
    max-width: 430px;
    background:#fff;
    border:1px solid var(--vdm-line);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 70px rgba(15,23,42,.10);
}

@media (max-width: 991px) {
    .sidebar { position: static; width:100%; height:auto; }
    .app-shell { display:block; }
    .app-main { margin-left:0; width:100%; }
    .topbar { padding:0 18px; }
    .topbar-search { width: 100%; max-width: 340px; }
}


/* Sidebar Hide / Show Toggle */
.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.sidebar-toggle {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    border: 1px solid var(--vdm-line);
    background: #fff;
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .05);
    transition: all .22s ease;
    flex: 0 0 auto;
}

.sidebar-toggle:hover {
    background: #FFF8CE;
    border-color: #FFD54A;
    color: #B77900;
    transform: translateY(-1px);
}

.sidebar-toggle:active {
    transform: scale(.97);
}

.sidebar,
.app-main {
    transition: all .25s ease;
}

body.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
}

body.sidebar-collapsed .app-main {
    margin-left: 0;
    width: 100%;
}

body.sidebar-collapsed .sidebar-toggle i::before {
    content: "\f136"; /* Bootstrap Icons: layout-sidebar-inset-reverse */
}

@media (max-width: 991px) {
    .topbar-left {
        width: 100%;
    }

    .sidebar-toggle {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        font-size: 20px;
    }

    body.sidebar-collapsed .sidebar {
        display: none;
    }
}
