:root {
    --bg: #0f172a;
    --panel: #111827;
    --card: #1f2937;
    --line: #334155;
    --text: #e5e7eb;
    --muted: #94a3b8;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --success: #16a34a;
    --danger: #dc2626;
}
* { box-sizing: border-box; }
body {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a, #111827 55%, #1e293b);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; }
.sidebar {
    width: 285px;
    min-height: 100vh;
    background: rgba(15, 23, 42, .96);
    border-right: 1px solid var(--line);
    position: fixed;
    left: 0;
    top: 0;
    padding: 22px 18px;
}
.brand-box {
    border: 1px solid rgba(245, 158, 11, .35);
    background: rgba(245, 158, 11, .08);
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 22px;
}
.brand-title { font-size: 22px; font-weight: 800; letter-spacing: .6px; }

.brand-logo {
    width: 100%;
    max-width: 215px;
    display: block;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 10px 24px rgba(0,0,0,.22);
}
.topbar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.topbar-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    background: #ffffff;
    border-radius: 14px;
    padding: 6px;
    border: 1px solid rgba(245,158,11,.32);
}
.login-logo {
    width: 100%;
    max-width: 300px;
    display: block;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 16px 35px rgba(0,0,0,.28);
}

.brand-subtitle { color: var(--muted); font-size: 13px; }
.nav-link-custom {
    display: block;
    padding: 11px 14px;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 7px;
    transition: all .15s ease;
}
.nav-link-custom:hover {
    background: rgba(245, 158, 11, .12);
    color: white;
    transform: translateX(3px);
}
.main-content {
    margin-left: 285px;
    padding: 28px;
}
.topbar {
    border: 1px solid var(--line);
    background: rgba(17, 24, 39, .76);
    border-radius: 20px;
    padding: 18px 22px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.page-title { font-size: 26px; font-weight: 800; margin: 0; }
.page-caption { color: var(--muted); margin: 3px 0 0; }
.card-dark {
    background: rgba(31, 41, 55, .82);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,.18);
}
.kpi-card {
    background: linear-gradient(145deg, rgba(31,41,55,.95), rgba(15,23,42,.94));
    border: 1px solid rgba(148,163,184,.22);
    border-radius: 20px;
    padding: 20px;
    min-height: 122px;
}
.kpi-label { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.kpi-value { font-size: 26px; font-weight: 850; margin-top: 8px; }
.kpi-note { color: #cbd5e1; font-size: 12px; margin-top: 8px; }
.table { color: var(--text); }
.table thead th {
    color: #f8fafc;
    border-bottom-color: var(--line);
    background: rgba(15, 23, 42, .72);
}
.table tbody td { border-color: rgba(51, 65, 85, .65); vertical-align: middle; }
.table-hover tbody tr:hover { color: white; background: rgba(245, 158, 11, .08); }
.form-control, .form-select, textarea {
    background-color: rgba(15, 23, 42, .9) !important;
    border: 1px solid var(--line) !important;
    color: var(--text) !important;
}
.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 .2rem rgba(245, 158, 11, .25) !important;
    border-color: var(--accent) !important;
}
label { color: #cbd5e1; font-weight: 600; margin-bottom: 6px; }
.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #111827;
    font-weight: 800;
}
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #111827; }
.btn-outline-light { border-color: var(--line); color: #e2e8f0; }
.badge-soft { background: rgba(245, 158, 11, .15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, .25); }
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(17,24,39,.94);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 30px;
}
.print-box {
    background: white;
    color: #111827;
    border-radius: 12px;
    padding: 24px;
}
@media print {
    .sidebar, .topbar, .no-print { display: none !important; }
    .main-content { margin: 0; padding: 0; }
    body { background: white; color: #111827; }
    .print-box { padding: 0; }
}
@media (max-width: 992px) {
    .sidebar { position: static; width: auto; min-height: auto; }
    .main-content { margin-left: 0; }
}
