/* ==========================================================================
   Galeri Prompt Banana CSS - Refactored
   ========================================================================== */

/* 1. VARIABLES & GENERAL STYLES
   ========================================================================== */
:root {
    /* Colors */
    --soft-blue-bg: #EFF6FF;
    --text-dark: #1F2937;
    --text-medium: #4B5563;
    --primary-blue-dark: #1E40AF;
    --primary-blue: #2563EB;
    --primary-blue-light: #3B82F6;
    --primary-green: #047857;
    --success-green: #10B981;
    --light-gray-bg: #F9FAFB;
    --light-gray-border: #E5E7EB;
    --white: #FFFFFF;
    --danger-red: #EF4444;

    /* Typography */
    --font-family-sans: 'Inter', sans-serif;

    /* Sizing & Spacing */
    --header-height-desktop: 80px;
    --header-height-mobile: 70px;

    /* Borders & Shadows */
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 1rem;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family-sans);
    background-color: var(--soft-blue-bg);
    color: var(--text-dark);
    line-height: 1.6;
    padding-top: var(--header-height-desktop);
    padding-bottom: 80px; /* <-- TAMBAHKAN BARIS INI */
}

/* 2. LAYOUT & CONTAINER
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding: 2rem 1rem;
}

/* [PERBAIKAN] Membuat layout kartu Masonry menjadi responsif */
.prompt-grid {
    display: block;
    column-gap: 1.5rem;
    column-count: 1; /* Default untuk layar terkecil */
}
@media (min-width: 400px) {
    .prompt-grid { column-count: 2; } /*edit kolom*/
}
@media (min-width: 768px) {
    .prompt-grid { column-count: 4; }
}
@media (min-width: 1024px) {
    .prompt-grid { column-count: 5; }
}


/* 3. HEADER
   ========================================================================== */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--white);
    box-shadow: var(--shadow-md);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.header-title h1 {
    font-size: 1.2rem;
    color: var(--primary-blue-dark);
    white-space: nowrap;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-input, .filter-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--light-gray-border);
    border-radius: var(--border-radius-md);
    font-size: 0.9rem;
}

.search-form-overlay {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 0.75rem 1rem;
    z-index: 1002;
    border-bottom: 1px solid var(--light-gray-border);
}

.search-form-overlay.active {
    display: block;
}

/* 4. CARD COMPONENT
   ========================================================================== */
.card {
    position: relative;
    background: linear-gradient(180deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0) 20%), var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: inline-block;
    width: 100%;
    margin-bottom: 1.5rem;
    break-inside: avoid; /* Mencegah kartu terpotong di layout kolom */
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    animation: glow 2s infinite ease-in-out;
}

.card-image-container {
    position: relative;     
    width: 100%;
    overflow: hidden;
}

.card-image-container img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* GANTI KODE LAMA ANDA DENGAN INI */
.image-overlay-text {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background-color: rgba(0, 0, 0, 0.4); /* Buat sedikit lebih gelap agar kontras */
    color: white;
    padding: 1rem 1rem; /* [DIPERBAIKI] Padding ditambah */
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2); /* Border lebih lembut */
    transition: all 0.2s ease;
    z-index: 6; /* [DITAMBAH] Pastikan di atas tombol admin */
}

.image-overlay-text:hover {
    background-color: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

.card-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-grow: 1;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-blue-dark);
}

.card-user {
    font-size: 0.8rem;
    color: var(--text-medium);
    font-style: italic;
}

.prompt-wrapper {
    position: relative;
}

.prompt-textarea {
    width: 100%;
    height: 7rem;
    padding: 0.75rem;
    background-color: #F3F4F6;
    border: 1px solid var(--light-gray-border);
    border-radius: var(--border-radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    resize: none;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.5rem;
}

/* Style untuk Tags di Overlay Kartu */
.card-tags-overlay {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.5rem;
    
}
.tag-overlay {
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.5rem 0.5rem;
}
.tag-overlay:hover {
    background: var(--primary-blue);
    color: var(--white);
}

/* Style untuk Tombol Like di Modal */
.like-btn {
    flex: 0 1 auto; /* Jangan membesar, sesuaikan dengan konten */
    background-color: #F3F4F6;
    color: var(--text-medium);
    padding: 0.75rem 1rem;
}
.like-btn .material-icons {
    color: var(--danger-red);
    transition: transform 0.2s ease;
}
.like-btn.liked {
    background-color: #FEE2E2; /* Latar belakang merah muda */
    color: var(--danger-red);
    font-weight: 600;
}
.like-btn:hover .material-icons {
    transform: scale(1.2);
}

.tag {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-medium);
    background-color: transparent;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--light-gray-border);
    cursor: pointer;
    transition: all 0.2s ease;
}
.tag:hover {
    background-color: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

.tag-category {
    background-color: var(--soft-blue-bg);
    border-color: var(--primary-blue-light);
    color: var(--primary-blue-dark);
    font-weight: 600;
}

.card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
    border-top: 1px solid var(--light-gray-border);
    padding-top: 1rem;
}

