:root {
    --brand-ink: #16314d;
    --brand-ink-deep: #0f2337;
    --brand-gold: #d2a64b;
    --brand-gold-soft: rgba(199, 154, 67, 0.22);
    --brand-mint: #673147;
    --brand-fog: rgba(151, 90, 116, 0.20);
    --brand-glass: rgba(255, 255, 255, 0.74);
    --brand-glass-strong: rgba(255, 255, 255, 0.84);
    --line-soft: rgba(22, 49, 77, 0.08);
    --line-strong: rgba(22, 49, 77, 0.14);
    --text-main: #1d2b39;
    --text-soft: #4f5963;
    --text-faint: #6f7883;
    --shadow-soft: 0 18px 42px rgba(28, 45, 61, 0.10);
    --shadow-card: 0 16px 34px rgba(28, 45, 61, 0.08);
    --shadow-hero: 0 22px 54px rgba(24, 39, 53, 0.16);
    --brand-wine: #673147;
    --brand-wine-deep: #56253a;
    --brand-wine-rich: #7a384f;
    --radius-xl: 30px;
    --radius-lg: 24px;
    --radius-md: 18px;
}

html, body {
    min-height: 100%;
}

body {
    margin: 0;
    color: var(--text-main);
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    background:
        radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.18), transparent 20rem),
        radial-gradient(circle at 88% 18%, rgba(199, 154, 67, 0.10), transparent 24rem),
        linear-gradient(160deg, #6f8fab 0%, #3f6789 42%, #284a69 100%);
    background-attachment: fixed;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

body::before {
    background:
        linear-gradient(115deg, rgba(255, 255, 255, 0.08), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 28%);
}

body::after {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(circle at center, black 42%, transparent 88%);
}

a {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
h3 {
    margin: 0;
    letter-spacing: -0.03em;
    line-height: 1.04;
    color: var(--brand-ink-deep);
}

h1 {
    font-size: clamp(2.4rem, 4.2vw, 3.9rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(1.45rem, 2.2vw, 1.95rem);
    font-weight: 650;
}

h3 {
    font-size: 1.18rem;
    font-weight: 650;
}

p {
    margin: 0;
}

.screen-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 2.2rem 1rem 3.4rem;
}

.hero-card,
.panel-card,
.trip-card,
.stop-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid rgba(22, 49, 77, 0.10);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.78);
}

.hero-card::before,
.panel-card::before,
.trip-card::before,
.stop-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(130deg, rgba(255, 255, 255, 0.45), transparent 42%);
    pointer-events: none;
    z-index: 0;
}

.hero-card > *,
.panel-card > *,
.trip-card > *,
.stop-card > * {
    position: relative;
    z-index: 1;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.trip-header-lockup {
    flex-wrap: nowrap;
}

.trip-header-lockup .summary-metric {
    min-width: 110px;
}

.brand-lockup img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    padding: 0.55rem;
    box-shadow: 0 14px 28px rgba(28, 39, 51, 0.08);
}

.hero-card {
    display: flex;
    justify-content: space-between;
    gap: 1.25rem;
    align-items: center;
    padding: 1.85rem 1.95rem;
    margin-bottom: 1.65rem;
    box-shadow: var(--shadow-hero);
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(22, 49, 77, 0.12);
}

.hero-card.compact {
    margin-bottom: 1.1rem;
}

.hero-card h1,
.hero-card h2,
.hero-card h3,
.hero-card p,
.hero-card .muted-text,
.hero-card .hero-copy {
    color: var(--brand-ink-deep);
}

.hero-card .eyebrow {
    color: var(--brand-gold);
}

.hero-card .hero-copy {
    max-width: 56rem;
    margin-top: 0.7rem;
    font-size: 1rem;
    line-height: 1.6;
}

.panel-card {
    padding: 1.55rem;
    margin-bottom: 1.35rem;
    box-shadow: var(--shadow-soft);
    background: rgba(255, 255, 255, 0.78);
}

.panel-header,
.trip-card-top,
.stop-card-head,
.action-row,
.inline-form {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    justify-content: space-between;
}

