@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800&display=swap');

:root {
    --background-color: #080e1a;
    --surface-color: rgba(20, 30, 50, 0.85);
    --primary-color: #f97316;
    --secondary-color: #03dac6;
    --on-background-color: #cbd5e1;
    --on-surface-color: #f8fafc;
    --border-color: rgba(255, 255, 255, 0.08);
    --card-bg: rgba(30, 41, 59, 0.5);
    --input-bg: rgba(15, 23, 42, 0.5);
    --text-color: #f8fafc;
}

/* Safari del iPhone agranda el texto por su cuenta al girar a horizontal
   (text autosizing). Con 100 % respeta los tamaños de la hoja, como en
   normalize.css: sin esto, la cabecera compacta del horizontal podía crecer. */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.7;
    padding: 20px;
    max-width: 1400px;
    margin: auto;
    background: linear-gradient(135deg, #06101f 0%, #0b1729 55%, #101f38 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--on-background-color);
}

h1, h2, h3, h4 {
    color: var(--on-surface-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 4px 7px;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
    font-size: 0.8em;
    line-height: 1.2;
}

thead {
    background: rgba(249, 115, 22, 0.1);
    color: var(--primary-color);
    font-weight: bold;
    letter-spacing: 0.02em;
}

tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.025);
}

tbody tr:hover {
    background-color: rgba(249, 115, 22, 0.05);
    transition: background-color 0.15s ease;
}

.container {
    /* El tema le da width: min(100%, 84rem); sin esto, relleno y borde se
       sumaban a ese 100 % y en el móvil toda la página se salía 34 px. */
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

/* Botones y tarjetas de acción: el relleno cuenta dentro del ancho. En el
   móvil se estiran al 100 % y, sin esto, sobresalían de su tarjeta. */
.action-button,
.nav-link-button,
.nav-action-button,
.nav-current,
.trip-action-card {
    box-sizing: border-box;
}

.page-title-link {
    color: inherit;
    text-decoration: none;
}

.paxer-home-shell {
    display: grid;
    gap: 30px;
}

.landing-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.landing-section--connect,
.landing-section--selector {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.landing-section__header {
    margin-bottom: 18px;
}

.landing-section__copy {
    margin: 0;
}

.paxer-home-form {
    display: grid;
    gap: 18px;
}

.selector-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    flex-wrap: wrap;
}

.selector-toolbar__season {
    flex: 0 1 280px;
    margin-left: auto;
}

.field-group {
    min-width: 0;
}

.field-group--grow {
    flex: 1 1 340px;
}

.field-group--full {
    width: 100%;
}

.field-group--action {
    display: flex;
    align-items: end;
}

.form-grid {
    display: grid;
    gap: 18px;
}

.form-grid--manual {
    grid-template-columns: minmax(0, 1.5fr) minmax(220px, 0.9fr);
}

.form-grid--action {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
    align-items: end;
}

.error-banner {
    margin: 16px 0 20px;
    padding: 14px 16px;
    border: 1px solid #8b2e3a;
    border-radius: 8px;
    background: #3a1820;
    color: #ffd8de;
    font-weight: 600;
}

.name-locator-page {
    display: grid;
    gap: 22px;
}

.name-locator-header {
    display: grid;
    gap: 8px;
}

.name-locator-header h1 {
    margin: 0;
}

.name-locator-eyebrow,
.name-locator-best__label,
.name-locator-match-type {
    color: var(--secondary-color);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.name-locator-summary {
    margin: 0;
    color: var(--on-background-color);
}

.name-locator-form {
    margin: 0;
}

.name-locator-best,
.name-locator-empty {
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.04);
    padding: 18px;
}

.name-locator-best {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.name-locator-best > div:first-child {
    display: grid;
    gap: 4px;
}

.name-locator-best strong {
    color: var(--on-surface-color);
    font-size: 1.65rem;
    line-height: 1;
}

.name-locator-actions,
.name-locator-row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.secondary-button {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--on-surface-color);
    padding: 9px 12px;
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.08);
}

