/**
 * Aplikasi Pencarian Mobil Mewah - Stylesheet Kustom (Dark Luxury & Gold)
 * Didesain khusus untuk tampilan mobile-first yang responsif, berkelas, dan mewah.
 */

:root {
    --bg-deep: #0B0C10;
    --bg-card: #151922;
    --gold-primary: #C5A880;
    --gold-bright: #D4AF37;
    --gold-dark: #8F7249;
    --text-light: #FFFFFF;
    --text-muted: #8E9BAE;
    --text-gold: #C5A880;
    --glass-bg: rgba(21, 25, 34, 0.65);
    --glass-border: rgba(197, 168, 128, 0.15);
    --font-primary: 'Outfit', sans-serif;
    --font-secondary: 'Montserrat', sans-serif;
    --font-luxury: 'Playfair Display', serif;
}

* {
    box-sizing: border-box;
    font-family: var(--font-primary);
}

body {
    background-color: #030406;
    color: var(--text-light);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow: hidden;
}

/* Kontainer Frame HP (Mobile-First) */
.mobile-frame-container {
    width: 100%;
    max-width: 480px;
    height: 100vh;
    background-color: var(--bg-deep);
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
    border-left: 1px solid rgba(197, 168, 128, 0.1);
    border-right: 1px solid rgba(197, 168, 128, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Container tidak scroll, hanya .page-content yang scroll */
}

/* Area konten tengah yang scroll — satu-satunya zona scroll */
.page-content {
    flex: 1 1 0;
    overflow-y: auto;
    overflow-x: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.page-content::-webkit-scrollbar {
    display: none;
}

.mobile-frame-container::before {
    content: '';
    position: absolute;
    top: -150px;
    left: -150px;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(197, 168, 128, 0.12) 0%, rgba(0,0,0,0) 70%);
    z-index: 0;
    pointer-events: none;
}

.mobile-frame-container::after {
    content: '';
    position: absolute;
    bottom: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, rgba(0,0,0,0) 70%);
    z-index: 0;
    pointer-events: none;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(197, 168, 128, 0.3);
    box-shadow: 0 20px 40px rgba(197, 168, 128, 0.05);
}

.border-gold {
    border: 1px solid rgba(197, 168, 128, 0.4) !important;
    box-shadow: 0 0 20px rgba(197, 168, 128, 0.1) !important;
}

/* Typography */
.text-gold { color: var(--gold-primary) !important; }
.text-gold-bright { color: var(--gold-bright) !important; }
.text-light-muted { color: var(--text-muted) !important; }
.font-luxury-style { font-family: var(--font-luxury); font-weight: 700; }

/* Buttons */
.btn-gold {
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    color: #0B0C10 !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    box-shadow: 0 8px 20px rgba(197, 168, 128, 0.25);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(197, 168, 128, 0.4);
    background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold-primary) 100%);
}

.btn-gold:active { transform: translateY(1px); }