.action-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    color: white;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.action-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.edit-btn { background-color: var(--primary-blue); }
.edit-btn:hover { background-color: var(--primary-blue-dark); }

.delete-btn { background-color: var(--danger-red); }
.delete-btn:hover { opacity: 0.8; }

.action-btn .tooltip {
    top: 120%;
    font-size: 0.75rem;
    pointer-events: none;
}

.action-btn:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* 5. MODAL
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

/* style baru */
.modal-content {
    background-color: var(--white);
    padding: 20px;
    width: 90%;
    max-width: 500px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    
    /* [TAMBAHAN] Ini solusinya */
    max-height: 90vh; /* Batasi tinggi pop-up, maks 90% dari tinggi layar */
    overflow-y: auto; /* Tambahkan scroll otomatis jika kontennya panjang */
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--light-gray-border);
    padding-bottom: 1rem;
}

.modal-header h2 {
    color: var(--primary-blue-dark);
}

.modal-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-body form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Cari bagian .modal-body input... dan ganti dengan blok ini */

/* 1. Style Gabungan untuk Input, Textarea, dan Select (Dropdown) */
.modal-body input:not([type="file"]), 
.modal-body textarea, 
.modal-body select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--light-gray-border);
    border-radius: var(--border-radius-md); /* Membuat sudut melengkung (rounded) */
    font-family: var(--font-family-sans);
    font-size: 0.95rem;
    color: var(--text-dark);
    background-color: var(--white);
    transition: all 0.2s ease;
}

/* 2. Khusus untuk Dropdown (Select): Hilangkan panah bawaan & beri panah kustom */
.modal-body select {
    appearance: none;        /* Hapus style default browser */
    -webkit-appearance: none;
    -moz-appearance: none;
    
    /* Ikon Panah Kustom (SVG Abu-abu) */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem; /* Beri jarak di kanan agar teks tidak menabrak panah */
    cursor: pointer;
}

/* 3. Efek Fokus (Saat diklik menyala biru) */
.modal-body input:focus, 
.modal-body textarea:focus, 
.modal-body select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.form-group {
    flex: 1;
    min-width: 150px;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-medium);
}

/* 6. BUTTONS & UTILITIES
   ========================================================================== */
.auth-button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.login-btn { background-color: var(--primary-blue); color: white; }
.logout-btn { background-color: var(--danger-red); color: white; }
#add-prompt-link { display: none; }

.copy-btn {
    background: none;
    border: 1px solid var(--light-gray-border);
    border-radius: var(--border-radius-sm);
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-medium);
    transition: all 0.2s ease;
    align-self: flex-end;
    margin-bottom: 0.5rem;
}
.copy-btn.copied {
    background-color: var(--success-green);
    color: white;
    border-color: var(--success-green);
}
.copy-btn svg { width: 14px; height: 14px; }

.icon-btn, .auth-icon-btn {
    background: var(--primary-blue);
    border: none;
    border-radius: var(--border-radius-md);
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: #fff;
    transition: background-color 0.2s, opacity 0.2s;
}

.reset-btn {
    background-color: #e5e7eb;
    color: #4b5563;
}

.reset-btn:hover {
    background-color: #d1d5db;
}

#add-prompt-link-mobile { background-color: var(--primary-green); }
.auth-icon-btn.logout { background-color: var(--danger-red); }

.tooltip {
    visibility: hidden;
    opacity: 0;
    background: #333;
    color: #fff;
    text-align: center;
    border-radius: var(--border-radius-sm);
    padding: 0.25rem 0.7rem;
    position: absolute;
    z-index: 10;
    left: 50%;
    top: 110%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    white-space: nowrap;
    transition: opacity 0.2s;
    pointer-events: none;
}

.close-btn {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    background: none;
}

/* 7. ANIMATIONS & HOVER STATES
   ========================================================================== */
@keyframes glow {
    0% { box-shadow: 0 0 4px 0px rgba(37, 99, 235, 0.2); }
    50% { box-shadow: 0 0 16px 6px rgba(37, 99, 235, 0.4); }
    100% { box-shadow: 0 0 4px 0px rgba(37, 99, 235, 0.2); }
}

