:root {
    --sidebar-width: 240px;
    --brand-color: #0d6efd;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #f4f6f9;
}

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

.sidebar {
    width: var(--sidebar-width);
    background: #1e2a3a;
    color: #cfd8e3;
    flex-shrink: 0;
    min-height: 100vh;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    font-weight: 600;
    font-size: 1.05rem;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-brand img {
    height: 34px;
    width: auto;
    border-radius: 6px;
    background: #fff;
    padding: 2px;
}

.sidebar-opd {
    padding: 8px 18px;
    font-size: .78rem;
    color: #9fb4cc;
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
}

.sidebar-nav .nav-heading {
    padding: 14px 18px 6px;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #7c8aa0;
}

.sidebar-nav .nav-link {
    color: #cfd8e3;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 3px solid transparent;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255,255,255,.05);
    color: #fff;
}

.sidebar-nav .nav-link.active {
    background: rgba(13,110,253,.15);
    border-left-color: var(--brand-color);
    color: #fff;
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    padding: 12px 20px;
    border-bottom: 1px solid #e5e9ef;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.3rem;
    display: none;
}

.topbar-title {
    font-weight: 600;
    flex: 1;
}

.app-content {
    padding: 24px;
    flex: 1;
}

.app-footer {
    padding: 14px 24px;
    text-align: center;
    font-size: .85rem;
    color: #8b96a5;
}

/* ===== Tombol aksi tabel ===== */
.aksi-buttons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ===== Stat cards ===== */
.stat-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
}

.stat-label {
    color: #8b96a5;
    font-size: .85rem;
}

/* ===== Login page ===== */
.login-page {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0d6efd, #1e2a3a);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: #fff;
    padding: 36px 32px;
    border-radius: 14px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 45px rgba(0,0,0,.2);
}

.login-brand {
    text-align: center;
    margin-bottom: 24px;
}

.login-brand img {
    height: 84px;
    width: auto;
}

.login-brand h1 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 8px 0 2px;
}

.login-brand p {
    font-size: .85rem;
    color: #8b96a5;
    margin: 0;
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        z-index: 1050;
        transition: left .2s ease;
    }
    .sidebar.show {
        left: 0;
    }
    .sidebar-toggle {
        display: inline-block;
    }
}
