/* ================= RESET ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

/* ================= BODY ================= */
body {
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
    color: #333;
    /* overflow-x: hidden; */
}
a {
    text-decoration: none;
}

/* ================= NAVBAR ================= */
.navbar {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    height: 70px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    padding: 0 25px;
    border-bottom: 1px solid #eee;
    z-index: 1000;
    transition: 0.3s;
}

.navbar .menu-toggle {
    font-size: 22px;
    cursor: pointer;
}

.navbar .user {
    margin-left: auto;
    font-weight: 600;
}

/* ================= SIDEBAR ================= */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    transition: 0.3s;
    height: 100%;
    background: linear-gradient(180deg, #065f46, #047857);
    color: white;
    padding: 25px;
    border-radius: 0 20px 20px 0;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.sidebar h3 {
    margin-bottom: 30px;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 8px;
    text-decoration: none;
    color: white;
    transition: 0.3s;
}
.sidebar a i {
    width: 20px; /* 🔥 bikin rata semua */
    text-align: center;
    font-size: 16px;
}
.sidebar a span {
    line-height: 1;
}

.sidebar a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(6px);
}

.sidebar a.active {
    background: white;
    color: #007975;

    font-weight: bold;
}

/* COLLAPSED */
.sidebar-collapsed .sidebar {
    width: 80px;
}

.sidebar-collapsed .sidebar span {
    display: none;
}

.sidebar-collapsed .content {
    margin-left: 80px;
}

.sidebar-collapsed .navbar {
    left: 80px;
}
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
}

/* ================= CONTENT ================= */
.content {
    margin-left: 260px;
    padding: 100px 30px;
    transition: 0.3s;
}

/* ================= CARD ================= */
.card-box {
    background: #ffffff;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* MODAL */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6); /* lebih gelap biar fokus */
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 20px;
    width: 350px;
    animation: fadeUp 0.3s ease;
}

/* MODAL MODERN */
.modern-modal {
    width: 420px;
    background: #f3f4f6;
    padding: 30px;
    border-radius: 20px;

    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    animation: fadeUp 0.3s ease;
}
.modern-modal h3 {
    margin-bottom: 20px;
    color: #065f46;
}

/* INPUT MODERN */
.modern-modal .input-group {
    margin-bottom: 15px;
}

.modern-modal label {
    color: #374151;
    font-weight: 500;
    font-size: 13px;
}

.modern-modal input {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #ddd;
    margin-top: 5px;
}

.modern-modal input:focus {
    border-color: #007975;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
    outline: none;
}

/* FIX SELECT DI MODAL HIJAU */
.modern-modal select {
    background: #ffffff !important;
    color: #111 !important;
}

/* OPTION DI MODAL */
.modern-modal select option {
    color: #111 !important;
    background: #ffffff !important;
}
.modern-modal input,
.modern-modal select {
    background: #ffffff !important; /* 🔥 wajib putih */
    border: 1.5px solid #cbd5e1 !important; /* abu jelas */
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    color: #111;
}
.modern-modal input:hover,
.modern-modal select:hover {
    border-color: #9ca3af;
}
.modern-modal input:focus,
.modern-modal select:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22,163,74,0.2);
    outline: none;
}

/* ACTION BUTTON */
.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.modal-actions .btn {
    flex: 1;
}

.btn-secondary {
    /* background: #e5e7eb; */
    background:#6b7280;
    color:white;
}

/* ===== NAVBAR EXTRA ===== */
.tahun-box {
    margin-left: 20px;
    background: #dcfce7;
    color: #166534;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.logout-btn {
    width: 100%;
    background: #ecfdf5;
    color: #16a34a;
}

.logout-btn:hover {
    background: #16a34a;
    color: white;
}

/* ===== BADGE ===== */
.badge {
    margin-left: auto;
    background: white;
    color: #16a34a;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: bold;
}
/* warna */
.badge.success {
    background: #dcfce7;
    color: #166534;
}

.badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

/* ================= TABLE FIX ================= */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}
thead th {
    text-align: left;
    padding: 12px 15px;
    font-weight: 600;
    color: #065f46;
}

tbody td {
    padding: 14px 15px;
    vertical-align: top;
    border-bottom: 1px solid #f1f5f9;
}

th {
    background: #f0fdf4;
    color: #065f46;
    font-weight: 600;
}

td {
    background: #ffffff;
}

th,
td {
    padding: 14px;
    border-bottom: 1px solid #eee;
}

/* hover */
tr:hover td {
    background: #f9fafb;
}
/* ================= TOTAL COLUMN ================= */
.col-total {
    min-width: 220px;
}

.main-total {
    font-weight: 700;
    font-size: 16px;
    color: #111827;
    margin-bottom: 4px;
}

.sub-total {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 3px;
}