.btn-outline-gold {
    background: transparent;
    color: var(--gold-primary) !important;
    border: 1px solid var(--gold-primary);
    border-radius: 12px;
    padding: 12px 26px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-outline-gold:hover {
    background: rgba(197, 168, 128, 0.1);
    border-color: var(--gold-bright);
    color: var(--gold-bright) !important;
}

/* Form Inputs */
.form-group-custom { position: relative; margin-bottom: 25px; }

.form-input-custom {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px 20px;
    color: var(--text-light);
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.form-input-custom:focus {
    border-color: var(--gold-primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 15px rgba(197, 168, 128, 0.15);
}

.form-label-custom {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: all 0.3s ease;
    pointer-events: none;
    background: transparent;
}

.form-input-custom:focus ~ .form-label-custom,
.form-input-custom:not(:placeholder-shown) ~ .form-label-custom {
    top: 0;
    font-size: 12px;
    color: var(--gold-primary);
    padding: 2px 8px;
    background: var(--bg-deep);
    border-radius: 4px;
}

/* iOS-style Switch */
.switch-custom { position: relative; display: inline-block; width: 50px; height: 28px; }
.switch-custom input { opacity: 0; width: 0; height: 0; }

.slider-custom {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255,255,255,0.1);
    transition: .4s;
    border-radius: 34px;
    border: 1px solid rgba(255,255,255,0.05);
}

.slider-custom:before {
    position: absolute;
    content: "";
    height: 20px; width: 20px;
    left: 3px; bottom: 3px;
    background-color: #ffffff;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

input:checked + .slider-custom { background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%); }
input:focus + .slider-custom { box-shadow: 0 0 1px var(--gold-primary); }
input:checked + .slider-custom:before { transform: translateX(22px); background-color: var(--bg-deep); }

/* Luxe Search Box — sticky di dalam .page-content */
.luxe-search-container {
    padding: 20px 20px 15px 20px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 99;
    background: rgba(11, 12, 16, 0.97);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(197, 168, 128, 0.1);
}

.luxe-brand-logo {
    font-family: var(--font-luxury);
    font-size: 40px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #ffffff 0%, var(--gold-primary) 50%, var(--gold-bright) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 10px rgba(197, 168, 128, 0.25));
    display: inline-block;
}

.luxe-brand-sub {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 35px;
    display: block;
}

.luxe-logo-img {
    width: 340px;
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
    border: 2px solid var(--gold-primary);
    border-radius: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 0 15px rgba(197, 168, 128, 0.1);
    filter: drop-shadow(0 4px 15px rgba(197, 168, 128, 0.35));
    transition: all 0.3s ease;
    display: inline-block;
}

.luxe-logo-img:hover {
    transform: scale(1.03);
    border-color: var(--gold-bright);
    box-shadow: 0 8px 32px rgba(197, 168, 128, 0.15), inset 0 0 20px rgba(212, 175, 55, 0.2);
}

.search-box-wrap { position: relative; width: 100%; }

.search-input-luxury {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(197, 168, 128, 0.25);
    border-radius: 30px;
    padding: 16px 25px 16px 60px;
    font-size: 16px;
    color: var(--text-light);
    outline: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.search-input-luxury:focus {
    border-color: var(--gold-bright);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(197, 168, 128, 0.15), 0 0 15px rgba(197, 168, 128, 0.2);
}

.search-icon-gold {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold-primary);
    font-size: 18px;
    transition: all 0.3s ease;
}

.search-input-luxury:focus ~ .search-icon-gold {
    color: var(--gold-bright);
    transform: translateY(-50%) scale(1.1);
}

/* ============================================================
   Results & Car Cards
   ============================================================ */
.results-container {
    padding: 10px 20px;
    position: relative;
    z-index: 2;
}

/* DIUBAH: dari flex-row jadi flex-column agar harga bisa tampil di bawah */
.car-result-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 15px 20px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;          /* ← diubah dari row ke column */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

.car-result-card:hover {
    background: rgba(197, 168, 128, 0.06);
    border-color: rgba(197, 168, 128, 0.3);
    transform: scale(1.02);
}

/* Baris atas: brand+model di kiri, ikon chevron di kanan */
.car-card-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.car-info { flex-grow: 1; }

.car-brand-badge {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--gold-primary);
    letter-spacing: 1.5px;
    margin-bottom: 4px;
    display: inline-block;
}

.car-model-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-light);
    margin: 0;
}

/* BBM dihapus dari kartu — hanya tampil di bottom sheet */
.car-fuel-type {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    display: flex;
    align-items: center;
}

.car-fuel-type i {
    font-size: 10px;
    margin-right: 5px;
    color: var(--gold-primary);
}

.car-action-icon {
    color: var(--gold-primary);
    font-size: 16px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 12px;
}

.car-result-card:hover .car-action-icon {
    transform: translateX(5px);
    color: var(--gold-bright);
}

/* ============================================================
   Harga Langsung di Kartu (sesuai permission)
   ============================================================ */

/* Pemisah tipis antara baris atas dan section harga */
.card-prices {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 11px;
    padding-top: 11px;
    border-top: 1px solid rgba(197, 168, 128, 0.1);
}

/* Satu baris harga */
.card-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
}

/* Baris Harga Jual: aksen background emas sangat tipis */
.card-price-row--sell {
    background: rgba(212, 175, 55, 0.06);
    border-radius: 6px;
    padding: 3px 7px;
    margin: 0 -7px;
}

/* Label kiri: ikon + nama singkat */
.card-price-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    color: rgba(197, 168, 128, 0.6);
}

/* Nilai harga kanan */
.card-price-val {
    font-size: 13px;
    font-weight: 700;
    color: #e0e0e0;
    letter-spacing: 0.2px;
}

/* Nilai Harga Jual: emas terang */
.card-price-val--sell {
    color: var(--gold-bright);
}

/* ============================================================
   Bottom Sheet
   ============================================================ */
.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 100%);
    width: 100%;
    max-width: 480px;
    background: var(--bg-card);
    border-top: 2px solid var(--gold-primary);
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
    padding: 30px 25px;
    box-shadow: 0 -15px 40px rgba(0,0,0,0.8);
    z-index: 1000;
    display: none;
}

