/* ============================================================
   AUTONET – PREMIUM LOGISTICS UI 2025
   FULL GLOBAL CSS – SINGLE FILE (PRODUCTION)
============================================================ */

/* ------------------------------------------------------------
   1) ROOT DESIGN TOKENS
------------------------------------------------------------ */
:root {
    --red: #e11d2f;
    --red-soft: #fee2e2;
    --red-dark: #b91c1c;

    --ink: #0f172a;
    --ink-soft: #1e293b;

    --bg: #ffffff;
    --bg-soft: #f5f5f7;
    --bg-softer: #fafafa;
    --bg-glass: rgba(255,255,255,0.60);

    --border: #e4e4e7;
    --border-soft: #f1f1f3;
    --border-glass: rgba(255,255,255,0.35);

    --text-main: #1f2937;
    --text-muted: #6b7280;

    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --radius-pill: 999px;

    --shadow-soft: 0 20px 55px rgba(0,0,0,0.06);
    --shadow-card: 0 20px 55px rgba(0,0,0,0.12);
    --shadow-xl: 0 30px 80px rgba(0,0,0,0.17);

    --grain: url('/assets/misc/grain.png');
}

/* ------------------------------------------------------------
   2) RESET
------------------------------------------------------------ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text-main);
    line-height: 1.45;
    overflow-x: hidden;
}

/* ------------------------------------------------------------
   3) CORE WRAPPER + CONTAINER
------------------------------------------------------------ */
.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 18px;
}

/* ------------------------------------------------------------
   4) NAVBAR – PREMIUM GLASS
------------------------------------------------------------ */
.navbar-autonet {
    position: sticky;
    top: 0;
    z-index: 2000;
    background: rgba(255,255,255,0.70);
    backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid var(--border-soft);
    box-shadow: 0 4px 18px rgba(0,0,0,0.05);
}

.nav-inner {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-mark {
    width: 36px;
    height: 36px;
    background: var(--red-soft);
    border-radius: var(--radius-md);
    color: var(--red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
}

.brand-text {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text-main);
    letter-spacing: -0.035em;
}

.brand-dot {
    width: 9px;
    height: 9px;
    background: var(--red);
    border-radius: 50%;
}

/* Nav Links */
.nav-center {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-link {
    font-size: 0.96rem;
    font-weight: 500;
    padding: 8px 4px;
    text-decoration: none;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: 0.22s ease;
}

.nav-link:hover {
    color: var(--text-main);
    border-color: var(--red-soft);
}

.nav-right {
    display: flex;
    gap: 10px;
}

/* ------------------------------------------------------------
   5) BUTTONS – PREMIUM GRADIENT + SOFT SHADOWS
------------------------------------------------------------ */
.btn-main,
.btn-main-sm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff;
    padding: 11px 26px;
    font-weight: 600;
    border-radius: var(--radius-pill);
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(225,29,47,0.28);
    transition: 0.22s ease;
}

.btn-main-sm {
    padding: 8px 16px;
    font-size: 0.82rem;
}

.btn-main:hover,
.btn-main-sm:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-ghost {
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    text-decoration: none;
    background: #fff;
    color: var(--text-main);
    transition: 0.18s ease;
}

.btn-ghost:hover {
    background: var(--bg-soft);
    border-color: var(--red-soft);
}

/* ------------------------------------------------------------
   6) HERO – PREMIUM INDUSTRIAL + GRAIN
------------------------------------------------------------ */
.hero {
    padding: 100px 0 80px;
    position: relative;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--grain);
    opacity: 0.14;
    pointer-events: none;
    z-index: 1;
}

.hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    gap: 8px;
    padding: 7px 13px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-bottom: 8px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin: 0 0 12px;
}

.hero-highlight {
    color: var(--red);
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 26px;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.hero-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge-soft {
    padding: 6px 12px;
    background: var(--bg-soft);
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ------------------------------------------------------------
   7) ROUTES CARD – GLASS + PREMIUM LIFT
------------------------------------------------------------ */
.card-elevated {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
}

.routes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.route-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    transition: 0.25s ease;
    cursor: pointer;
}

.route-row:hover {
    background: var(--red-soft);
    border-color: var(--red);
    transform: translateY(-2px);
}

.route-dot {
    width: 8px;
    height: 8px;
    background: var(--red);
    border-radius: 50%;
}

.route-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ------------------------------------------------------------
   8) INFO CARDS / GRID
------------------------------------------------------------ */
.section {
    padding: 48px 0;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 20px;
}

.info-card {
    background: #fff;
    padding: 22px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    transition: 0.2s ease;
}

.info-card:hover {
    transform: translateY(-3px);
    border-color: var(--red-soft);
    box-shadow: var(--shadow-card);
}

.info-icon {
    font-size: 1.7rem;
    color: var(--red);
    margin-bottom: 8px;
}

.info-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.info-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ------------------------------------------------------------
   9) FORM / WIZARD SHELL
------------------------------------------------------------ */
.page-shell {
    padding: 40px 0 48px;
}

.page-header {
    margin-bottom: 20px;
}

