:root {
    --primary: #28c76f;
    --primary-dark: #1faa60;
    --secondary: #1f2a37;
    --accent: #2f80ed;
    --light: #f5f7fb;
    --danger: #e74c3c;
    --dark: #0e141b;
    --card: #ffffff;
    --muted: #6b7a8c;
    --border: #e6edf4;
    --shadow: 0 18px 45px rgba(16, 24, 40, 0.12);
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
    margin: 0;
    background: var(--light);
    color: var(--secondary);
    overflow-x: hidden;
}

a { color: inherit; }

/* --- Navigation --- */
nav {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(12px);
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 56px;
    box-shadow: 0 10px 30px rgba(16,24,40,0.08);
    position: sticky;
    top: 0;
    z-index: 3000;
    border-bottom: 1px solid rgba(230,237,244,0.6);
}

.logo { font-size: 1.6em; font-weight: 900; letter-spacing: .2px; cursor: pointer; display: flex; align-items: center; }
.logo a { text-decoration: none; display: inline-flex; align-items: center; }
.logo span { color: var(--primary); }
.logo-img { height: 100px; width: auto; display: block; filter: drop-shadow(0 6px 12px rgba(15, 23, 42, 0.15)); }

.nav-links { display: flex; align-items: center; gap: 10px; }
.nav-links .nav-btn,
.nav-links button {
    background: #ffffff;
    border: 1px solid var(--border);
    cursor: pointer;
    font-weight: 600;
    color: var(--secondary);
    padding: 10px 18px;
    border-radius: 999px;
    transition: all .2s ease;
    text-decoration: none;
}

.nav-links .nav-btn:hover,
.nav-links button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(16,24,40,0.12);
}

.nav-links .primary { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: white; border: none; }
.btn-login { background: var(--secondary) !important; color: white !important; padding: 10px 18px; border-radius: 999px; border: none !important; }