.panel-header {
    margin-bottom: 0.9rem;
}

.hero-copy,
.muted-text,
.trip-card p,
.stop-card p {
    color: var(--text-soft);
}

.muted-text {
    font-size: 0.96rem;
    line-height: 1.55;
}

.eyebrow {
    margin: 0 0 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.18rem;
    font-size: 0.72rem;
    color: var(--brand-gold);
    font-weight: 800;
}

.trip-grid,
.stops-list,
.radio-grid {
    display: grid;
    gap: 1rem;
}

.trip-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-top: 1.2rem;
}

.stops-list {
    gap: 1.15rem;
}

.route-panel {
    padding-top: 1.8rem;
}

.route-panel-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.alert-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1.2rem 1.25rem;
    border-radius: 24px;
    border: 1px solid rgba(24, 50, 41, 0.10);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.58) 100%);
    box-shadow: 0 12px 28px rgba(18, 36, 29, 0.08);
}

.alert-card-danger {
    border-color: rgba(183, 49, 49, 0.34);
    border-left: 8px solid #b73131;
    background: linear-gradient(180deg, rgba(255, 238, 238, 0.98) 0%, rgba(255, 225, 225, 0.90) 100%);
    box-shadow:
        0 0 0 1px rgba(183, 49, 49, 0.08),
        0 18px 38px rgba(120, 28, 28, 0.14);
}

.alert-card-danger .eyebrow,
.alert-card-danger h3,
.alert-card-danger .muted-text,
.alert-card-danger .summary-label {
    color: #8f2020;
}

.alert-card-copy {
    max-width: 38rem;
}

.alert-badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0.35rem 0.8rem;
    margin-bottom: 0.8rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #c03535 0%, #992525 100%);
    color: #fff7f7;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 10px 22px rgba(153, 37, 37, 0.24);
}

.alert-highlight {
    margin-top: 0.7rem;
    color: #7e1a1a;
    font-weight: 800;
}

.alert-links {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-self: stretch;
    align-content: flex-start;
}

.alert-link {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 210px;
    min-height: 64px;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(183, 49, 49, 0.24);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 245, 245, 0.90) 100%);
    color: #8f2020;
    font-weight: 700;
    box-shadow: 0 12px 24px rgba(120, 28, 28, 0.10);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.alert-link:hover {
    transform: translateY(-1px);
    border-color: rgba(183, 49, 49, 0.38);
    box-shadow: 0 14px 28px rgba(120, 28, 28, 0.15);
}

.alert-link span {
    font-size: 0.98rem;
}

.alert-link small {
    margin-top: 0.18rem;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #b73131;
}

.list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.sync-status-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(24, 50, 41, 0.12);
    background: rgba(255, 255, 255, 0.72);
    color: #2b1c21;
    box-shadow: 0 10px 22px rgba(18, 36, 29, 0.08);
}

.sync-status-card strong {
    font-size: 0.94rem;
    color: #2b1c21;
}

.sync-status-card p {
    color: #453b3f;
    line-height: 1.45;
}

.sync-status-card .secondary-button {
    color: var(--brand-wine);
    border-color: rgba(103, 49, 71, 0.20);
    background: rgba(255, 255, 255, 0.58);
}

.sync-status-ok {
    border-color: rgba(48, 127, 81, 0.20);
    background: linear-gradient(180deg, rgba(241, 252, 246, 0.96) 0%, rgba(230, 248, 238, 0.92) 100%);
}

.sync-status-warning {
    border-color: rgba(182, 129, 39, 0.22);
    background: linear-gradient(180deg, rgba(255, 249, 234, 0.98) 0%, rgba(251, 241, 212, 0.92) 100%);
}

.sync-status-neutral {
    border-color: rgba(84, 96, 110, 0.18);
    background: linear-gradient(180deg, rgba(245, 247, 250, 0.98) 0%, rgba(235, 240, 245, 0.92) 100%);
}