.page-title {
    font-weight: 700;
    font-size: 1.55rem;
    margin-bottom: 4px;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.form-shell {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    background: #fff;
    box-shadow: var(--shadow-soft);
    padding: 20px 18px 22px;
}

/* Wizard stepper */
.wizard-steps {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    overflow-x: auto;
}

.wizard-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: #fff;
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.wizard-step-index {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.wizard-step-label {
    font-weight: 500;
}

/* Active / done states */
.wizard-step--active {
    border-color: var(--red);
    background: var(--red-soft);
    color: var(--red-dark);
}

.wizard-step--active .wizard-step-index {
    border-color: transparent;
    background: var(--red);
    color: #fff;
}

.wizard-step--done {
    border-color: var(--red-soft);
    background: #fff;
    color: var(--text-main);
}

.wizard-step--done .wizard-step-index {
    background: var(--red-soft);
    border-color: transparent;
    color: var(--red-dark);
}

/* Wizard panels */
.wizard-panels {
    margin-top: 8px;
}

.wizard-panel {
    display: none;
    animation: fadeSlideIn 0.22s ease;
}

.wizard-panel.active {
    display: block;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Inputs */
.form-row {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 14px;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--text-main);
}

.form-control,
select,
textarea {
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 9px 12px;
    font-size: 0.9rem;
    font-family: inherit;
}

textarea {
    resize: vertical;
    min-height: 90px;
}

/* Map box */
.map-box {
    position: relative;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    background: var(--bg-soft);
}

.map-placeholder {
    width: 100%;
    height: 240px;
}

/* Wizard footer */
.wizard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
    gap: 12px;
}

.wizard-footer-left {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.wizard-footer-right {
    display: flex;
    gap: 8px;
}

/* ------------------------------------------------------------
   10) TRACKING TIMELINE
------------------------------------------------------------ */
.timeline {
    position: relative;
    padding-left: 22px;
    margin: 8px 0 0;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-left: 14px;
    padding-bottom: 12px;
}

.timeline-dot {
    position: absolute;
    left: -2px;
    top: 2px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #fff;
    border: 2px solid var(--border);
}

.timeline-item.active .timeline-dot {
    border-color: var(--red);
    background: var(--red-soft);
}

.timeline-label {
    font-size: 0.9rem;
    font-weight: 500;
}

.timeline-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ------------------------------------------------------------
   11) VEHICLE SELECTOR (Car, SUV, Van, Truck…)
------------------------------------------------------------ */
.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.vehicle-card {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: 0.25s ease;
    position: relative;
    box-shadow: 0 0 0 rgba(0,0,0,0);
}

.vehicle-card:hover {
    border-color: var(--red);
    background: var(--red-soft);
    transform: translateY(-2px);
}

.vehicle-card input[type="radio"] {
    display: none;
}

/* Icons + labels */
.vc-icon {
    font-size: 34px;
    margin-bottom: 6px;
    color: #64748b;
    transition: 0.2s ease;
}

.vc-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

/* checkmark circle */
.vc-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.4);
    transition: 0.2s ease;
}

/* radio checked state */
.vehicle-card input[type="radio"]:checked + .vc-icon,
.vehicle-card input[type="radio"]:checked ~ .vc-label {
    color: var(--red);
}

.vehicle-card input[type="radio"]:checked ~ .vc-check {
    opacity: 1;
    transform: scale(1);
}

/* ------------------------------------------------------------
   12) DATE PICKER
------------------------------------------------------------ */
.date-control {
    position: relative;
}

.date-control input {
    padding-right: 40px;
}

.date-control .date-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-muted);
}

/* ------------------------------------------------------------
   13) MAP (Leaflet overrides)
------------------------------------------------------------ */
.leaflet-container {
    font-family: inherit;
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
    background: #fff !important;
    border-radius: var(--radius-md) !important;
    width: 34px !important;
    height: 34px !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-soft) !important;
}

.map-box .reset-map {
    position: absolute;
    right: 14px;
    bottom: 14px;
    background: #fff;
    padding: 6px 10px;
    font-size: 0.85rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}

/* ------------------------------------------------------------
   14) TOAST (Bootstrap override)
------------------------------------------------------------ */
.toast-container {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 999999999 !important;
    pointer-events: auto;
}

.toast {
    z-index: 999999999 !important;
}

#toastMsg.bg-danger {
    background: linear-gradient(135deg, #b91c1c, #ef4444) !important;
    color: white;
    border-radius: 14px;
}

#toastMsg.bg-success {
    background: linear-gradient(135deg, #059669, #10b981) !important;
    color: #fff;
    border-radius: 14px;
}

/* ------------------------------------------------------------
   15) FOOTER
------------------------------------------------------------ */
.site-footer {
    margin-top: 30px;
    border-top: 1px solid var(--border-soft);
    background: var(--bg-soft);
    padding: 16px 0 10px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    font-size: 0.85rem;
}

.footer-brand {
    font-weight: 600;
    margin-bottom: 4px;
}

.footer-sub {
    color: var(--text-muted);
}

.footer-meta {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-bottom {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ------------------------------------------------------------
   16) RESPONSIVE
------------------------------------------------------------ */
@media (max-width: 768px) {
    .nav-center {
        display: none;
    }

    .hero {
        padding-top: 80px;
    }

    .hero-grid {
        grid-template-columns: minmax(0,1fr);
        gap: 26px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .grid-3 {
        grid-template-columns: minmax(0,1fr);
    }

    .form-row {
        grid-template-columns: minmax(0,1fr);
    }

    .footer-inner {
        flex-direction: column;
    }
}
.btn-ghost-sm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-main);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: 0.18s ease;
}

.btn-ghost-sm:hover {
    background: var(--bg-soft);
    border-color: var(--red-soft);
    color: var(--text-main);
}
