:root {
    --primary: #2c5cc5;
    --sidebar-width: 250px;
    --bg-light: #f4f6fb;
}

* { box-sizing: border-box; }

body {
    background: var(--bg-light);
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

/* ---------- LOGIN ---------- */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2c5cc5, #16264d);
}
.login-wrapper { width: 100%; max-width: 400px; padding: 15px; }
.login-card { border: none; border-radius: 14px; }

/* ---------- APP LAYOUT ---------- */
.app-wrapper { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    background: #16264d;
    color: #fff;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.25s ease;
}
.sidebar-brand {
    padding: 18px 20px;
    font-weight: 700;
    font-size: 17px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-nav { padding: 10px 0; }
.nav-section {
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 600;
    padding: 14px 20px 6px;
    letter-spacing: .5px;
}
.sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    border-left: 3px solid transparent;
}
.sidebar .nav-link:hover, .sidebar .nav-link.active {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-left-color: #4d8bff;
}
.sidebar .nav-link i { width: 18px; text-align: center; }

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    background: #fff;
    border-bottom: 1px solid #e5e9f2;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 900;
}

.page-content { padding: 22px; }

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}
.page-header h4 { margin: 0; font-weight: 700; color: #16264d; }

.card { border: none; border-radius: 12px; box-shadow: 0 2px 10px rgba(20,30,60,0.06); }

.kpi-card {
    border-radius: 14px;
    padding: 18px;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.kpi-card i.bg-icon {
    position: absolute;
    right: 10px; top: 10px;
    font-size: 46px;
    opacity: 0.2;
}
.kpi-card .kpi-label { font-size: 13px; opacity: 0.9; }
.kpi-card .kpi-value { font-size: 22px; font-weight: 700; margin-top: 4px; }

.bg-grad-blue { background: linear-gradient(135deg,#2c5cc5,#4d8bff); }
.bg-grad-green { background: linear-gradient(135deg,#0f9d58,#34d399); }
.bg-grad-red { background: linear-gradient(135deg,#d64550,#ff7676); }
.bg-grad-orange { background: linear-gradient(135deg,#e07a1f,#ffb347); }
.bg-grad-purple { background: linear-gradient(135deg,#6a3fb5,#a17fe0); }
.bg-grad-teal { background: linear-gradient(135deg,#0e7c86,#3fc1c9); }

table.dataTable { font-size: 13.5px; }

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