@media (hover: hover) {
    .copy-btn:hover { background-color: #F3F4F6; }
    #add-prompt-link-mobile:hover { background: var(--success-green); }
    .icon-btn:hover .tooltip, .auth-icon-btn:hover .tooltip {
        visibility: visible;
        opacity: 1;
    }
    .auth-icon-btn:hover { background: var(--primary-blue-light); }
    .auth-icon-btn.logout:hover { opacity: 0.8; }
}

/* 8. RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 768px) {
    body {
        padding-top: var(--header-height-mobile);
    }
    .sticky-header {
        padding: 0.5rem 0.5rem;
    }
    .header-title h1 {
        font-size: 1rem;
    }
    .container {
        padding: 2rem 2rem;
    }

    .header-controls .filter-input,
    .header-controls .auth-button,
    .header-controls #add-prompt-link,
    #search-btn,
    #add-prompt-link-mobile,
    #auth-container-mobile {
        display: none !important;
    }

    #category-filter {
        display: inline-flex;
        flex-grow: 1;
    }
}

@media (min-width: 769px) {
    #search-btn { display: none; }

    .header-controls .filter-input,
    .header-controls .auth-button,
    .header-controls #add-prompt-link,
    #category-filter {
        display: inline-flex;
    }
    
    .search-form-overlay {
        display: none !important;
    }
}

/* 9. FOOTER
   ========================================================================== */
.site-footer {
    width: 100%;
    padding: 2.5rem 1rem;
    margin-top: 2rem;
    border-top: 1px solid var(--light-gray-border);
    background-color: var(--white);
}

.site-footer p {
    text-align: center;
    color: var(--text-medium);
    font-size: 0.875rem;
}

.site-footer a {
    color: var(--primary-blue-dark);
    text-decoration: none;
    font-weight: 500;
    transition: text-decoration 0.2s ease;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* 10. BOTTOM NAVIGATION (MOBILE ONLY)
   ========================================================================== */
/* GANTI .bottom-nav-mobile LAMA DENGAN INI UNTUK EFEK KACA */
.bottom-nav-mobile {
    display: flex; 
    position: fixed;
    bottom: 1rem; 
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 450px;
    z-index: 1010;
    height: 65px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-radius: 999px;

    /* [PERUBAHAN UTAMA UNTUK EFEK KACA] */
    /* 1. Latar belakang menjadi semi-transparan */
    background-color: rgba(255, 255, 255, 0.6);
    /* 2. EFEK BLUR untuk konten di belakangnya (ini intinya!) */
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    /* 3. Border semi-transparan untuk mempertegas efek kaca */
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* 4. Bayangan yang lebih lembut */
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: var(--text-medium);
    text-decoration: none;
    padding: 4px 0;
    transition: color 0.2s ease-in-out;
}

.nav-item:hover {
    color: var(--primary-blue);
}

.nav-item.active {
    color: var(--primary-blue-dark);
    font-weight: 500;
}

.nav-item .material-icons {
    font-size: 24px;
}

.nav-label {
    font-size: 11px;
    margin-top: 2px;
}

.nav-add-fab {
    transform: translateY(-20px);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-green);
    color: var(--white);
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--white);
    flex: none; 
}

.nav-add-fab .material-icons {
    font-size: 32px;
}

.nav-add-fab:hover {
    background-color: var(--success-green);
    color: var(--white);
}



@media (max-width: 768px) {

}

/* 11. IMAGE PREVIEW IN MODAL
   ========================================================================== */
.image-container-with-delete {
    position: relative;
    display: inline-block;
    margin-top: 0.5rem;
}

/* [PERBAIKAN] Ukuran pratinjau gambar di modal dan object-fit */
#prompt-image-preview {
    max-width: 100%;
    max-height: 100px;
    width: 100%;
    object-fit: contain;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--light-gray-border);
    display: block;
    background-color: #f9fafb;
}

.delete-image-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 28px;
    height: 28px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    z-index: 10;
    transition: background-color 0.2s ease;
}

.delete-image-btn:hover {
    background-color: var(--danger-red);
}

.bottom-nav-mobile .tooltip {
    top: auto;
    bottom: 115%;
}

/* ==========================================================================
   12. [BERSIH] DESAIN KARTU (OVERLAY GAMBAR)
   ========================================================================== */

/* 1. Modifikasi .card */
.card {
    background: var(--light-gray-bg);
    position: relative;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: inline-block;
    width: 100%;
    margin-bottom: 1.5rem;
    break-inside: avoid;
    border: none;
    transition: transform 0.3s ease;
}

/* 2. Modifikasi .card-image-container dan <img> */
.card-image-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    line-height: 0;
    cursor: zoom-in; /* Petunjuk kursor "zoom" */
}

.card-image-container img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    border-radius: var(--border-radius-lg);
    transition: transform 0.3s ease;
}

.card:hover .card-image-container img {
    transform: scale(1.05);
}

/* 3. Sembunyikan .card-content lama */
.card-content {
    display: none;
}

/* 4. [BARU] Ikon petunjuk 'expand' (solusi mobile) */
.card-expand-hint {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    padding: 5px;
    z-index: 6; 
    pointer-events: none; /* [PENTING] Agar klik tembus ke gambar */
    backdrop-filter: blur(2px);
    transition: all 0.2s ease;
}

