/* public/assets/css/style.css */

/* --- 1. GLOBAL TYPOGRAPHY (ELEGANT STYLE) --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    --font-primary: 'Inter', 'Segoe UI', Helvetica, Arial, sans-serif;
    --bs-body-font-family: var(--font-primary);
    
    /* Standar Font Desktop (Lebih kecil dari default bootstrap 16px) */
    --bs-body-font-size: 0.875rem; /* Setara 14px */
}

body {
    background-color: #f0f2f5; /* Warna background ala Facebook/LinkedIn */
    font-family: var(--font-primary);
    color: #344767; /* Warna text abu gelap (lebih lembut di mata) */
    line-height: 1.5;
}

/* Memperkecil Heading agar tidak "Teriak" */
h1, .h1 { font-size: 1.5rem; font-weight: 700; }  /* 24px */
h2, .h2 { font-size: 1.25rem; font-weight: 700; } /* 20px */
h3, .h3 { font-size: 1.125rem; font-weight: 600; }/* 18px */
h4, .h4 { font-size: 1rem; font-weight: 600; }    /* 16px */
h5, .h5 { font-size: 0.95rem; font-weight: 600; } 
h6, .h6 { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* Link tidak digarisbawahi agar bersih */
a { text-decoration: none; }

/* --- 2. COMPONENT OVERRIDES (CARD & FORM) --- */
.card {
    border: none;
    border-radius: 12px; /* Sudut lebih membulat */
    box-shadow: 0 2px 12px rgba(0,0,0,0.05); /* Bayangan halus */
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #eee;
    padding: 1rem 1.25rem;
}

/* Input Form Lebih Slim */
.form-control, .form-select {
    font-size: 0.875rem; /* 14px */
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #d2d6da;
}

.form-control:focus {
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
    border-color: #0d6efd;
}

/* Tombol Lebih Compact */
.btn {
    font-size: 0.85rem; /* Sedikit lebih kecil dari 14px */
    padding: 0.4rem 1rem;
    border-radius: 8px;
    font-weight: 500;
}

.btn-sm {
    font-size: 0.75rem; /* 12px */
    padding: 0.25rem 0.5rem;
}

/* Tabel Text Kecil & Rapi */
.table {
    font-size: 0.85rem; /* 13.6px */
}
.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem; /* Header tabel kecil */
    letter-spacing: 0.5px;
    color: #8898aa;
}

/* --- 3. SWEETALERT CUSTOMIZATION (POPUP KECIL & ELEGAN) --- */
div:where(.swal2-container) div:where(.swal2-popup) {
    width: 24em !important; /* Lebar popup diperkecil */
    padding: 1.25em !important;
    border-radius: 15px !important;
    font-family: var(--font-primary) !important;
}

div:where(.swal2-container) .swal2-title {
    font-size: 1.2rem !important; /* Judul popup tidak raksasa */
    color: #344767 !important;
}

div:where(.swal2-container) .swal2-html-container {
    font-size: 0.9rem !important; /* Text isi popup kecil */
    margin: 0.5em 1em !important;
}

div:where(.swal2-container) .swal2-actions {
    margin-top: 1em !important;
}

div:where(.swal2-container) button.swal2-styled {
    font-size: 0.85rem !important; /* Tombol popup kecil */
    padding: 0.5em 1.5em !important;
    border-radius: 8px !important;
}

