/* ============ VARIABLES ============ */
:root {
    --primary: #1a7e1f;
    --primary-light: #39ab4c;
    --secondary: #15c03a;
    --accent: #e8eaf6;
    --sidebar-width: 260px;
    --sidebar-bg: linear-gradient(180deg, #0d421a 0%, #1a7e1a 50%, #15c02c 100%);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #f4f6f9;
}

/* ============ SIDEBAR ============ */
#sidebar-wrapper {
    min-height: 100vh;
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background: var(--sidebar-bg);
    transition: all 0.3s ease;
    overflow-y: auto;
}

#wrapper.toggled #sidebar-wrapper {
    margin-left: calc(var(--sidebar-width) * -1);
}

.sidebar-heading {
    padding: 1.2rem 1.2rem 0.3rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.sidebar-school {
    padding: 0 1.2rem 1rem;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.55);
    letter-spacing: 0.3px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 0.5rem;
}

.sidebar-label {
    padding: 0.8rem 1.2rem 0.3rem;
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

#sidebar-wrapper .list-group-item {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.75);
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

#sidebar-wrapper .list-group-item:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-left-color: rgba(255,255,255,0.3);
}

#sidebar-wrapper .list-group-item.active {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-left-color: #64f67c;
    font-weight: 600;
}

#sidebar-wrapper .list-group-item i {
    width: 20px;
    margin-right: 10px;
    text-align: center;
}

/* ============ CONTENT ============ */
#page-content-wrapper {
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    transition: all 0.3s ease;
    min-height: 100vh;
    overflow-x: auto;
}

#wrapper.toggled #page-content-wrapper {
    width: 100%;
    margin-left: 0;
}

/* ============ AVATAR ============ */
.avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

/* ============ CARDS ============ */
.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

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

.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #333;
}

.stat-card .stat-label {
    font-size: 0.78rem;
    color: #888;
    margin-top: 2px;
}

/* ============ TABLES ============ */
.table-custom {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
    width: 100%;
}

.table-custom thead th {
    background: var(--primary);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    padding: 0.7rem 0.8rem;
    white-space: nowrap;
}

.table-custom tbody td {
    font-size: 0.85rem;
    padding: 0.6rem 0.8rem;
    vertical-align: middle;
    border-color: #f0f0f0;
}

.table-custom tbody tr:hover {
    background-color: #f8f9ff;
}

/* ============ BADGES ============ */
.badge-kbm { background: #e8f5e9; color: #2e7d32; }
.badge-tidak { background: #fff3e0; color: #e65100; }
.badge-libur { background: #fce4ec; color: #c62828; }
.badge-pns { background: #e3f2fd; color: #1565c0; }
.badge-pppk { background: #f3e5f5; color: #7b1fa2; }
.badge-gtt { background: #fff8e1; color: #f57f17; }
.badge-honorer { background: #fbe9e7; color: #bf360c; }
.badge-active { background: #e8f5e9; color: #2e7d32; }
.badge-inactive { background: #fafafa; color: #9e9e9e; }

/* ============ FORMS ============ */
.form-control:focus, .form-select:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 0.2rem rgba(21, 101, 192, 0.15);
}

.card-form {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* ============ BUTTONS ============ */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
}

/* ============ LOGIN ============ */
.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #0d4211 0%, #1a7e27 40%, #15c01d 100%);
}

.login-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    max-width: 420px;
    width: 100%;
}

.login-header {
    background: linear-gradient(135deg, #1a7e1a, #1bc015);
    padding: 2rem;
    text-align: center;
    color: #fff;
}

/* ============ PAGE HEADER ============ */
.page-header {
    margin-bottom: 1.5rem;
}

.page-header h4 {
    font-weight: 700;
    color: #333;
    margin: 0;
}

.page-header p {
    color: #888;
    font-size: 0.85rem;
    margin: 0.3rem 0 0;
}

/* ============ MONTH SELECTOR ============ */
.month-selector .btn {
    min-width: 100px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    #sidebar-wrapper {
        margin-left: calc(var(--sidebar-width) * -1);
    }

    #wrapper.toggled #sidebar-wrapper {
        margin-left: 0;
    }

    #page-content-wrapper {
        width: 100%;
        margin-left: 0;
    }

    #wrapper.toggled #page-content-wrapper {
        margin-left: var(--sidebar-width);
    }
}