.sync-status-danger {
    border-color: rgba(183, 49, 49, 0.24);
    background: linear-gradient(180deg, rgba(255, 240, 240, 0.98) 0%, rgba(252, 227, 227, 0.92) 100%);
}

.toggle-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 48px;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.72);
    color: var(--brand-ink);
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(18, 36, 29, 0.07);
}

.toggle-pill input {
    width: 18px;
    height: 18px;
    accent-color: var(--brand-ink);
}

.route-summary {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.route-summary-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    align-items: stretch;
}

.route-map-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(31, 12, 21, 0.62);
}

.route-map-modal {
    width: min(960px, 100%);
    max-height: min(88vh, 860px);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.1rem;
    border-radius: 28px;
    border: 1px solid rgba(255, 232, 239, 0.18);
    background: linear-gradient(180deg, rgba(255, 247, 250, 0.98) 0%, rgba(249, 238, 243, 0.95) 100%);
    box-shadow: 0 28px 70px rgba(21, 6, 13, 0.34);
}

.route-map-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.route-map-modal-header h3,
.route-map-modal-header p,
.route-map-modal .secondary-button {
    color: #2b1c21;
}

.route-map-canvas {
    width: 100%;
    min-height: 62vh;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(103, 49, 71, 0.14);
}

.route-map-marker-shell {
    background: transparent;
    border: none;
}

.route-map-marker {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.94);
    color: #fff8fa;
    font-size: 0.86rem;
    font-weight: 800;
    box-shadow: 0 10px 18px rgba(37, 10, 21, 0.20);
}

.route-map-marker-pending {
    background: linear-gradient(180deg, #b68127 0%, #956516 100%);
}

.route-map-marker-processed {
    background: linear-gradient(180deg, #307f51 0%, #235f3c 100%);
}

.route-map-marker-start {
    background: linear-gradient(180deg, #2f6fdb 0%, #244f99 100%);
}

.route-map-marker-return {
    background: linear-gradient(180deg, #d1a221 0%, #b07f10 100%);
}

.summary-metric,
.meta-card {
    min-width: 120px;
    padding: 0.8rem 0.95rem;
    border-radius: 18px;
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.58);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.summary-label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--text-faint);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.premium-stop-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.premium-stop-card.missing-coordinates {
    border-color: rgba(183, 49, 49, 0.18);
    box-shadow:
        0 0 0 1px rgba(183, 49, 49, 0.10),
        var(--shadow-card);
}

.stop-heading {
    display: flex;
    align-items: flex-start;
    gap: 0.95rem;
}

.stop-order-badge {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(128, 59, 82, 0.98) 0%, rgba(88, 37, 58, 0.98) 100%);
    color: #fffdf7;
    font-size: 1.05rem;
    font-weight: 800;
    box-shadow: 0 12px 22px rgba(18, 38, 30, 0.22);
}

.stop-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8rem;
}

.nav-card {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.05rem;
    border-radius: 22px;
    border: 1px solid rgba(22, 49, 77, 0.10);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.64) 0%, rgba(255, 255, 255, 0.48) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.missing-coordinates-card {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.05rem;
    border-radius: 22px;
    border: 1px solid rgba(183, 49, 49, 0.18);
    background: linear-gradient(135deg, rgba(255, 245, 245, 0.18) 0%, rgba(255, 236, 236, 0.10) 100%);
}

.nav-card-copy {
    max-width: 34rem;
}

.service-window-card {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: 1rem 1.05rem;
    border-radius: 22px;
    border: 1px solid rgba(255, 225, 234, 0.14);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.06) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.service-window-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.8rem;
}

.service-window-selectors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
    margin-top: 0.8rem;
}

.service-window-card .secondary-button {
    color: var(--brand-wine);
}

.service-window-summary {
    margin-top: 0.2rem;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--brand-wine);
}

.service-window-stepper {
    margin-top: 0.75rem;
}

.service-window-stepper-row {
    display: grid;
    grid-template-columns: 52px 1fr 52px;
    gap: 0.7rem;
    align-items: center;
    margin-top: 0.35rem;
}

