/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800');

:root {
    --bg: #080b12;
    --bg2: #0e1320;
    --bg3: #141926;
    --surface: #1a2235;
    --surface2: #212c42;
    --border: #2a3555;
    --border2: #3a4870;
    --text: #e8edf8;
    --text2: #8a97b8;
    --text3: #5a6888;
    --accent: #4f6ef7;
    --accent2: #6c84ff;
    --accent-glow: rgba(79, 110, 247, 0.25);
    --gold: #f0b429;
    --success: #22c55e;
    --danger: #ef4444;
    --radius: 14px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(8,11,18,0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 68px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-logo {
    font-family: 'Manrope', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}
.site-logo span { color: var(--accent2); }

.header-search {
    flex: 1;
    max-width: 560px;
    position: relative;
}
.header-search input {
    width: 100%;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 50px;
    padding: 10px 20px 10px 46px;
    color: var(--text);
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.header-search input::placeholder { color: var(--text3); }
.header-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.header-search .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text3);
    font-size: 0.9rem;
    pointer-events: none;
}
.suggestions-box {
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    z-index: 200;
    display: none;
}
.suggestions-box.active { display: block; }
.suggestion-item {
    padding: 11px 18px;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--text2);
    transition: background 0.15s;
    display: flex;
    align-items: center;
    gap: 10px;
}
.suggestion-item:hover { background: var(--surface2); color: var(--text); }
.suggestion-item i { color: var(--text3); width: 14px; }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover { background: var(--accent2); box-shadow: 0 0 20px var(--accent-glow); }
.btn-outline {
    background: transparent;
    color: var(--text2);
    border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--border2); color: var(--text); background: var(--surface); }
.btn-ghost {
    background: transparent;
    color: var(--text2);
}
.btn-ghost:hover { color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-icon { padding: 9px; border-radius: 50%; }

.gallery-wrap { padding: 32px 24px; max-width: 1600px; margin: 0 auto; }

.gallery-grid {
    columns: 5 220px;
    column-gap: 16px;
}
.gallery-item {
    break-inside: avoid;
    margin-bottom: 16px;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: var(--surface);
    display: block;
    aspect-ratio: 4 / 3;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }
.gallery-item-title {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
}
.gallery-item-caption {
    color: rgba(255,255,255,0.7);
    font-size: 0.75rem;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.skeleton {
    background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-item { break-inside: avoid; margin-bottom: 16px; }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.93);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.lightbox.active { opacity: 1; pointer-events: auto; }
.lightbox-inner {
    position: relative;
    max-width: min(90vw, 1200px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.lightbox-img-wrap {
    position: relative;
    max-height: 75vh;
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.lightbox-img-wrap img {
    max-width: 90vw;
    max-height: 75vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
    transition: opacity 0.2s;
}
.lightbox-info {
    text-align: center;
    margin-top: 16px;
    padding: 0 16px;
}
.lightbox-title { font-size: 1.1rem; font-weight: 700; color: #fff; }
.lightbox-caption { font-size: 0.85rem; color: rgba(255,255,255,0.55); margin-top: 4px; }
.lightbox-close {
    position: fixed;
    top: 20px; right: 20px;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
    cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); }
.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
    backdrop-filter: blur(6px);
    cursor: pointer;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.2); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
    padding: 20px;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-box {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px 32px;
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    transform: translateY(16px);
    transition: transform 0.25s;
    max-height: 90vh;
    overflow-y: auto;
}
@media (max-width: 640px) {
    .modal-box {
        padding: 22px 18px 26px;
        max-width: calc(100% - 32px);
        border-radius: 24px;
    }
    .modal-title {
        font-size: 1.35rem !important;
    }
}
@media (max-width: 480px) {
    .modal-box {
        padding: 18px 16px 22px;
        border-radius: 20px;
    }
    .drop-zone {
        min-height: 130px !important;
        padding: 18px 12px !important;
    }
    .dz-icon i {
        font-size: 2rem !important;
    }
    .dz-text {
        font-size: 0.85rem !important;
    }
    .dz-sub {
        font-size: 0.7rem !important;
    }
    .form-input {
        font-size: 0.88rem !important;
        padding: 10px 14px !important;
    }
    .btn {
        padding: 9px 14px !important;
        font-size: 0.82rem !important;
    }
    .form-label {
        font-size: 0.75rem !important;
    }
}
@media (max-width: 380px) {
    .modal-box {
        padding: 16px 14px 20px;
    }
    .modal-title {
        font-size: 1.2rem !important;
    }
    .drop-zone {
        padding: 14px 10px !important;
    }
}
.modal-overlay.active .modal-box { transform: translateY(0); }
.modal-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 6px; }
.modal-sub { font-size: 0.85rem; color: var(--text2); margin-bottom: 24px; }

.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text2); margin-bottom: 7px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-input {
    width: 100%;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-input::placeholder { color: var(--text3); }
textarea.form-input { resize: vertical; min-height: 90px; }

.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 18px;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--accent);
    background: var(--accent-glow);
}
.drop-zone .dz-icon { font-size: 2.2rem; color: var(--text3); margin-bottom: 10px; }
.drop-zone .dz-icon i { font-size: 2.2rem; }
.drop-zone .dz-text { font-size: 0.88rem; color: var(--text2); }
.drop-zone .dz-sub { font-size: 0.78rem; color: var(--text3); margin-top: 4px; }
.drop-zone .dz-preview { display: none; }
.drop-zone.has-file .dz-default { display: none; }
.drop-zone.has-file .dz-preview { display: block; }
.drop-zone.has-file .dz-preview img { max-height: 140px; margin: 0 auto; border-radius: var(--radius-sm); }

.load-more-wrap { text-align: center; padding: 32px 0 48px; }
.load-more-btn {
    background: var(--surface);
    border: 1.5px solid var(--border);
    color: var(--text2);
    padding: 12px 36px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.load-more-btn:hover { border-color: var(--accent); color: var(--accent2); }

.empty-state {
    text-align: center;
    padding: 80px 20px;
}
.empty-state .es-icon { font-size: 4rem; color: var(--text3); margin-bottom: 20px; }
.empty-state h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: var(--text2); font-size: 0.9rem; }

.alert {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 16px;
    border: 1px solid;
}
.alert-error { background: rgba(239,68,68,0.1); color: #fca5a5; border-color: rgba(239,68,68,0.3); }
.alert-success { background: rgba(34,197,94,0.1); color: #86efac; border-color: rgba(34,197,94,0.3); }
.alert-info { background: rgba(79,110,247,0.1); color: #a5b4fc; border-color: rgba(79,110,247,0.3); }

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--surface2);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 12px;
}
.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s;
}

.admin-wrap { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 248px;
    background: var(--bg2);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    padding: 24px 0;
    z-index: 50;
}
.admin-logo {
    font-family: 'Manrope', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    padding: 0 24px 24px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.admin-logo span { color: var(--accent2); }
.admin-nav-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text3); padding: 16px 24px 6px; }
.admin-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 24px;
    color: var(--text2);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}