/* Sembunyikan ikon ini jika tombol admin muncul (saat login & hover) */
.card:hover .card-actions + .card-expand-hint {
    display: none;
}

/* Sembunyikan juga di desktop saat overlay info muncul */
@media (min-width: 769px) {
    .card:hover .card-expand-hint {
        opacity: 0;
        visibility: hidden;
    }
}

/* 5. Tombol Copy di Overlay */
.copy-btn-overlay {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    border-radius: var(--border-radius-md);
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0; /* Mencegah tombol mengecil */
}
.copy-btn-overlay .material-icons {
    font-size: 20px;
}
.copy-btn-overlay .copy-text {
    display: none;
    font-size: 0.8rem;
    font-weight: 500;
}
.copy-btn-overlay:hover {
    background: rgba(255, 255, 255, 0.4);
}
.copy-btn-overlay.copied {
    background-color: var(--success-green);
    border-color: var(--success-green);
}
.copy-btn-overlay.copied .material-icons {
    display: none;
}
.copy-btn-overlay.copied .copy-text {
    display: inline;
    padding: 0 0.25rem;
}

/* 6. Tombol Admin .card-actions */
.card-actions {
    margin-top: 0;
    border-top: none;
    padding-top: 0;
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 5;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease-in-out;
}

.card:hover .card-actions {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 7. [MODIFIKASI] Overlay untuk Info Hover (Judul & User) */
.card-prompt-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: var(--white);
    border-bottom-left-radius: var(--border-radius-lg);
    border-bottom-right-radius: var(--border-radius-lg);
    
    /* Layout baru (info di kiri, tombol di kanan) */
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;

    /* Animasi muncul saat hover */
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.card:hover .card-prompt-overlay {
    transform: translateY(0);
    opacity: 1;
}

/* 8. [BARU] Styling untuk info di overlay (INI YANG HILANG) */
.overlay-info {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* Tambah gap antara judul dan author */
    flex-grow: 1;
    min-width: 0;
}

.overlay-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    display: block; /* Pastikan judul ditampilkan */
}

.overlay-user {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    display: block; /* Pastikan author ditampilkan */
}

/* ==========================================================================
   13. [BARU] MODAL FULL VIEW (LIGHTBOX)
   ========================================================================== */

.modal-fullview {
    z-index: 2000; /* Paling atas */
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem;
    align-items: center; /* Pusatkan konten */
}

.close-btn-fullview {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    
    /* [PERUBAHAN] Dibungkus warna merah */
    background-color: var(--danger-red);
    color: var(--white);
    border: 2px solid var(--white);
    box-shadow: var(--shadow-md);
    border-radius: 50%;
    width: 44px;  /* Ukuran lingkaran */
    height: 44px; /* Ukuran lingkaran */
    font-size: 24px; /* Ukuran 'x' */
    font-weight: bold;
    line-height: 40px; /* Sesuaikan agar 'x' di tengah */
    text-align: center;
    padding: 0;
    
    cursor: pointer;
    z-index: 2001;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.close-btn-fullview:hover {
    transform: scale(1.1);
    background-color: #d73737; /* Merah lebih gelap saat hover */
}

.modal-content-fullview {
    width: 100%;
    max-width: 1400px; /* Batas lebar maksimum */
    height: 90vh; /* Tinggi 90% dari layar */
    display: flex;
    background: none; /* Hapus background, kita hanya butuh 2 kolom */
    padding: 0;
    box-shadow: none;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.modal-image-side {
    flex: 3; /* Ambil 3 bagian (misal 60%) */
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg);
    overflow: hidden;
    height: 100%;
}
.modal-image-side img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Tampilkan gambar penuh tanpa terpotong */
}

.modal-prompt-side {
    flex: 2; /* Ambil 2 bagian (misal 40%) */
    background: var(--white);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 0 var(--border-radius-lg) var(--border-radius-lg) 0;
}
.modal-prompt-side h2 {
    color: var(--primary-blue-dark);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--light-gray-border);
    padding-bottom: 1rem;
}

.prompt-text-container {
    flex-grow: 1; /* Penuhi sisa ruang */
    background-color: var(--light-gray-bg);
    border: 1px solid var(--light-gray-border);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    overflow-y: auto; /* Bisa scroll jika prompt sangat panjang */
    margin-bottom: 1.5rem;
}
.prompt-text-container p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-dark);
    white-space: pre-wrap; /* Jaga format baris baru */
    word-break: break-word;
}

#view-modal-copy-btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
}
#view-modal-copy-btn.copied {
    background-color: var(--success-green) !important;
}