.selisih {
    font-size: 13px;
    color: #92400e;
    margin-bottom: 6px;
}

/* ================= ACTION BUTTON ================= */
.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.action-buttons form {
    display: inline-block;
    margin: 0;
}

/* CARD DASHBOARD */
.dashboard-card {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: white;
    padding: 20px;
    border-radius: 18px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.3);
    transition: 0.3s;
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

/* ICON */
.dashboard-card i {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 30px;
    opacity: 0.2;
}

/* TITLE */
.dashboard-card small {
    opacity: 0.9;
}

/* NUMBER */
.dashboard-card h2 {
    margin-top: 10px;
    font-size: 28px;
}

/* GRID */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

/* ================= ICON BUTTON ================= */
.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    color: white;
}
 /* .btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    color: white;
    font-size: 14px;
} */


.btn-icon:hover {
    transform: scale(1.15);
}
/* EDIT */
.btn-edit {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
}
.btn-edit:hover {
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
}

/* DELETE */
.btn-delete {
    background: linear-gradient(135deg, #ef4444, #dc3545);
}
.btn-delete:hover {
    background: linear-gradient(135deg, #dc3545, #ef4444);
}
/* PRINT */
.btn-print {
    background: #17a2b8;
}
.btn-print:hover {
    background: #138496;
}



/* ================= DATATABLE FIX ================= */
.dataTables_wrapper {
    color: #333;
}

.dataTables_filter input,
.dataTables_length select {
    background: white;
    color: #111;
}

/* CONTAINER TOP */
.dataTables_wrapper .dataTables_length {
    float: left;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dataTables_wrapper .dataTables_filter {
    float: right;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* CLEAR FLOAT */
.dataTables_wrapper::after {
    content: "";
    display: block;
    clear: both;
}

/* INFO TEXT */
.dataTables_info {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

/* PAGINATION */
.dataTables_paginate {
    margin-top: 10px;
}

.dataTables_paginate .paginate_button {
    border-radius: 8px !important;
    padding: 5px 10px !important;
    margin: 2px;
    background: #eee !important;
    border: none !important;
}

.dataTables_paginate .paginate_button.current {
    background: #007975 !important;
    color: white !important;
}

/* RESPONSIVE FIX */
@media(max-width:768px) {

    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        float: none;
        justify-content: space-between;
        width: 100%;
    }
}

/* ================= LOGIN MODERN ================= */

.auth-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;

    background: radial-gradient(circle at top left, #22c55e, #15803d);
}
.auth-container .btn {
    width: 100%;
}

.auth-card-split {
    display: flex;
    width: 900px;
    max-width: 95%;

    border-radius: 25px;
    overflow: hidden;

    backdrop-filter: blur(20px);
    background: rgba(255,255,255,0.15);

    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
}
.auth-left {
    flex: 1;
    padding: 50px 40px;

    background: linear-gradient(135deg, #15803d, #22c55e);
    color: white;

    display: flex;
    flex-direction: column;
    justify-content: center;
}
.auth-left h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.auth-left .subtitle {
    opacity: 0.9;
    margin-bottom: 25px;
}
.benefits {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 14px;
}
.auth-right {
    flex: 1;
    padding: 45px 35px;
    background: rgba(255,255,255,0.9);
}
.auth-right label {
    color: #374151;
    font-weight: 500;
}
.auth-right h2 {
    margin-bottom: 20px;
    color: #065f46;
}
.auth-right .input-group {
    margin-bottom: 16px;
}
.auth-right input::placeholder {
    color: #9ca3af;
}
.auth-right input:focus,
.auth-right select:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
    background: #fff;
}
.auth-right .input-group label {
    color: #6b7280;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
}
.auth-right .btn {
    width: 100%;
    padding: 14px;

    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: white;

    border-radius: 12px;
    font-weight: 600;
}
.auth-right .input-group input,
.auth-right .input-group select {
    background: #ffffff !important;
    border: 1px solid #e5e7eb;
    color: #111;
}
.auth-right .auth-link {
    color: #6b7280; /* abu medium */
    text-align: center;
    margin-top: 15px;
}
.auth-right .auth-link a {
    color: #16a34a; /* hijau utama */
    font-weight: 600;
    text-decoration: none;
}

.auth-right .auth-link a:hover {
    text-decoration: underline;
}
@media(max-width:768px){
    .auth-card-split {
        flex-direction: column;
    }

    .auth-left {
        text-align: center;
        padding: 30px;
    }
}

/* CARD LOGIN */
.card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(25px);

    border-radius: 24px;
    padding: 45px 35px;
    width: 100%;
    max-width: 420px;

    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255,255,255,0.2);

    animation: fadeUp 0.5s ease;
}

/* TITLE */
.card h2 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 25px;
}

/* ================= INPUT ================= */
.input-group {
    margin-bottom: 20px;
}
.input-group label {
    font-weight: 600;
    color: #065f46; /* hijau seperti kanan */
    margin-bottom: 8px;
    font-size: 14px;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 14px 16px;
    /* border-radius: 14px; */
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
    font-size: 14px;
    transition: all 0.25s ease;

    height: 45px;
    border-radius: 10px;
    padding: 8px 12px;
    /* border: 1px solid #d1d5db; */
    /* font-size: 14px; */
}

.input-group input:focus,
.input-group select:focus {
    border-color: #22c55e;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
    transform: scale(1.02);
}
.input-wrapper {
    position: relative;
}

.input-wrapper input {
    padding-right: 45px; /* ruang untuk icon */
}
/* SELECT2 FIX */
.select2-container .select2-selection--single {
    height: 45px !important;
    border-radius: 10px !important;
    border: 1px solid #d1d5db !important;
    padding: 8px 12px !important;
}

/* text di dalam select2 */
.select2-selection__rendered {
    line-height: 28px !important;
    padding-left: 0 !important;
}

/* arrow select2 */
.select2-selection__arrow {
    height: 45px !important;
}


.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 16px;
    color: #6b7280;
    user-select: none;
    transition: 0.2s;
}