.admin-nav a:hover { color: var(--text); background: var(--surface); }
.admin-nav a.active { color: var(--accent2); border-left-color: var(--accent); background: var(--accent-glow); }
.admin-nav a i { width: 18px; text-align: center; font-size: 0.9rem; }
.admin-content { margin-left: 248px; flex: 1; padding: 32px; }
.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}
.page-title { font-size: 1.5rem; font-weight: 800; }
.page-subtitle { font-size: 0.85rem; color: var(--text2); margin-top: 2px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.stat-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.stat-val { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: 0.78rem; color: var(--text2); margin-top: 2px; }

.table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
}
.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
}
.table-title { font-weight: 700; font-size: 0.95rem; }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
thead th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text3);
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
}
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.15s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface2); }
td { padding: 13px 16px; font-size: 0.88rem; vertical-align: middle; }
.td-img { width: 56px; height: 44px; object-fit: cover; border-radius: var(--radius-sm); }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.badge-admin { background: rgba(240,180,41,0.15); color: var(--gold); }
.badge-uploader { background: rgba(79,110,247,0.15); color: #818cf8; }
.badge-visitor { background: rgba(138,151,184,0.1); color: var(--text3); }
.badge-active { background: rgba(34,197,94,0.12); color: #4ade80; }
.badge-inactive { background: rgba(239,68,68,0.12); color: #f87171; }
.badge-pending { background: rgba(251,191,36,0.12); color: #fbbf24; }
.badge-approved { background: rgba(34,197,94,0.12); color: #4ade80; }
.badge-rejected { background: rgba(239,68,68,0.12); color: #f87171; }

.admin-search {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.admin-search input {
    flex: 1;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text);
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s;
}
.admin-search input:focus { border-color: var(--accent); }
.admin-search input::placeholder { color: var(--text3); }

.mobile-menu-btn { display: none; }
@media (max-width: 768px) {
    .mobile-menu-btn { display: flex; }
    .header-search { display: none; }
    .header-search.mobile-open { display: block; position: fixed; top: 68px; left: 0; right: 0; padding: 12px 16px; background: var(--bg2); border-bottom: 1px solid var(--border); z-index: 99; }
    .gallery-grid { columns: 2 150px; }
    .admin-sidebar { transform: translateX(-100%); transition: transform 0.25s; position: fixed; z-index: 1000; width: 260px; }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-content { margin-left: 0; padding: 20px 16px; }
    .lightbox-nav { display: none; }
    .stats-grid { grid-template-columns: 1fr; }
    .admin-topbar { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
    .site-header { padding: 0 16px; gap: 10px; }
    .site-logo { font-size: 1.1rem; }
    .btn { padding: 7px 12px; font-size: 0.75rem; }
    .hero-section { padding: 40px 16px 24px; }
    .hero-title { font-size: 1.8rem; }
    .gallery-wrap { padding: 20px 16px; }
    .gallery-grid { column-gap: 12px; }
    .gallery-item { margin-bottom: 12px; }
}

.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.text-accent { color: var(--accent2); }
.text-muted { color: var(--text2); }
.text-gold { color: var(--gold); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2 { gap: 8px; }
.mt-4 { margin-top: 16px; }
.w-full { width: 100%; }

.hero-section {
    text-align: center;
    padding: 60px 20px 32px;
    max-width: 700px;
    margin: 0 auto;
}
.hero-title {
    font-family: 'Manrope', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 14px;
}
.hero-title span { color: var(--accent2); }
.hero-sub { color: var(--text2); font-size: 1rem; }

.search-hero-wrap {
    max-width: 640px;
    margin: 24px auto 0;
    position: relative;
}
.search-hero-wrap input {
    width: 100%;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 50px;
    padding: 16px 24px 16px 54px;
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search-hero-wrap input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}
.search-hero-wrap .search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text3);
    font-size: 1rem;
}

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: radial-gradient(ellipse at 30% 20%, rgba(79,110,247,0.08) 0%, transparent 60%);
}
.login-box {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 44px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}
.login-logo {
    font-family: 'Manrope', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 28px;
    text-align: center;
}
.login-logo span { color: var(--accent2); }
@media (max-width: 480px) {
    .login-box { padding: 32px 24px; }
    .login-logo { font-size: 1.2rem; margin-bottom: 20px; }
}