/* [BARU] CSS untuk Info Author di Modal */
.prompt-author-info {
    margin-top: -0.75rem; /* Tarik ke atas, lebih dekat ke H2 */
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    color: var(--text-medium);
}
.prompt-author-info a {
    color: var(--primary-blue);
    font-weight: 500;
    text-decoration: none;
}
.prompt-author-info a:hover {
    text-decoration: underline;
}

/* Penyesuaian untuk Mobile */
@media (max-width: 768px) {
    .modal-content-fullview {
        flex-direction: column;
        height: 85vh;
    }
    .modal-image-side, .modal-prompt-side {
        flex: 1; /* Bagi rata */
        border-radius: 0;
    }
    .modal-image-side {
        border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    }
    .modal-prompt-side {
        border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
        padding: 1.5rem;
    }
    .prompt-text-container p {
        font-size: 0.9rem;
    }
    .close-btn-fullview {
        top: 0.75rem;
        right: 0.75rem;
        width: 36px;
        height: 36px;
        font-size: 20px;
        line-height: 32px; /* Sesuaikan agar 'x' di tengah */
    }
}

/* [BARU] Styling untuk tombol Generate */
.generate-btn {
    background-color: var(--success-green); /* Warna hijau */
    color: white;
    text-decoration: none; /* Menghilangkan garis bawah <a> */
}
.generate-btn:hover {
    background-color: var(--primary-green); /* Hijau lebih gelap saat hover */
}

#view-modal-generate-btn.copied {
    background-color: var(--primary-green); /* Hijau lebih gelap */
}

/* [BARU] Wrapper untuk 2 tombol di modal view */
.modal-button-group {
    display: flex;
    gap: 1rem; /* Jarak antar tombol */
    width: 100%;
    position: relative; /* <-- TAMBAHKAN BARIS INI */
}

/* [MODIFIKASI] Mengatur ulang lebar tombol Salin & Generate */
#view-modal-copy-btn,
#view-modal-generate-btn {
    flex: 1; /* Membuat kedua tombol memiliki lebar yang sama */
    width: auto; /* Menimpa width: 100% sebelumnya */
    font-size: 1rem;
    padding: 0.75rem;
}

/* ==========================================================================
   14. [BARU] CSS UNTUK POP-UP PROMPT MOBILE
   ========================================================================== */

   /* [PERBAIKAN Z-INDEX] */
#prompt-text-popup {
    z-index: 2001; /* Pastikan ini lebih tinggi dari .modal-fullview (2000) */
}
/* Styling untuk textarea di dalam pop-up baru */
#popup-prompt-textarea {
    width: 100%;
    height: 250px; /* Beri tinggi yang cukup */
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.6;
    resize: none;
    background: var(--light-gray-bg);
    border: 1px solid var(--light-gray-border);
    border-radius: var(--border-radius-md);
    padding: 0.75rem;
}

/* Status "copied" untuk tombol di pop-up baru */
#popup-copy-btn.copied {
    background-color: var(--success-green) !important;
}


/* ==========================================================================
   15. [MODIFIKASI] TAMPILAN FULL VIEW (KHUSUS MOBILE)
   ========================================================================== */

/* Blok media query ini akan menimpa CSS desktop HANYA di mobile */
@media (max-width: 768px) {
    
    /* 1. Konten modal full-view utama (sudah ada) */
    .modal-content-fullview {
        flex-direction: column;
        height: 85vh;
    }

    /* 2. Sisi gambar: Paksa ambil semua ruang (bukan 50%) */
    .modal-image-side {
        flex: 1; /* Biarkan ini mengambil semua ruang yang tersedia */
        min-height: 0; /* Trik agar flexbox bekerja benar */
        border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    }

    /* 3. Sisi prompt: Paksa menyusut ke kontennya (Author + Tombol) */
    .modal-prompt-side {
        flex: none; /* [PENTING] Hentikan 50/50 split */
        height: auto; /* [PENTING] Tinggi sesuai konten */
        border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
        padding: 1.5rem;
        box-shadow: 0 -5px 15px rgba(0,0,0,0.1); /* Efek bayangan */
    }

    /* 4. [PENTING] Sembunyikan elemen yang tidak perlu di tampilan utama */
    .modal-prompt-side h2 {
        display: none;
    }
    .modal-prompt-side .prompt-text-container {
        display: none;
    }
    
    /* 5. Pastikan info author tetap di atas tombol */
    .prompt-author-info {
        margin-top: 0;
        margin-bottom: 1rem;
        text-align: center;
    }
    /*6. Perkecil grup tombol modal di mobile */
    .modal-button-group {
        gap: 0.5rem; /* Kurangi jarak antar tombol (dari 1rem) */
    }

    /* 7. Target semua tombol di grup itu */
    .modal-button-group .auth-button {
        font-size: 0.8rem; /* Kecilkan font (dari 1rem) */
        padding: 0.6rem;   /* Kecilkan padding (dari 0.75rem) */
    }

    /* 8. Target spesifik tombol Like (karena padding-nya beda) */
    .modal-button-group .like-btn {
        padding: 0.6rem 0.75rem; /* Buat padding Kiri/Kanan sedikit lebih besar */
        flex: 0 1 auto; /* Pastikan dia tidak ikut membesar */
    }

    /* 9. Kecilkan juga ikon di dalamnya */
    .modal-button-group .auth-button .material-icons {
        font-size: 1rem; /* Turunkan dari default (24px) ke 16px */
    }

    /* 10. Posisikan ulang ikon Bantuan (?) */
    .help-tooltip-icon {
        top: -38px; /* Sesuaikan posisi top-nya karena tombol lebih kecil */
        width: 24px;
        height: 24px;
    }
    .help-tooltip-icon .material-icons {
        font-size: 18px;
    }
}

