﻿*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --primary: #3f8926;
    --primary-hover: #1b3a21;
    --secondary: #47a433;
    --secondary-hover: #3b8a2a;
    --tertiary: #9ecc47;
    --dark: #0f172a;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #334155;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --status-green: #10b981;
    --status-red: #ef4444;
    --status-orange: #f59e0b;
}

body {
    background: var(--bg-color);
    color: var(--text-main);
    font-size: 15px;
    font-family: 'Segoe UI', system-ui, sans-serif;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4 {
    color: var(--primary);
}

/* =========================================================================
   NAVBAR (ALINEACIÓN ESTRICTA)
   ========================================================================= */
.navbar-aranda {
    background: var(--primary);
    color: white;
    min-height: 75px;
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 0;
}

/* Este contenedor alinea exactamente con el .container principal */
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.menu-toggle {
    display: none !important;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 10px 0;
}

.logo-img-wrapper {
    height: 70px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .logo-img-wrapper img {
        height: 100%;
        width: auto;
       
        border-radius: 6px;
    }

.logo-text {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 1px;
    color: white;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 100%;
    transition: all 0.3s;
}

.tab-btn {
    background: none;
    border: none;
    color: #e2e8f0;
    font-weight: 600;
    cursor: pointer;
    padding: 0 1rem;
    border-bottom: 3px solid transparent;
    transition: 0.2s;
    display: flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
    font-size: 0.95rem;
}

    .tab-btn:hover, .tab-btn.active {
        color: var(--tertiary);
        border-bottom-color: var(--tertiary);
    }

.btn-admin-nav {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 50px;
    padding: 0.55rem 1.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-left: 10px;
}

    .btn-admin-nav:hover {
        background: white;
        color: var(--primary);
        border-color: white;
        box-shadow: 0 4px 10px rgba(0,0,0,0.15);
        transform: translateY(-2px);
    }

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.view {
    display: none;
    animation: fadeIn 0.3s;
}

    .view.active {
        display: block;
    }

.header-section {
    margin-bottom: 1.5rem;
}

.text-center {
    text-align: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.flex-wrap {
    flex-wrap: wrap;
}

.mt-2 {
    margin-top: 1rem;
}

.mx-auto {
    margin: 0 auto;
}

.card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* =========================================================================
   HERO BANNER Y BUSCADOR (FORMA CUADRADA)
   ========================================================================= */

.hero-banner {
    background-image: url('images/banner.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 16px;
    width: 100%;
    aspect-ratio: 21 / 10; /* Proporción estándar de banners anchos (ultrawide) */
    text-align: center;
    position: relative;
    margin-bottom: 3.5rem; /* Más espacio abajo para el buscador flotante */
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.hero-title {
    color: #ffffff;
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    /* Sombra extra fuerte para compensar la falta de overlay oscuro */
    text-shadow: 2px 2px 8px rgba(0,0,0,0.9), -1px -1px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 6px rgba(0,0,0,0.9);
}

.search-box-hero {
    background: #ffffff;
    border-radius: 12px; /* Corrección: Esquinas ligeramente redondeadas, no píldora */
    padding: 1.2rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    max-width: 1050px;
    margin: 0 auto;
    position: absolute;
    bottom: -45px;
    left: 20px;
    right: 20px;
    display: flex;
    align-items: center;
}

.form-grid-hero {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
}

.form-group-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 1.5rem;
    text-align: left;
    position: relative;
}

    .form-group-hero.border-divider {
        border-right: 1px solid #e2e8f0;
    }

    .form-group-hero label {
        font-size: 0.75rem;
        font-weight: 700;
        color: var(--text-muted);
        margin-bottom: 2px;
        display: flex;
        align-items: center;
        gap: 6px;
    }

        .form-group-hero label i {
            color: var(--primary);
            font-size: 1.2rem;
        }

.input-hero {
    border: none !important;
    outline: none !important;
    background-color: transparent !important;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    padding: 0.2rem 0;
    width: 100%;
    font-family: inherit;
}

.btn-search-container {
    flex: 0 0 auto;
    padding: 0 0 0 1.5rem;
    border: none;
}

.btn-search-hero {
    background: var(--primary);
    color: white;
    border-radius: 8px; /* Hace juego con el contenedor principal */
    padding: 1.2rem 2.5rem;
    font-size: 1.05rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    box-shadow: 0 4px 10px rgba(36, 78, 45, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-search-hero:hover {
        background: var(--primary-hover);
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(36, 78, 45, 0.4);
    }

/* =========================================================================
   MENÚ DESPLEGABLE CUSTOM (TIPO OLTURSA)
   ========================================================================= */
.custom-select-container {
    position: relative;
    width: 100%;
    outline: none;
}

.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    cursor: pointer;
    padding: 0.2rem 0;
}

    .custom-select-trigger i {
        color: var(--text-muted);
        font-size: 1.2rem;
        transition: transform 0.2s;
    }

.custom-select-container.active .custom-select-trigger i {
    transform: rotate(180deg);
}

.custom-select-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    left: -15px;
    right: -15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 100;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    overflow: hidden;
    border: 1px solid var(--border);
}

.custom-select-container.active .custom-select-dropdown {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.custom-select-search {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
}

    .custom-select-search i {
        color: var(--text-muted);
        font-size: 1.1rem;
    }

    .custom-select-search input {
        border: none;
        outline: none;
        background: transparent;
        width: 100%;
        font-size: 0.95rem;
        font-family: inherit;
    }

.custom-select-options {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 250px;
    overflow-y: auto;
}

    .custom-select-options li {
        padding: 12px 20px;
        font-size: 1rem;
        color: var(--text-main);
        font-weight: 500;
        cursor: pointer;
        border-bottom: 1px solid #f1f5f9;
        transition: background 0.2s, color 0.2s;
    }

        .custom-select-options li:hover {
            background: var(--secondary);
            color: white;
        }

        .custom-select-options li.hidden {
            display: none;
        }

/* Destinos Populares */
.destinations-section {
    padding: 2rem 0 4rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 2rem;
}

.destinations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.dest-card {
    display: block;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

    .dest-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 20px rgba(0,0,0,0.15);
    }

.dest-img-wrapper {
    aspect-ratio: 3/4;
    overflow: hidden;
    width: 100%;
}

.dest-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(0.7);
    transition: transform 0.5s ease, filter 0.5s ease;
}

.dest-card:hover .dest-img {
    transform: scale(1.1);
    filter: contrast(1);
}

.dest-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.dest-card:hover .dest-overlay {
    opacity: 0.9;
}

.dest-title {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================================================
   FORMULARIOS MODALES Y ADMIN
   ========================================================================= */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
}

    .form-group.full-width {
        grid-column: 1 / -1;
    }

    .form-group label {
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--text-muted);
    }

    .form-group input, .form-group select {
        padding: 0.65rem;
        border: 1px solid var(--border);
        border-radius: 6px;
        outline: none;
        font-size: 0.95rem;
        background: #fff;
        width: 100%;
    }

        .form-group input:focus, .form-group select:focus {
            border-color: var(--secondary);
            box-shadow: 0 0 0 2px rgba(71, 164, 51, 0.1);
        }

.alert-box {
    padding: 1rem;
    border-radius: 6px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    font-size: 0.9rem;
    color: var(--primary);
}

.btn {
    padding: 0.6rem 1rem;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: 0.2s;
    font-size: 0.9rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

    .btn-primary:hover {
        background: var(--primary-hover);
    }

.btn-secondary {
    background: var(--secondary);
    color: white;
}

    .btn-secondary:hover {
        background: var(--secondary-hover);
    }

.btn-outline {
    background: white;
    border: 1px solid var(--border);
    color: var(--primary);
}

    .btn-outline:hover {
        background: var(--bg-color);
        border-color: var(--primary);
    }

.btn-danger {
    background: var(--status-red);
    color: white;
}

.badge {
    padding: 0.25rem 0.6rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
}

.bg-green {
    background: #dcfce7;
    color: var(--status-green);
}

.bg-red {
    background: #fee2e2;
    color: var(--status-red);
}

.bg-orange {
    background: #fef3c7;
    color: var(--status-orange);
}

.bg-gray {
    background: #e2e8f0;
    color: #475569;
}

.badge-seat {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
}

/* Salidas Card */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1rem;
}

.trip-card {
    border: 1px solid var(--border);
    padding: 1.25rem;
    border-radius: 8px;
    background: white;
    transition: 0.2s;
}

    .trip-card:hover {
        border-color: var(--tertiary);
        box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    }

/* Van y Asientos 3D */
.van-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.van-silhouette {
    background: linear-gradient(to right, #e2e8f0 0%, #f8fafc 50%, #e2e8f0 100%);
    border: 3px solid #cbd5e1;
    border-radius: 110px 110px 20px 20px;
    padding: 0;
    width: 340px;
    height: 680px;
    position: relative;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15), inset 0 0 10px rgba(0,0,0,0.05);
}

.van-headlights {
    position: absolute;
    top: 5px;
    left: 35px;
    right: 35px;
    height: 35px;
    background: transparent;
    border-radius: 50% 50% 0 0;
    box-shadow: -45px 0 15px -15px rgba(0,0,0,0.1), 45px 0 15px -15px rgba(0,0,0,0.1);
}

.van-windshield {
    position: absolute;
    top: 60px;
    left: 15px;
    right: 15px;
    height: 80px;
    background: #afb9c9;
    border-radius: 20px 20px 5px 5px;
    border-top: 3px solid #94a3b8;
    box-shadow: inset 0 10px 15px rgba(255,255,255,0.1);
    z-index: 2;
}

.van-mirror {
    position: absolute;
    top: 135px;
    width: 25px;
    height: 15px;
    background: #afb9c9;
    z-index: 1;
}

    .van-mirror.left {
        left: -18px;
        border-radius: 15px 5px 5px 15px;
        transform: rotate(15deg);
    }

    .van-mirror.right {
        right: -18px;
        border-radius: 5px 15px 15px 5px;
        transform: rotate(-15deg);
    }

.van-window-left, .van-window-right {
    position: absolute;
    top: 150px;
    bottom: 80px;
    width: 12px;
    background: #afb9c9;
    z-index: 1;
}

.van-window-left {
    left: 8px;
    border-radius: 0 5px 5px 0;
}

.van-window-right {
    right: 8px;
    border-radius: 5px 0 0 5px;
}

.van-rear-window {
    position: absolute;
    bottom: 15px;
    left: 40px;
    right: 40px;
    height: 20px;
    background: #afb9c9;
    border-radius: 5px 5px 15px 15px;
}

.seats-area {
    position: absolute;
    top: 150px;
    left: 26px;
    right: 26px;
    bottom: 50px;
    background: #ffffff;
    border-radius: 5px;
    padding: 15px 12px;
    z-index: 3;
}

.seats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px 12px;
    justify-items: center;
    align-items: center;
}

.seat-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 62px;
}

.seat-btn {
    width: 54px !important;
    height: 62px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 3px;
    border: none;
    border-radius: 8px !important;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15), inset 0 2px 4px rgba(255,255,255,0.25) !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

    .seat-btn.available {
        background: linear-gradient(135deg, #47a433 0%, #1b3a21 100%) !important;
        border: 1px solid #122816 !important;
    }

        .seat-btn.available:hover:not(:disabled) {
            transform: translateY(-4px) scale(1.05);
            box-shadow: 0 6px 12px rgba(0,0,0,0.25), inset 0 2px 4px rgba(255,255,255,0.4) !important;
        }

    .seat-btn.occupied {
        background: linear-gradient(135deg, #94a3b8 0%, #475569 100%) !important;
        border: 1px solid #334155 !important;
        color: #f8fafc !important;
        cursor: not-allowed;
        box-shadow: none !important;
        text-shadow: none;
    }

.row-1-gap {
    margin-bottom: 30px;
}

.legend {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    background: white;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.box {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1), inset 0 1px 2px rgba(255,255,255,0.2);
}

    .box.available {
        background: linear-gradient(135deg, #47a433 0%, #1b3a21 100%);
        border: 1px solid #122816;
    }

    .box.occupied {
        background: linear-gradient(135deg, #94a3b8 0%, #475569 100%);
        border: 1px solid #334155;
    }

/* Modales y Tablas */
.table-responsive, .card.table-responsive {
    overflow-x: auto !important;
    overflow-y: visible !important;
    width: 100%;
    max-width: 100%;
    display: block;
    padding-bottom: 40px;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

    .data-table th {
        padding: 1rem 0.8rem;
        text-align: left;
        border-bottom: 2px solid var(--border);
        font-size: 0.9rem;
        color: var(--primary);
    }

    .data-table td {
        padding: 0.8rem;
        text-align: left;
        border-bottom: 1px solid var(--border);
        font-size: 0.9rem;
    }

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15,23,42,0.7);
    align-items: center;
    justify-content: center;
    z-index: 10500 !important;
    padding: 15px;
    backdrop-filter: blur(2px);
}

    .modal.active {
        display: flex;
    }

.modal-content {
    background: white;
    width: 100%;
    max-width: 500px;
    margin: auto !important;
    border-radius: 10px;
    max-height: calc(100vh - 30px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}

.modal-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    width: 100%;
}

.modal-footer {
    padding: 1rem;
    background: #f8fafc;
    border-top: 1px solid var(--border);
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.ticket-summary {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    border: 1px dashed var(--border);
}

.summary-row.total {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    color: var(--primary);
}

/* Tickets y Toasts */
.ticket-receipt {
    background: white;
    padding: 20px;
    font-family: 'Courier New', Courier, monospace;
    color: #000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

    .ticket-receipt .center {
        text-align: center;
    }

    .ticket-receipt .divider {
        border-bottom: 1px dashed #000;
        margin: 10px 0;
    }

    .ticket-receipt table {
        width: 100%;
        border-collapse: collapse;
        font-size: 13px;
    }

    .ticket-receipt td {
        padding: 3px 0;
        vertical-align: top;
    }

.text-right {
    text-align: right;
}

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10600;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--dark);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    animation: slideIn 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .toast.success {
        background: var(--status-green);
    }

    .toast.info {
        background: var(--secondary);
    }

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Utilidades Admin */
.table-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

    .table-controls input {
        width: 100%;
        max-width: 300px;
        padding: 0.5rem 1rem;
        border: 1px solid var(--border);
        border-radius: 6px;
        outline: none;
        font-size: 0.9rem;
    }

        .table-controls input:focus {
            border-color: var(--secondary);
            box-shadow: 0 0 0 2px rgba(71, 164, 51, 0.1);
        }

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.page-info {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.select-moderno {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: transparent;
    border: none !important;
    padding: 0px 18px 0px 4px;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    cursor: pointer;
    outline: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0px center;
    background-size: 14px;
    width: 100%;
}

    .select-moderno:focus {
        outline: none;
    }

    .select-moderno option {
        background-color: #ffffff;
        color: #333333;
    }

#print-area {
    display: none;
}

@media print {
    html, body {
        background-color: #ffffff !important;
        margin: 0 !important;
        padding: 0 !important;
    }

        body > *:not(#print-area) {
            display: none !important;
        }

    #print-area {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        min-height: 100vh;
        background-color: #ffffff !important;
    }
}

/* =========================================================================
   DISEÑO RESPONSIVO (TABLETS Y MÓVILES)
   ========================================================================= */
@media (max-width: 768px) {
    /* Navbar Responsiva */
    .menu-toggle {
        display: block !important;
        margin: 10px 0;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: var(--primary) !important;
        padding: 0 0 1rem 0;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1000;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }

        .nav-links.active {
            display: flex;
        }

        .nav-links .tab-btn, .nav-links .btn, .nav-links span, .btn-admin-nav {
            padding: 1rem 1.5rem;
            width: 100%;
            text-align: left;
            border-left: 3px solid transparent;
            border-bottom: none;
            border-radius: 0;
            margin-top: 0 !important;
            height: auto;
            justify-content: flex-start;
        }

    .btn-admin-nav {
        border: none;
        border-left: 3px solid transparent;
        background: transparent;
    }

    /* Hero Banner y Buscador */
    .hero-banner {
        background-size: cover;
        background-position: left center;
        aspect-ratio: 9 / 9; 
        padding: 0; 
        border-radius: 0;
        margin-bottom: 380px; 
        position: relative; 
    }

    .search-box-hero {
        position: absolute; 
        bottom: -320px; 
        left: 15px;
        right: 15px;
        border-radius: 12px;
        padding: 1.2rem;
        margin-top: 0;
        box-shadow: 0 8px 25px rgba(0,0,0,0.2);
        display: block;
        z-index: 10;
    }

    .hero-title {
        font-size: 2.2rem;
    }

     .form-grid-hero {
        flex-direction: column;
        gap: 1rem;
    }

    .form-group-hero {
        width: 100%;
        padding: 0.5rem 0;
        border-radius: 0;
    }

        .form-group-hero.border-divider {
            border-right: none;
            border-bottom: 1px solid #e2e8f0;
        }

    .btn-search-container {
        width: 100%;
        padding: 0;
        margin-top: 0.5rem;
    }

    .btn-search-hero {
        width: 100%;
        padding: 1.2rem;
        border-radius: 8px;
    }

    /* Modales, Card, y Van */
    .search-box .form-grid {
        grid-template-columns: 1fr;
    }

    .search-box .form-group[style*="flex-end"] {
        justify-content: center !important;
        margin-top: 10px;
    }

    .search-box .btn-primary {
        width: 100%;
        justify-content: center;
    }

    .trip-card {
        padding-bottom: 1.25rem !important;
    }

        .trip-card .flex-between {
            flex-direction: column;
            align-items: flex-start;
            gap: 5px;
        }

        .trip-card > div[style*="display:flex; flex-wrap:wrap"] {
            flex-direction: column;
            gap: 10px !important;
        }

        .trip-card .btn, .trip-card button[style*="position:absolute"] {
            width: 100%;
            position: static !important;
            justify-content: center;
            margin-top: 10px;
        }

    .modal-content {
        width: 100%;
        margin: auto !important;
        max-width: none;
        border-radius: 8px;
    }

    .modal-body {
        padding: 1.2rem;
    }

        .modal-body .form-grid, .modal-body #paradas-container > div {
            grid-template-columns: 1fr !important;
            gap: 12px;
        }

    .modal-footer {
        flex-direction: column;
        gap: 10px;
    }

        .modal-footer .btn {
            width: 100%;
            margin: 0;
            justify-content: center;
        }

    .legend {
        flex-direction: column;
        gap: 10px;
        align-items: center;
        text-align: center;
    }

    .van-wrapper {
        transform: scale(0.85);
        transform-origin: top center;
        margin-bottom: -80px;
    }

    .results-grid {
        grid-template-columns: 1fr; /* Fuerza a ocupar 1 sola columna sin desbordar */
        gap: 1rem;
        padding: 0;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .trip-card {
        padding: 1rem !important; /* Reduce padding para que no se salga de la pantalla */
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 0 1rem 0 !important;
    }

    .container {
        padding: 0 15px !important;
        overflow-x: hidden; /* Evita que el contenedor principal genere scroll horizontal */
    }


}

@media (max-width: 400px) {
    .van-wrapper {
        transform: scale(0.70);
        margin-bottom: -160px;
    }
}



/* COMPONENTE MONTO ADICIONAL (MODERNO SAAS) */
.monto-adicional-wrapper {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    height: 45px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

    .monto-adicional-wrapper:focus-within {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(36, 78, 45, 0.1);
    }

.btn-monto {
    background: transparent;
    border: none;
    width: 45px;
    height: 100%;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-monto:hover {
        background: #e2e8f0;
        color: var(--text-main);
    }

.monto-adicional-wrapper input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    text-align: center;
    font-size: 1rem !important;
    font-weight: 700;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: var(--text-main);
}

    .monto-adicional-wrapper input::-webkit-outer-spin-button,
    .monto-adicional-wrapper input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

.text-danger-monto {
    color: var(--status-red);
    font-weight: 600;
    font-size: 0.8rem;
    margin-top: 4px;
    display: block;
}

.text-success-monto {
    color: var(--status-green);
    font-weight: 600;
    font-size: 0.8rem;
    margin-top: 4px;
    display: block;
}


/* =========================================================================
   NUEVO LAYOUT SAAS PREMIUM (SIDEBAR Y TOPBAR)
   ========================================================================= */
body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

.app-layout {
    display: flex;
    height: 100vh;
    background: #f4f7f6;
    overflow: hidden;
}

/* SIDEBAR */
.sidebar {
    width: 250px;
    background: #ffffff;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

    .sidebar-header img {
        max-width: 140px;
    }

.close-sidebar-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
}

.sidebar-nav {
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    color: var(--primary); /* Verde empresa */
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.95rem;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

    .sidebar-link i {
        font-size: 1.25rem;
        color: var(--primary); /* Iconos verdes */
        transition: all 0.2s;
    }

    .sidebar-link:hover {
        background: #f0fdf4;
    }

    .sidebar-link.active {
        background: var(--primary);
        color: #ffffff;
        box-shadow: 0 4px 6px rgba(63, 137, 38, 0.2);
    }

        .sidebar-link.active i {
            color: #ffffff;
        }

/* MAIN Y TOPBAR */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.topbar {
    height: 65px;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    z-index: 900;
}

.menu-toggle-admin {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-btn {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    position: relative;
    text-decoration: none;
}

    .icon-btn:hover {
        background: #e2e8f0;
        color: var(--primary);
    }

/* DISEÑO DEL PUNTO DE NOTIFICACIÓN */
.badge-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 12px; /* Más grande */
    height: 12px; /* Más grande */
    background: var(--status-red);
    border-radius: 50%;
    border: 2px solid white;
}

/* ANIMACIÓN TIPO LATIDO / RADAR */
@keyframes pulse-red {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.8);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.badge-dot.animating {
    animation: pulse-red 1.5s infinite;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid transparent;
}

    .user-profile-btn:hover {
        background: #f8fafc;
        border-color: var(--border);
    }

.avatar {
    width: 35px;
    height: 35px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

.main-admin-content {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    background: #f4f7f6;
}

.header-section {
    text-align: left; /* Alineado a la izquierda */
    margin-bottom: 1.5rem;
}

    .header-section h2 {
        margin: 0 0 5px 0;
        color: var(--text-main);
        font-weight: 700;
    }

/* BUSCADOR DE TABLAS SAAS */
.modern-search {
    position: relative;
    width: 100%;
    max-width: 300px;
}

    .modern-search i {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-muted);
    }

    .modern-search input {
        width: 100%;
        padding: 8px 15px 8px 35px;
        border: 1px solid var(--border);
        border-radius: 6px;
        outline: none;
    }

        .modern-search input:focus {
            border-color: var(--primary);
        }

/* RESPONSIVE MÓVIL */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 990;
}

@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
    }

        .sidebar.open {
            transform: translateX(0);
        }

    .sidebar-overlay.active {
        display: block;
    }

    .close-sidebar-btn, .menu-toggle-admin {
        display: block;
    }

    .topbar {
        padding: 0 15px;
    }

    .user-name {
        display: none;
    }
}


/* =========================================================================
   DISEÑO DE TABS (PESTAÑAS DE USUARIOS)
   ========================================================================= */
.tabs-container {
    background: #f1f5f9 !important;
    padding: 4px !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    gap: 5px !important;
    border: 1px solid var(--border);
}

.btn-tab {
    background: transparent !important;
    color: var(--text-muted) !important;
    border: none !important;
    padding: 8px 20px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-size: 0.9rem !important;
}

    .btn-tab.active {
        background: #ffffff !important;
        color: var(--primary) !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
    }

/* =========================================================================
   SISTEMA DE NOTIFICACIONES (DROPDOWN)
   ========================================================================= */
.noti-wrapper {
    position: relative;
}

.noti-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    width: 320px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: none;
    flex-direction: column;
    z-index: 2000;
    overflow: hidden;
}

    .noti-dropdown.active {
        display: flex;
    }

.noti-header {
    padding: 15px;
    font-weight: bold;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
    color: var(--text-main);
}

.noti-body {
    max-height: 350px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.noti-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    text-decoration: none;
    color: var(--text-main);
}

    .noti-item:hover {
        background: #f0fdf4;
    }

.noti-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #dcfce7;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.noti-content {
    flex: 1;
}

.noti-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 3px 0;
    color: var(--primary);
}

