/* =========================================
   PENGATURAN DASAR & RESET
========================================= */
html, body, div, span, h1, h2, h3, h4, p, a, ul, li, form, label, table, thead, tbody, th, td, input, select, button {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: #f3f4f8;
    color: #334155;
    line-height: 1.5;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* =========================================
   SIDEBAR MENU (ELEGAN & MODERN)
========================================= */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #111827 0%, #1e293b 100%);
    color: #ffffff;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.05);
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #38bdf8;
    letter-spacing: 0.5px;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 15px;
}

.sidebar-menu li {
    margin-bottom: 8px;
}

.sidebar-menu a {
    display: block;
    padding: 14px 18px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sidebar-menu a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    transform: translateX(4px);
}

.sidebar-menu .active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

/* =========================================
   AREA KONTEN UTAMA
========================================= */
.main-wrapper {
    margin-left: 280px;
    width: calc(100% - 280px);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.top-navbar {
    background-color: #ffffff;
    padding: 18px 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.user-badge {
    font-size: 15px;
    color: #475569;
}

.user-badge strong {
    color: #0f172a;
}

.content-container {
    padding: 35px;
    flex: 1;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #0f172a;
}

/* =========================================
   KARTU (CARDS) & STATISTIK
========================================= */
.grid-stats {
    display: flex;
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    flex: 1;
    background-color: #ffffff;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0,0,0,0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
}

.stat-card span {
    font-size: 14px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .num {
    font-size: 36px;
    font-weight: 800;
    color: #2563eb;
    margin-top: 10px;
}

.card {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0,0,0,0.02);
    margin-bottom: 30px;
}

.card h3 {
    margin-bottom: 20px;
    font-size: 18px;
    color: #0f172a;
    font-weight: 600;
}

/* =========================================
   TABEL ELEGAN
========================================= */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 10px;
}

th, td {
    padding: 16px 20px;
    text-align: left;
    font-size: 14px;
    border-bottom: 1px solid #f1f5f9;
}

th {
    background-color: #f8fafc;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tbody tr {
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background-color: #f8fafc;
}

/* =========================================
   FORMULIR (INPUT & SELECT)
========================================= */
input, select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 14px;
    color: #334155;
    margin-top: 8px;
    margin-bottom: 20px;
    background-color: #ffffff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* =========================================
   TOMBOL (BUTTONS) MODERN
========================================= */
button, .btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

button:hover, .btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
    box-shadow: none;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 6px rgba(245, 158, 11, 0.2);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
}

.btn-danger, .btn-logout {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover, .btn-logout:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

/* =========================================
   FOOTER
========================================= */
footer {
    background-color: #ffffff;
    text-align: center;
    padding: 20px;
    font-size: 14px;
    color: #94a3b8;
}

footer strong {
    color: #0f172a;
}

/* =========================================
   RESPONSIVE (HP & TABLET)
========================================= */
@media screen and (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    .main-wrapper {
        margin-left: 0;
        width: 100%;
    }
    .grid-stats {
        flex-direction: column;
    }
    .content-container {
        padding: 20px;
    }
}