/* ==========================================================================
   16. [BARU] TOMBOL NAVIGASI MODAL (NEXT/PREV)
   ========================================================================== */

/* Pastikan .modal-image-side bisa menampung tombol absolute */
.modal-image-side {
    position: relative; /* [PENTING] Pastikan ini ada */
}

.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2002; /* Di atas gambar, di bawah tombol close (2001) */
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex; /* Menggunakan flex untuk tombol baru */
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.modal-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.modal-nav-btn#modal-nav-prev {
    left: 1rem;
}

.modal-nav-btn#modal-nav-next {
    right: 1rem;
}

/* Sembunyikan tombol jika tidak diperlukan (di-handle JS) */
.modal-nav-btn[style*="display: none"] {
    display: none !important;
}

/* Penyesuaian mobile */
@media (max-width: 768px) {
    .modal-nav-btn {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    .modal-nav-btn#modal-nav-prev {
        left: 0.5rem;
    }
    .modal-nav-btn#modal-nav-next {
        right: 0.5rem;
    }
}

/* ==========================================================================
   17. [BARU] UTILITY CLASSES
   ========================================================================== */

/* Kelas ini digunakan oleh JavaScript di SEMUA halaman */
.hidden {
    display: none !important;
}

/* ==========================================================================
   18. [BARU] KUSTOMISASI SWEETALERT
   ========================================================================== */

   .swal2-container {
    z-index: 2002; /* Harus lebih tinggi dari #prompt-text-popup (2001) */
}

.swal2-popup {
    border-radius: var(--border-radius-lg) !important;
}

.swal2-title {
    color: var(--text-dark) !important;
}

.swal2-html-container {
    color: var(--text-medium) !important;
}

/* Tombol Konfirmasi (Biru) */
.swal2-confirm {
    background-color: var(--primary-blue) !important;
    border-radius: var(--border-radius-md) !important;
}
.swal2-confirm:hover {
    background-color: var(--primary-blue-dark) !important;
}

/* Tombol Batal (Abu-abu) */
.swal2-cancel {
    background-color: var(--light-gray-border) !important;
    color: var(--text-medium) !important;
    border-radius: var(--border-radius-md) !important;
}
.swal2-cancel:hover {
    background-color: #d1d5db !important;
}

/* Warna Ikon */
.swal2-icon.swal2-success .swal2-icon-content {
    color: var(--success-green) !important;
}
.swal2-icon.swal2-error {
    border-color: var(--danger-red) !important;
    color: var(--danger-red) !important;
}
.swal2-icon.swal2-warning {
    border-color: #FBBF24 !important; /* Kuning */
    color: #FBBF24 !important;
}
.swal2-icon.swal2-info {
    border-color: var(--primary-blue-light) !important;
    color: var(--primary-blue-light) !important;
}

/* ==========================================================================
   19. [BARU] IKON BANTUAN (TANDA TANYA) DI MODAL
   ========================================================================== */

/* 1. Styling Ikon '?' (help_outline) */
.help-tooltip-icon {
    position: absolute;
    top: -42px; /* (tinggi ikon 28px + 14px jarak) */
    right: 0;   /* Pojok kanan, sejajar dgn tombol Generate */
    z-index: 2000;
    background-color: #e5e7eb; /* var(--light-gray-border) */
    color: #4B5563; /* var(--text-medium) */
    border-radius: 50%;
    width: 320px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    transition: all 0.2s ease;
}

.help-tooltip-icon .material-icons {
    font-size: 20px;
}

/* 2. Styling Tooltip Content (yang tersembunyi) */
.help-tooltip-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 120%; /* Muncul di atas ikon */
    right: 0;
    width: 280px;
    background-color: var(--text-dark);
    color: var(--white);
    padding: 1rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.875rem;
    line-height: 1.6;
    text-align: left;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.help-tooltip-content strong {
    color: var(--success-green);
}

/* 3. Tampilkan tooltip saat ikon di-hover */
.help-tooltip-icon:hover .help-tooltip-content {
    visibility: visible;
    opacity: 1;
}

