:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --text-main: #333333;
    --text-muted: #6b7280;
    --bg-body: #f3f4f6;
    --bg-sidebar: #ffffff;
    --sidebar-width: 260px;
    --border-color: #e5e7eb;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 30px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}
.sidebar-header p {
    margin: 5px 0 0 0;
    opacity: 0.8;
    font-size: 14px;
}

.nav-menu {
    list-style: none;
    padding: 20px 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}
/* Mempercantik tampilan scrollbar pada sidebar */
.nav-menu::-webkit-scrollbar {
    width: 6px;
}
.nav-menu::-webkit-scrollbar-track {
    background: transparent;
}
.nav-menu::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.nav-menu::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
.nav-menu .nav-title {
    padding: 10px 25px;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 10px;
}
.nav-menu li a {
    display: block;
    padding: 12px 25px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}
.nav-menu li a i {
    width: 25px;
    color: var(--primary);
    transition: all 0.3s ease;
}
.nav-menu li a:hover, .nav-menu li a.active {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
    border-right: 4px solid var(--primary);
}
.nav-menu li a.active i {
    color: var(--primary);
}
.text-danger {
    color: #ef4444 !important;
}
.text-danger i {
    color: #ef4444 !important;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.topbar {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}
.user-info i {
    color: var(--primary);
}

.container {
    padding: 30px;
}

/* Card & Typography */
.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}
.page-title {
    margin-top: 0;
    margin-bottom: 24px;
    color: var(--text-main);
    font-weight: 600;
}

/* Grid & Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.3s;
}
.stat-card:hover {
    transform: translateY(-5px);
}
.stat-info h3 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}
.stat-info .num {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}
.stat-icon {
    width: 60px;
    height: 60px;
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}
table th, table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--text-muted);
}
table tbody tr:hover {
    background: #f1f5f9;
}
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    background: #e0e7ff;
    color: #4f46e5;
}

/* Forms & Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}
.btn:hover {
    background: var(--secondary);
    box-shadow: 0 4px 6px rgba(102,126,234,0.3);
}
.btn-secondary {
    background: #94a3b8;
}
.btn-secondary:hover {
    background: #64748b;
}
.header-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-main);
}
.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.3s;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}
textarea.form-control {
    resize: vertical;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
