/* Global layout */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f4f5fb;
    color: #1b2234;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Topbar */
.topbar {
    background: #0b1020;
    color: #ffffff;
    padding: 0.75rem 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo a {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.logo span {
    color: #4fd1c5;
}

.topnav a {
    margin-left: 1.25rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

.topnav a:hover {
    opacity: 1;
}

.btn-primary {
    padding: 0.45rem 1.2rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #4f46e5, #22c55e);
    color: #ffffff;
    font-weight: 600;
}

.btn-outline {
    padding: 0.45rem 1.2rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #ffffff;
    font-weight: 500;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
}

.page-main {
    padding: 1.5rem 0 3rem;
}

/* Landing hero */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: center;
    padding: 3rem 0 2rem;
}

.hero-copy h1 {
    font-size: 2.7rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-copy h1 span {
    color: #4f46e5;
}

.hero-copy p {
    max-width: 34rem;
    color: #4b5563;
    margin-bottom: 1.5rem;
}

.hero-cta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hero-meta {
    display: flex;
    gap: 1rem;
    margin-top: 1.25rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.pill {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.08);
    color: #4f46e5;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-card {
    background: #101427;
    color: #ffffff;
    border-radius: 1.25rem;
    padding: 1.6rem 1.6rem 1.2rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.7);
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: "";
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.5), transparent 55%),
                radial-gradient(circle at 100% 100%, rgba(94, 234, 212, 0.45), transparent 55%);
    opacity: 0.7;
}

.hero-card-inner {
    position: relative;
    z-index: 1;
}

.hero-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
}

.hero-card small {
    font-size: 0.75rem;
    opacity: 0.8;
}

.hero-route {
    margin-top: 1.1rem;
    padding: 0.9rem 0.9rem 0.7rem;
    border-radius: 0.9rem;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.hero-route-step {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    padding: 0.35rem 0;
}

.hero-route-step strong {
    font-size: 0.8rem;
}

.route-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    margin-right: 0.4rem;
}

.route-dot.start {
    background: #4ade80;
    color: #052e16;
}

.route-dot.stop {
    background: #22d3ee;
    color: #0f172a;
}

.hero-route-meta {
    margin-top: 0.8rem;
    font-size: 0.75rem;
    display: flex;
    justify-content: space-between;
    opacity: 0.9;
}

.badge-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.08);
    font-size: 0.7rem;
}

/* Feature grid */
.section-title {
    margin-top: 3rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.section-subtitle {
    margin-bottom: 1.8rem;
    color: #6b7280;
    max-width: 32rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.4rem;
}

.feature-card {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.1rem 1.1rem 1rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.feature-card h3 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.feature-card p {
    font-size: 0.9rem;
    color: #6b7280;
}

.feature-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #4f46e5;
    margin-bottom: 0.25rem;
}

/* Auth / forms / cards */
.card {
    max-width: 520px;
    margin: 2rem auto;
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.7rem 1.8rem 1.6rem;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.card h2 {
    margin-top: 0;
    margin-bottom: 0.4rem;
}

.card p {
    margin-top: 0;
    color: #6b7280;
    font-size: 0.9rem;
}

form .field {
    margin-bottom: 1rem;
}

label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="time"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border-radius: 0.55rem;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.15);
}

textarea {
    min-height: 70px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.2rem;
    font-size: 0.9rem;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #4f46e5, #22c55e);
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
}

.btn-secondary {
    background: #111827;
}

.btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.error {
    margin-bottom: 0.8rem;
    padding: 0.5rem 0.7rem;
    border-radius: 0.5rem;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 0.85rem;
}

.success {
    margin-bottom: 0.8rem;
    padding: 0.5rem 0.7rem;
    border-radius: 0.5rem;
    background: #ecfdf3;
    color: #16a34a;
    font-size: 0.85rem;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.7rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: #f3f4f6;
    font-size: 0.8rem;
}

.chip input {
    margin: 0;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.slider-value {
    font-size: 0.85rem;
    color: #6b7280;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table th,
.table td {
    padding: 0.55rem 0.6rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.table th {
    background: #f9fafb;
    font-weight: 600;
}

.badge {
    display: inline-flex;
    padding: 0.15rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    background: #e0f2fe;
    color: #0369a1;
}

.footer {
    border-top: 1px solid #e5e7eb;
    padding: 1rem 0 1.3rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.footer-meta {
    opacity: 0.8;
}

/* Dashboard layout */
.dashboard-layout {
    display: grid;
    grid-template-columns: 2.2fr 1.2fr;
    gap: 1.5rem;
}

.dash-card {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.2rem 1.3rem 1.1rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.dash-card h3 {
    margin-top: 0;
    margin-bottom: 0.6rem;
}

.dash-card p {
    margin-top: 0;
    font-size: 0.9rem;
    color: #6b7280;
}

.trip-list {
    list-style: none;
    padding: 0;
    margin: 0.6rem 0 0;
}

.trip-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.9rem;
}

.trip-list li:last-child {
    border-bottom: none;
}

/* Admin dashboard */
.admin-shell {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    min-height: calc(100vh - 60px);
}

.admin-sidebar {
    background: #020617;
    color: #e5e7eb;
    padding: 1rem 1rem 1.5rem;
}

.admin-sidebar h2 {
    font-size: 1.1rem;
    margin: 0 0 1.2rem;
}

.admin-nav a {
    display: block;
    padding: 0.45rem 0.7rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    color: #cbd5f5;
    margin-bottom: 0.3rem;
}

.admin-nav a.active,
.admin-nav a:hover {
    background: rgba(59, 130, 246, 0.22);
}

.admin-content {
    padding: 1.3rem 1.5rem 2rem;
}

.admin-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: #ffffff;
    border-radius: 0.8rem;
    padding: 0.9rem 1rem;
    border: 1px solid #e5e7eb;
}

.stat-card h4 {
    margin: 0 0 0.2rem;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 700;
}

/* Map */
#map {
    width: 100%;
    height: 380px;
    border-radius: 0.9rem;
    border: 1px solid #e5e7eb;
    margin-bottom: 1rem;
}

.itinerary {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.itinerary-item {
    padding: 0.45rem 0.4rem;
    border-bottom: 1px solid #e5e7eb;
}

.itinerary-item:last-child {
    border-bottom: none;
}

/* Responsive */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-shell {
        grid-template-columns: 180px minmax(0, 1fr);
    }
}

@media (max-width: 700px) {
    .topnav {
        display: none;
    }

    .feature-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .card {
        margin: 1.2rem 1rem;
    }
}