/* 4. Sedikit efek hover pada ikon */
.help-tooltip-icon:hover {
    background-color: #d1d5db;
    transform: scale(1.1);
}

/* 5. [Responsive] Sesuaikan lebar tooltip di mobile */
@media (max-width: 768px) {
    .help-tooltip-content {
        width: 280px;
    }
}

/* ==========================================================================
   PINTEREST STYLE HEADER (DESKTOP) - SOFT BLUE THEME
   ========================================================================== */

.pinterest-style {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background-color: var(--white);
    height: 80px;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05); /* Shadow sangat halus */
}

/* --- 1. KIRI: LOGO & NAV --- */
.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0; /* Jangan mengecil */
}

.logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    transition: background-color 0.2s;
}
.logo-link:hover {
    background-color: var(--soft-blue-bg);
}
.header-logo {
    width: 32px;
    height: 32px;
}

.desktop-nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 24px;
    font-size: 16px;
    transition: all 0.2s ease;
}
.desktop-nav-link.active {
    background-color: var(--text-dark); /* Hitam Pinterest */
    color: var(--white);
}
.desktop-nav-link:not(.active):hover {
    background-color: var(--soft-blue-bg);
}

/* --- 2. TENGAH: SEARCH BAR --- */
.header-center {
    flex-grow: 1; /* Mengambil sisa ruang */
    max-width: 800px; /* Jangan terlalu lebar di layar ultrawide */
}

.search-bar-wrapper {
    position: relative;
    width: 100%;
    background-color: #e9e9e9; /* Abu-abu muda khas search bar */
    border-radius: 999px; /* Pill shape */
    display: flex;
    align-items: center;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.search-bar-wrapper:focus-within {
    background-color: var(--white);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2); /* Outline soft blue */
}

.search-bar-wrapper .search-icon {
    padding-left: 16px;
    color: var(--text-medium);
    font-size: 20px;
}

/* Style untuk tombol X di pencarian */
.clear-btn {
    color: var(--text-medium);
    cursor: pointer;
    padding-right: 16px; /* Jarak dari kanan */
    font-size: 20px;
    user-select: none;
    transition: color 0.2s ease;
}

.clear-btn:hover {
    color: var(--danger-red); /* Merah saat di-hover agar jelas */
}

/* Pastikan input tidak menabrak tombol X */
header.pinterest-style input#filter-input {
    padding-right: 4px; /* Kurangi padding kanan input */
}

/* Override input lama */
header.pinterest-style input#filter-input {
    width: auto;      /* Biarkan lebar menyesuaikan */
    flex-grow: 1;     /* Ambil sisa ruang yang ada, tapi sisakan untuk tombol X */
    min-width: 0;     /* Mencegah input meluap di layar kecil */
    background: transparent;
    border: none;
    padding: 14px 0 14px 16px; /* Padding kanan 0 agar dekat dengan tombol X */
    font-size: 16px;
    color: var(--text-dark);
    outline: none;
    border-radius: 999px;
}

/* --- 3. KANAN: USER ACTIONS --- */
.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.pinterest-btn {
    padding: 10px 20px;
    border-radius: 24px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 15px;
    transition: filter 0.2s;
}
.btn-primary {
    background-color: var(--primary-blue); /* Soft Blue Button */
    color: white;
}
.btn-primary:hover {
    filter: brightness(1.1);
}