.toggle-password:hover {
    color: #16a34a;
}

/* PLACEHOLDER */
/* .input-group input::placeholder {
    color: rgba(255, 255, 255, 0.7);
} */


/* FIX SELECT DROPDOWN */
select {
    color: #111 !important;
    background: #fff !important;
}

/* OPTION BIAR TERLIHAT */
select option {
    color: #000 !important;
    background: #fff !important;
}

/* FOCUS */
select:focus {
    outline: none;
    border-color: #16a34a;
}

/* ================= ALERT ================= */
.alert {
    position: relative;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;

    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    animation: fadeIn 0.3s ease;
}

/* ICON BULAT */
.alert i {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* CLOSE BUTTON */
.alert .close-btn {
    margin-left: auto;
    cursor: pointer;
    opacity: 0.6;
}
.alert .close-btn:hover {
    opacity: 1;
}

/* SUCCESS */
.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.alert-success i {
    background: #10b981;
    color: white;
}

/* ERROR */
.alert-danger {
    background: #fef2f2;
    color: #7f1d1d;
    border: 1px solid #fecaca;
}
.alert-danger i {
    background: #ef4444;
    color: white;
}

/* WARNING */
.alert-warning {
    background: #fffbeb;
    color: #78350f;
    border: 1px solid #fde68a;
}
.alert-warning i {
    background: #f59e0b;
    color: white;
}

/* ANIMASI */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= BUTTON ================= */
.btn {
    width: auto;
    display: inline-block;
    padding: 14px;
    border-radius: 14px;

    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: white;

    font-size: 15px;
    font-weight: 600;

    transition: all 0.3s ease;
}
/* ================= BUTTON ================= */
/* .btn {
    padding: 10px 15px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    position: relative;
    z-index: 10;
    text-decoration: none !important;
} */
 .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(34, 197, 94, 0.4);
}

/* primary */
.btn-primary {
    background: #16a34a;
    color: white;
}

.btn-primary:hover {
    background: #15803d;
}

/* secondary */
.btn-secondary {
    background: #e5e7eb;
    color: #111;
    text-decoration: none;
}

/* LINK */
.auth-link {
    text-align: center;
    margin-top: 15px;
    color: white;
}

.auth-link a {
    color: #bbf7d0;
    font-weight: bold;
}

/* ERROR BOX */
.error-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 5px solid #ef4444;
    border-radius: 12px;
    padding: 15px 18px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

.error-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #b91c1c;
    margin-bottom: 10px;
    font-size: 15px;
}

.error-header i {
    font-size: 16px;
}

.error-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.error-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: #7f1d1d;
    line-height: 1.4;
}

.error-item i {
    color: #ef4444;
    margin-top: 2px;
}

/* ================= MODAL ================= */
.modern-modal {
    width: 420px;
    background: #ffffff;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

/* select fix */
.modern-modal select {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #ddd;

    background: #ffffff !important;
    color: #111 !important;

    appearance: auto;
    /* 🔥 penting */
    -webkit-appearance: auto;
    -moz-appearance: auto;
}

/* option fix */
.modern-modal select option {
    background: #ffffff !important;
    color: #111 !important;
}

/* ================= RESPONSIVE ================= */
@media(max-width:768px) {

    .sidebar {
        left: -260px;
        position: fixed;
    }

    .sidebar.show {
        left: 0;
        overflow-y: auto;
    }

    .content {
        margin-left: 0;
        padding: 90px 15px;
    }

    .navbar {
        left: 0;
    }
}
