/* =========================================
   GLOBAL CSS - FRONTEND & ADMIN
   Wisata Banyuwangi (FINAL VERIFIED)
   ========================================= */

/* === RESET & BASE === */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Poppins', Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    overflow-x: hidden;
    line-height: 1.6;
}

/* =========================================
   SIDEBAR (GLOBAL - FRONTEND & ADMIN)
   ========================================= */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 230px;
    height: 100vh;
    background: linear-gradient(180deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 20px;
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.sidebar.collapsed { transform: translateX(-230px); }
.sidebar .logo {
    text-align: center;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 30px;
    padding: 15px 10px;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    border-bottom: 1px solid #444;
    flex-shrink: 0;
}
.sidebar ul { list-style: none; padding: 0; margin: 0; flex: 1; overflow-y: auto; }
.sidebar ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    font-size: 0.95rem;
}
.sidebar ul li a:hover, .sidebar ul li a.active {
    background: #0092ff;
    color: white;
    border-left: 4px solid #FFD700;
}
.sidebar ul li a i { width: 20px; text-align: center; }

.sidebar-footer {
    flex-shrink: 0;
    text-align: center;
    color: #aaa;
    font-size: 0.75rem;
    padding: 20px 15px;
    border-top: 1px solid #333;
    margin-top: auto;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: fixed;
    top: 20px;
    left: 250px;
    background: #1a1a1a;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.sidebar-toggle:hover { background: #0092ff; transform: scale(1.1); }

/* =========================================
   CONTENT AREA (FRONTEND)
   ========================================= */
.content {
    margin-left: 230px;
    padding: 30px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}
.content.sidebar-collapsed { margin-left: 0; padding-left: 70px; }

.content.dashboard {
    background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)), url('img/ijen.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    color: white;
    margin: 0;
    padding: 30px;
    position: relative;
    animation: fadeIn 0.8s ease;
}
.welcome-dashboard {
    background: rgba(0, 0, 0, 0.6);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.welcome-dashboard h1 { color: #FFD700; margin-bottom: 15px; font-size: 2.5rem; text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); }
.welcome-dashboard .highlight { color: #4CAF50; font-size: 1.4rem; font-weight: bold; margin-bottom: 15px; }

/* Frontend Cards */
.card-container { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 20px; margin-bottom: 30px; }
.card {
    background: rgba(255, 255, 255, 0.92);
    padding: 25px;
    min-width: 200px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,.25);
    text-align: center;
    font-weight: bold;
    color: #333;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    flex: 1;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.card:hover { transform: translateY(-8px); box-shadow: 0 12px 24px rgba(0,0,0,.35); }
.card h3 { margin: 0 0 10px 0; color: #1a1a1a; font-size: 1.3rem; }
.card p { margin: 5px 0; color: #666; }

/* Frontend Destination Cards */
.wisata-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-top: 30px; padding: 10px; animation: fadeIn 1s; }
.wisata-card { background: white; border-radius: 15px; overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,.15); transition: all 0.4s ease; cursor: pointer; }
.wisata-card:hover { transform: translateY(-8px); box-shadow: 0 12px 28px rgba(0,0,0,.25); }
.wisata-card img { width: 100%; height: 200px; object-fit: cover; transition: 0.4s; }
.wisata-card:hover img { filter: brightness(1.1); transform: scale(1.05); }
.wisata-card .desc { padding: 20px; text-align: center; }
.wisata-card .desc h3 { margin: 0 0 10px 0; color: #1a1a1a; font-size: 1.4rem; }
.wisata-card .desc p { font-size: 14px; color: #555; line-height: 1.6; margin: 8px 0; }

.btn-pesan {
    display: inline-block;
    margin-top: 15px;
    background: linear-gradient(135deg, #0092ff, #0075d8);
    color: white;
    padding: 12px 25px;
    font-weight: bold;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,146,255,0.3);
}
.btn-pesan:hover { background: linear-gradient(135deg, #0075d8, #005ca9); transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,146,255,0.4); }

/* Frontend Modal */
.photo-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.95); z-index: 2000; align-items: center; justify-content: center; animation: fadeInModal 0.3s ease; padding: 20px; box-sizing: border-box; }
@keyframes fadeInModal { from { opacity: 0; } to { opacity: 1; } }
.modal-container { width: 100%; max-width: 900px; height: auto; max-height: 90vh; position: relative; display: flex; flex-direction: column; animation: slideUp 0.4s ease; }
@keyframes slideUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-content { width: 100%; height: 70vh; max-height: 600px; display: flex; align-items: center; justify-content: center; background: #000; border-radius: 10px 10px 0 0; overflow: hidden; }
.modal-image { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
.close-modal { position: absolute; top: -40px; right: 0; color: rgb(184, 33, 33); font-size: 35px; cursor: pointer; background: rgba(0, 0, 0, 0.5); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; }
.close-modal:hover { background: rgba(255, 255, 255, 0.2); transform: scale(1.1); }
.modal-text { color: #555; font-style: italic; line-height: 1.6; margin-bottom: 15px; padding: 15px; background: #f8f9fa; border-radius: 8px; border-left: 4px solid #0092ff; }
.modal-rating { color: #FFD700; font-size: 1.2rem; margin-bottom: 10px; }
.modal-date { color: #888; font-size: 0.9rem; text-align: right; }
.modal-nav { position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-50%); display: flex; justify-content: space-between; padding: 0 20px; pointer-events: none; }
.modal-nav button { pointer-events: auto; background: rgba(255, 255, 255, 0.15); border: 2px solid rgba(255, 255, 255, 0.3); color: white; width: 50px; height: 50px; border-radius: 50%; font-size: 20px; cursor: pointer; backdrop-filter: blur(10px); transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; }
.modal-nav button:hover { background: rgba(255, 255, 255, 0.3); border-color: rgba(255, 255, 255, 0.5); transform: scale(1.1); }
.modal-counter { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; color: white; font-size: 0.9rem; opacity: 0.8; }
.modal-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; color: white; gap: 15px; }
.loading-spinner { width: 40px; height: 40px; border: 4px solid rgba(255, 255, 255, 0.1); border-left-color: #0092ff; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* === ANIMATIONS === */
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0% { transform: scale(1); box-shadow: 0 4px 15px rgba(0,146,255,0.3); } 50% { transform: scale(1.05); box-shadow: 0 6px 20px rgba(0,146,255,0.4); } 100% { transform: scale(1); box-shadow: 0 4px 15px rgba(0,146,255,0.3); } }
@keyframes slideIn { from { transform: translateX(-20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* =========================================
   ADMIN PANEL STYLES (DESKTOP FIRST)
   ========================================= */
.main-content {
    margin-left: 250px;
    padding: 20px;
    transition: margin-left 0.3s ease;
    min-height: 100vh;
}
.main-content.sidebar-collapsed { margin-left: 0; }

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.admin-header h1 { color: #1a1a1a; font-size: 1.5rem; }
.admin-actions { display: flex; align-items: center; gap: 20px; }
.notification-bell { position: relative; }
.notification-bell a { color: #1a1a1a; font-size: 1.3rem; text-decoration: none; }
.notification-bell .badge {
    position: absolute; top: -8px; right: -8px;
    background: #ff4444; color: white; font-size: 11px;
    padding: 3px 7px; border-radius: 50%; font-weight: bold;
    min-width: 18px; text-align: center;
}
.admin-profile { display: flex; align-items: center; gap: 10px; }
.admin-profile .avatar {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, #0092ff, #0066cc);
    border-radius: 50%; display: flex; align-items: center;
    justify-content: center; color: white; font-weight: bold;
}

.section-card {
    background: white; padding: 25px; border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); margin-bottom: 20px;
    overflow: hidden; /* Mencegah overflow keluar card utama */
}
.section-card h2 {
    color: #1a1a1a; margin-bottom: 20px; padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0; display: flex; align-items: center; gap: 10px;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px; margin-bottom: 30px;
}
.stat-card {
    background: white; padding: 25px; border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex; align-items: center; gap: 15px;
}
.stat-card .icon {
    width: 50px; height: 50px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: white;
}
.stat-card.blue .icon { background: linear-gradient(135deg, #0092ff, #0066cc); }
.stat-card.green .icon { background: linear-gradient(135deg, #228B22, #1a4a24); }
.stat-card.orange .icon { background: linear-gradient(135deg, #FF9800, #F57C00); }
.stat-card.red .icon { background: linear-gradient(135deg, #ff4444, #cc0000); }
.stat-card .info h3 { font-size: 1.8rem; color: #1a1a1a; margin-bottom: 3px; }
.stat-card .info p { color: #666; font-size: 0.9rem; }

/* Wrapper untuk tabel agar bisa di-scroll horizontal di layar kecil */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Admin Tables */
table { 
    width: 100%; 
    border-collapse: collapse; 
    background: white;
    min-width: 600px; /* Memastikan tabel tidak terlalu kurus jika di-scroll */
}
table th, table td { 
    padding: 12px 15px; 
    text-align: left; 
    border-bottom: 1px solid #eee;
}
table th { background: #f8f9fa; font-weight: 600; color: #333; }
table tr:hover { background: #f8f9fa; }

/* Badges & Buttons */
.status-badge { padding: 5px 12px; border-radius: 20px; font-size: 0.85rem; font-weight: 500; display: inline-block; }
.status-pending { background: #fff3cd; color: #856404; }
.status-confirmed { background: #d4edda; color: #155724; }
.status-cancelled { background: #f8d7da; color: #721c24; }
.status-completed { background: #cce5ff; color: #004085; }
.status-approved { background: #d4edda; color: #155724; }
.status-rejected { background: #f8d7da; color: #721c24; }

.btn-action {
    padding: 6px 12px; 
    border: none; 
    border-radius: 6px; 
    cursor: pointer;
    margin-right: 5px; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
    text-decoration: none; 
    color: white; 
    font-size: 0.85rem;
}
.btn-view { background: #0092ff; }
.btn-confirm { background: #228B22; }
.btn-cancel { background: #dc3545; }
.btn-complete { background: #17a2b8; }
.btn-delete { background: #dc3545; }
.btn-action:hover { opacity: 0.9; transform: translateY(-1px); }

.destination-item {
    background: #f8f9fa; padding: 20px; border-radius: 10px;
    display: flex; justify-content: space-between; align-items: center;
    border-left: 4px solid #0092ff; margin-bottom: 15px;
}
.destination-info h3 { color: #1a1a1a; margin-bottom: 5px; }
.destination-info p { color: #666; font-size: 0.9rem; }
.destination-actions { display: flex; gap: 8px; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #333; }
.form-control, .form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 12px 15px; border: 2px solid #ddd; border-radius: 10px;
    font-size: 16px; transition: all 0.3s; font-family: inherit;
}
.form-control:focus, .form-group input:focus, .form-group textarea:focus {
    border-color: #0092ff; outline: none; box-shadow: 0 0 0 3px rgba(0, 146, 255, 0.1);
}
textarea.form-control { min-height: 120px; resize: vertical; }
.alert { padding: 15px; border-radius: 10px; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.alert-success { background: #d4edda; color: #155724; border-left: 4px solid #28a745; }
.alert-error { background: #f8d7da; color: #721c24; border-left: 4px solid #dc3545; }

.action-buttons, .filters { display: flex; gap: 10px; margin-bottom: 25px; flex-wrap: wrap; }
.filters select, .filters input { padding: 10px 15px; border: 2px solid #ddd; border-radius: 10px; font-size: 14px; }
.filters button { padding: 10px 20px; background: #0092ff; color: white; border: none; border-radius: 10px; cursor: pointer; font-weight: 600; }
.filter-tabs { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-tab {
    padding: 10px 20px; background: #f8f9fa; border: 2px solid #ddd; border-radius: 8px;
    cursor: pointer; text-decoration: none; color: #666; font-weight: 600; transition: all 0.3s;
}
.filter-tab.active { background: #0092ff; border-color: #0092ff; color: white; }

.notification-item {
    padding: 20px; border-left: 4px solid #0092ff; background: #f8f9fa;
    margin-bottom: 15px; border-radius: 0 10px 10px 0;
    display: flex; justify-content: space-between; align-items: start; transition: all 0.3s;
}
.notification-item:hover { background: #e3f2fd; transform: translateX(5px); }
.notification-item.booking { border-left-color: #228B22; }
.notification-item.system { border-left-color: #FF9800; }
.notification-item.alert { border-left-color: #ff4444; }
.notification-content h4 { color: #1a1a1a; margin-bottom: 8px; font-size: 1.1rem; }
.notification-content p { color: #666; font-size: 0.95rem; line-height: 1.5; }
.notification-time { color: #999; font-size: 0.85rem; margin-top: 8px; display: flex; align-items: center; gap: 5px; }
.btn-link { color: #0092ff; text-decoration: none; font-weight: 600; padding: 8px 15px; border-radius: 6px; transition: all 0.2s; display: inline-flex; align-items: center; gap: 5px; }
.btn-link:hover { background: #0092ff; color: white; }

.testi-list { display: grid; gap: 20px; }
.testi-item {
    background: #f8f9fa; border-radius: 12px; padding: 20px;
    border-left: 4px solid #ddd; transition: all 0.3s;
}
.testi-item:hover { box-shadow: 0 5px 20px rgba(0,0,0,0.1); transform: translateX(5px); }
.testi-item.pending { border-left-color: #FF9800; }
.testi-item.approved { border-left-color: #228B22; }
.testi-item.rejected { border-left-color: #dc3545; }
.testi-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 15px; }
.testi-info h3 { color: #1a1a1a; margin-bottom: 5px; }
.testi-meta { color: #666; font-size: 0.9rem; }
.testi-content { margin: 15px 0; padding: 15px; background: white; border-radius: 8px; font-style: italic; color: #555; line-height: 1.6; }
.testi-photo-preview img { max-width: 200px; max-height: 150px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.testi-actions { display: flex; gap: 10px; margin-top: 15px; flex-wrap: wrap; }

.login-container {
    background: white; padding: 40px; border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3); width: 100%; max-width: 450px;
    margin: 0 auto; animation: slideUp 0.5s ease;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.login-header { text-align: center; margin-bottom: 30px; }
.login-header i { font-size: 3rem; color: #0092ff; margin-bottom: 15px; }
.login-header h2 { color: #1a1a1a; font-size: 1.8rem; }
.login-header p { color: #666; font-size: 0.95rem; }
.btn-login {
    width: 100%; padding: 15px; background: linear-gradient(135deg, #0092ff, #0066cc);
    color: white; border: none; border-radius: 10px; font-size: 16px; font-weight: bold; cursor: pointer; transition: all 0.3s;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(0, 146, 255, 0.4); }
.back-link { display: block; text-align: center; margin-top: 20px; color: #0092ff; text-decoration: none; }
.back-link:hover { text-decoration: underline; }

/* =========================================
   📱 MOBILE RESPONSIVE (MAX 768px)
   ========================================= */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%) !important; width: 250px !important; }
    .sidebar.active { transform: translateX(0) !important; }
    .sidebar.collapsed { transform: translateX(-100%) !important; }
    .sidebar-toggle { left: 15px !important; top: 15px !important; }
    
    .content, .main-content { margin-left: 0 !important; padding: 15px !important; width: 100% !important; }
    .content.dashboard { padding: 15px !important; background-attachment: scroll; }
    
    .admin-header { flex-direction: column; align-items: flex-start; gap: 15px; }
    .admin-actions { width: 100%; justify-content: space-between; }
    .admin-header h1 { font-size: 1.3rem !important; }
    
    .stats-grid { grid-template-columns: 1fr !important; }
    .stat-card { flex-direction: row !important; align-items: center !important; padding: 15px !important; }
    .stat-card .icon { width: 40px !important; height: 40px !important; font-size: 1.2rem !important; margin-right: 15px !important; margin-bottom: 0 !important; }
    .stat-card .info h3 { font-size: 1.5rem !important; }
    
    .section-card { padding: 15px !important; }
    
    /* FIX TABEL RESPONSIF (Horizontal Scroll) */
    .table-responsive {
        border-radius: 8px;
        box-shadow: 0 0 5px rgba(0,0,0,0.05);
        margin-bottom: 15px;
    }
    
    .destination-item { flex-direction: column !important; align-items: flex-start !important; gap: 10px; }
    .destination-actions { width: 100%; justify-content: flex-end; }
    .destination-actions a, .destination-actions button {
        display: inline-block !important; padding: 8px 16px !important; border-radius: 6px !important;
        font-size: 12px !important; text-decoration: none !important; text-align: center !important;
        color: white !important; font-weight: bold;
    }
    .destination-actions a { background: #0092ff !important; }
    .destination-actions button { background: #dc3545 !important; border: none; cursor: pointer; }
    
    .filters, .action-buttons { flex-direction: column; }
    .filters select, .filters input, .filters button, .action-buttons .btn { width: 100%; }
    .filter-tabs { gap: 5px; }
    .filter-tab { flex: 1 1 45%; text-align: center; font-size: 12px; padding: 8px 5px; }
    
    .testi-header { flex-direction: column; gap: 10px; }
    .testi-actions { flex-direction: column; }
    .testi-actions button { width: 100%; justify-content: center; }
    
    .login-container { padding: 30px 20px; margin: 20px; }
    .dashboard-hero, .booking-header, .benefits-header { padding: 30px 15px !important; }
    .dashboard-hero h1, .booking-header h1 { font-size: 1.6rem !important; }
    .dashboard-hero p, .booking-header p { font-size: 0.9rem !important; }
    input, textarea, select, .form-control { font-size: 16px !important; padding: 12px !important; }
    .btn-pesan, .cta-button, .btn-submit, .btn-action, .btn-login {
        width: 100% !important; max-width: 300px !important; margin: 10px auto !important;
        display: block !important; justify-content: center !important;
    }
}

@media (max-width: 480px) {
    .sidebar .logo { font-size: 1.1rem; padding: 10px; }
    .sidebar ul li a { padding: 12px 15px; font-size: 0.9rem; }
    .stat-card .info h3 { font-size: 1.3rem !important; }
    .stat-card .info p { font-size: 0.8rem !important; }
}