:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #0ea5e9;
    --dark: #1e293b;
    --light: #f8fafc;
    --white: #ffffff;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-800: #1e293b;
    --sidebar-width: 240px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--gray-100);
    color: var(--gray-800);
    font-size: 0.9rem; /* Dikecilkan sedikit */
    line-height: 1.5;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--dark);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    padding: 1.5rem;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.sidebar-nav {
    padding: 0.75rem;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 0.5rem;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    transition: var(--transition);
}

.nav-item:hover, .nav-item.active {
    background-color: var(--primary);
    color: var(--white);
}

.nav-item i {
    width: 20px;
    margin-right: 0.75rem;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 1.5rem;
    transition: var(--transition);
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    background: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Login Page Styles */
.login-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4f46e5 0%, #1e293b 100%);
}

.login-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header i {
    color: var(--primary);
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--secondary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-login {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
}

.btn-login:hover {
    background: var(--primary-dark);
}

.alert {
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--white);
    padding: 1.25rem;
    border-radius: 0.75rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.stat-card .label {
    color: var(--secondary);
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

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

/* Tables */
.card {
    background: var(--white);
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th {
    text-align: left;
    padding: 0.75rem;
    color: var(--secondary);
    font-size: 0.8rem;
    border-bottom: 1px solid var(--gray-200);
}

td {
    padding: 0.75rem;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--gray-200);
}

.status {
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
}

.status-active { background: #d1fae5; color: #065f46; }
.status-inactive { background: #fee2e2; color: #991b1b; }

@media (max-width: 768px) {
    .sidebar {
        left: -100%;
    }
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    .sidebar.open {
        left: 0;
    }
}
