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

:root {
    --navy: #0b1f33;
    --navy-2: #0b1f33;
    --blue: #0f7480;
    --blue-dark: #0f7480;
    --blue-soft: #e9eef0;
    --aqua: #0f7480;
    --green: #2f7d6c;
    --green-soft: #e7f1ef;
    --orange: #b8792b;
    --yellow-soft: #fff5df;
    --red: #d95050;
    --red-soft: #fdecec;
    --ink: #111318;
    --muted: #58646d;
    --line: #d9e2e5;
    --canvas: #e9eef0;
    --mist: #e9eef0;
    --white: #fff;
    --shadow: 0 12px 34px rgba(11, 31, 51, .12);
    --radius: 14px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { margin: 0; min-height: 100vh; overflow-x: hidden; color: var(--ink); background: var(--canvas); font-family: Montserrat, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 13px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; font-weight: 400; }
img { max-width: 100%; }

.app-shell { display: block; min-height: 100vh; }
.app-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .98); box-shadow: 0 8px 26px rgba(11, 31, 51, .07); backdrop-filter: blur(12px); }
.topbar { display: flex; width: 100%; min-height: 82px; align-items: center; gap: 18px; padding: 10px clamp(18px, 3vw, 38px); }
.header-brand { display: inline-flex; flex: 0 0 auto; align-items: center; }
.header-brand img { display: block; width: 180px; height: 60px; object-fit: contain; }
.header-navigation { position: relative; min-width: 0; flex: 1 1 auto; background: transparent; }
.main-nav { display: flex; min-width: 0; align-items: center; justify-content: center; gap: 3px; padding: 0; }
.nav-link { display: flex; min-height: 42px; align-items: center; gap: 8px; padding: 9px 11px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; text-align: left; font-size: 12px; font-weight: 600; white-space: nowrap; transition: color .16s ease, background .16s ease, transform .16s ease; }
.nav-link:hover { color: var(--navy); background: var(--blue-soft); }
.nav-link.active { color: #fff; background: var(--blue); box-shadow: 0 5px 14px rgba(11, 31, 51, .16); }
.nav-icon { display: inline-flex; width: 20px; height: 20px; flex: 0 0 20px; align-items: center; justify-content: center; color: var(--blue-dark); font-size: 16px; }
.nav-link.active .nav-icon { color: #fff; }
.nav-icon svg { display: block; width: 19px; height: 19px; flex: 0 0 19px; overflow: visible; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.logout-link svg, .button-icon svg { display: block; width: 18px; height: 18px; flex: 0 0 18px; overflow: visible; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }
.button-icon { display: inline-flex; align-items: center; justify-content: center; }
.nav-dropdown { position: relative; }
.nav-dropdown > summary { cursor: pointer; list-style: none; }
.nav-dropdown > summary::-webkit-details-marker { display: none; }
.nav-chevron { margin-left: 2px; font-size: 16px; transition: transform .16s ease; }
.nav-dropdown[open] > summary .nav-chevron { transform: rotate(180deg); }
.nav-dropdown-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 70; display: grid; width: max-content; min-width: 250px; max-width: min(92vw, 620px); max-height: calc(100vh - 165px); gap: 3px; padding: 9px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 18px 42px rgba(11, 31, 51, .16); }
.nav-dropdown-menu .nav-link { width: 100%; }
.nav-dropdown-menu-wide { right: 0; left: auto; min-width: min(560px, 92vw); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.main-column { width: 100%; min-width: 0; }
.menu-button { display: none; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: var(--navy); background: #fff; font-size: 21px; }
.menu-button:hover { color: var(--blue-dark); background: var(--blue-soft); }
.topbar-user { display: flex; flex-direction: row; align-items: center; gap: 9px; }
.topbar-user-photo, .topbar-user-avatar { width: 39px; height: 39px; flex: 0 0 39px; border-radius: 50%; object-fit: cover; }
.topbar-user-avatar { display: grid; place-items: center; color: #fff; background: var(--blue); font-size: 13px; font-weight: 700; }
.topbar-user-meta { min-width: 0; line-height: 1.15; }
.topbar-user-meta strong, .topbar-user-meta small { display: block; }
.topbar-user-meta strong { max-width: 170px; overflow: hidden; color: var(--navy); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.topbar-user-meta small { margin-top: 3px; color: var(--muted); font-size: 10px; text-transform: none; letter-spacing: 0; }
.topbar-logout { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; margin-left: 2px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #fff; }
.topbar-logout:hover { color: var(--blue-dark); background: var(--blue-soft); }
.topbar-logout svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }
.topbar-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; margin-left: 0; }
.topbar-actions .btn { gap: 6px; }
.today-chip { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.guest-access-note { display: flex; flex-direction: column; padding-right: 12px; border-right: 1px solid var(--line); line-height: 1.25; text-align: right; }
.guest-access-note strong { color: var(--navy); font-size: 12px; }
.guest-access-note small { color: var(--muted); font-size: 10px; }
.content { min-width: 0; padding: 30px clamp(18px, 3vw, 38px) 55px; }

.page-heading { display: flex; align-items: flex-start; gap: 16px; justify-content: space-between; margin-bottom: 22px; }
.page-heading h1 { margin: 2px 0 5px; color: var(--navy); font-size: clamp(21px, 2.2vw, 28px); font-weight: 650; line-height: 1.2; }
.page-heading p { max-width: 720px; margin: 0; color: var(--muted); }
.page-actions { display: flex; flex-wrap: wrap; gap: 9px; justify-content: flex-end; }
.eyebrow { display: block; margin-bottom: 5px; color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow-light { color: #e9eef0; }

.btn { display: inline-flex; min-height: 32px; align-items: center; justify-content: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #fff; box-shadow: none; font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap; transition: .15s ease; }
.btn:hover { border-color: #bdcbd4; background: #f7f9fa; transform: translateY(-1px); }
.btn:disabled { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }
.btn-primary, .btn-secondary, .btn-ghost, .btn-danger { color: var(--muted); border-color: var(--line); background: #fff; box-shadow: none; }
.btn-create-tour, .btn-save { color: #fff; border-color: var(--blue-dark); background: var(--blue-dark); }
.btn-create-tour:hover, .btn-save:hover { color: #fff; border-color: var(--navy); background: var(--navy); }
.btn-topbar-transport { color: #fff; border-color: #18845a; background: var(--green); }
.btn-topbar-transport:hover { color: #fff; border-color: #14734e; background: #1b8d60; }
.btn-consult { color: #fff; border-color: var(--navy); background: var(--navy); }
.btn-consult:hover { color: #fff; border-color: var(--blue); background: var(--blue); }
.btn-report { color: #fff; border-color: var(--blue); background: var(--blue); }
.btn-report:hover { color: #fff; border-color: var(--navy); background: var(--navy); }
.btn-login { color: #fff; border-color: var(--blue-dark); background: var(--blue-dark); }
.btn-login:hover { color: #fff; border-color: var(--navy); background: var(--navy); }
.btn-invoice { color: #fff; border-color: var(--navy); background: var(--navy); }
.btn-invoice:hover { color: #fff; border-color: var(--blue); background: var(--blue); }
.btn-sm { min-height: 32px; padding: 6px 10px; font-size: 12px; }
.btn-icon { width: 32px; min-height: 32px; padding: 0; }
.btn .button-icon svg { width: 15px; height: 15px; flex-basis: 15px; }
.btn-block { width: 100%; }
.text-link { color: var(--blue-dark); font-weight: 750; }

.cards-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.cards-grid.cards-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards-grid.cards-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-card { position: relative; overflow: hidden; min-height: 132px; padding: 19px 20px; border: 1px solid #e4ebef; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.metric-card::after { position: absolute; right: -25px; bottom: -38px; width: 110px; height: 110px; border-radius: 50%; background: var(--metric-soft, var(--blue-soft)); content: ""; }
.metric-card > * { position: relative; z-index: 1; }
.metric-label { display: flex; justify-content: space-between; color: var(--muted); font-weight: 650; }
.metric-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 10px; color: var(--metric, var(--blue)); background: var(--metric-soft, var(--blue-soft)); }
.metric-value { margin: 10px 0 1px; color: var(--navy); font-size: 31px; font-weight: 850; line-height: 1; }
.metric-foot { color: var(--muted); font-size: 11px; }
.metric-card.green { --metric: var(--green); --metric-soft: var(--green-soft); }
.metric-card.orange { --metric: var(--orange); --metric-soft: var(--yellow-soft); }
.metric-card.aqua { --metric: var(--blue); --metric-soft: var(--blue-soft); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .75fr); gap: 18px; }
.card { min-width: 0; border: 1px solid #e1e9ee; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.card-header { display: flex; align-items: center; gap: 12px; justify-content: space-between; min-height: 67px; padding: 15px 20px; border-bottom: 1px solid #e8eef2; }
.card-header h2, .card-header h3 { margin: 0; color: var(--navy); font-size: 16px; }
.card-header p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.card-body { padding: 20px; }
.card-body.flush { padding: 0; }
.stack { display: grid; min-width: 0; gap: 14px; }
.quick-action { display: flex; align-items: center; gap: 13px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; transition: .15s; }
.quick-action:hover { border-color: #8fb9be; background: #f7f9fa; transform: translateX(2px); }
.quick-action-icon { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 11px; color: var(--blue-dark); background: var(--blue-soft); font-size: 18px; }
.quick-action strong, .quick-action small { display: block; }
.quick-action strong { color: var(--navy); font-size: 13px; }
.quick-action small { color: var(--muted); font-size: 11px; }
.empty-state { padding: 45px 20px; color: var(--muted); text-align: center; }
.empty-state-icon { display: grid; width: 54px; height: 54px; margin: 0 auto 12px; place-items: center; border-radius: 16px; color: var(--blue); background: var(--blue-soft); font-size: 24px; }
.empty-state h3 { margin: 0 0 5px; color: var(--navy); }
.empty-state p { margin: 0 0 16px; }

.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 11px 14px; color: #708390; background: #f7f9fa; font-size: 10px; letter-spacing: .055em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 13px 14px; border-top: 1px solid #e9eef1; vertical-align: middle; }
.data-table tbody tr:hover { background: #fbfdfe; }
.data-table .tour-group-heading td { padding: 9px 14px; color: var(--navy); background: var(--mist); border-top: 2px solid var(--line); font-size: 11px; font-weight: 850; letter-spacing: .045em; text-transform: uppercase; }
.data-table .tour-group-heading:hover td { background: var(--mist); }
.data-table .tour-group-heading small { margin-left: 9px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.data-table .table-total-row td { padding: 12px 14px; color: #fff; background: var(--navy); border-top: 2px solid var(--blue); font-size: 12px; font-weight: 850; text-transform: uppercase; }
.data-table .table-total-row strong { color: #fff; font-size: 14px; }
.data-table .table-total-row small { display: block; margin-top: 2px; color: #c7dce7; font-size: 10px; font-weight: 650; text-transform: none; }
.data-table .cell-title { display: block; color: var(--navy); font-weight: 400; }
.data-table .cell-title.cell-client, .data-table .cell-title.cell-pax { font-weight: 600; }
.tour-pricing-section { display: grid; gap: 12px; padding-top: 6px; }
.tour-pricing-heading { display: grid; gap: 3px; }
.tour-pricing-heading small, .tour-pricing-partner small { color: var(--muted); }
.tour-pricing-list { display: grid; gap: 10px; }
.tour-pricing-row { display: grid; grid-template-columns: minmax(140px, 1.2fr) repeat(3, minmax(120px, 1fr)) minmax(82px, .65fr); gap: 10px; align-items: end; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fafcfd; }
.tour-pricing-partner { display: grid; gap: 2px; align-self: center; }
.user-list-avatar { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; color: #fff; background: var(--brand); font-weight: 500; }
.user-list-avatar img { width: 100%; height: 100%; object-fit: cover; }
.data-table .cell-subtitle { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.data-table .actions { display: flex; gap: 5px; justify-content: flex-end; }
.data-table .actions form { display: inline; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; text-transform: uppercase; white-space: nowrap; }
.badge::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; }
.badge-success { color: #168056; background: #e4f5ed; }
.badge-warning { color: #a36a14; background: #fff3dc; }
.badge-danger { color: #b63f45; background: #fde9ea; }
.badge-info { color: var(--blue); background: var(--mist); }
.tour-pill { display: inline-block; max-width: 180px; padding: 5px 8px; overflow: hidden; border-radius: 6px; color: #fff; font-size: 10px; font-weight: 800; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line); background: #fafcfd; }
.filters .field { min-width: 145px; margin: 0; }
.filters .field.search { flex: 1; min-width: 210px; }
.record-count { margin-left: auto; color: var(--muted); font-size: 11px; }
.mobile-filter-toggle { display: none; }

.form-card { max-width: 1120px; margin: 0 auto; }
.cards-grid.form-card { margin-bottom: 20px; }
.page-heading.form-card { margin-bottom: 22px; }
.form-section { padding: 21px 23px; border-bottom: 1px solid var(--line); }
.form-section:last-child { border-bottom: 0; }
.form-section-heading { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 17px; }
.section-number { display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; border-radius: 9px; color: var(--blue-dark); background: var(--blue-soft); font-size: 11px; font-weight: 850; }
.form-section-heading h3 { margin: 1px 0 2px; color: var(--navy); font-size: 15px; }
.form-section-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.form-grid { display: grid; gap: 14px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { color: var(--muted); font-size: 11px; font-weight: 750; }
.field small { color: var(--muted); font-size: 10px; }
.field input, .field select, .field textarea { width: 100%; min-height: 41px; padding: 9px 11px; border: 1px solid #ccd9e0; border-radius: 8px; outline: none; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
.field textarea { min-height: 91px; resize: vertical; }
.field textarea.email-template-editor { min-height: 560px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 11px; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(15, 116, 128, .18); }
.date-input-shell { position: relative; display: block; }
.date-input-shell > input[type="text"] { padding-right: 43px; }
.date-picker-button { position: absolute; top: 1px; right: 1px; bottom: 1px; display: grid; width: 40px; place-items: center; border: 0; border-left: 1px solid #d9e2e7; border-radius: 0 7px 7px 0; color: var(--blue-dark); background: #f7fafb; cursor: pointer; }
.date-picker-button:hover { background: var(--blue-soft); }
.date-picker-button:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.date-picker-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.date-picker-source { position: absolute; width: 1px !important; height: 1px; min-height: 0 !important; padding: 0 !important; opacity: 0; pointer-events: none; }
.field input[type="color"] { min-height: 42px; padding: 5px; }
.field-check { display: flex; min-height: 41px; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid #ccd9e0; border-radius: 8px; }
.field-check input { width: 16px; height: 16px; accent-color: var(--blue); }
.field-check span { font-size: 12px; font-weight: 650; }
.readonly-value { display: flex; min-height: 41px; align-items: center; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #f7f9fa; font-weight: 700; }
.cron-command-value { min-width: 0; flex: 1; overflow-x: auto; font: 500 10px/1.4 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; white-space: nowrap; }
.form-stack { display: grid; gap: 15px; }
.form-actions { display: flex; gap: 9px; justify-content: flex-end; padding: 18px 23px; background: #f9fbfc; border-radius: 0 0 var(--radius) var(--radius); }
.required::after { color: var(--red); content: " *"; }
.input-group { display: flex; gap: 7px; }
.input-group .field { flex: 1; }
.email-content-details { min-width: 175px; }
.email-content-details summary { color: var(--blue-dark); font-weight: 750; cursor: pointer; }
.email-content-details pre { width: min(520px, 64vw); max-height: 340px; margin: 9px 0 0; padding: 12px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; color: var(--navy); background: #f7f9fa; font: 400 11px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; white-space: pre-wrap; }

.assignment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.choice-panel { min-width: 0; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.choice-panel legend { padding: 0 7px; color: var(--navy); font-size: 12px; font-weight: 800; }
.choice-grid { display: grid; gap: 8px; max-height: 245px; overflow-y: auto; }
.choice-item { display: flex; min-width: 0; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid #e3eaee; border-radius: 8px; background: #fff; cursor: pointer; }
.choice-item:hover { border-color: #8fb9be; background: #f7f9fa; }
.choice-item input { width: 17px; height: 17px; flex: 0 0 17px; accent-color: var(--blue); }
.choice-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.choice-empty, .assignment-help { margin: 0; color: var(--muted); font-size: 11px; }
.assignment-help { margin-top: 10px; }
.assignment-help.is-error { color: var(--red); font-weight: 750; }

.passenger-row { display: grid; grid-template-columns: 34px 150px minmax(180px, 1fr) 100px minmax(160px, 1fr) 36px; gap: 8px; align-items: end; margin-bottom: 9px; }
.passenger-number { display: grid; width: 30px; height: 40px; place-items: center; border-radius: 8px; color: var(--muted); background: #f1f5f7; font-weight: 800; }
.passenger-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.route-group { overflow: hidden; margin-bottom: 14px; border: 1px solid #dce6eb; border-radius: 12px; background: #fbfdfe; }
.route-group-heading { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid #e4ebef; background: #f1f7f9; }
.route-group-heading > div { display: flex; align-items: center; gap: 9px; color: var(--navy); }
.route-number { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; color: #fff; background: var(--blue); font-size: 11px; font-weight: 850; }
.route-group-grid { display: grid; grid-template-columns: 150px minmax(220px, 1.4fr) 100px minmax(170px, 1fr); gap: 12px; padding: 14px; }
.route-pickup { grid-column: span 2; }
.route-notes { grid-column: 1 / -1; }

.alert { position: relative; margin: 0 0 17px; padding: 12px 42px 12px 14px; border: 1px solid; border-radius: 9px; font-weight: 650; }
.alert button { position: absolute; top: 7px; right: 8px; border: 0; color: inherit; background: transparent; font-size: 20px; }
.alert-success { color: #176e4d; border-color: #bce5d1; background: #eaf8f1; }
.alert-danger { color: #a33941; border-color: #f0c1c4; background: #fcedee; }
.alert-warning { color: #875a12; border-color: #efd79e; background: #fff7e5; }

.calendar-toolbar { display: flex; gap: 10px; align-items: center; }
.calendar-toolbar h2 { min-width: 190px; margin: 0; color: var(--navy); text-align: center; }
.calendar-sync-card { margin-bottom: 15px; }
.calendar-sync-card summary { display: flex; min-height: 66px; align-items: center; gap: 14px; justify-content: space-between; padding: 14px 18px; cursor: pointer; list-style: none; }
.calendar-sync-card summary::-webkit-details-marker { display: none; }
.calendar-sync-heading { display: flex; min-width: 0; align-items: center; gap: 11px; color: var(--navy); }
.calendar-sync-heading > .button-icon { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; color: var(--blue-dark); background: var(--blue-soft); }
.calendar-sync-heading strong, .calendar-sync-heading small { display: block; }
.calendar-sync-heading small { margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 500; }
.calendar-sync-body { padding: 0 18px 18px; border-top: 1px solid var(--line); }
.calendar-sync-body > p { margin: 16px 0 13px; color: var(--muted); }
.calendar-sync-controls { display: flex; align-items: flex-end; gap: 8px; }
.calendar-sync-controls .field { flex: 1; }
.calendar-sync-controls input[readonly] { color: #405767; background: #f7fafb; }
.calendar-sync-warning { margin: 13px 0 0; }
.calendar-sync-note { display: block; margin-top: 11px; color: var(--muted); }
.calendar-sync-renew { margin-top: 12px; }
.calendar-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.calendar-grid { display: grid; min-width: 940px; grid-template-columns: repeat(7, 1fr); }
.calendar-weekday { padding: 11px 8px; border-right: 1px solid var(--line); color: var(--muted); background: #f6f9fa; font-size: 10px; font-weight: 800; text-align: center; text-transform: uppercase; }
.calendar-day { min-height: 143px; padding: 8px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); background: #fff; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.other-month { background: #fafbfc; }
.calendar-day.other-month .day-number { color: #b1bdc5; }
.calendar-day.today { box-shadow: inset 0 0 0 2px var(--blue); }
.day-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.day-number-group { display: inline-flex; min-width: 0; align-items: center; gap: 3px; }
.day-number { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: #49606e; font-size: 11px; font-weight: 800; }
.day-passenger-count { color: var(--muted); font-size: 9px; font-weight: 750; white-space: nowrap; }
.today .day-number { color: #fff; background: var(--blue); }
.day-add { opacity: 0; color: var(--blue); font-size: 16px; }
.calendar-day:hover .day-add { opacity: 1; }
.calendar-event { display: block; overflow: hidden; margin: 3px 0; padding: 4px 6px; border-left: 3px solid rgba(0,0,0,.18); border-radius: 5px; color: #fff; font-size: 9px; font-weight: 750; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.calendar-more { display: block; padding: 4px 3px; color: var(--blue-dark); font-size: 10px; font-weight: 800; }
.calendar-more-mobile { display: none; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 12px; color: var(--muted); font-size: 11px; }
.legend-dot { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; }

.catalog-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(310px, .7fr); gap: 18px; align-items: start; }
.catalog-list-item { display: flex; gap: 12px; align-items: center; padding: 13px 16px; border-top: 1px solid #e9eef1; }
.catalog-list-item:first-child { border-top: 0; }
.catalog-list-item.is-inactive { opacity: .62; }
.catalog-color { width: 10px; height: 38px; flex: 0 0 10px; border-radius: 7px; background: var(--blue); }
.catalog-list-main { min-width: 0; flex: 1; }
.catalog-list-main strong, .catalog-list-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catalog-list-main strong { color: var(--navy); }
.catalog-list-main small { color: var(--muted); }
.catalog-primary-line { display: flex; min-width: 0; flex-wrap: wrap; gap: 5px 13px; align-items: baseline; }
.catalog-primary-line strong { margin-right: 3px; }
.catalog-primary-line > span { color: var(--muted); font-size: 12px; }
.catalog-photo { width: 42px; height: 42px; flex: 0 0 42px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #eef3f5; }
.catalog-photo img { width: 100%; height: 100%; object-fit: cover; }
.catalog-photo-preview { display: block; width: 112px; height: 112px; margin: 5px 0 9px; object-fit: cover; border: 1px solid var(--line); border-radius: 12px; }
.catalog-list-columns { display: grid; grid-template-columns: minmax(0, 1fr) 190px 155px; gap: 12px; padding: 9px 16px 9px 80px; color: var(--muted); background: #f7fafb; border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.catalog-list-columns span:last-child { text-align: right; }
.catalog-rating-column { display: grid; width: 190px; flex: 0 0 190px; gap: 2px; }
.catalog-rating-column > span { display: none; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.catalog-rating-column strong { color: var(--blue-dark); font-size: 13px; }
.catalog-rating-column small { color: var(--muted); font-size: 10px; }
.catalog-rating-column .catalog-rating-empty { color: var(--muted); }
.setup-steps { margin: 0; padding-left: 22px; color: #405767; }
.setup-steps li { margin: 0 0 9px; padding-left: 4px; }
.setup-steps li:last-child { margin-bottom: 0; }
.catalog-actions { display: flex; gap: 5px; }
.partner-access-panel { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #f7f9fa; }
.partner-access-panel[hidden] { display: none; }
.survey-average-card { margin-bottom: 18px; }
.survey-average-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; padding: 16px; }
.survey-average-item { display: grid; gap: 5px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fafcfd; }
.survey-average-item span { color: var(--muted); font-size: 11px; }
.survey-average-item strong { color: var(--navy); font-size: 15px; }
.survey-average-item small { color: var(--muted); }
.response-answers { min-width: 165px; }
.response-answers summary { cursor: pointer; list-style: none; }
.response-answers summary::-webkit-details-marker { display: none; }
.response-answers > div { display: grid; gap: 8px; min-width: min(360px, 72vw); margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: var(--shadow); }
.response-answers p { display: grid; gap: 2px; margin: 0; }
.response-answers p span { color: var(--muted); font-size: 10px; }
.response-answers p strong { color: var(--navy); }
.survey-comment { max-width: 260px; overflow-wrap: anywhere; white-space: normal; }

.auth-page { display: grid; min-height: 100vh; place-items: center; padding: 25px; background: var(--mist, #e9eef0); }
.login-background { background: radial-gradient(circle at 15% 15%, rgba(15, 116, 128, .16), transparent 30%), linear-gradient(145deg, #e9eef0, #fff); }
.login-shell { width: min(430px, 100%); }
.login-card { padding: 35px 40px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.97); box-shadow: 0 25px 65px rgba(11, 31, 51, .14); }
.login-logo { display: block; width: 280px; height: auto; margin: 0 auto 28px; }
.auth-heading { margin-bottom: 22px; }
.auth-heading.centered { text-align: center; }
.auth-heading h1, .auth-heading h2 { margin: 2px 0 6px; color: var(--navy); font-size: 26px; }
.auth-heading p { margin: 0; color: var(--muted); }
.auth-foot { margin: 25px 0 0; color: #91a1ab; font-size: 10px; text-align: center; }
.setup-shell { display: grid; overflow: hidden; width: min(1080px, 100%); grid-template-columns: .8fr 1.2fr; border-radius: 24px; background: #fff; box-shadow: 0 26px 70px rgba(11, 31, 51, .15); }
.setup-brand { display: flex; flex-direction: column; justify-content: center; padding: 52px 43px; color: #e9eef0; background: linear-gradient(160deg, #0b1f33, #0f7480); }
.setup-logo { width: 235px; height: auto; margin-bottom: 55px; padding: 10px 12px; border-radius: 12px; background: #fff; }
.setup-brand h1 { margin: 3px 0 15px; color: #fff; font-size: 35px; line-height: 1.08; }
.setup-brand p { margin: 0; color: #e9eef0; }
.setup-points { display: grid; gap: 11px; margin-top: 30px; }
.setup-points span::before { margin-right: 9px; color: #fff; content: "✓"; font-weight: 900; }
.setup-card { padding: 42px; }
.setup-card hr { width: 100%; height: 1px; margin: 4px 0; border: 0; background: var(--line); }

@media (max-width: 1180px) {
    .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1080px) {
    .menu-button { display: grid; }
    .header-navigation { position: absolute; top: 100%; right: 0; left: 0; z-index: 2; display: none; border-bottom: 1px solid var(--line); background: #fff; box-shadow: 0 20px 35px rgba(11, 31, 51, .16); }
    .header-navigation.open { display: block; }
    .main-nav { max-height: calc(100vh - 76px); align-items: stretch; flex-direction: column; padding: 10px 14px 15px; overflow-y: auto; }
    .main-nav > .nav-link, .nav-dropdown, .nav-dropdown > summary { width: 100%; }
    .nav-dropdown-menu, .nav-dropdown-menu-wide { position: static; width: 100%; min-width: 0; max-width: none; max-height: none; grid-template-columns: 1fr; margin-top: 4px; padding: 7px; border-color: var(--line); background: #f7f9fa; box-shadow: none; }
    .nav-dropdown-menu .nav-link { padding-left: 16px; }
    .dashboard-grid, .catalog-layout { grid-template-columns: 1fr; }
    .setup-shell { grid-template-columns: 1fr; }
    .setup-brand { display: none; }
    .passenger-row { grid-template-columns: 30px 130px 1fr 90px 36px; }
    .passenger-row .passenger-details { grid-column: 2 / -1; }
    .route-group-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .route-customer, .route-pickup { grid-column: span 1; }
    .assignment-grid { grid-template-columns: 1fr; }
    .tour-pricing-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tour-pricing-partner { grid-column: 1 / -1; }
    .filters.has-mobile-toggle { min-height: 53px; align-items: center; padding: 10px 12px; }
    .filters.has-mobile-toggle > .mobile-filter-toggle { display: inline-flex; order: -2; }
    .filters.has-mobile-toggle:not(.filters-mobile-open) > .field,
    .filters.has-mobile-toggle:not(.filters-mobile-open) > .btn:not(.mobile-filter-toggle) { display: none; }
    .filters.has-mobile-toggle:not(.filters-mobile-open) > .record-count { width: auto; margin-left: auto; }
    .filters.has-mobile-toggle.filters-mobile-open > .record-count { width: 100%; margin: 0; }
}

@media (max-width: 900px) {
    .today-chip, .topbar-user-meta { display: none; }
}

@media (max-width: 680px) {
    .topbar { min-height: 68px; gap: 8px; padding: 7px 14px; }
    .header-brand img { width: 140px; height: 50px; }
    .today-chip { display: none; }
    .topbar-actions { gap: 6px; }
    .topbar-actions .btn { width: 37px; overflow: visible; padding: 0; }
    .topbar-user-photo, .topbar-user-avatar, .topbar-user-meta { display: none; }
    .topbar-user { gap: 0; }
    .guest-access-note small { display: none; }
    .topbar-action-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
    .content { padding: 20px 14px 40px; }
    .page-heading { flex-direction: column; }
    .page-actions { width: 100%; justify-content: flex-start; }
    .page-actions .btn { flex: 1 1 auto; }
    .cards-grid, .cards-grid.cards-grid-two, .cards-grid.cards-grid-three { grid-template-columns: 1fr; }
    .form-grid.two, .form-grid.three, .form-grid.four { grid-template-columns: 1fr; }
    .form-grid > [style*="grid-column"] { grid-column: 1 / -1 !important; }
    .filters { align-items: stretch; }
    .filters .field, .filters .field.search { min-width: calc(50% - 5px); flex: 1; }
    .record-count { width: 100%; margin: 0; }
    .form-section { padding: 18px 15px; }
    .form-actions { padding: 15px; }
    .form-actions .btn { flex: 1; }
    .passenger-row { grid-template-columns: 30px 1fr 78px 36px; padding: 10px 0; border-bottom: 1px solid var(--line); }
    .passenger-row .passenger-movement { grid-column: 2 / 4; }
    .passenger-row .passenger-name { grid-column: 2 / 3; }
    .passenger-row .passenger-details { grid-column: 2 / -1; }
    .route-group-grid { grid-template-columns: 1fr; padding: 12px; }
    .route-customer, .route-pickup, .route-notes { grid-column: 1; }
    .login-card, .setup-card { padding: 28px 22px; }
    .auth-page { padding: 14px; }
    .card-header { flex-wrap: wrap; padding: 14px; }
    .calendar-toolbar { width: 100%; flex-wrap: wrap; }
    .calendar-toolbar h2 { order: -1; width: 100%; min-width: 0; margin-bottom: 3px; text-align: left; }
    .calendar-sync-controls { align-items: stretch; flex-direction: column; }
    .calendar-sync-controls .field, .calendar-sync-controls .btn { width: 100%; }
    .calendar-wrap { overflow-x: hidden; border-radius: 10px; }
    .calendar-grid { width: 100%; min-width: 0; grid-template-columns: repeat(7, minmax(0, 1fr)); }
    .calendar-weekday { min-width: 0; padding: 7px 1px; font-size: 8px; }
    .calendar-day { min-width: 0; min-height: 82px; padding: 3px 2px; overflow: hidden; }
    .day-head { justify-content: center; margin-bottom: 2px; }
    .day-number-group { gap: 1px; }
    .day-number { width: 21px; height: 21px; font-size: 9px; }
    .day-passenger-count { font-size: 7px; }
    .day-add { display: none; }
    .calendar-event { margin: 2px 0; padding: 2px 2px; border-left-width: 2px; border-radius: 3px; font-size: 7px; line-height: 1.15; }
    .calendar-event-overflow-mobile { display: none; }
    .calendar-more-mobile { display: block; padding: 1px 0; font-size: 8px; text-align: center; }
    .calendar-more-mobile + .calendar-more { display: none; }
    .data-table th { padding: 10px 11px; }
    .data-table td { padding: 11px; }
    .catalog-list-columns { display: none; }
    .catalog-list-item.has-rating-column { align-items: flex-start; flex-wrap: wrap; }
    .catalog-list-item.has-rating-column .catalog-list-main { min-width: calc(100% - 54px); }
    .catalog-list-item.has-rating-column .catalog-rating-column { width: auto; margin-left: 54px; flex: 1 1 170px; }
    .catalog-list-item.has-rating-column .catalog-rating-column > span { display: block; }
    .catalog-list-item.has-rating-column .catalog-actions { margin-left: auto; }
}

@media (max-width: 480px) {
    .header-brand img { width: 124px; }
    .guest-access-note { display: none; }
    .filters .field, .filters .field.search { width: 100%; min-width: 100%; }
    .filters .btn { flex: 1; }
    .page-actions .btn { width: 100%; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn { width: 100%; }
}

@media print {
    .app-header, .page-actions, .filters { display: none !important; }
    .main-column { width: 100%; }
    .content { padding: 0; }
    .card { box-shadow: none; }
}

/* Acciones y controles operativos */
.btn-primary, .btn-save { color: #fff; border-color: var(--blue-dark); background: var(--blue-dark); }
.btn-primary:hover, .btn-save:hover { color: #fff; border-color: var(--navy); background: var(--navy); }
.btn-danger, .btn-new-run { color: #fff; border-color: #b93636; background: var(--red); }
.btn-danger:hover, .btn-new-run:hover { color: #fff; border-color: #a82e2e; background: #bd3b3b; }
.btn-secondary[title^="Editar"], a.btn-secondary[title="Editar"], button.btn-secondary[title="Editar"] { color: #5a4307; border-color: #d5ad42; background: #f4c95d; }
.btn-secondary[title^="Editar"]:hover, a.btn-secondary[title="Editar"]:hover, button.btn-secondary[title="Editar"]:hover { color: #493604; border-color: #c39a2e; background: #e8bb49; }
.btn-whatsapp { color: #fff; border-color: #168455; background: #21a866; }
.btn-whatsapp:hover { color: #fff; border-color: #116b45; background: #198d55; }
.btn-report-consult { width: 145px; align-self: flex-end; margin-inline: auto; }
.calendar-summary { line-height: 1.55; text-align: right; }
.calendar-summary small { color: #708593; font-size: 10px; }
.audit-detail { display: block; max-width: 340px; overflow-wrap: anywhere; white-space: normal; }

.action-popover { position: relative; }
.action-popover > summary { list-style: none; }
.action-popover > summary::-webkit-details-marker { display: none; }
.action-popover-panel { position: absolute; right: 0; z-index: 1000; display: grid; min-width: 150px; max-width: calc(100vw - 20px); gap: 7px; margin-top: 5px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; overflow-y: auto; background: #fff; box-shadow: 0 14px 32px rgba(15,46,66,.18); }
.action-popover[open] > .action-popover-panel { position: fixed; right: auto; margin-top: 0; }
.survey-popover { min-width: 190px; justify-items: stretch; }
.survey-popover img { display: block; margin: 0 auto 3px; border: 6px solid #fff; border-radius: 7px; box-shadow: 0 0 0 1px var(--line); }
.data-table .actions { align-items: center; flex-wrap: wrap; }
.data-table .actions.actions-nowrap { min-width: max-content; flex-wrap: nowrap; white-space: nowrap; }
.transport-table .transport-client-cell { width: 160px; max-width: 160px; }
.transport-table .transport-client-cell .cell-title { line-height: 1.35; overflow-wrap: anywhere; white-space: normal; }

@media (max-width: 680px) {
    .calendar-summary { width: 100%; text-align: left; }
    .btn-report-consult { width: 100%; }
    .action-popover-panel { position: fixed; right: 14px; left: 14px; min-width: 0; }
}