.noti-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.noti-time {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 5px;
    display: block;
}

/* =========================================================================
   CORRECCIÓN RESPONSIVA: NOTIFICACIONES EN MÓVIL
   ========================================================================= */
@media (max-width: 768px) {
    .noti-dropdown {
        position: fixed !important;
        top: 65px !important; /* Se ubica justo debajo del topbar */
        left: 15px !important; /* Margen izquierdo */
        right: 15px !important; /* Margen derecho */
        width: auto !important; /* Se adapta al ancho disponible */
        max-width: none !important;
        box-shadow: 0 10px 40px rgba(0,0,0,0.2) !important;
    }

    .noti-body {
        max-height: 60vh !important; /* Limita la altura para no ocupar toda la pantalla */
    }
}




/* =========================================================================
   VARIANTE: SILUETA DE CAMIONETA (6 ASIENTOS)
   ========================================================================= */
.van-silhouette.camioneta {
    width: 290px;
    height: 520px;
    border-radius: 90px 90px 30px 30px;
}

.seats-grid {
    display: grid;
    /* Por defecto Van (4 columnas) */
    grid-template-columns: repeat(4, 1fr);
    gap: 20px 12px;
    justify-items: center;
    align-items: center;
}

    .seats-grid.camioneta {
        /* Camioneta usa 6 subdivisiones invisibles para centrar los asientos 5 y 6 */
        grid-template-columns: repeat(6, 1fr);
        gap: 25px 8px;
    }

/* Ajustes de ventanas y área interior para la camioneta */
.van-silhouette.camioneta .seats-area {
    top: 150px;
    bottom: 50px;
    left: 32px;
    right: 32px;
}

.van-silhouette.camioneta .van-mirror {
    top: 130px;
}

.van-silhouette.camioneta .van-window-left,
.van-silhouette.camioneta .van-window-right {
    top: 150px;
    bottom: 60px;
}