.service-window-stepper-button {
    min-height: 48px;
    border: 1px solid rgba(103, 49, 71, 0.18);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(128, 59, 82, 0.98) 0%, rgba(88, 37, 58, 0.98) 100%);
    color: #fff8fa;
    font-size: 1.3rem;
    font-weight: 800;
    cursor: pointer;
    touch-action: manipulation;
}

.service-window-stepper-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.service-window-stepper-value {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    border: 1px solid rgba(103, 49, 71, 0.14);
    background: rgba(255, 255, 255, 0.82);
    color: var(--brand-wine);
    font-size: 1.05rem;
    font-weight: 800;
}

.service-window-select {
    position: relative;
    z-index: 1;
    min-height: 52px;
    margin-top: 0.35rem;
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(103, 49, 71, 0.18);
    color: var(--brand-wine);
    font-weight: 700;
    font-size: 1rem;
    appearance: auto;
    -webkit-appearance: menulist-button;
    touch-action: manipulation;
    pointer-events: auto;
}

.service-window-select option {
    color: var(--brand-wine);
    background: #fff7fa;
}

.nav-card-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.stop-footer {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.3rem;
    border-top: 1px solid rgba(24, 50, 41, 0.08);
}

.stop-outcome {
    min-width: 0;
    flex: 1;
}

.primary-button,
.secondary-button,
.provider-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 999px;
    padding: 0.9rem 1.3rem;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.primary-button:hover,
.secondary-button:hover,
.provider-button:hover {
    transform: translateY(-1px);
}

.primary-button {
    border: 1px solid rgba(255, 222, 231, 0.16);
    background:
        linear-gradient(180deg, #7a384f 0%, #56253a 100%);
    color: #fffef9;
    box-shadow: 0 16px 32px rgba(39, 9, 22, 0.30);
}

.primary-button::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 46%);
    pointer-events: none;
}

.secondary-button {
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.92);
    color: var(--brand-ink);
    box-shadow: 0 10px 22px rgba(18, 10, 14, 0.08);
}

.provider-button {
    border: 1px solid transparent;
    box-shadow: 0 10px 22px rgba(18, 36, 29, 0.10);
}

.provider-button-google {
    color: #ffffff;
    background: linear-gradient(180deg, #4f90f8 0%, #2f6fdb 100%);
    border-color: rgba(47, 111, 219, 0.28);
}

.provider-button-waze {
    color: #113542;
    background: linear-gradient(180deg, #8fe7ff 0%, #58d7ff 100%);
    border-color: rgba(88, 215, 255, 0.34);
}

.primary-button:disabled,
.secondary-button:disabled,
.provider-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 34px;
    padding: 0.4rem 0.82rem;
    border-radius: 999px;
    border: 1px solid rgba(199, 154, 67, 0.22);
    background: linear-gradient(180deg, rgba(255, 249, 235, 0.98) 0%, rgba(251, 242, 218, 0.92) 100%);
    color: #6b4d1c;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.trip-selector,
.form-control,
.form-select {
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid rgba(24, 50, 41, 0.12);
    padding: 0.98rem 1.05rem;
    background: rgba(255, 255, 255, 0.72);
    color: var(--text-main);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.30);
}

.trip-selector::placeholder,
.form-control::placeholder,
.form-select::placeholder {
    color: #7b848e;
}

.trip-selector:focus,
.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: rgba(199, 154, 67, 0.55);
    box-shadow: 0 0 0 4px rgba(199, 154, 67, 0.12);
}

.trip-card,
.stop-card {
    padding: 1.28rem;
    box-shadow: var(--shadow-card);
}

.trip-card,
.trip-card h3,
.trip-card p,
.stop-card,
.stop-card h3,
.stop-card p,
.meta-card,
.meta-card strong,
.stop-outcome strong,
.summary-metric strong {
    color: #1f1619;
}

.trip-card .muted-text,
.stop-card .muted-text,
.meta-card .summary-label,
.stop-outcome .summary-label,
.summary-metric .summary-label {
    color: #5f5559;
}

.customer-alias {
    margin-top: 0.08rem;
    font-size: 0.88rem;
    line-height: 1.3;
    color: var(--brand-wine);
    font-weight: 600;
}