/* --- Dashboard Hero --- */
.hero-section {
    padding: 56px 40px 70px;
    background: radial-gradient(1200px 600px at 70% 10%, rgba(40,199,111,0.18), transparent 60%),
                radial-gradient(900px 500px at 5% 30%, rgba(47,128,237,0.16), transparent 60%),
                linear-gradient(135deg, #0b121a, #162535 45%, #0b121a);
}
.hero-wrap { position: relative; z-index: 1; max-width: 1120px; width: 100%; margin: 0 auto; display: grid; grid-template-columns: 1.25fr 1fr; gap: 46px; align-items: center; }
.hero-copy { text-align: left; color: #f8fafc; }
.hero-tag { display: inline-flex; align-items: center; gap: 8px; background: rgba(40,199,111,0.18); color: #b7f5d2; padding: 6px 12px; border-radius: 999px; font-weight: 700; letter-spacing: .3px; font-size: 12px; }
.hero-title { font-size: 52px; margin: 14px 0 12px; line-height: 1.05; letter-spacing: -.2px; }
.hero-sub { color: #cfe0f0; font-size: 17px; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-btn { padding: 14px 24px; border-radius: 999px; border: none; cursor: pointer; font-weight: 700; text-decoration: none; display: inline-block; }
.hero-btn.primary { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: white; box-shadow: 0 14px 30px rgba(40,199,111,0.35); }
.hero-btn.ghost { background: transparent; color: #f8fafc; border: 1px solid rgba(255,255,255,0.25); }
.hero-card { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); padding: 24px; border-radius: 20px; backdrop-filter: blur(14px); box-shadow: 0 24px 50px rgba(0,0,0,0.25); color: #f5f7fa; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.stat { background: rgba(255,255,255,0.08); padding: 12px; border-radius: 12px; text-align: center; }
.stat strong { display: block; font-size: 18px; }
.hero-badge { display: inline-flex; gap: 10px; align-items: center; margin-top: 16px; color: #c8d6e4; font-size: 13px; }

.info-section { background: #ffffff; padding: 40px 20px 80px; }
.info-container { max-width: 980px; margin: 0 auto; display: grid; gap: 22px; }
.home-section { width: 100%; color: #0f151c; background: var(--card); border-radius: 22px; padding: 28px; box-shadow: var(--shadow); border: 1px solid rgba(230,237,244,0.7); }
.home-section h2 { margin: 0 0 10px; font-size: 24px; letter-spacing: -.2px; }
.home-muted { color: var(--muted); margin-bottom: 14px; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-card { background: #f8fafc; border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.section-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 22px; align-items: center; }
.section-media { border-radius: 18px; overflow: hidden; border: 1px solid var(--border); box-shadow: 0 14px 28px rgba(16,24,40,0.08); }
.section-media img { width: 100%; height: 100%; display: block; object-fit: cover; }
.qa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.qa-item { background: #f8fafc; border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.review-card { background: #f8fafc; border: 1px solid var(--border); border-radius: 16px; padding: 18px; display: grid; gap: 10px; }
.review-top { display: flex; gap: 12px; align-items: center; }
.review-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.stars { color: #f6c343; font-weight: 700; font-size: 14px; }

.fleet-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.fleet-card { background: #f8fafc; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; display: grid; }
.fleet-carousel { position: relative; height: 240px; overflow: hidden; background: #f3f6fb; }
.fleet-track {
    height: 100%;
    display: flex;
    transition: transform 0.45s ease;
    will-change: transform;
}
.fleet-track img {
    width: 100%;
    height: 100%;
    flex: 0 0 100%;
    object-fit: contain;
    padding: 12px 16px;
    display: block;
}
.fleet-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.7);
    background: rgba(15, 23, 42, 0.5);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 2;
    font-size: 22px;
    line-height: 1;
}
.fleet-nav.left { left: 10px; }
.fleet-nav.right { right: 10px; }
.fleet-nav:hover { background: rgba(15, 23, 42, 0.7); }
.fleet-nav:disabled { opacity: 0.35; cursor: default; }
.fleet-body { padding: 16px; display: grid; gap: 8px; }
.fleet-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.fleet-pill { background: #eef2f7; border: 1px solid var(--border); padding: 4px 10px; border-radius: 999px; font-weight: 600; font-size: 12px; color: var(--muted); }

/* --- Page Management --- */
.page-section { display: none; min-height: calc(100vh - 70px); width: 100%; }
.active { display: flex; }
#dashboard.active { display: block; }
#booking { height: calc(100vh - 70px); }

/* --- Booking Sidebar --- */
#sidebar { width: 420px; background: white; padding: 26px; box-shadow: 12px 0 30px rgba(16,24,40,0.08); z-index: 1000; overflow-y: auto; }
#map-container { flex-grow: 1; position: relative; }
#map { position: absolute; inset: 0; z-index: 1; }

.input-group { margin-bottom: 15px; }
label { font-size: 11px; font-weight: 800; color: #888; text-transform: uppercase; display: block; margin-bottom: 5px; }
.input-box { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; box-sizing: border-box; font-size: 14px; background: #fbfdff; outline: none; transition: border .2s ease; }
.input-box:focus { border-color: rgba(47,128,237,0.5); box-shadow: 0 0 0 4px rgba(47,128,237,0.12); }
.search-btn { width: 100%; background: var(--secondary); color: white; border: none; padding: 12px; border-radius: 10px; cursor: pointer; font-weight: 700; margin-bottom: 10px; }

#price-section { display: none; margin-top: 20px; border-top: 2px solid #eee; padding-top: 20px; }
.price-row { display: flex; justify-content: space-between; align-items: center; padding: 12px; margin-bottom: 10px; border-radius: 12px; background: #f8fafc; border: 1px solid var(--border); }
.book-btn { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: white; border: none; padding: 8px 15px; border-radius: 999px; cursor: pointer; font-weight: 700; }

/* --- Profile/Bookings --- */
#profile { flex-direction: column; align-items: center; padding: 40px; overflow-y: auto; width: 100%; }
.history-table { width: 100%; max-width: 1000px; background: white; border-radius: 16px; box-shadow: 0 12px 30px rgba(16,24,40,0.12); margin-top: 20px; border: 1px solid var(--border); }
.history-header { background: var(--secondary); color: white; padding: 15px; display: grid; grid-template-columns: 1.5fr 2fr 1fr 1fr; font-weight: bold; border-radius: 16px 16px 0 0; }
.history-row { display: grid; grid-template-columns: 1.5fr 2fr 1fr 1fr; padding: 15px; border-bottom: 1px solid #eee; font-size: 0.9em; align-items: center; }
.admin-header { background: var(--secondary); color: white; padding: 15px; display: grid; grid-template-columns: 1.4fr 2fr 1.1fr 0.8fr 0.8fr 0.9fr 1.2fr; font-weight: bold; border-radius: 16px 16px 0 0; }
.admin-row { display: grid; grid-template-columns: 1.4fr 2fr 1.1fr 0.8fr 0.8fr 0.9fr 1.2fr; padding: 14px 15px; border-bottom: 1px solid #eee; font-size: 0.9em; align-items: center; gap: 8px; }
.admin-row small { color: var(--muted); }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-btn { border: none; padding: 6px 12px; border-radius: 999px; font-weight: 700; cursor: pointer; }
.admin-btn.accept { background: var(--primary); color: white; }
.admin-btn.decline { background: var(--danger); color: white; }
.admin-btn:disabled { opacity: 0.5; cursor: default; }
.status-pill { padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 12px; text-transform: capitalize; display: inline-flex; }
.status-pending { background: #fff2cc; color: #9a6a00; }
.status-confirmed { background: #d9f7e5; color: #177a44; }
.status-declined { background: #fde0dd; color: #b3261e; }

/* --- Modals --- */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 5000; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
.modal-content { background: white; padding: 35px; border-radius: 20px; width: 380px; text-align: center; box-shadow: var(--shadow); }
.auth-toggle { display: flex; justify-content: center; gap: 20px; margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.auth-toggle span { cursor: pointer; font-weight: 600; color: #999; }
.active-toggle { color: var(--primary) !important; border-bottom: 2px solid var(--primary); }
#card-element { padding: 12px; border: 1px solid #ddd; border-radius: 6px; margin: 20px 0; background: #fff; }

@media (max-width: 980px) {
    nav { padding: 0 20px; }
    .hero-section { padding: 44px 20px 60px; }
    .hero-wrap { grid-template-columns: 1fr; text-align: center; }
    .hero-copy { text-align: center; }
    .hero-actions { justify-content: center; }
    .features-grid, .fleet-grid, .steps, .qa-grid, .reviews-grid { grid-template-columns: 1fr; }
    .section-grid { grid-template-columns: 1fr; }
    .cta-strip { flex-direction: column; text-align: center; }
}
