:root {
    --primary-color: #006837;    /* Hijau Tua UMPP */
    --secondary-color: #00a651;  /* Hijau FIKES */
    --accent-color: #fbae17;     /* Kuning Emas */
    --dark-color: #1e293b;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --text-muted: #64748b;
    --transition: all 0.25s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--dark-color);
}

.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background-color: var(--primary-color);
    color: var(--white);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
}

.sidebar-brand {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.15);
}

.brand-icon {
    font-size: 2.2rem;
    color: var(--accent-color);
}

.sidebar-brand h2 {
    font-size: 1.15rem;
    font-weight: 600;
}

.sidebar-brand small {
    color: #cbd5e1;
    font-size: 0.75rem;
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: #f1f5f9;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    border-left: 4px solid transparent;
    transition: var(--transition);
}

.menu-item i {
    width: 28px;
    font-size: 1.1rem;
}

.menu-item:hover, .menu-item.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-left-color: var(--accent-color);
    font-weight: 500;
}

.badge {
    background-color: var(--accent-color);
    color: #000;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: auto;
}

/* Main Container */
.main-container {
    margin-left: 280px;
    width: calc(100% - 280px);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.header {
    background-color: var(--white);
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    border-bottom: 4px solid var(--secondary-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header-title h1 {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: 600;
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--secondary-color);
}

/* Content Area */
.content-body {
    padding: 30px;
    flex: 1;
}

/* Components UI */
.card {
    background: var(--white);
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
    border-top: 4px solid var(--primary-color);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: var(--white);
    padding: 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--secondary-color);
}

.stat-card.accent {
    border-left-color: var(--accent-color);
}

.stat-info h3 { font-size: 1.8rem; font-weight: 700; margin-bottom: 4px; color: var(--dark-color); }
.stat-info span { color: var(--text-muted); font-size: 0.8rem; font-weight: 500; }
.stat-icon i { font-size: 2.3rem; color: #e2e8f0; }

/* Table Responsive */
.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 15px; font-size: 0.85rem; }
table th, table td { padding: 14px 16px; border-bottom: 1px solid var(--border-color); text-align: left; }
table th { background-color: #f8fafc; color: var(--primary-color); font-weight: 600; }

/* Status */
.status { padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; }
.status-pending { background-color: #fef3c7; color: #d97706; }
.status-approved { background-color: #d1fae5; color: #059669; }

/* Footer */
.main-footer {
    background-color: var(--white);
    padding: 15px 30px;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}
.main-footer a { color: var(--primary-color); text-decoration: none; font-weight: 500; }

/* Style Tambahan untuk Halaman Form Peminjaman */
.card-header-form {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 20px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.form-icon-title {
    font-size: 2.5rem;
    color: var(--secondary-color);
}

.card-header-form h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
}

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color);
    background-color: #f0fdf4; /* Soft green background */
    padding: 8px 15px;
    border-radius: 4px;
    border-left: 4px solid var(--secondary-color);
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--dark-color);
}

.form-group label .required {
    color: #ef4444;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: #fff;
    color: var(--dark-color);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.1);
}

/* Row grouping untuk inputan pendek */
.form-group-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

textarea.form-control {
    resize: vertical;
}

/* Buttons actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.btn-secondary {
    background-color: #e2e8f0;
    color: var(--dark-color);
}
.btn-secondary:hover {
    background-color: #cbd5e1;
}

/* Memastikan responsivitas layout form pada layar desktop */
@media (min-width: 768px) {
    .form-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    .form-section-title, .full-width {
        grid-column: span 2;
    }
}

/* ==========================================================================
   RESET & PERBAIKAN GAYA TOMBOL (BUTTON UTAMA)
   ========================================================================== */

/* Ini untuk menghapus border & background abu-abu bawaan browser (Windows/Mac) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Jarak antara ikon dan teks */
    padding: 10px 24px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    border-radius: 6px; /* Membuat sudut tombol melengkung modern */
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Tombol Aksi / Kirim (Hijau FIKES UMPP) */
.btn-primary {
    background-color: var(--secondary-color) !important; /* Memaksa warna #00a651 */
    color: var(--white) !important;
    border-color: var(--secondary-color) !important;
}

.btn-primary:hover {
    background-color: var(--primary-color) !important; /* Berubah Hijau Tua saat disorot */
    border-color: var(--primary-color) !important;
    box-shadow: 0 4px 6px rgba(0, 68, 55, 0.15);
    transform: translateY(-1px); /* Efek mengangkat sedikit */
}

/* Tombol Bersihkan / Reset (Abu-abu / Outline Elegan) */
.btn-secondary {
    background-color: #f1f5f9 !important;
    color: var(--dark-color) !important;
    border-color: var(--border-color) !important;
}

.btn-secondary:hover {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
    transform: translateY(-1px);
}

/* Efek ketika tombol diklik (Active State) */
.btn:active {
    transform: translateY(1px);
    box-shadow: none;
}



/* Style Header Aksi di Atas Tabel */
.action-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.search-box {
    width: 300px;
}

.card-header-table {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.table-icon-title {
    font-size: 2.2rem;
    color: var(--primary-color);
}

/* Modifikasi Element Spesifik Tabel */
.code-badge {
    background-color: #f1f5f9;
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
}

.facility-tag {
    background-color: #eff6ff;
    color: #1d4ed8;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 4px;
    display: inline-block;
    border: 1px solid #bfdbfe;
}

/* Tombol Aksi Ikon (Edit & Delete) */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-edit {
    background-color: #fef3c7;
    color: #d97706;
    border-color: #fde68a;
}
.btn-edit:hover { background-color: #fde68a; }

.btn-delete {
    background-color: #fee2e2;
    color: #dc2626;
    border-color: #fecaca;
}
.btn-delete:hover { background-color: #fecaca; }

/* System Alerts */
.alert {
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-sukses { background-color: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }

/* MODAL DIALOG COMPONENT */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background-color: #fff;
    width: 100%;
    max-width: 550px;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    border-top: 5px solid var(--secondary-color);
    transform: translateY(-30px);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-container {
    transform: translateY(0);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-body { padding: 20px; }
.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.mb-3 { margin-bottom: 15px; }