/* AZS APP CSS LOADED - DESIGN FIX 1 */

:root {
    --ink: #10231b;
    --muted: #66736d;
    --paper: #f4f1e9;
    --card: #fffdf8;
    --line: #dedbd2;
    --green: #1f6b45;
    --green-dark: #174d34;
    --lime: #dff36a;
    --orange: #f36f3d;
    --shadow: 0 16px 45px rgba(24, 47, 36, .08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.45;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.install-banner {
    position: fixed;
    left: 50%;
    bottom: 16px;
    z-index: 1000;
    width: min(620px, calc(100% - 24px));
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: 48px 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 13px;
    color: #fff;
    background: #10231bf2;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

.install-banner img { border-radius: 11px; }
.install-banner strong { display: block; }
.install-banner p { margin: 3px 0 0; color: rgba(255,255,255,.72); font-size: .75rem; }
.install-action {
    min-height: 40px;
    padding: 0 13px;
    color: var(--ink);
    background: var(--lime);
    border: 0;
    border-radius: 8px;
    font-weight: 850;
}
.install-dismiss {
    width: 36px;
    height: 36px;
    padding: 0;
    color: #fff;
    background: transparent;
    border: 0;
    font-size: 1.5rem;
}

.hero {
    min-height: 260px;
    display: grid;
    place-items: end start;
    color: #fff;
    background:
        radial-gradient(circle at 80% -10%, rgba(223, 243, 106, .2), transparent 30%),
        linear-gradient(120deg, #0e2e21, #174d34 70%, #1f6041);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    right: -60px;
    bottom: -150px;
    width: 450px;
    height: 260px;
    border: 2px solid rgba(255,255,255,.14);
    border-radius: 50%;
    transform: rotate(-12deg);
}

.hero__inner {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 55px 0 48px;
    position: relative;
    z-index: 1;
}

.route-label, .eyebrow {
    color: var(--green);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .14em;
}

.route-label { color: var(--lime); }
.hero__topline { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.hero__table-link { color: #fff; font-size: .82rem; font-weight: 750; text-decoration: none; }
.hero__table-link:hover { color: var(--lime); }
.hero__links { display: flex; gap: 18px; }

.hero h1 {
    max-width: 760px;
    margin: 8px 0 2px;
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    line-height: .98;
    letter-spacing: -.055em;
}

.hero p {
    margin: 14px 0 0;
    color: rgba(255,255,255,.76);
    font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero p span { color: var(--lime); padding: 0 8px; }

.page-shell {
    width: min(1180px, calc(100% - 40px));
    margin: -20px auto 70px;
    position: relative;
    z-index: 2;
}

.drive-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 10px 24px;
    align-items: center;
    padding: 26px 28px;
    color: #fff;
    background: linear-gradient(120deg, #183f2e, #1f6b45);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.drive-panel .eyebrow { color: var(--lime); }
.drive-panel h2 { margin: 5px 0 0; font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.03em; }
.drive-panel__copy p { margin: 7px 0 0; color: rgba(255,255,255,.68); font-size: .83rem; }
.drive-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.preset-button,
.start-trip-button,
.stop-trip-button,
.push-button,
.push-test-button {
    min-height: 52px;
    padding: 0 18px;
    border-radius: 10px;
    font-weight: 850;
}

.preset-button--primary,
.push-button,
.push-test-button {
    color: #fff;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.25);
}

.preset-button {
    transition: transform .12s ease, background-color .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.preset-button:active {
    transform: translateY(1px) scale(.99);
}

.preset-button.is-active {
    color: var(--ink);
    background: var(--lime);
    border-color: var(--lime);
    box-shadow: 0 12px 24px rgba(223, 255, 88, 0.18);
}

.start-trip-button {
    color: var(--ink);
    background: var(--lime);
    border: 1px solid var(--lime);
    font-size: 1rem;
}

.stop-trip-button { color: #fff; background: #a94332; border: 1px solid #b95746; }
.push-button:disabled { cursor: not-allowed; opacity: .55; }
.push-status {
    grid-column: 1 / -1;
    min-height: 1em;
    margin: 0;
    color: rgba(255,255,255,.68);
    text-align: right;
    font-size: .72rem;
}

.trip-dashboard {
    display: grid;
    grid-template-columns: 1.3fr .85fr .85fr;
    gap: 14px;
    margin-top: 16px;
}

.trip-alert,
.trip-station-card {
    min-height: 220px;
    padding: 24px;
    border-radius: 17px;
    box-shadow: var(--shadow);
}

.trip-alert { color: #fff; background: var(--green); }
.trip-alert--warning { background: #9b5c20; }
.trip-alert--critical { background: #9f3527; }
.trip-alert__label { font-size: .68rem; font-weight: 900; letter-spacing: .13em; opacity: .72; }
.trip-alert h2 { margin: 38px 0 8px; font-size: clamp(1.45rem, 3vw, 2.2rem); line-height: 1.05; letter-spacing: -.035em; }
.trip-alert p { margin: 0; color: rgba(255,255,255,.8); }
.trip-station-card { background: var(--card); border: 1px solid rgba(16,35,27,.08); }
.trip-station-card--next { background: #ece9e0; }
.trip-station-card__metric { margin-top: 24px; color: var(--green); font-size: 2.25rem; font-weight: 950; letter-spacing: -.05em; }
.trip-station-card h3 { margin: 4px 0; font-size: 1rem; }
.trip-station-card p { margin: 0; color: var(--muted); font-size: .78rem; }
.trip-card-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 17px; }

.location-panel,
.filters,
.map-wrap,
.results-wrap {
    background: var(--card);
    border: 1px solid rgba(16, 35, 27, .08);
    box-shadow: var(--shadow);
}

.location-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 112px;
    padding: 24px 28px;
    margin-top: 16px;
    border-radius: 18px;
}

.location-copy { margin: 5px 0 0; color: var(--muted); }
.location-panel__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }

.location-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 58px;
    padding: 0 23px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: var(--orange);
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(243, 111, 61, .24);
    transition: transform .15s, background .15s;
}

.location-button:hover { transform: translateY(-1px); background: #df5c2d; }
.location-button:disabled { cursor: wait; opacity: .7; transform: none; }
.location-button__icon { font-size: 1.5rem; }

.filters {
    margin-top: 16px;
    border-radius: 16px;
    overflow: hidden;
}

.filters summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 18px 24px;
    list-style: none;
    font-weight: 850;
    cursor: pointer;
}

.filters summary::-webkit-details-marker { display: none; }
.filters summary::after { content: "+"; color: var(--green); font-size: 1.4rem; }
.filters[open] summary::after { content: "−"; }
.filters__hint { margin-left: auto; color: var(--muted); font-size: .85rem; font-weight: 500; }

.filters__body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    padding: 4px 24px 22px;
    border-top: 1px solid var(--line);
}

.preset-strip {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.preset-chip {
    min-height: 42px;
    padding: 0 14px;
    color: var(--green-dark);
    background: #eef4ef;
    border: 1px solid #d3dfd7;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 800;
}

.preset-chip--link {
    display: inline-grid;
    place-items: center;
    text-decoration: none;
}

.route-controls {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(340px, 1.2fr) repeat(3, minmax(170px, .6fr));
    gap: 14px;
    align-items: end;
    margin-top: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.mode-fieldset { margin: 0; }
.mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 4px;
    border-radius: 12px;
    background: #e9ece5;
}

.mode-switch label { position: relative; }
.mode-switch input { position: absolute; opacity: 0; pointer-events: none; }
.mode-switch span {
    min-height: 46px;
    display: grid;
    place-items: center;
    padding: 7px 12px;
    border-radius: 9px;
    color: #506059;
    text-align: center;
    font-size: .8rem;
    font-weight: 800;
    cursor: pointer;
}

.mode-switch input:checked + span { color: #fff; background: var(--green); box-shadow: 0 4px 12px rgba(31,107,69,.18); }
.mode-switch input:focus-visible + span { outline: 3px solid rgba(31,107,69,.22); }

.field { display: grid; gap: 7px; }
.field > span:first-child { color: #34463d; font-size: .76rem; font-weight: 800; }
.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 46px;
    padding: 0 12px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 9px;
    outline: 0;
}

.field textarea { min-height: 90px; padding: 9px 11px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31,107,69,.1); }

.input-with-unit { position: relative; display: block; }
.input-with-unit input { padding-right: 38px; }
.input-with-unit b { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .75rem; }

fieldset { min-width: 0; margin: 18px 0 0; padding: 0; border: 0; }
legend { margin-bottom: 10px; font-size: .82rem; font-weight: 800; }

.choice-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-grid label { position: relative; }
.choice-grid input { position: absolute; opacity: 0; pointer-events: none; }
.choice-grid span {
    display: block;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #405048;
    background: #fff;
    font-size: .84rem;
    font-weight: 700;
    cursor: pointer;
}

.choice-grid input:checked + span { color: #fff; border-color: var(--green); background: var(--green); }
.choice-grid input:focus-visible + span { outline: 3px solid rgba(31,107,69,.22); }

.status-filter { margin-top: 0; }
.status-filter__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: .78rem;
}

.status-filter__meta b { color: var(--green-dark); }

.filters__actions { grid-column: 1 / -1; display: flex; gap: 10px; }
.apply-button,
.reset-button {
    min-height: 43px;
    padding: 0 17px;
    border-radius: 9px;
    font-weight: 800;
}

.apply-button { color: #fff; background: var(--green); border: 1px solid var(--green); }
.reset-button { color: var(--ink); background: transparent; border: 1px solid var(--line); }

.status-warning {
    margin-top: 16px;
    padding: 14px 16px;
    color: #81501c;
    background: #fff0ce;
    border: 1px solid #ecd89b;
    border-radius: 14px;
    box-shadow: var(--shadow);
    font-size: .86rem;
    font-weight: 700;
}

.diagnostics-panel {
    margin-top: 16px;
    background: var(--card);
    border: 1px solid rgba(16,35,27,.08);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.diagnostics-panel summary {
    padding: 16px 20px;
    list-style: none;
    cursor: pointer;
    font-weight: 850;
}

.diagnostics-panel summary::-webkit-details-marker { display: none; }

.diagnostics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 0 20px 20px;
    border-top: 1px solid var(--line);
}

.diagnostics-grid div {
    display: grid;
    gap: 4px;
    padding: 12px;
    background: #f4f5ef;
    border-radius: 12px;
}

.diagnostics-grid span {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 700;
}

.diagnostics-grid strong {
    color: var(--ink);
    font-size: .82rem;
    line-height: 1.4;
}

.route-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(380px, .65fr);
    gap: 24px;
    align-items: start;
    margin-top: 18px;
}

.map-panel,
.station-list-panel { min-width: 0; }

.map-wrap,
.results-wrap {
    padding: 24px;
    border-radius: 18px;
}

.map-wrap { position: sticky; top: 16px; }
.station-list-panel { display: flex; flex-direction: column; }

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 17px;
}

.section-heading h2 { margin: 3px 0 0; font-size: 1.45rem; letter-spacing: -.025em; }
.map-toolbar { display: flex; align-items: center; gap: 10px; }
.count-pill {
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    color: #fff;
    background: var(--green);
    border-radius: 999px;
    font-weight: 850;
}

.database-count { color: var(--muted); font-size: .78rem; text-align: right; }

#map {
    height: calc(100vh - 180px);
    min-height: 560px;
    width: 100%;
    border-radius: 12px;
    background: #dfe5de;
    z-index: 0;
}

.map-fallback {
    min-height: calc(100vh - 180px);
    margin-top: calc(-1 * (100vh - 180px));
    position: relative;
    z-index: 2;
    display: grid;
    place-content: center;
    padding: 30px;
    color: var(--ink);
    text-align: center;
    background: linear-gradient(135deg, #e2e7df, #f5f3ec);
    border-radius: 12px;
}

.map-fallback strong { font-size: 1.2rem; }
.map-fallback p { max-width: 530px; margin: 8px auto 0; color: var(--muted); }
.map-fallback code { color: var(--green); }
.map-balloon { max-width: 300px; font-family: inherit; }
.map-balloon strong,
.map-balloon b { display: block; }
.map-balloon strong { color: var(--green); font-size: 1.05rem; }
.map-balloon b { margin-top: 2px; }
.map-balloon p { margin: 7px 0; color: #46554e; font-size: .78rem; }
.map-balloon a {
    display: inline-block;
    margin-top: 5px;
    padding: 8px 10px;
    color: #fff;
    background: var(--ink);
    border-radius: 6px;
    text-decoration: none;
    font-size: .75rem;
    font-weight: 800;
}

.map-attribution-note { margin: 8px 0 -10px; color: var(--muted); font-size: .68rem; }

.station-list {
    display: grid;
    gap: 11px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    padding-right: 4px;
}

.station-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    transition: border-color .15s, transform .15s;
}

.station-card:hover { border-color: #aebcb4; transform: translateY(-1px); }
.station-card--selected { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31,107,69,.08); }
.station-card__top { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.station-brand { margin: 0; font-size: 1.22rem; line-height: 1.1; letter-spacing: -.02em; }
.station-name { margin: 5px 0 0; color: var(--muted); font-size: .88rem; }
.station-distance { flex: none; color: var(--green); text-align: right; white-space: nowrap; }
.station-distance strong { display: block; font-size: 1.35rem; font-weight: 900; line-height: 1.1; }
.station-distance small { display: block; margin-top: 2px; color: var(--muted); font-size: .65rem; font-weight: 750; }
.station-address { margin: 13px 0 0; color: #405048; font-size: .85rem; }

.station-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.station-metrics span {
    padding: 6px 9px;
    color: #405048;
    background: #f1f3ed;
    border-radius: 7px;
    font-size: .72rem;
    font-weight: 750;
}

.station-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.badge { padding: 4px 8px; color: #435249; background: #eff2ec; border-radius: 5px; font-size: .7rem; font-weight: 800; }
.badge--verified { color: #165b39; background: #dff2e3; }
.badge--check { color: #81501c; background: #fff0ce; }
.station-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 15px; padding-top: 14px; border-top: 1px solid #ece9e1; }
.yandex-button {
    color: #fff;
    background: var(--ink);
    text-decoration: none;
    padding: 10px 13px;
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 800;
}

.station-actions { display: flex; flex: none; gap: 7px; }
.route-button {
    color: var(--green-dark);
    background: #e4efe7;
    text-decoration: none;
    padding: 10px 13px;
    border: 0;
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 800;
}

.route-button--ghost { background: transparent; border: 1px solid var(--line); }
.road-label { color: var(--muted); font-size: .74rem; font-weight: 700; }

.staff-button {
    min-height: 40px;
    padding: 0 11px;
    color: #fff;
    background: var(--green);
    border: 1px solid var(--green);
    border-radius: 8px;
    font-size: .76rem;
    font-weight: 800;
}

.loading-card,
.empty-state {
    padding: 40px 20px;
    color: var(--muted);
    text-align: center;
    border: 1px dashed #c8cec8;
    border-radius: 13px;
}

.empty-state__icon { color: var(--green); font-size: 2.2rem; }
.empty-state h3 { margin: 8px 0 2px; color: var(--ink); }
.empty-state p { margin: 0; }
.error-card { padding: 18px; color: #872e22; background: #fff0ec; border: 1px solid #f0c9c1; border-radius: 12px; }

/* Full station table */
.table-page { min-width: 320px; }
.table-header { color: #fff; background: linear-gradient(120deg, #0e2e21, #1f6041); }
.table-header__inner {
    width: min(1380px, calc(100% - 40px));
    min-height: 220px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 160px 1fr 160px;
    align-items: center;
    gap: 22px;
}

.table-header h1 { margin: 4px 0 0; font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1; letter-spacing: -.05em; }
.table-header p { margin: 10px 0 0; color: rgba(255,255,255,.68); }
.table-header__nav { display: grid; gap: 10px; justify-items: start; }
.back-link,
.export-button { color: #fff; text-decoration: none; font-size: .82rem; font-weight: 800; }

.export-button {
    min-height: 48px;
    display: grid;
    place-items: center;
    padding: 0 15px;
    color: var(--ink);
    background: var(--lime);
    border-radius: 10px;
}

.table-shell,
.trip-shell { width: min(1380px, calc(100% - 40px)); margin: -24px auto 70px; position: relative; }

.table-filters,
.table-card,
.trip-toolbar,
.trip-group {
    background: var(--card);
    border: 1px solid rgba(16,35,27,.08);
    box-shadow: var(--shadow);
    border-radius: 16px;
}

.table-filters {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) repeat(7, minmax(130px, .68fr));
    gap: 12px;
    align-items: end;
    padding: 20px;
}

.table-checks { grid-column: 1 / -2; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; min-height: 43px; }
.table-checks label { color: #405048; font-size: .8rem; font-weight: 700; }
.table-checks input { accent-color: var(--green); }
.table-filter-actions { display: flex; justify-content: flex-end; gap: 8px; }
.reset-button--link { display: grid; place-items: center; text-decoration: none; font-size: .82rem; }
.table-card { margin-top: 16px; overflow: hidden; }
.table-scroll { overflow-x: auto; }
.stations-table { width: 100%; border-collapse: collapse; min-width: 1120px; }
.stations-table th,
.stations-table td { padding: 14px 13px; border-bottom: 1px solid #e8e5dc; text-align: left; vertical-align: middle; }
.stations-table th { color: var(--muted); background: #efede6; font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; }
.stations-table td { color: #35463e; font-size: .78rem; }
.stations-table tr:last-child td { border-bottom: 0; }
.stations-table tbody tr:hover { background: #faf9f5; }
.stations-table strong { display: block; color: var(--ink); font-size: .9rem; }
.stations-table small { display: block; margin-top: 3px; color: var(--muted); font-size: .7rem; }
.route-number { color: var(--green) !important; font-size: 1rem !important; font-weight: 900; }
.number-cell { white-space: nowrap; font-weight: 750; }
.fuel-cell span { display: inline-block; margin: 2px; padding: 3px 5px; color: var(--green-dark); background: #e5efe8; border-radius: 4px; font-size: .65rem; font-weight: 850; }
.status { display: inline-block; padding: 5px 7px; border-radius: 5px; white-space: nowrap; font-size: .66rem; font-weight: 800; }
.status--verified { color: #165b39; background: #dff2e3; }
.status--needs_check { color: #81501c; background: #fff0ce; }
.status--not_checked { color: #59645f; background: #e9ecea; }
.status--closed { color: #872e22; background: #f9e2de; }
.table-map-link { color: var(--green); font-weight: 800; text-decoration: none; white-space: nowrap; }
.table-empty { padding: 50px !important; color: var(--muted) !important; text-align: center !important; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 22px; padding: 17px; }
.pagination a { color: var(--green); font-weight: 800; text-decoration: none; }
.pagination span { color: var(--muted); font-size: .8rem; }

/* Trip stations working selection */
.trip-page { min-width: 320px; }
.trip-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px;
}

.trip-toolbar__copy p { margin: 6px 0 0; color: var(--muted); font-size: .84rem; }
.trip-toolbar__actions { display: flex; flex-wrap: wrap; gap: 8px; }

.radius-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.radius-switch a {
    display: inline-grid;
    place-items: center;
    min-height: 42px;
    padding: 0 14px;
    color: var(--green-dark);
    text-decoration: none;
    background: #eef4ef;
    border: 1px solid #d3dfd7;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 800;
}

.radius-switch a.is-active { color: #fff; background: var(--green); border-color: var(--green); }

.trip-group { margin-top: 16px; overflow: hidden; }
.trip-group__heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    background: #f4f2eb;
    border-bottom: 1px solid #e8e5dc;
}

.trip-group__heading h2 { margin: 4px 0 0; font-size: 1.2rem; letter-spacing: -.02em; }
.trip-group__count { color: var(--muted); font-size: .8rem; font-weight: 700; }
.trip-group__table { overflow-x: auto; }
.trip-group__table table { width: 100%; min-width: 1220px; border-collapse: collapse; }
.trip-group__table th,
.trip-group__table td {
    padding: 13px 12px;
    border-bottom: 1px solid #e8e5dc;
    text-align: left;
    vertical-align: middle;
}

.trip-group__table th {
    color: var(--muted);
    background: #efede6;
    font-size: .68rem;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.trip-group__table td { color: #35463e; font-size: .78rem; }
.trip-group__table tr:last-child td { border-bottom: 0; }
.trip-group__table tbody tr:hover { background: #faf9f5; }
.trip-action-cell { white-space: nowrap; }
.trip-action-row { display: flex; flex-wrap: wrap; gap: 7px; }
.trip-action-row form { display: inline; }
.trip-kpi {
    display: inline-block;
    margin-right: 8px;
    padding: 4px 7px;
    color: var(--green-dark);
    background: #e5efe8;
    border-radius: 6px;
    font-size: .68rem;
    font-weight: 800;
}

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

/* Manual verification queue */
.check-shell { width: min(1120px, calc(100% - 40px)); margin: -24px auto 70px; position: relative; }
.check-header__actions { display: flex; gap: 10px; align-items: center; }
.export-button--ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.check-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr)) auto auto;
    gap: 12px;
    align-items: end;
    padding: 20px;
    background: var(--card);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.check-messages { margin-bottom: 12px; }
.check-message { padding: 12px 16px; color: #165b39; background: #dff2e3; border-radius: 9px; }
.manual-form-card {
    padding: 24px;
    background: var(--card);
    border: 1px solid rgba(16,35,27,.08);
    border-radius: 16px;
    box-shadow: var(--shadow);
}
.manual-form-card__header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 18px;
}
.manual-form-card__header h2 { margin: 4px 0 0; font-size: 1.75rem; }
.manual-form-card__header p { max-width: 380px; margin: 0; color: var(--muted); font-size: .9rem; }
.manual-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.manual-form-grid .field--full,
.manual-form-errors,
.manual-form-actions { grid-column: 1 / -1; }
.manual-form-errors {
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff3f1;
    color: #8a2f20;
    border: 1px solid rgba(178, 67, 43, 0.18);
}
.manual-form-errors p { margin: 0; }
.manual-form-options { margin-top: 0; }
.field-error { color: #8a2f20; font-size: .78rem; font-weight: 700; }
.manual-form-actions { display: flex; gap: 12px; align-items: center; }
.check-list { display: grid; gap: 14px; margin-top: 16px; }
.check-card { padding: 22px; background: var(--card); border: 1px solid rgba(16,35,27,.08); border-radius: 16px; box-shadow: var(--shadow); }
.check-card__heading { display: flex; justify-content: space-between; gap: 22px; }
.check-card__heading h2 { margin: 5px 0 2px; font-size: 1.55rem; }
.check-card__heading p { margin: 0; color: var(--muted); font-size: .82rem; }
.check-score { flex: none; width: 76px; height: 76px; display: grid; place-content: center; color: #fff; text-align: center; background: var(--green); border-radius: 50%; }
.check-score strong { font-size: 1.4rem; line-height: 1; }
.check-score span { font-size: .55rem; }
.check-links { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 16px 0; padding: 12px 0; border-block: 1px solid var(--line); font-size: .76rem; }
.check-links a { color: var(--green); font-weight: 800; text-decoration: none; }
.check-links span { margin-left: auto; color: var(--muted); }
.check-edit-form { display: grid; grid-template-columns: 1.2fr .5fr 1.4fr; gap: 13px; align-items: end; }
.check-options { align-self: stretch; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 15px; padding: 10px 13px; background: #efeee8; border-radius: 9px; }
.check-options label { font-size: .76rem; font-weight: 750; }
.check-options input { accent-color: var(--green); }
.check-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.check-action { min-height: 43px; padding: 0 15px; color: var(--ink); background: #ecebe5; border: 1px solid var(--line); border-radius: 8px; font-weight: 850; }
.check-action--verified { color: #fff; background: var(--green); border-color: var(--green); }
.check-action--closed { color: #fff; background: #9f3527; border-color: #9f3527; }

@media (max-width: 900px) {
    .drive-panel { grid-template-columns: 1fr; }
    .drive-actions { justify-content: flex-start; }
    .push-status { text-align: left; }
    .trip-dashboard { grid-template-columns: 1fr 1fr; }
    .trip-alert { grid-column: 1 / -1; }
    .route-controls { grid-template-columns: 1fr 1fr; }
    .mode-fieldset { grid-column: 1 / -1; }
    .route-layout { grid-template-columns: 1fr; }
    .map-wrap { position: static; }
    .station-list { max-height: none; overflow: visible; padding-right: 0; }
    #map { height: 420px; min-height: 420px; }
    .map-fallback { min-height: 420px; margin-top: -420px; }
    .diagnostics-grid { grid-template-columns: 1fr 1fr; }
    .table-header__inner { grid-template-columns: 1fr auto; }
    .table-header__inner > div:not(.table-header__nav) { grid-column: 1 / -1; grid-row: 1; align-self: end; }
    .table-header__nav { align-self: start; padding-top: 20px; }
    .back-link { align-self: start; padding-top: 20px; }
    .export-button { grid-column: 2; }
    .table-filters { grid-template-columns: repeat(2, 1fr); }
    .field--search { grid-column: 1 / -1; }
    .table-checks { grid-column: 1 / -1; }
    .table-filter-actions { grid-column: 1 / -1; justify-content: start; }
    .trip-toolbar { align-items: start; }
    .check-filters,
    .manual-form-grid { grid-template-columns: repeat(2, 1fr); }
    .check-edit-form { grid-template-columns: 1fr 1fr; }
    .check-comment { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .hero { min-height: 220px; }
    .hero__inner,
    .page-shell { width: min(100% - 24px, 1180px); }
    .hero__inner { padding-bottom: 40px; }
    .page-shell { margin-top: -14px; }
    .location-panel { align-items: stretch; flex-direction: column; padding: 20px; }
    .location-panel__actions { width: 100%; justify-content: stretch; }
    .location-panel__actions > * { width: 100%; }
    .location-button { width: 100%; min-height: 62px; }
    .filters summary,
    .filters__body { padding-left: 18px; padding-right: 18px; }
    .filters__body { grid-template-columns: 1fr; gap: 2px; }
    .route-controls { grid-template-columns: 1fr; }
    .mode-fieldset { grid-column: auto; }
    .mode-switch { grid-template-columns: 1fr; }
    .filters__hint { display: none; }
    .filters__actions { margin-top: 16px; }
    .apply-button { flex: 1; }
    .route-layout { display: flex; flex-direction: column; }
    .map-wrap,
    .results-wrap { width: 100%; padding: 18px; }
    #map { height: 340px; min-height: 340px; }
    .map-fallback { min-height: 340px; margin-top: -340px; }
    .station-card__top { gap: 10px; }
    .station-distance { font-size: 1.22rem; }
    .station-card__footer { align-items: stretch; flex-direction: column; }
    .station-actions { display: grid; grid-template-columns: 1fr; }
    .route-button,
    .yandex-button,
    .staff-button { text-align: center; min-height: 44px; display: grid; place-items: center; }
    .hero__topline { align-items: flex-start; flex-direction: column; gap: 10px; }
    .hero__links { flex-wrap: wrap; }
    .drive-panel { padding: 21px; }
    .drive-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
    .start-trip-button,
    .stop-trip-button,
    .preset-button,
    .push-button,
    .push-test-button { min-height: 58px; font-size: 1.02rem; }
    .trip-dashboard { grid-template-columns: 1fr; }
    .trip-alert { grid-column: auto; }
    .trip-alert,
    .trip-station-card { min-height: 190px; padding: 20px; }
    .trip-alert h2 { margin-top: 28px; }
    .status-filter__meta { gap: 8px 12px; }
    .diagnostics-grid { grid-template-columns: 1fr; }
    .install-banner { grid-template-columns: 42px 1fr auto; }
    .install-banner img { width: 42px; height: 42px; }
    .install-action { grid-column: 2; justify-self: start; }
    .install-dismiss { grid-column: 3; grid-row: 1; }
    .table-header__inner,
    .table-shell,
    .trip-shell { width: min(100% - 24px, 1380px); }
    .table-header__inner { min-height: 245px; }
    .table-header__inner > div:not(.table-header__nav) { padding-bottom: 18px; }
    .table-filters { grid-template-columns: 1fr; padding: 16px; }
    .field--search,
    .table-checks,
    .table-filter-actions { grid-column: auto; }
    .table-filter-actions .apply-button { flex: 1; }
    .trip-toolbar,
    .trip-group__heading { padding: 16px; }
    .trip-toolbar__actions,
    .radius-switch { width: 100%; }
    .trip-toolbar__actions > * { flex: 1; }
    .check-shell { width: min(100% - 24px, 1120px); }
    .check-filters,
    .manual-form-grid,
    .check-edit-form { grid-template-columns: 1fr; }
    .check-comment,
    .check-actions { grid-column: auto; }
    .check-card { padding: 17px; }
    .check-links span { width: 100%; margin-left: 0; }
    .check-actions { display: grid; }
    .check-action { min-height: 48px; }
    .check-score { width: 64px; height: 64px; }
    .manual-form-card__header,
    .check-header__actions,
    .manual-form-actions { flex-direction: column; align-items: stretch; }
}

/* ===== DESIGN FIX 1 OVERRIDES ===== */

:root {
    --bg: #f4efe6;
    --panel: #ffffff;
    --text: #10291f;
    --muted: #64736b;
    --green-dark: #0f4d32;
    --green: #1f7a4d;
    --lime: #dfff58;
    --border: rgba(16, 41, 31, 0.18);
    --shadow: 0 18px 50px rgba(16, 41, 31, 0.08);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 16px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page-shell,
.hero-shell,
.filters-shell,
.workspace-shell,
.trip-shell {
    width: min(1480px, calc(100% - 40px));
    margin-left: auto;
    margin-right: auto;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.hero__inner.hero-shell {
    width: min(1480px, calc(100% - 40px));
}

.page-shell {
    margin-top: -20px;
    margin-bottom: 48px;
}

.journey-panel,
.location-card {
    border-radius: var(--radius-xl);
}

.journey-panel {
    background: linear-gradient(120deg, #133f2c, #1f6b45 72%, #2f7c4f);
    border-color: rgba(255,255,255,.08);
    color: #fff;
}

.journey-panel .eyebrow {
    color: var(--lime);
}

.journey-panel h2,
.journey-panel p,
.journey-panel .push-status {
    color: #fff;
}

.journey-panel .drive-panel__copy p,
.journey-panel .push-status {
    color: rgba(255,255,255,.78);
}

.location-card {
    margin-top: 24px;
    padding: 26px 28px;
}

.filters-shell {
    margin-top: 24px;
}

.filters-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 24px;
}

.filters-details > summary {
    list-style: none;
    cursor: pointer;
}

.filters-details > summary::-webkit-details-marker {
    display: none;
}

.filters-details > summary::after {
    content: "+";
    margin-left: auto;
    color: var(--green);
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.filters-details[open] > summary::after {
    content: "−";
}

.filters-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 22px;
}

.filters-details:not([open]) .filters-body {
    display: none;
}

.filters-body {
    padding-top: 0;
}

.filters-header h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(24px, 2vw, 34px);
    line-height: 1.05;
}

.filters-summary {
    margin: 0;
    max-width: 540px;
    color: var(--muted);
    font-size: 14px;
    text-align: right;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 22px;
}

.filter-group {
    grid-column: span 4;
    min-width: 0;
    margin: 0;
}

.filter-group--wide {
    grid-column: span 6;
}

.filter-group--full {
    grid-column: 1 / -1;
}

.filter-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 900;
    color: var(--text);
    font-size: 14px;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip,
.filter-chip span {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(16, 41, 31, 0.22);
    border-radius: 999px;
    padding: 0 16px;
    background: #fff;
    color: #34483d;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}

.filter-chip {
    position: relative;
}

.filter-chip input {
    position: absolute;
    opacity: 0;
    inset: 0;
    pointer-events: none;
}

.chip.is-active,
.filter-chip input:checked + span {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

.filters-grid select,
.filters-grid input[type="number"],
.filters-grid input[type="search"] {
    min-height: 48px;
    border-radius: 16px;
    border: 1px solid rgba(16, 41, 31, 0.22);
    padding: 0 14px;
    background: #fff;
    color: var(--text);
}

.filters-grid select:focus,
.filters-grid input[type="number"]:focus,
.filters-grid input[type="search"]:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(31, 122, 77, 0.12);
}

.input-with-unit b {
    color: var(--muted);
    font-weight: 800;
}

.filters-actions {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.btn-primary,
.btn-secondary,
.btn-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    padding: 14px 22px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
}

.btn-primary {
    border: 0;
    background: var(--green);
    color: #fff;
}

.btn-secondary {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
}

.btn-dark {
    border: 0;
    background: #08261a;
    color: #fff;
}

.btn-primary--compact,
.btn-secondary--compact {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
}

.btn-secondary--compact {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
}

.workspace-shell {
    margin-top: 28px;
    margin-bottom: 48px;
}

.workspace-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1.35fr) minmax(380px, 0.65fr) !important;
    gap: 24px;
    align-items: start;
}

.map-column,
.stations-column {
    min-width: 0;
}

.map-card {
    position: sticky;
    top: 16px;
    overflow: hidden;
    padding: 22px;
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.eyebrow {
    display: block;
    margin-bottom: 6px;
    color: var(--green);
    font-size: 12px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.panel-header h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(22px, 2vw, 32px);
    line-height: 1.05;
}

.result-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--green);
    color: #fff;
    font-weight: 900;
    font-size: 20px;
}

.map-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.route-map,
#map {
    width: 100%;
    height: calc(100vh - 230px) !important;
    min-height: 620px !important;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #dde9df;
}

.map-fallback {
    min-height: calc(100vh - 230px);
    margin-top: calc(-1 * (100vh - 230px));
    border-radius: var(--radius-lg);
}

.map-note {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.stations-panel {
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

.stations-panel .panel-header {
    padding: 22px 22px 0;
    margin-bottom: 0;
}

.stations-panel__meta {
    margin: 8px 22px 0;
    color: var(--muted);
    font-size: 13px;
}

.selected-station-card {
    margin: 14px 18px 0;
    padding: 18px;
    border: 1px solid rgba(16, 41, 31, 0.08);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbf8 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

.selected-station-card h3 {
    margin: 6px 0 0;
    color: var(--text);
    font-size: 24px;
    line-height: 1.05;
}

.selected-station-card p {
    margin: 8px 0 0;
    color: var(--muted);
}

.selected-station-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.selected-station-card__header p {
    margin-top: 4px;
    font-size: 14px;
}

.selected-station-card__id {
    flex: none;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: #eaf3ec;
    color: #214735;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.selected-station-card__address {
    font-size: 14px;
}

.selected-station-card__metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.selected-station-card__metric {
    padding: 12px;
    border-radius: 16px;
    background: #eef4ef;
}

.selected-station-card__metric strong {
    display: block;
    color: var(--green);
    font-size: 18px;
    line-height: 1.1;
    font-weight: 900;
}

.selected-station-card__metric span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.selected-station-card__actions {
    margin-top: 14px;
}

.stations-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 18px 22px;
    display: grid;
    gap: 14px;
    max-height: none;
}

.station-card {
    background: #fff;
    border: 1px solid rgba(14, 46, 34, 0.10);
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(14, 46, 34, 0.06);
}

.station-card__top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.station-main {
    min-width: 0;
}

.station-brand {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
    color: var(--text);
    line-height: 1.1;
}

.station-name,
.station-address {
    color: var(--muted);
    font-size: 14px;
    margin-top: 4px;
}

.station-address {
    overflow-wrap: anywhere;
}

.station-distance {
    text-align: right;
    min-width: 88px;
    flex: none;
}

.station-distance strong {
    display: block;
    color: var(--green);
    font-size: 24px;
    line-height: 1;
    white-space: nowrap;
}

.station-distance span {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}

.station-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

.station-badges span,
.station-badges .badge {
    border-radius: 999px;
    background: #eef4ef;
    color: #274235;
    padding: 6px 9px;
    font-size: 12px;
    font-weight: 800;
}

.station-badges .needs-check,
.station-badges .badge.needs-check {
    background: #fff0c2;
    color: #8a5b00;
}

.station-badges .verified,
.station-badges .badge.verified {
    background: #dff7e8;
    color: #17683f;
}

.station-badges .station-db-id,
.station-badges .badge.station-db-id {
    background: #e8eefb;
    color: #274c89;
}

.external-status {
    margin-top: 14px;
    padding: 12px 13px;
    border-radius: 14px;
    background: #f4f6f3;
    color: #375045;
    border: 1px solid rgba(16, 41, 31, 0.08);
}

.external-status strong {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.external-status p {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
}

.external-status small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.external-status__hint {
    margin-top: 8px;
    font-weight: 700;
}

.external-status__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.external-status__badges .badge,
.external-status__badges .gdebenz-fuel {
    background: rgba(255, 255, 255, 0.78);
    color: inherit;
}

.external-status--available {
    background: #e6f6eb;
    color: #145c37;
    border-color: rgba(20, 92, 55, 0.14);
}

.external-status--unavailable {
    background: #fde8df;
    color: #8a3422;
    border-color: rgba(138, 52, 34, 0.16);
}

.external-status--queue,
.external-status--low {
    background: #fff2cf;
    color: #8a5b00;
    border-color: rgba(138, 91, 0, 0.16);
}

.external-status--unknown,
.external-status--empty {
    background: #f2f4f3;
    color: #5b6b63;
}

.external-status--stale {
    position: relative;
}

.external-status--stale::after {
    content: "устарело";
    position: absolute;
    top: 10px;
    right: 12px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(16, 41, 31, 0.08);
    color: currentColor;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.station-card__actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.station-card__actions-inner {
    display: flex;
    gap: 10px;
    width: 100%;
}

.station-card__actions a,
.station-card__actions button,
.btn-route,
.btn-yandex {
    flex: 1;
    border-radius: 12px;
    border: 0;
    padding: 11px 12px;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
}

.station-card__actions button,
.btn-route {
    background: #e9f5ec;
    color: #17683f;
}

.station-card__actions a,
.btn-yandex {
    background: #08261a;
    color: #fff;
}

.station-card--selected {
    border-color: rgba(31, 122, 77, 0.45);
    box-shadow: 0 0 0 3px rgba(31, 122, 77, 0.10), 0 10px 30px rgba(14, 46, 34, 0.06);
}

.trip-shell {
    margin: 0 auto 60px;
}

.trip-toolbar {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 22px;
    box-shadow: var(--shadow);
    margin: 24px 0;
}

.radius-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.trip-gdebenz-refresh {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.trip-gdebenz-refresh small {
    color: var(--muted);
    font-size: 12px;
    max-width: 320px;
}

.radius-switch .chip {
    text-decoration: none;
}

.route-section {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow);
    margin: 22px 0;
    overflow: hidden;
}

.route-section__header {
    padding: 20px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.route-section__header h2 {
    margin: 0;
    font-size: 28px;
}

.trip-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1050px;
}

.trip-table th,
.trip-table td {
    padding: 13px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(16, 41, 31, 0.08);
    vertical-align: middle;
}

.trip-table th {
    position: sticky;
    top: 0;
    background: #f8faf7;
    color: var(--text);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    z-index: 1;
}

.trip-table tr:nth-child(even) td {
    background: #fbf8f1;
}

.trip-table .num,
.trip-table .route-number {
    font-weight: 900;
    color: var(--green);
    white-space: nowrap;
}

.trip-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trip-action-row form {
    display: inline-flex;
}

.trip-group__count {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.trip-external-status {
    display: grid;
    gap: 2px;
}

.trip-external-status strong {
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.trip-external-status span,
.trip-external-status small {
    color: var(--muted);
    font-size: 12px;
}

.trip-external-status--available strong { color: #145c37; }
.trip-external-status--unavailable strong { color: #8a3422; }
.trip-external-status--queue strong,
.trip-external-status--low strong { color: #8a5b00; }

@media (max-width: 1023px) {
    .page-shell,
    .hero-shell,
    .filters-shell,
    .workspace-shell,
    .trip-shell {
        width: min(100% - 24px, 1480px);
    }

    .workspace-grid {
        display: block !important;
    }

    .map-card {
        position: static;
        margin-bottom: 16px;
        padding: 14px;
    }

    .route-map,
    #map {
        height: 420px !important;
        min-height: 360px !important;
        border-radius: 18px;
    }

    .map-fallback {
        min-height: 420px;
        margin-top: -420px;
    }

    .stations-panel {
        height: auto;
    }

    .selected-station-card {
        margin: 12px 14px 0;
        padding: 14px;
    }

    .selected-station-card__metrics {
        grid-template-columns: 1fr;
    }

    .stations-list {
        max-height: none;
        overflow: visible;
        padding: 14px;
    }

    .filters-grid {
        grid-template-columns: 1fr;
    }

    .filter-group,
    .filter-group--wide,
    .filter-group--full {
        grid-column: auto;
    }

    .filters-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .filters-details > summary::after {
        margin-left: 0;
    }

    .filters-summary {
        text-align: left;
    }

    .filters-actions {
        flex-direction: column;
    }

    .trip-toolbar__actions {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .station-card__top {
        flex-direction: column;
    }

    .station-distance {
        text-align: left;
        min-width: 0;
    }

    .station-card__actions,
    .station-card__actions-inner {
        flex-direction: column;
    }

    .trip-toolbar,
    .route-section__header {
        padding: 16px;
    }

    .trip-toolbar__actions,
    .radius-switch {
        width: 100%;
    }
}
