/* =========================================
   SIBELA — Custom Stylesheet
   ========================================= */

/* ---------- Global ---------- */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f1f5f9;
    min-height: 100vh;
}

/* ---------- Sidebar ---------- */
#sidebar {
    width: 260px;
    min-height: 100vh;
    background-color: #1e293b;
    position: sticky;
    top: 0;
    overflow-y: auto;
}

#sidebar .nav-link {
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: background-color 0.2s;
}

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

#sidebar .nav-link.active {
    background-color: #3b82f6;
    font-weight: 600;
}

#sidebar .nav-link .badge {
    font-size: 0.65rem;
}

/* ---------- Page Content ---------- */
#page-content-wrapper {
    min-height: 100vh;
    background-color: #f1f5f9;
}

/* ---------- Avatar ---------- */
.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #64748b;
}

.avatar-circle-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #cbd5e1;
}

/* ---------- Kartu Statistik ---------- */
.stat-card {
    border: none;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

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

.stat-card .stat-label {
    font-size: 0.8rem;
    color: #64748b;
}

/* ---------- Kartu Periode ---------- */
.periode-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem;
    background: #fff;
    transition: box-shadow 0.2s;
}

.periode-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.periode-card .periode-nama {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
}

.periode-card .periode-anggaran {
    font-size: 0.75rem;
    color: #64748b;
}

/* ---------- Progress Bar ---------- */
.progress {
    height: 8px;
    border-radius: 4px;
}

.progress-bar-ok {
    background-color: #22c55e;
}

.progress-bar-warn {
    background-color: #f59e0b;
}

.progress-bar-over {
    background-color: #ef4444;
}

/* ---------- Grafik ---------- */
.chart-container {
    position: relative;
    width: 100%;
    max-height: 320px;
}

/* ---------- Tabel ---------- */
.table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    font-weight: 600;
}

.table td {
    font-size: 0.875rem;
    vertical-align: middle;
}

/* ---------- Badge ---------- */
.badge {
    font-weight: 500;
    font-size: 0.75rem;
}

/* ---------- Card Umum ---------- */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 600;
}

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

.login-card {
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    overflow: hidden;
}

.login-logo {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    margin: 0 auto 1rem;
}

/* ---------- Alert Peringatan ---------- */
.alert-peringatan {
    border-left: 4px solid #f59e0b;
    background-color: #fffbeb;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    #sidebar {
        width: 200px;
        font-size: 0.8rem;
    }

    .stat-card .stat-value {
        font-size: 1.2rem;
    }
}