/* Wrapper User Profile */
.user-profile-wrapper {
    position: relative; /* Untuk dropdown positioning */
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Foto Profil */
.profile-icon-container {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    background-color: var(--light-gray-bg);
    transition: transform 0.2s;
}
.profile-icon-container:hover {
    transform: scale(1.05);
    background-color: var(--soft-blue-bg);
}
#header-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Panah Dropdown */
.icon-btn-pinterest {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-medium);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.icon-btn-pinterest:hover {
    background-color: var(--light-gray-bg);
    color: var(--text-dark);
}

/* DROPDOWN MENU STYLE */
.dropdown-menu {
    position: absolute;
    top: 60px;
    right: 0;
    width: 280px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 16px;
    display: none; /* Hidden by default */
    flex-direction: column;
    z-index: 2000;
    border: 1px solid var(--light-gray-border);
    transform-origin: top right;
    animation: popIn 0.2s ease-out;
}
.dropdown-menu.show {
    display: flex;
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.dropdown-header {
    padding-bottom: 8px;
}
.dropdown-label {
    font-size: 12px;
    color: var(--text-medium);
    margin-bottom: 4px;
}
.dropdown-header h4 {
    font-size: 16px;
    color: var(--text-dark);
    margin: 0;
}
.dropdown-header p#dropdown-email {
    font-size: 14px;
    color: var(--text-medium);
    margin: 0;
}
.dropdown-menu hr {
    border: none;
    border-top: 1px solid var(--light-gray-border);
    margin: 8px 0;
}

.dropdown-item {
    padding: 10px 12px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
}
.dropdown-item:hover {
    background-color: var(--soft-blue-bg); /* Hover Soft Blue */
    color: var(--primary-blue-dark);
}
.dropdown-item .material-icons {
    font-size: 20px;
}
.dropdown-item.text-danger:hover {
    background-color: #FEE2E2;
    color: var(--danger-red);
}

/* RESPONSIVE ADJUSTMENTS */
@media (max-width: 768px) {
    .pinterest-style .header-left .desktop-nav-link,
    .pinterest-style .header-center {
        display: none; /* Sembunyikan menu text & search panjang di mobile */
    }
    /* Anda bisa menambahkan tombol search icon lagi di sini untuk mobile jika diperlukan,
       atau biarkan navigasi mobile bawah yang menangani */
}

/* ==========================================================================
   20. [BARU] HOME CATEGORY CHIPS (LIST KATEGORI HORIZONTAL)
   ========================================================================== */

.category-scroll-container {
    display: flex;
    gap: 10px;
    overflow-x: auto; /* Bisa discroll menyamping */
    padding: 4px 4px 16px 4px; /* Padding bawah agar bayangan tidak terpotong */
    margin-bottom: 16px;
    
    /* Sembunyikan Scrollbar agar rapi */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE/Edge */
}

.category-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.category-chip {
    flex: 0 0 auto; /* Jangan mengecil */
    padding: 10px 20px;
    background-color: var(--white);
    border: 1px solid transparent; /* Border transparan default */
    border-radius: 24px; /* Bentuk Pill/Lonjong */
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Bayangan halus */
    white-space: nowrap;
}

.category-chip:hover {
    background-color: var(--soft-blue-bg); /* Hover Biru Muda */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.category-chip.active {
    background-color: var(--text-dark); /* Hitam Pinterest saat aktif */
    color: var(--white);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* ==========================================================================
   21. [UPDATE] PERCANTIK DROPDOWN MENU
   ========================================================================== */

/* Override style dropdown sebelumnya agar lebih cantik */
.dropdown-menu {
    border: none; /* Hapus border kasar */
    border-radius: 24px; /* Lebih bulat */
    box-shadow: 0 15px 50px rgba(0,0,0,0.15), 0 5px 15px rgba(0,0,0,0.05); /* Shadow deep */
    padding: 20px;
    width: 300px;
    top: 65px;
}

.dropdown-header {
    text-align: center;
    background-color: var(--soft-blue-bg);
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 12px;
}

.dropdown-header .dropdown-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-blue);
    margin-bottom: 4px;
    font-weight: 700;
}

.dropdown-header h4 {
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.dropdown-item {
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 600;
    color: var(--text-medium);
}

.dropdown-item:hover {
    background-color: #F3F4F6;
    color: var(--text-dark);
    transform: translateX(5px); /* Efek geser sedikit saat hover */
}

.dropdown-item .material-icons {
    color: var(--primary-blue); /* Ikon biru */
    margin-right: 12px;
}

/* Khusus tombol Logout */
.dropdown-item.text-danger {
    color: var(--danger-red);
    margin-top: 8px;
    border-top: 1px solid var(--light-gray-border);
    border-radius: 0 0 12px 12px; /* Radius bawah saja */
}
.dropdown-item.text-danger:hover {
    background-color: #FEF2F2;
    transform: none;
}
.dropdown-item.text-danger .material-icons {
    color: var(--danger-red);
}

/* ==========================================================================
   PAGINATION STYLES (SOFT BLUE THEME)
   ========================================================================== */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--primary-blue-light);
    background-color: var(--white);
    color: var(--primary-blue);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.page-btn:hover:not(:disabled) {
    background-color: var(--soft-blue-bg);
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.1);
}

.page-btn.active {
    background-color: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
    pointer-events: none; /* Halaman aktif tidak bisa diklik */
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--light-gray-bg);
    border-color: var(--light-gray-border);
    color: var(--text-medium);
}

/* Style untuk ikon panah di tombol */
.page-btn .material-icons {
    font-size: 1.2rem;
}

/* ==========================================================================
   LOADING ANIMATION STYLES
   ========================================================================== */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    width: 100%;
    grid-column: 1 / -1; /* Agar loader memenuhi lebar grid */
}

.spinner {
    width: 48px;
    height: 48px;
    border: 5px solid var(--soft-blue-bg);    /* Warna jalur (track) yang lebih muda */
    border-top: 5px solid var(--primary-blue); /* Warna indikator utama */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.loading-text {
    color: var(--text-medium);
    font-size: 0.95rem;
    font-weight: 500;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Animasi Putar */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animasi Denyut Teks */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}