.trip-card {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.trip-card.selected {
    border-color: rgba(199, 154, 67, 0.42);
    box-shadow:
        0 0 0 1px rgba(199, 154, 67, 0.22),
        0 26px 54px rgba(20, 39, 31, 0.14);
}

.trip-card-closed {
    border-color: rgba(61, 50, 56, 0.16);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.68) 0%, rgba(241, 235, 238, 0.76) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.32),
        0 18px 36px rgba(33, 18, 24, 0.14);
}

.trip-card-closed::before {
    background: linear-gradient(130deg, rgba(255, 255, 255, 0.12), transparent 46%);
}

.trip-card-closed .status-chip {
    border-color: rgba(93, 79, 86, 0.18);
    background: linear-gradient(180deg, rgba(245, 241, 243, 0.98) 0%, rgba(231, 224, 227, 0.92) 100%);
    color: #5b4a52;
}

.trip-closed-banner {
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
    margin: 0.55rem 0 0.35rem;
    padding: 0.85rem 0.95rem;
    border-radius: 18px;
    border: 1px solid rgba(91, 74, 82, 0.14);
    background: linear-gradient(180deg, rgba(249, 246, 247, 0.95) 0%, rgba(241, 236, 238, 0.92) 100%);
}

.trip-closed-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 30px;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #8a7a81 0%, #6f6066 100%);
    color: #fffafc;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.trip-card-top,
.stop-card-head {
    align-items: flex-start;
}

.trip-card h3,
.stop-card h3 {
    margin-bottom: 0.32rem;
}

.trip-card .muted-text {
    color: var(--text-faint);
}

.notes-box {
    min-height: 150px;
    resize: vertical;
}

.radio-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin: 1rem 0;
}

.radio-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.72rem;
    padding: 1rem 1.05rem;
    border: 1px solid rgba(24, 50, 41, 0.12);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: 0 8px 20px rgba(19, 38, 31, 0.06);
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.radio-option span {
    color: #1f1619;
    font-weight: 700;
}

.radio-option input {
    width: 20px;
    height: 20px;
    accent-color: var(--brand-wine-deep);
    flex: 0 0 auto;
}

.radio-option:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(19, 38, 31, 0.10);
}

.radio-option:has(input:checked) {
    border-color: rgba(103, 49, 71, 0.55);
    background: linear-gradient(180deg, rgba(255, 244, 248, 0.98) 0%, rgba(244, 224, 232, 0.94) 100%);
    box-shadow:
        0 0 0 2px rgba(103, 49, 71, 0.18),
        0 14px 28px rgba(59, 20, 36, 0.14);
}

.radio-option:has(input:checked) span {
    color: #4a1f31;
}

.form-panel {
    max-width: 780px;
}

.inline-form {
    margin-top: 1rem;
}

.action-row {
    flex-wrap: wrap;
}

.action-row a,
.action-row button {
    flex: 0 0 auto;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.15rem;
    }

    .hero-card,
    .alert-card,
    .route-panel-header,
    .list-toolbar,
    .panel-header,
    .inline-form,
    .action-row,
    .trip-card-top,
    .stop-card-head,
    .route-summary,
    .nav-card,
    .missing-coordinates-card,
    .stop-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .screen-shell {
        padding: 1rem 0.9rem 2.2rem;
    }

    .hero-card,
    .panel-card,
    .trip-card,
    .stop-card {
        border-radius: 24px;
    }

    .nav-card-actions {
        justify-content: stretch;
    }

    .route-map-modal {
        width: 100%;
        max-height: 94vh;
        padding: 0.9rem;
        border-radius: 22px;
    }

    .route-map-modal-header {
        flex-direction: column;
        align-items: stretch;
    }

    .route-map-canvas {
        min-height: 56vh;
    }

    .alert-links {
        justify-content: stretch;
    }

    .alert-link,
    .missing-coordinates-card a,
    .nav-card-actions a,
    .stop-footer button {
        width: 100%;
    }
}
