/* assets/css/style.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url('../img/desa.png');
    background-size: cover;
    background-position: center;
    filter: blur(1px);
    transform: scale(1.05);
    z-index: -2;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(245, 247, 250, 0.88);
    z-index: -1;
}

/* ========== SIDEBAR ========== */
.sidebar {
    width: 260px;
    background: #1a4d3e;
    color: #fff;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar-brand {
    padding: 25px 20px 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand i {
    font-size: 32px;
    color: #a8d5ba;
    display: block;
    margin-bottom: 8px;
}

.sidebar-brand span {
    font-size: 20px;
    font-weight: bold;
    display: block;
    color: #fff;
}

.sidebar-brand small {
    font-size: 11px;
    color: #a8d5ba;
    display: block;
    margin-top: 4px;
}

.sidebar-user {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-user i {
    font-size: 28px;
    color: #a8d5ba;
}

.sidebar-user span {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
}

.sidebar-menu {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.sidebar-menu li {
    margin: 2px 12px;
    border-radius: 8px;
    transition: all 0.3s;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.3s;
}

.sidebar-menu li a i {
    width: 22px;
    font-size: 16px;
    text-align: center;
}

.sidebar-menu li:hover {
    background: rgba(255,255,255,0.1);
}

.sidebar-menu li:hover a {
    color: #fff;
}

.sidebar-menu li.active {
    background: rgba(255,255,255,0.15);
}

.sidebar-menu li.active a {
    color: #fff;
    font-weight: 600;
}

.sidebar-menu li.logout {
    margin-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 10px;
}

.sidebar-menu li.logout a {
    color: #ff6b6b;
}

.sidebar-menu li.logout a:hover {
    background: rgba(255,107,107,0.15);
    color: #ff6b6b;
}

/* ========== MAIN CONTENT ========== */
.main-content {
    margin-left: 260px;
    flex: 1;
    padding: 20px 30px;
    min-height: 100vh;
    width: calc(100% - 260px);
}

/* ========== TOP BAR ========== */
.top-bar {
    background: #fff;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar h4 {
    margin: 0;
    font-weight: 600;
    color: #1a4d3e;
}

.top-bar h4 i {
    color: #1a4d3e;
    margin-right: 10px;
}

.top-bar .breadcrumb {
    margin: 0;
    background: none;
    padding: 0;
}

.top-bar .breadcrumb-item a {
    color: #1a4d3e;
    text-decoration: none;
}

/* ========== CARDS ========== */
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s;
    border-left: 4px solid #1a4d3e;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-card .icon {
    font-size: 28px;
    color: #1a4d3e;
    opacity: 0.7;
}

.stat-card .value {
    font-size: 28px;
    font-weight: 700;
    color: #1a4d3e;
}

.stat-card .label {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

.stat-card.card-green {
    border-left-color: #28a745;
}
.stat-card.card-green .value { color: #28a745; }
.stat-card.card-green .icon { color: #28a745; }

.stat-card.card-red {
    border-left-color: #dc3545;
}
.stat-card.card-red .value { color: #dc3545; }
.stat-card.card-red .icon { color: #dc3545; }

.stat-card.card-blue {
    border-left-color: #007bff;
}
.stat-card.card-blue .value { color: #007bff; }
.stat-card.card-blue .icon { color: #007bff; }

.stat-card.card-orange {
    border-left-color: #fd7e14;
}
.stat-card.card-orange .value { color: #fd7e14; }
.stat-card.card-orange .icon { color: #fd7e14; }

/* ========== TABLE ========== */
.table-wrapper {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.table-wrapper .table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.table-wrapper .table-header .left {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.table-wrapper .table-header .right {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.table-wrapper table {
    margin-bottom: 0;
}

.table-wrapper table thead th {
    background: #f8f9fa;
    color: #1a4d3e;
    font-weight: 600;
    font-size: 13px;
    border-bottom: 2px solid #e9ecef;
    white-space: nowrap;
}

.table-wrapper table tbody td {
    vertical-align: middle;
    font-size: 13px;
}

/* ========== BUTTONS ========== */
.btn-primary-custom {
    background: #1a4d3e;
    border: none;
    color: #fff;
}

.btn-primary-custom:hover {
    background: #143b2f;
    color: #fff;
}

.btn-outline-custom {
    border: 1px solid #1a4d3e;
    color: #1a4d3e;
}

.btn-outline-custom:hover {
    background: #1a4d3e;
    color: #fff;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    .sidebar .sidebar-brand span,
    .sidebar .sidebar-brand small,
    .sidebar .sidebar-user span,
    .sidebar .sidebar-menu li a span {
        display: none;
    }
    .sidebar .sidebar-brand i {
        font-size: 24px;
    }
    .sidebar .sidebar-user {
        justify-content: center;
    }
    .sidebar .sidebar-user i {
        font-size: 24px;
    }
    .sidebar .sidebar-menu li a {
        justify-content: center;
        padding: 12px;
    }
    .sidebar .sidebar-menu li a i {
        font-size: 20px;
    }
    .main-content {
        margin-left: 70px;
        width: calc(100% - 70px);
        padding: 15px;
    }
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #1a4d3e;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #143b2f;
}

/* ========== MODAL ========== */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.modal-header {
    background: #1a4d3e;
    color: #fff;
    border-radius: 12px 12px 0 0;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}