.name-locator-table-wrap {
    overflow-x: auto;
}

.name-locator-table {
    margin-bottom: 0;
}

.name-locator-table td span {
    color: #a8b3c7;
    font-size: 0.84em;
}

.name-locator-row-actions a {
    color: var(--secondary-color);
    font-weight: 700;
}

.companion-overview {
    margin: 12px 0 16px;
    padding: 10px 14px;
    border: 1px solid rgba(212, 160, 23, 0.75);
    border-radius: 10px;
    background: rgba(212, 160, 23, 0.1);
    color: #f5d06f;
}

.companion-overview__header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.companion-overview__title {
    font-size: 1rem;
    font-weight: 700;
    color: #ffd166;
}

.companion-overview__badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 209, 102, 0.14);
    border: 1px solid rgba(255, 209, 102, 0.32);
    color: #ffe8a3;
    font-size: 0.85rem;
    font-weight: 700;
}

.companion-overview__body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    line-height: 1.45;
    font-size: 0.93rem;
}

.companion-overview__summary {
    color: #f2dfab;
}

.companion-overview__meta {
    color: #ddc170;
    font-size: 0.88rem;
}

.companion-overview__meta::before {
    content: "· ";
    color: rgba(255, 209, 102, 0.55);
}

.results-refresh-notice {
    margin: 12px 0 16px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.results-refresh-notice__title {
    margin: 0 0 4px 0;
    font-size: 0.98rem;
    font-weight: 700;
}

.results-refresh-notice__message {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
}

.results-refresh-notice__summary {
    margin-top: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.results-refresh-notice__details {
    margin: 8px 0 0;
    padding-left: 18px;
    display: grid;
    gap: 4px;
    font-size: 0.88rem;
    line-height: 1.4;
}

.results-refresh-notice__details li {
    margin: 0;
}

.results-refresh-notice__more {
    margin-top: 8px;
    font-size: 0.84rem;
    opacity: 0.82;
}

.results-refresh-notice--pending {
    background: rgba(75, 119, 190, 0.14);
}

.results-refresh-notice--changed {
    background: rgba(56, 142, 93, 0.14);
}

.pdf-highlight-proposal {
    display: grid;
    gap: 18px;
    padding: 22px;
    border: 1px dashed rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
        rgba(255, 255, 255, 0.02);
}

.pdf-highlight-proposal__dropzone {
    display: grid;
    gap: 10px;
    padding: 24px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.pdf-highlight-form {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.pdf-highlight-proposal__dropzone.is-dragover {
    border-color: rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.pdf-highlight-proposal__dropzone.is-processing {
    cursor: progress;
    opacity: 0.9;
}

.pdf-highlight-proposal__dropzone:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.38);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.pdf-highlight-proposal__eyebrow,
.pdf-highlight-proposal__title,
.pdf-highlight-proposal__body,
.pdf-highlight-proposal__status {
    margin: 0;
}

.pdf-highlight-proposal__eyebrow {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--secondary-color);
}

.pdf-highlight-proposal__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--on-surface-color);
}

.pdf-highlight-proposal__body {
    line-height: 1.65;
}

.pdf-highlight-proposal__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pdf-highlight-proposal__picker {
    width: auto;
    min-width: 190px;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
}

.pdf-highlight-proposal__hint {
    font-size: 0.92rem;
    color: rgba(224, 224, 224, 0.76);
}

.pdf-highlight-proposal__selected {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--on-surface-color);
}

.pdf-highlight-proposal__status {
    font-size: 0.92rem;
    color: rgba(224, 224, 224, 0.72);
}

.pdf-highlight-proposal__status[data-tone="pending"] {
    color: #8fd3ff;
}

.pdf-highlight-proposal__status[data-tone="success"] {
    color: #8bdf9f;
}

.pdf-highlight-proposal__status[data-tone="error"] {
    color: #ff9db0;
}