/* --- 4. MOBILE SPECIFIC (RESPONSIVE) --- */
@media (max-width: 768px) {
    /* BASE FONT MOBILE: 12px (Sesuai request) */
    html, body {
        font-size: 12px !important;
    }

    /* Heading Mobile Disesuaikan */
    h1, .h1 { font-size: 1.2rem !important; }
    h2, .h2 { font-size: 1.1rem !important; }
    h3, .h3 { font-size: 1rem !important; }
    h4, .h4 { font-size: 0.9rem !important; }
    h5, .h5 { font-size: 0.85rem !important; }
    
    /* Text Paragraph & Link di Mobile */
    p, span, a, div, .small, small {
        font-size: 12px !important; /* Paksa 12px untuk text biasa */
    }

    /* Tombol & Input Mobile */
    .btn, .form-control, .form-select {
        font-size: 12px !important;
        padding: 6px 10px !important;
    }

    /* Icon Grid Dashboard di Mobile (Biar gak kegedean) */
    .fa-2x {
        font-size: 1.5em !important;
    }
    .fa-3x {
        font-size: 2em !important;
    }

    /* SweetAlert di Mobile (Lebih kecil lagi) */
    div:where(.swal2-container) div:where(.swal2-popup) {
        width: 85% !important;
        padding: 1em !important;
    }
    div:where(.swal2-container) .swal2-title {
        font-size: 1rem !important;
    }
}

/* --- 5. UTILITY & NAVBAR --- */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Update Bagian Ini */
.card-login {
    width: 100%;
    max-width: 460px; /* DULU 380px -> SEKARANG 460px (Biar lebih lega) */
    padding: 10px;    /* Tambah sedikit padding di luar */
}

/* Tambahan agar Logo di tengah terlihat bagus */
.text-center img {
    display: inline-block;
}

.navbar-brand {
    font-size: 1.1rem; /* Logo text compact */
}
.offcanvas-custom {
    background-color: #0d6efd;
    color: white;
}
.offcanvas-custom .nav-link {
    font-size: 0.9rem; /* Menu font compact */
    color: rgba(255, 255, 255, 0.8) !important;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 12px 0;
}

/* --- 6. FIX DROPDOWN PROFILE (Agar Font Konsisten) --- */
.dropdown-menu {
    border: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1); /* Bayangan lebih halus */
    border-radius: 12px; /* Sudut membulat */
    padding: 0.5rem;
    font-size: 0.875rem !important; /* Paksa 14px di Desktop */
    min-width: 220px; /* Lebar minimum agar tidak gepeng */
}

.dropdown-item {
    border-radius: 8px; /* Item menu juga rounded */
    padding: 8px 16px;
    font-weight: 500;
    color: #344767;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: #f0f2f5;
    color: #0d6efd;
    transform: translateX(3px); /* Efek geser sedikit saat hover */
}

.dropdown-header {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8898aa;
    padding: 0.5rem 1rem;
}

/* --- 7. FIX TABLE MOBILE (SCROLLABLE VERSION) --- */
@media (max-width: 768px) {
    /* Container Tabel jadi bisa digeser kiri-kanan */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* Agar smooth di iPhone */
        display: block;
        width: 100%;
    }

    /* Font tabel di HP diperkecil dan dipadatkan */
    .table {
        min-width: 600px; /* Paksa lebar minimal agar tidak gepeng */
    }
    
    .table th, .table td {
        white-space: nowrap; /* Teks jangan turun ke bawah (wrapping) */
        padding: 8px 10px !important; /* Jarak dipersempit */
        font-size: 11px !important;
    }

    /* Header Tabel tetap muncul */
    .table thead {
        display: table-header-group;
    }
    
    /* Baris belang-belang agar mata tidak siwer */
    .table tbody tr:nth-of-type(odd) {
        background-color: rgba(0,0,0,0.02);
    }
}

/* --- 8. INDIKATOR MENU AKTIF --- */
.navbar-nav .nav-link.active {
        color: #fff !important;      /* Warna Teks Putih Terang */
        font-weight: 700 !important; /* Tebal */
        border-bottom: 2px solid #fff; /* Garis bawah putih */
        background-color: rgba(255,255,255,0.1); /* Sedikit background transparan */
        border-radius: 5px;
    }

/* Badge Emas Custom untuk "NEW" */
.bg-gold {
        background-color: #ffd700 !important;
        color: #000 !important; /* Teks hitam biar kontras */
        font-weight: bold;
    }