.bottom-sheet-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: none;
}

.sheet-handle {
    width: 50px;
    height: 5px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    margin: -15px auto 25px auto;
}

.sheet-close-btn {
    position: absolute;
    top: 20px; right: 20px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: none;
    border-radius: 50%;
    width: 32px; height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sheet-close-btn:hover {
    background: rgba(197, 168, 128, 0.2);
    color: var(--gold-bright);
}

.price-item-luxury {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 15px 20px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-item-luxury.gold-highlight {
    background: rgba(197, 168, 128, 0.03);
    border: 1px solid rgba(197, 168, 128, 0.2);
}

.price-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 500;
}

.price-val {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-light);
}

.price-item-luxury.gold-highlight .price-val {
    color: var(--gold-bright);
    font-size: 20px;
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.2));
}

.restricted-value {
    color: #e63946 !important;
    font-style: italic;
    font-size: 14px;
    font-weight: 400;
}

/* ============================================================
   Header Profil — fixed di atas, tidak ikut scroll
   ============================================================ */
.luxe-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0; /* Tidak menyusut dalam flex column */
    z-index: 10;
    background: rgba(11, 12, 16, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.luxe-header-profile { display: flex; align-items: center; }

.luxe-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    border: 1.5px solid var(--gold-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #0b0c10;
    font-weight: 700;
    font-size: 16px;
    margin-right: 12px;
}

.luxe-profile-info { line-height: 1.2; }

.luxe-profile-name { font-size: 14px; font-weight: 600; color: var(--text-light); }

.role-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 9px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: rgba(197, 168, 128, 0.12);
    border: 0.5px solid rgba(197, 168, 128, 0.3);
    color: var(--gold-primary);
    border-radius: 20px;
    margin-top: 3px;
}

.logout-icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-icon-btn:hover { color: #e63946; }

/* ============================================================
   Bottom Navigation Bar — fixed di bawah, tidak ikut scroll
   ============================================================ */
.bottom-navbar {
    flex-shrink: 0; /* Tidak menyusut dalam flex column */
    width: 100%;
    height: 75px;
    background: rgba(21, 25, 34, 0.97);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid rgba(197, 168, 128, 0.15);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
    z-index: 100;
}

.nav-item-custom {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 12px;
}

.nav-item-custom i { font-size: 20px; margin-bottom: 4px; }
.nav-item-custom.active { color: var(--gold-bright); }
.nav-item-custom:hover { color: var(--gold-primary); }

/* ============================================================
   Empty State
   ============================================================ */
.empty-state-search {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state-search i {
    font-size: 45px;
    color: rgba(197, 168, 128, 0.3);
    margin-bottom: 15px;
}

/* ============================================================
   Admin Table
   ============================================================ */
.table-luxury {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    margin-top: 10px;
}

.table-luxury th {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 15px;
    border: none;
}

.table-luxury tr {
    background: rgba(255, 255, 255, 0.015);
    transition: all 0.3s ease;
}

.table-luxury td {
    padding: 14px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 14px;
}

.table-luxury td:first-child {
    border-left: 1px solid rgba(255, 255, 255, 0.03);
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.table-luxury td:last-child {
    border-right: 1px solid rgba(255, 255, 255, 0.03);
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.table-luxury tr:hover { background: rgba(197, 168, 128, 0.04); }
.table-luxury tr:hover td { border-color: rgba(197, 168, 128, 0.15); }

.action-btn-circle {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
    color: var(--text-muted);
    font-size: 13px;
    text-decoration: none;
    margin-left: 5px;
    transition: all 0.3s ease;
}

.action-btn-circle.btn-edit:hover {
    background: rgba(197, 168, 128, 0.15);
    color: var(--gold-bright);
    border-color: var(--gold-primary);
}

.action-btn-circle.btn-delete:hover {
    background: rgba(230, 57, 70, 0.15);
    color: #e63946;
    border-color: #e63946;
}

/* ============================================================
   Modal Luxury
   ============================================================ */
.modal-content-luxury {
    background-color: var(--bg-card);
    border: 1px solid var(--gold-primary);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.8);
}

.modal-header-luxury {
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 20px 25px;
}

.modal-footer-luxury {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 15px 25px;
}

.select-custom-luxury {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 20px;
    color: var(--text-light);
    outline: none;
    width: 100%;
}

.select-custom-luxury option { background-color: var(--bg-card); color: var(--text-light); }
.select-custom-luxury:focus { border-color: var(--gold-primary); }