.pdf-highlight-proposal__preview {
    display: grid;
    gap: 14px;
}

.pdf-highlight-proposal__preview-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--secondary-color);
}

.pdf-preview-sheet {
    display: grid;
    gap: 11px;
    padding: 22px 20px;
    border-radius: 18px;
    background: #f6f1e8;
    color: #1e2b38;
    box-shadow:
        0 20px 40px -28px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(15, 23, 35, 0.08);
}

.pdf-preview-sheet__row {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    align-items: baseline;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(30, 43, 56, 0.08);
    font-size: 0.98rem;
    line-height: 1.5;
}

.pdf-preview-sheet__row:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.pdf-preview-sheet__footer {
    display: grid;
    gap: 8px;
    margin-top: 2px;
    padding-top: 12px;
    border-top: 1px solid rgba(30, 43, 56, 0.12);
}

.pdf-preview-sheet__footer-heading {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(30, 43, 56, 0.52);
}

.pdf-preview-sheet__guide-row {
    display: grid;
    grid-template-columns: 58px max-content;
    gap: 10px;
    align-items: baseline;
    font-size: 0.92rem;
    line-height: 1.45;
}

.pdf-preview-sheet__guide-code {
    font-size: 0.82rem;
    font-weight: 800;
    color: rgba(30, 43, 56, 0.62);
}

.pdf-preview-sheet__index {
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(30, 43, 56, 0.48);
    letter-spacing: 0.06em;
}

.pdf-preview-sheet__text {
    color: rgba(30, 43, 56, 0.9);
}

.marker-text {
    position: relative;
    display: inline-block;
    padding: 0 0.12em;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #0e1722;
    isolation: isolate;
}

.marker-text::before,
.marker-text::after {
    content: "";
    position: absolute;
    left: -0.12em;
    right: -0.12em;
    z-index: -1;
    background: var(--marker-color, rgba(255, 255, 255, 0.2));
    opacity: 0.82;
    filter: saturate(1.08);
}

.marker-text::before {
    top: 0.5em;
    bottom: 0.03em;
    border-radius: 0.34em 0.48em 0.3em 0.42em;
    transform: rotate(-1.4deg) skewX(-10deg);
}

.marker-text::after {
    top: 0.58em;
    bottom: 0.08em;
    border-radius: 0.28em 0.38em 0.3em 0.34em;
    opacity: 0.62;
    transform: rotate(0.9deg) skewX(8deg);
}

.marker-text--guide {
    justify-self: start;
    width: fit-content;
    font-weight: 700;
    letter-spacing: 0;
}

.pdf-highlight-proposal__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
}

.marker-key {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 0 2px;
}

.marker-key__swatch {
    display: inline-flex;
    width: 30px;
    height: 12px;
    border-radius: 999px;
    background: var(--marker-color, rgba(255, 255, 255, 0.2));
    opacity: 0.96;
}

.marker-key__label {
    color: var(--on-background-color);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

@media (max-width: 720px) {
    .companion-overview {
        padding: 9px 12px;
    }

    .companion-overview__title {
        font-size: 0.95rem;
    }

    .companion-overview__body {
        font-size: 0.9rem;
    }
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
}

a:hover {
    text-decoration: underline;
}

.booking-code-link {
    white-space: nowrap;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.16em;
}

.details ul { list-style-type: none; padding-left: 0; }
.details li { margin-bottom: 12px; }
.details ul ul { padding-left: 25px; border-left: 2px solid var(--primary-color); margin-top: 8px; }
.details b { color: #f9a825; } /* Amarillo para localizadores */

.summary-grid {
    display: grid;
    /* Columnas de 500 px, salvo en pantallas más estrechas (móvil). */
    grid-template-columns: repeat(auto-fit, minmax(min(500px, 100%), 1fr));
    gap: 25px;
}

.tokiot-policy-card {
    margin: 20px 0 18px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 4px solid var(--secondary-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
}

.tokiot-policy-card__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.tokiot-policy-card__text {
    min-width: 0;
}

.tokiot-policy-card__title {
    margin: 4px 0 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #f5d27a;
}

.tokiot-policy-card__form {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 7px;
    background: rgba(0, 0, 0, 0.22);
}

.tokiot-policy-card__choice {
    min-width: 48px;
    height: 34px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--text-color);
    font-weight: 800;
    cursor: pointer;
}

.tokiot-policy-card__choice.is-active {
    background: var(--secondary-color);
    color: #06111f;
}

.tokiot-policy-card__meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
    color: #cfd7e6;
    font-size: 0.9rem;
}

.tokiot-policy-card__meta span {
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.07);
}

.external-transfer-card {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.external-transfer-card h5 {
    margin: 0 0 10px;
    color: #f5d27a;
    font-size: 0.95rem;
}

.external-transfer-card table {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.summary-total-row td {
    font-weight: bold;
    color: #f5d27a;
    border-top: 2px solid rgba(180, 122, 255, 0.45);
    background: rgba(255, 255, 255, 0.03);
}

.continuation-card .driver-meta-list {
    margin-top: 12px;
}

.continuation-detail {
    margin-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 12px;
}

.continuation-group {
    margin-top: 12px;
}

.continuation-group ul {
    list-style: none;
    margin: 8px 0 0;
    padding-left: 0;
}

.continuation-group li {
    margin: 4px 0;
}

.continuation-count {
    color: #aaa;
    margin-left: 6px;
}

.continuation-dates {
    color: #aaa;
    font-size: 0.9em;
    margin-left: 8px;
}

.info-header {
    background: rgba(249, 115, 22, 0.07);
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.info-header-split {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.info-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* Formulario */
form {
    background: transparent;
    padding: 0;
    border-radius: 0;
}
label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--on-surface-color);
}
select,
input[type="number"],
input[type="text"],
input[type="password"],
textarea,
button {
    width: 100%;
    min-height: 50px;
    padding: 12px 16px;
    margin-bottom: 0;
    box-sizing: border-box;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.5);
    color: var(--on-surface-color);
    font-size: 15px;
    font-family: 'Outfit', sans-serif;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select:focus,
input[type="number"]:focus,
input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
    outline: none;
    border-color: rgba(249, 115, 22, 0.5);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

select option {
    background: #0f172a;
    color: #f8fafc;
}

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

input::placeholder,
textarea::placeholder {
    color: rgba(224, 224, 224, 0.62);
}

button {
    background: linear-gradient(135deg, #ea580c, #f97316);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.25);
}
button:hover {
    background: linear-gradient(135deg, #f97316, #fb923c);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.35);
}

@media (max-width: 768px) {
    .paxer-home-shell {
        gap: 24px;
    }

    .landing-section {
        margin-top: 24px;
        padding-top: 24px;
    }

    .form-grid--manual,
    .form-grid--action {
        grid-template-columns: 1fr;
    }

    .pdf-highlight-proposal,
    .pdf-highlight-proposal__dropzone {
        padding: 18px;
    }

    .pdf-preview-sheet {
        padding: 18px 16px;
    }

    .pdf-preview-sheet__row {
        grid-template-columns: 26px minmax(0, 1fr);
        gap: 8px;
        font-size: 0.92rem;
    }

    .pdf-highlight-proposal__actions {
        align-items: stretch;
    }

    .pdf-highlight-proposal__picker {
        width: 100%;
    }
}

/* Spinner de carga */
#loader {
    display: none;
    text-align: center;
    padding: 50px;
}
.spinner {
    border: 6px solid #333;
    border-top: 6px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Menú de Acciones */
.actions-menu,
.actions-submenu,
.nav-backlinks {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px;
    border-radius: 12px;
}

.actions-menu {
    margin-bottom: 25px;
}

.nav-backlinks {
    margin: 0 0 20px;
}

.action-button,
.nav-link-button,
.nav-action-button,
.nav-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    text-align: center;
    padding: 10px 14px;
    background: rgba(30, 41, 59, 0.6);
    color: var(--on-background-color);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: 'Outfit', sans-serif;
    line-height: 1.25;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.action-button,
.nav-link-button,
.nav-action-button {
    cursor: pointer;
}

button.action-button,
button.nav-action-button {
    width: auto;
    min-height: 0;
    margin: 0;
    appearance: none;
    font-family: inherit;
    background: rgba(30, 41, 59, 0.6);
    color: var(--on-background-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.action-button:hover,
.nav-link-button:hover,
.nav-action-button:hover {
    background: rgba(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.35);
    color: var(--on-surface-color);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.15);
}

.action-button.active,
.nav-link-button.active,
.nav-link-button[aria-current="page"],
.nav-current {
    background: linear-gradient(135deg, #ea580c, #f97316);
    border-color: rgba(249, 115, 22, 0.4);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.25);
}

.nav-current {
    cursor: default;
}

.action-button.header-action-button,
.nav-link-button.header-action-button,
.nav-action-button.header-action-button {
    flex: 0 0 auto;
    white-space: nowrap;
}

.rooming-selector-menu {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.rooming-selector-menu .action-button,
.rooming-selector-menu .nav-link-button,
.rooming-selector-menu .nav-current {
    flex: 0 0 auto;
    min-width: 150px;
}

/* Custom styles for the Paxer title. */
.paxer-title {
    font-weight: bold;
    background: linear-gradient(45deg, #FF0000, #FF8C00, #FFFF00, #87CEEB, #FFFFFF); /* Red to Orange to Yellow to SkyBlue to White */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.actions-menu{display:flex;flex-wrap:wrap;gap:.75rem;align-items:center;margin:12px 0}
.actions-menu .actions-right{margin-left:auto;display:flex;gap:.75rem}

/* Guías Asignados + Conductor */
.guides-driver-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 25px;
}

.guides-table-card {
    flex: 0 1 auto;
    min-width: 220px;
}

.driver-card {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px 20px;
    min-width: 220px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.gm-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 16px 0 24px 0;
    align-items: stretch;
}

.gm-card {
    flex: 1 1 320px;
    overflow: hidden;
}

.gm-card .driver-card-header {
    margin: -16px -20px 18px;
}

.gm-card-body {
    display: block;
}

.gm-lines div {
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: #dddddd;
}

.gm-lines div:last-child {
    margin-bottom: 0;
}

.full-tour-card {
    flex: 1 1 280px;
}

.is-hidden {
    display: none !important;
}

.full-tour-toggle {
    margin-top: 16px;
}

/* Toggle buttons - Golden gradient style (show/hide actions) */
.full-tour-toggle-btn,
.toggle-filter-btn {
    background: linear-gradient(135deg, #ffd700, #f07c00);
    border: 2px solid #ffd700;
    border-radius: 6px;
    color: #1b1b1b;
    font-weight: 600;
    padding: 10px 18px;
    cursor: pointer;
    font-size: 0.9rem;
    box-shadow: 0 3px 6px rgba(0,0,0,0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
    width: auto;
    margin: 0;
}

.toggle-filter-btn {
    display: block;
    width: 100%;
}

.prefetch-banner {
    margin: 16px 0;
    padding: 12px 18px;
    border-radius: 10px;
    border: 1px solid #2c2c2c;
    background: linear-gradient(135deg, rgba(255,215,0,0.08), rgba(48,207,208,0.08));
    box-shadow: 0 6px 14px rgba(0,0,0,0.35);
}

.prefetch-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #fdf4c4;
    letter-spacing: 0.3px;
}

.prefetch-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffd700 0%, #ff7f11 100%);
    box-shadow: 0 0 8px rgba(255,215,0,0.9);
    display: inline-block;
}

.prefetch-progress {
    margin-top: 10px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255,255,255,0.1);
    overflow: hidden;
}

.prefetch-progress-bar {
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg,#30cfd0,#ffd700,#30cfd0);
    background-size: 200% 100%;
    animation: bus-progress-shimmer 1.5s linear infinite;
}

.full-tour-toggle-btn:hover,
.toggle-filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(255, 215, 0, 0.3);
    background: linear-gradient(135deg, #ffe44d, #ff9500);
}

.full-tour-toggle-btn:focus,
.toggle-filter-btn:focus {
    outline: 2px solid #ffe58f;
    outline-offset: 2px;
}

/* Active state when filter is ON (showing hidden items) */
.toggle-filter-btn.filter-active,
.full-tour-toggle-btn.filter-active {
    background: linear-gradient(135deg, #4fe1b7, #2ecc71);
    border-color: #4fe1b7;
    color: #1b1b1b;
}

.toggle-filter-btn.filter-active:hover,
.full-tour-toggle-btn.filter-active:hover {
    background: linear-gradient(135deg, #6eecc8, #45d96a);
    box-shadow: 0 5px 12px rgba(79, 225, 183, 0.3);
}

/* Download/Export buttons - Blue gradient style */
.download-btn {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    border: 2px solid #4a90e2;
    border-radius: 6px;
    color: #ffffff;
    font-weight: 600;
    padding: 10px 18px;
    cursor: pointer;
    font-size: 0.9rem;
    box-shadow: 0 3px 6px rgba(0,0,0,0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(74, 144, 226, 0.4);
    background: linear-gradient(135deg, #5a9fef, #4589cc);
    text-decoration: none;
    color: #ffffff;
}

.download-btn:focus {
    outline: 2px solid #8ab8f0;
    outline-offset: 2px;
}

.full-tour-empty {
    margin-top: 12px;
    font-size: 0.9rem;
    color: #c0c0c0;
}

.full-tour-hidden {
    margin-top: 16px;
}

.full-tour-hidden-list {
    margin-top: 12px;
    border-top: 1px dashed #333;
    padding-top: 12px;
}

.full-tour-list {
    margin-top: 12px;
    border-top: 1px solid #2b2b2b;
    padding-top: 12px;
    max-height: 260px;
    overflow-y: auto;
}

.full-tour-entry {
    margin-bottom: 12px;
}

.full-tour-entry:last-child {
    margin-bottom: 0;
}

.full-tour-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.full-tour-entry-header .booking-code {
    color: #ffd700;
    font-weight: 700;
}

.full-tour-count {
    color: #4fe1b7;
    font-size: 0.85rem;
}

.full-tour-entry ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.full-tour-entry li {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #cccccc;
    border-bottom: 1px dashed #2f2f2f;
    padding: 4px 0;
}

.full-tour-entry li:last-child {
    border-bottom: none;
}

.full-tour-name {
    flex: 1;
    margin-right: 10px;
}

.full-tour-dates {
    color: #9fb4ff;
    font-size: 0.78rem;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .gm-wrapper {
        flex-direction: column;
    }
    .full-tour-list {
        max-height: none;
    }
}

.driver-label {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.75rem;
    color: #a0a0a0;
    margin: 0 0 6px 0;
}

.driver-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.driver-name a:hover {
    text-decoration: underline;
}

.driver-phone {
    margin: 6px 0 0 0;
    font-size: 0.95rem;
    color: #9fb4ff;
}

.driver-phone-link {
    color: inherit;
    text-decoration: none;
}

.driver-phone-link:hover {
    text-decoration: underline;
}

.driver-meta {
    margin: 12px 0 0 0;
    font-size: 0.9rem;
    color: #f0d58a;
    font-weight: 600;
}

.driver-meta-list {
    list-style: none;
    margin: 8px 0 0 0;
    padding: 0;
    font-size: 0.85rem;
    color: #ccc;
}

.driver-meta-list li {
    margin-bottom: 4px;
}

.driver-card--primary {
    flex: 0 0 auto;
    width: max-content;
    min-width: 0;
    max-width: 100%;
    min-height: 0;
    aspect-ratio: auto;
    padding: 20px 24px;
    display: block;
    align-self: flex-start;
    overflow: hidden;
    border-radius: 10px;
}

.driver-card--primary .driver-card-body {
    display: block;
    min-height: 0;
    width: max-content;
    max-width: 100%;
}

.driver-card--primary .driver-company {
    margin-top: 18px;
}

.driver-card--primary .driver-detail-list {
    margin-top: 18px;
    padding-top: 0;
    margin-bottom: 0;
}

.driver-card--primary .driver-detail-value {
    word-break: break-word;
}

.driver-card-header {
    margin: -20px -24px 18px;
    padding: 11px 18px 10px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    line-height: 1.1;
    text-transform: uppercase;
}

.driver-card-body {
    display: block;
}

.driver-company {
    margin: 16px 0 0 0;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.45;
}

.driver-detail-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
    width: max-content;
    max-width: 100%;
}

.driver-detail-row {
    display: grid;
    grid-template-columns: max-content max-content;
    gap: 24px;
    justify-content: start;
    align-items: start;
}

.driver-detail-key {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.driver-detail-value {
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.4;
}

@media (max-width: 720px) {
    .driver-card--primary {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        max-width: none;
        min-height: 0;
        aspect-ratio: auto;
    }

    /* En el móvil, las tablas anchas (listado, Les Paso, Me Pasan) se
       desplazan de lado dentro de su caja en vez de obligar a encoger
       toda la página. El prefijo del tema gana a su «table { overflow:
       hidden }», que recortaba las columnas de la derecha. */
    html[data-suite-theme] .container > table,
    html[data-suite-theme] .container .card > table,
    html[data-suite-theme] .summary-grid table,
    .container > table,
    .container .card > table,
    .summary-grid table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Textos sin sitio donde partir (unidos con espacios duros, enlaces
       largos): se parten en vez de ensanchar la página. Pasaba en las
       ciudades de cada día de /itinerario. */
    .itinerary-day-card {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    /* Tabla de pasajeros: el número y el nombre se quedan a la izquierda al
       desplazarla de lado, con fondo opaco del tema para tapar lo que pasa
       por debajo. */
    html[data-suite-theme] .passenger-table th:nth-child(-n + 2),
    html[data-suite-theme] .passenger-table td:nth-child(-n + 2) {
        position: sticky;
        z-index: 1;
        background: var(--px-panel, #0b1d2b);
    }

    html[data-suite-theme] .passenger-table th:nth-child(-n + 2) {
        background: var(--px-panel-strong, #0e2434);
    }

    html[data-suite-theme] .passenger-table th:first-child,
    html[data-suite-theme] .passenger-table td:first-child {
        left: 0;
        box-sizing: border-box;
        width: 2.4rem;
        min-width: 2.4rem;
        max-width: 2.4rem;
    }

    html[data-suite-theme] .passenger-table th:nth-child(2),
    html[data-suite-theme] .passenger-table td:nth-child(2) {
        left: 2.4rem;
        min-width: 8.5rem;
        box-shadow: 6px 0 8px -6px rgba(0, 0, 0, 0.7);
    }

    /* Zona táctil de dedo (unos 38 px) para el localizador, que abre la
       reserva, y para el teléfono del conductor. */
    .passenger-table .booking-code-link,
    .driver-phone-link {
        display: inline-block;
        padding: 12px 0;
    }

    .driver-card--primary .driver-detail-list {
        margin-top: 16px;
        padding-top: 0;
        width: 100%;
    }

    .tokiot-policy-card__body {
        align-items: stretch;
        flex-direction: column;
    }

    .tokiot-policy-card__form {
        width: 100%;
    }

    .tokiot-policy-card__choice {
        flex: 1 1 0;
    }
}

.guias-table {
    width: auto;
    margin: 0;
    table-layout: auto;
}

.guias-table th,
.guias-table td {
    border-bottom: 1px solid var(--border-color);
}

.guias-table th:first-child,
.guias-table td:first-child {
    width: 250px; /* Set a width for the first column */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.guias-table th:last-child,
.guias-table td:last-child {
    width: 80px;
    text-align: center;
}

/* Details Grid for Me Pasan / Les Paso */
.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 25px;
}

.details-column {
    position: relative;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 20px;
    border-radius: 14px;
    /* To prevent overflow if content is too long */
    overflow-x: auto;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.details-column h3 {
    margin-top: 0;
    border-bottom-color: var(--secondary-color);
}

.copy-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.copy-heading__title {
    flex: 1 1 auto;
    min-width: 0;
}

.copy-heading__actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    white-space: nowrap;
}

.copy-heading__actions .copy-icon {
    margin-left: 0;
    flex: 0 0 auto;
}

.details-column h4 {
    font-size: 1em;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.details-column ul {
    list-style-type: none;
    padding-left: 0;
}

.details-column ul ul {
    padding-left: 20px;
    border-left: 1px solid var(--primary-color);
    margin-top: 5px;
    margin-bottom: 10px;
}

.details-column li {
    margin-bottom: 5px;
}

.copy-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-size: 1.2em;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.copy-btn:hover {
    opacity: 1;
}

.copy-btn.copied {
    opacity: 1;
    color: var(--secondary-color);
}

/* Cool Copy Icons Styles */
.copy-icon {
    display: inline-block;
    font-size: 0.8em;
    cursor: pointer;
    margin-left: 6px;
    margin-bottom: -2px;
    padding: 2px 4px;
    border-radius: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    vertical-align: text-bottom;
}

.copy-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.copy-icon:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.copy-icon.copied {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #000;
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Bus error overlay */
#bus-error-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#bus-error-modal {
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px 28px;
    border-radius: 20px;
    width: min(320px, 90%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
}

#bus-error-modal h2 {
    margin: 0 0 12px 0;
    color: #ffb86b;
}

#bus-error-modal p {
    margin: 0 0 16px 0;
    color: rgba(255, 255, 255, 0.85);
}

#bus-error-modal button {
    padding: 10px 20px;
    border: 2px solid #4a90e2;
    border-radius: 6px;
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    width: auto;
    margin: 0;
}

#bus-error-modal button:hover {
    background: linear-gradient(135deg, #5a9fef, #4589cc);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.4);
}

/* Shimmer effect for copy icons */
.copy-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.copy-icon:hover::before {
    left: 100%;
}

.elegant-header {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: #000;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.subtitle {
    font-size: 0.9em;
    color: #aaa;
    margin-top: -10px;
    margin-bottom: 15px;
    font-style: italic;
}

/* Versión de Paxer, pequeña y siempre a la vista (templates/_paxer_version.html). */
.paxer-version {
    position: fixed;
    /* Por encima de la barra de inicio del iPhone en la app instalada. */
    right: calc(10px + env(safe-area-inset-right, 0px));
    bottom: calc(6px + env(safe-area-inset-bottom, 0px));
    z-index: 20;
    font-size: 11px;
    line-height: 1;
    opacity: 0.55;
    pointer-events: none;
    font-variant-numeric: tabular-nums;
}

/* Pantallas táctiles de cualquier ancho: el iPhone en horizontal pasa de
   720 px y allí el localizador medía 15 px de alto. Zona de dedo (unos
   38 px) para el localizador, el teléfono del conductor y «Abrir» en la
   búsqueda por nombre. */
@media (pointer: coarse) {
    .passenger-table .booking-code-link,
    .driver-phone-link,
    .name-locator-row-actions a {
        display: inline-block;
        padding: 12px 0;
    }
}

@media print {
    .paxer-version {
        display: none;
    }
}
