:root {
    --ink: #101d33;
    --muted: #5e6b7e;
    --line: #d9dfE8;
    --soft: #f4f6f9;
    --soft-2: #e9edf3;
    --surface: #ffffff;

    /* v0.6.2: granat + czerwień + żółty */
    --primary: #102a56;
    --primary-dark: #091a38;
    --accent: #d62839;
    --accent-dark: #a91d2b;
    --accent-soft: #fde8eb;
    --yellow: #f4c430;
    --yellow-soft: #fff4b8;

    --shadow: 0 18px 50px rgba(16, 42, 86, .10);
    --radius: 22px;
    --radius-sm: 14px;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

button,
input {
    font: inherit;
}

.container {
    width: min(calc(100% - 32px), var(--max));
    margin-inline: auto;
}

.container.narrow {
    max-width: 920px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(220, 231, 234, .85);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(14px);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    background:
        linear-gradient(135deg, var(--primary), var(--accent));
    font-weight: 900;
    font-size: 22px;
    box-shadow: 0 8px 22px rgba(16, 42, 86, .23);
}

.brand-copy {
    display: grid;
    line-height: 1.15;
}

.brand-copy strong {
    font-size: 15px;
}

.brand-copy small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 14px;
    font-weight: 700;
}

.main-nav a {
    color: #34425a;
}

.main-nav a:hover {
    color: var(--primary);
}

.main-nav .nav-muted {
    color: #9ca6b5;
    cursor: default;
}

.mobile-nav {
    display: none;
    position: relative;
}

.mobile-nav > summary {
    list-style: none;
}

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

.mobile-nav > summary::marker {
    content: "";
}

.mobile-nav-panel {
    display: grid;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 76px 0 80px;
    background:
        radial-gradient(circle at 85% 15%, rgba(244,196,48,.18), transparent 28%),
        linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -80px -150px auto;
    width: 380px;
    height: 380px;
    border: 1px solid rgba(16, 42, 86, .08);
    border-radius: 50%;
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, .7fr);
    gap: 64px;
    align-items: center;
}

.eyebrow,
.panel-kicker {
    display: inline-block;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
    margin: 10px 0 12px;
    letter-spacing: -.04em;
}

.hero h1 {
    max-width: 720px;
    font-size: clamp(44px, 7vw, 76px);
    line-height: .98;
}

.hero-lead {
    max-width: 650px;
    margin: 0;
    color: var(--muted);
    font-size: clamp(17px, 2vw, 21px);
}

.search-box {
    max-width: 730px;
    margin-top: 34px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px 10px 10px 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
}

.search-icon {
    color: var(--accent);
    font-size: 26px;
    line-height: 1;
}

.search-box input {
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
    font-size: 16px;
}

.search-box input::placeholder {
    color: #8a96a8;
}

.search-box button,
.button-primary {
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: var(--primary);
    padding: 13px 20px;
    font-weight: 800;
    cursor: pointer;
}

.search-box button:hover,
.button-primary:hover {
    background: var(--primary-dark);
}

.hero-actions {
    margin-top: 20px;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.text-link {
    color: var(--primary);
    font-weight: 800;
    font-size: 14px;
}

.hero-panel {
    padding: 30px;
    border: 1px solid rgba(16, 42, 86, .11);
    border-radius: 28px;
    background: rgba(255, 255, 255, .85);
    box-shadow: var(--shadow);
}

.stat-big {
    margin: 10px 0 20px;
    font-size: 68px;
    font-weight: 900;
    letter-spacing: -.06em;
    line-height: 1;
}

.stat-big small {
    margin-left: 8px;
    color: var(--muted);
    font-size: 15px;
    letter-spacing: 0;
}

.mini-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mini-stats > div {
    padding: 15px;
    border-radius: 14px;
    background: var(--soft);
}

.mini-stats strong,
.mini-stats span {
    display: block;
}

.mini-stats strong {
    font-size: 20px;
}

.mini-stats span {
    color: var(--muted);
    font-size: 12px;
}

.validity {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.section {
    padding: 70px 0;
}

.section-soft {
    background: var(--soft);
}

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

.section-heading.compact {
    margin-bottom: 18px;
}

.section-heading h2 {
    margin: 5px 0 0;
    font-size: clamp(28px, 4vw, 38px);
    letter-spacing: -.035em;
}

.section-heading.compact h2 {
    font-size: 24px;
}

.section-count {
    padding: 7px 11px;
    border-radius: 999px;
    color: var(--primary);
    background: var(--accent-soft);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.lines-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.line-card {
    min-height: 88px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    transition:
        transform .15s ease,
        border-color .15s ease,
        box-shadow .15s ease;
}

.line-card:hover {
    transform: translateY(-2px);
    border-color: rgba(16, 42, 86, .30);
    box-shadow: 0 12px 28px rgba(16, 42, 86, .08);
}

.line-number,
.departure-line,
.line-chip {
    min-width: 48px;
    height: 48px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: var(--primary);
    font-size: 18px;
    font-weight: 900;
}

.line-card-copy {
    min-width: 0;
}

.line-card-copy strong,
.line-card-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-card-copy strong {
    font-size: 14px;
}

.line-card-copy small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.line-arrow {
    color: var(--accent);
    font-size: 20px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.feature-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.feature-card h3 {
    margin: 18px 0 8px;
}

.feature-card p {
    color: var(--muted);
}

.feature-card a {
    color: var(--primary);
    font-weight: 800;
}

.feature-card-muted {
    opacity: .72;
}

.feature-icon {
    width: 45px;
    height: 45px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--primary);
    background: var(--accent-soft);
    font-weight: 900;
}

.coming-soon {
    display: inline-block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.page-hero {
    padding: 42px 0 38px;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(180deg, #f6f7fa 0%, #fff 100%);
}

.page-hero-line {
    background:
        radial-gradient(circle at 85% 10%, rgba(214,40,57,.12), transparent 24%),
        linear-gradient(180deg, #f6f7fa 0%, #fff 100%);
}

.page-hero h1 {
    font-size: clamp(36px, 6vw, 58px);
}

.page-hero p {
    color: var(--muted);
}

.breadcrumbs {
    margin-bottom: 24px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 12px;
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.line-title-row,
.stop-title {
    display: flex;
    align-items: center;
    gap: 22px;
}

.line-badge-large {
    min-width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    color: #fff;
    background:
        linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 14px 34px rgba(16, 42, 86, .22);
    font-size: 36px;
    font-weight: 950;
}

.direction-stack {
    display: grid;
    gap: 30px;
}

.direction-group {
    display: grid;
    gap: 14px;
}

.direction-header {
    display: flex;
    gap: 12px;
    align-items: center;
}

.direction-dot {
    width: 14px;
    height: 14px;
    border: 4px solid var(--accent-soft);
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 1px rgba(214,40,57,.25);
}

.direction-header span,
.direction-header strong {
    display: block;
}

.direction-header span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.direction-header strong {
    font-size: 17px;
}

.variant-list {
    display: grid;
    gap: 12px;
}

.variant-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.variant-card summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    cursor: pointer;
}

.variant-card summary::-webkit-details-marker {
    display: none;
}

.variant-card summary strong,
.variant-card summary span {
    display: block;
}

.variant-card summary > div > span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.summary-chevron {
    color: var(--primary);
    font-size: 20px;
    transition: transform .18s ease;
}

.variant-card[open] .summary-chevron {
    transform: rotate(180deg);
}

.stop-timeline {
    margin: 0;
    padding: 0 20px 20px 42px;
    list-style: none;
}

.stop-timeline li {
    position: relative;
    min-height: 52px;
    padding: 3px 0 15px 22px;
    border-left: 2px solid var(--soft-2);
}

.stop-timeline li:last-child {
    border-left-color: transparent;
}

.timeline-marker {
    position: absolute;
    left: -7px;
    top: 4px;
    width: 12px;
    height: 12px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 1px rgba(214,40,57,.35);
}

.stop-timeline a {
    display: inline-grid;
}

.stop-timeline a:hover strong {
    color: var(--primary);
}

.stop-timeline small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.stop-symbol {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 4px solid var(--primary);
    border-radius: 50%;
    color: var(--primary);
    background: #fff;
    font-size: 25px;
    font-weight: 950;
}

.stop-title h1 {
    margin-bottom: 4px;
}

.stop-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 12px;
}

.stop-meta span {
    padding: 5px 8px;
    border-radius: 7px;
    background: var(--soft);
}

.line-chips {
    margin-top: 22px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.line-chip {
    min-width: 40px;
    height: 40px;
    padding-inline: 10px;
    border-radius: 10px;
    font-size: 15px;
}

.departures-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(16, 42, 86, .05);
}

.departure-head,
.departure-row {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) minmax(190px, 230px);
    gap: 14px;
    align-items: center;
}

.departure-head {
    padding: 11px 18px;
    color: var(--muted);
    background: var(--soft);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.departure-row {
    padding: 14px 18px;
    border-top: 1px solid var(--line);
}

.departure-row:hover {
    background: #fbfbfc;
}

.departure-line {
    min-width: 44px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    font-size: 16px;
}

.departure-destination,
.departure-time {
    display: grid;
}

.departure-destination small,
.departure-time small {
    color: var(--muted);
    font-size: 11px;
}

.departure-time {
    width: 100%;
    min-width: 0;
    justify-items: end;
}

.departure-head > :last-child {
    text-align: right;
}

.departure-time strong {
    font-size: 21px;
}

.departure-time small.is-soon {
    color: #bd5c21;
    font-weight: 800;
}

.current-clock {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    font-size: 13px;
}

.data-note {
    margin: 16px 4px 0;
    color: var(--muted);
    font-size: 12px;
}

.search-box-page {
    max-width: 100%;
}

.search-summary {
    margin-bottom: 30px;
    color: var(--muted);
}

.result-section + .result-section {
    margin-top: 48px;
}

.lines-grid-compact {
    grid-template-columns: repeat(2, 1fr);
}

.stop-results {
    display: grid;
    gap: 8px;
}

.stop-result {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.stop-result:hover {
    border-color: rgba(16,42,86,.28);
}

.stop-result-dot {
    width: 12px;
    height: 12px;
    border: 3px solid var(--accent-soft);
    border-radius: 50%;
    background: var(--accent);
}

.stop-result strong,
.stop-result small {
    display: block;
}

.stop-result small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.empty-state {
    padding: 28px;
    border: 1px dashed #cbd3df;
    border-radius: 18px;
    color: var(--muted);
    background: var(--soft);
    text-align: center;
}

.not-found {
    padding: 70px 0;
    text-align: center;
}

.not-found-code {
    color: var(--accent);
    font-size: 72px;
    font-weight: 950;
    letter-spacing: -.06em;
}

.not-found h1 {
    margin: 0 0 8px;
}

.not-found p {
    margin: 0 auto 24px;
    max-width: 520px;
    color: var(--muted);
}

.button-primary {
    display: inline-block;
}

.site-footer {
    padding: 34px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    background: #fbfbfc;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-inner strong {
    color: var(--ink);
}

.footer-inner p {
    margin: 4px 0 0;
    font-size: 12px;
}

.footer-meta {
    display: flex;
    gap: 18px;
    font-size: 12px;
}

.footer-meta a {
    color: var(--primary);
    font-weight: 800;
}

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .hero-panel {
        max-width: 520px;
    }

    .lines-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 640px) {
    .container {
        width: min(calc(100% - 24px), var(--max));
    }

    .header-inner {
        min-height: 62px;
    }

    .brand-copy strong {
        font-size: 13px;
    }

    .main-nav {
        display: none;
    }

    .mobile-nav {
        display: block;
        flex: 0 0 auto;
    }

    .mobile-nav > summary {
        min-height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 9px 13px;
        border: 1px solid #d7e0e8;
        border-radius: 12px;
        color: #22314a;
        background: #fff;
        box-shadow: 0 6px 18px rgba(16, 42, 86, .08);
        cursor: pointer;
        font-size: 14px;
        font-weight: 800;
        user-select: none;
    }

    .mobile-nav[open] > summary {
        color: var(--primary);
        border-color: rgba(16, 42, 86, .26);
        background: #f7f9fc;
    }

    .mobile-nav-icon {
        font-size: 18px;
        line-height: 1;
    }

    .mobile-nav-panel {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        z-index: 80;
        width: min(280px, calc(100vw - 24px));
        padding: 8px;
        border: 1px solid #dce5eb;
        border-radius: 15px;
        background: #fff;
        box-shadow: 0 18px 45px rgba(16, 42, 86, .18);
    }

    .mobile-nav-panel a {
        display: block;
        padding: 12px 13px;
        border-radius: 10px;
        color: #34425a;
        font-size: 14px;
        font-weight: 750;
    }

    .mobile-nav-panel a:hover,
    .mobile-nav-panel a:focus-visible {
        color: var(--primary);
        background: #f4f7fb;
    }

    .mobile-nav-panel .nav-feedback-link {
        margin-top: 4px;
        border-top: 1px solid #edf1f4;
        color: var(--primary);
    }

    .hero {
        padding: 52px 0 58px;
    }

    .hero h1 {
        font-size: 48px;
    }

    .search-box {
        grid-template-columns: auto 1fr;
        padding: 13px 14px;
    }

    .search-box button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .section {
        padding: 50px 0;
    }

    .section-heading {
        align-items: center;
    }

    .lines-grid,
    .lines-grid-compact {
        grid-template-columns: 1fr;
    }

    .line-card {
        min-height: 76px;
    }

    .line-title-row,
    .stop-title {
        align-items: flex-start;
    }

    .line-badge-large {
        min-width: 68px;
        height: 68px;
        border-radius: 18px;
        font-size: 28px;
    }

    .page-hero h1 {
        font-size: 36px;
    }

    .departure-head {
        display: none;
    }

    .departure-row {
        grid-template-columns: 50px minmax(0, 1fr) minmax(112px, 132px);
        gap: 10px;
        padding: 13px;
    }

    .departure-line {
        width: 42px;
        height: 42px;
    }

    .departure-destination small {
        display: none;
    }

    .departure-time strong {
        font-size: 18px;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* ==========================================================================
   v0.6.0 — linia -> kierunek -> przystanek -> rozkład
   ========================================================================== */

.section-tight {
    padding: 44px 0;
}

.feature-step,
.flow-step-number {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--primary);
    background: var(--accent-soft);
    font-size: 18px;
    font-weight: 950;
}

.flow-step {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.flow-step-number {
    flex: 0 0 auto;
    border-radius: 50%;
    color: #fff;
    background: var(--primary);
}

.flow-step h2 {
    margin: 3px 0 0;
    font-size: clamp(25px, 4vw, 32px);
    letter-spacing: -.03em;
}

.direction-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.direction-tab {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.direction-tab:hover {
    border-color: rgba(16, 42, 86, .35);
}

.direction-tab.is-active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 42, 86, .08);
}

.direction-tab-arrow {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--primary);
    background: var(--accent-soft);
    font-size: 20px;
    font-weight: 900;
}

.direction-tab small,
.direction-tab strong,
.direction-tab em {
    display: block;
}

.direction-tab small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.direction-tab strong {
    margin-top: 2px;
}

.direction-tab em {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    font-style: normal;
}

.variant-switcher {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 18px;
    padding-bottom: 4px;
}

.variant-pill {
    min-width: 165px;
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.variant-pill strong,
.variant-pill small {
    display: block;
    white-space: nowrap;
}

.variant-pill strong {
    font-size: 12px;
}

.variant-pill small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

.variant-pill.is-active {
    color: #fff;
    border-color: var(--primary);
    background: var(--primary);
}

.variant-pill.is-active small {
    color: rgba(255, 255, 255, .74);
}

.route-summary-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin-bottom: 20px;
    padding: 18px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(120deg, var(--primary-dark), var(--primary));
}

.route-summary-card span,
.route-summary-card strong,
.route-summary-card small {
    display: block;
}

.route-summary-card span,
.route-summary-card small {
    color: rgba(255, 255, 255, .7);
    font-size: 10px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.route-summary-arrow {
    color: var(--accent-soft) !important;
    font-size: 22px !important;
}

.route-summary-count {
    min-width: 74px;
    text-align: right;
    font-size: 22px;
    font-weight: 900;
}

.stop-timeline-selectable {
    padding-left: 28px;
}

.stop-timeline-selectable li {
    min-height: 64px;
    padding: 0 0 10px 22px;
}

.stop-timeline-selectable .timeline-marker {
    top: 20px;
}

.timetable-stop-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px 13px;
    border: 1px solid transparent;
    border-radius: 12px;
}

.timetable-stop-link:hover {
    border-color: var(--line);
    background: #fff;
    box-shadow: 0 8px 20px rgba(16, 42, 86, .05);
}

.stop-order {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: var(--primary);
    background: var(--accent-soft);
    font-size: 11px;
    font-weight: 900;
}

.stop-link-copy strong,
.stop-link-copy small {
    display: block;
}

.stop-link-copy small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.stop-link-action {
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.timetable-hero {
    background:
        radial-gradient(circle at 85% 10%, rgba(214, 40, 57, .12), transparent 24%),
        linear-gradient(180deg, #f6f7fa 0%, #fff 100%);
}

.timetable-heading {
    display: flex;
    align-items: center;
    gap: 22px;
}

.line-badge-timetable {
    min-width: 80px;
    height: 80px;
    font-size: 32px;
}

.direction-line {
    margin: 0 !important;
}

.direction-line span {
    margin-right: 6px;
    color: var(--muted);
}

.direction-line strong {
    color: var(--primary);
}

.timetable-quick-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 20px;
    font-size: 12px;
    font-weight: 800;
}

.timetable-quick-links a {
    color: var(--primary);
}

.date-toolbar {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    gap: 14px;
    align-items: center;
    max-width: 540px;
    margin-inline: auto;
}

.date-arrow {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--primary);
    background: #fff;
    font-size: 22px;
    font-weight: 900;
}

.date-arrow:hover {
    border-color: var(--primary);
}

.date-current {
    text-align: center;
}

.date-current small,
.date-current strong {
    display: block;
}

.date-current small {
    color: var(--primary);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.date-current strong {
    margin-top: 2px;
    font-size: 21px;
}

.date-secondary-actions {
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 22px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.date-today-link {
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.date-picker-form {
    display: flex;
    align-items: end;
    gap: 8px;
}

.date-picker-form label {
    display: grid;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.date-picker-form input {
    min-height: 38px;
    margin-top: 4px;
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--ink);
    background: #fff;
}

.date-picker-form button {
    min-height: 38px;
    padding: 6px 12px;
    border: 0;
    border-radius: 9px;
    color: #fff;
    background: var(--primary);
    font-weight: 800;
    cursor: pointer;
}

.timetable-section-heading {
    align-items: center;
}

.classic-timetable {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(16, 42, 86, .05);
}

.hour-row {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    min-height: 68px;
    border-top: 1px solid var(--line);
}

.hour-row:first-child {
    border-top: 0;
}

.hour-label {
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--primary);
    font-size: 25px;
    font-weight: 950;
    font-variant-numeric: tabular-nums;
}

.minute-list {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    padding: 12px 16px;
}

.minute-chip {
    position: relative;
    min-width: 42px;
    padding: 6px 8px;
    border-radius: 9px;
    color: var(--ink);
    background: var(--soft);
    text-align: center;
    font-size: 18px;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
}

.minute-chip sup {
    margin-left: 1px;
    color: var(--primary);
    font-size: 9px;
}

.minute-chip em {
    position: absolute;
    right: 2px;
    bottom: -1px;
    color: var(--muted);
    font-size: 8px;
    font-style: normal;
}

.timetable-legend {
    display: flex;
    gap: 10px 16px;
    flex-wrap: wrap;
    margin-top: 15px;
    padding: 14px 16px;
    border-radius: 13px;
    color: var(--muted);
    background: #fff;
    font-size: 11px;
}

.timetable-legend > strong {
    width: 100%;
    color: var(--ink);
}

.timetable-legend b {
    display: inline-grid;
    min-width: 18px;
    height: 18px;
    margin-right: 4px;
    place-items: center;
    border-radius: 5px;
    color: #fff;
    background: var(--primary);
}

.service-day-note {
    margin: 15px 3px 0;
    padding: 11px 14px;
    border-left: 3px solid #f4a261;
    color: var(--muted);
    background: #fff8f2;
    font-size: 11px;
}

.timetable-empty {
    display: grid;
    gap: 4px;
}

.neighbor-stops {
    display: grid;
    grid-template-columns: 1fr 1.15fr 1fr;
    gap: 10px;
}

.neighbor-stop,
.neighbor-current {
    min-height: 88px;
    display: grid;
    align-content: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.neighbor-stop:hover {
    border-color: var(--primary);
}

.neighbor-stop small,
.neighbor-current small {
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
}

.neighbor-stop strong,
.neighbor-current strong {
    margin-top: 3px;
    font-size: 13px;
}

.neighbor-current {
    color: #fff;
    border-color: var(--primary);
    background: var(--primary);
    text-align: center;
}

.neighbor-current small {
    color: rgba(255, 255, 255, .72);
}

.neighbor-stop.is-next {
    text-align: right;
}

.neighbor-stop.is-disabled {
    color: #9aa9ad;
    background: var(--soft);
}

.remaining-route {
    overflow: hidden;
    margin-top: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.remaining-route summary {
    display: flex;
    justify-content: space-between;
    padding: 14px 16px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    list-style: none;
}

.remaining-route summary::-webkit-details-marker {
    display: none;
}

.mini-route-list {
    margin: 0;
    padding: 0 16px 16px 33px;
    list-style: none;
}

.mini-route-list li {
    position: relative;
    min-height: 35px;
    padding: 4px 0 8px 17px;
    border-left: 2px solid var(--soft-2);
    font-size: 12px;
}

.mini-route-list li:last-child {
    border-left-color: transparent;
}

.mini-route-list li > span {
    position: absolute;
    left: -6px;
    top: 8px;
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 1px rgba(214, 40, 57, .30);
}

.mini-route-list li.is-current {
    color: var(--primary);
    font-weight: 900;
}

@media (max-width: 640px) {
    .section-tight {
        padding: 34px 0;
    }

    .direction-tabs {
        grid-template-columns: 1fr;
    }

    .route-summary-card {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    }

    .route-summary-count {
        grid-column: 1 / -1;
        text-align: left;
    }

    .timetable-stop-link {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .stop-link-action {
        grid-column: 2;
    }

    .timetable-heading {
        align-items: flex-start;
    }

    .date-secondary-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .date-picker-form {
        justify-content: center;
    }

    .hour-row {
        grid-template-columns: 58px minmax(0, 1fr);
    }

    .hour-label {
        font-size: 21px;
    }

    .minute-list {
        padding: 10px;
    }

    .minute-chip {
        min-width: 39px;
        padding: 5px 7px;
        font-size: 17px;
    }

    .neighbor-stops {
        grid-template-columns: 1fr;
    }

    .neighbor-stop.is-next {
        text-align: left;
    }
}


/* ==========================================================================
   v0.6.1 — dopracowanie rozkładu
   ========================================================================== */

/* Stary selektor .stop-timeline a był bardziej szczegółowy i zwężał hover. */
.stop-timeline .timetable-stop-link {
    display: grid;
    width: 100%;
}

.stop-travel-time {
    min-width: 42px;
    padding: 5px 6px;
    border-radius: 8px;
    color: var(--primary);
    background: var(--accent-soft);
    text-align: center;
    font-size: 11px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.timeline-marker.is-request-stop,
.legend-marker.is-request-stop,
.mini-route-marker.is-request-stop {
    border-color: var(--primary);
    background: #fff;
}

.route-list-legend {
    display: flex;
    gap: 10px 18px;
    flex-wrap: wrap;
    margin: 0 0 14px 28px;
    color: var(--muted);
    font-size: 10px;
}

.route-list-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-marker {
    width: 11px;
    height: 11px;
    display: inline-block;
    border: 2px solid var(--accent);
    border-radius: 50%;
    background: var(--accent);
}

.schedule-type {
    display: inline-block !important;
    margin-top: 7px;
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--primary);
    background: var(--accent-soft);
    font-size: 10px !important;
    font-weight: 950 !important;
    letter-spacing: .05em;
}

.date-arrow.is-disabled {
    opacity: .3;
    cursor: not-allowed;
}

.date-range-note {
    margin: 12px 0 0;
    color: var(--muted);
    text-align: center;
    font-size: 10px;
}

.timetable-layout-switcher {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin: -5px 0 18px;
}

.timetable-layout-switcher a {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--muted);
    background: #fff;
    font-size: 11px;
    font-weight: 850;
}

.timetable-layout-switcher a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.timetable-layout-switcher a.is-active {
    color: #fff;
    border-color: var(--primary);
    background: var(--primary);
}

/* Wyraźniejsze oznaczenia wariantów kursów. */
.course-marker,
.official-course-marker {
    min-width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    margin-left: 3px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 950;
    line-height: 1;
    vertical-align: middle;
}

.course-marker {
    color: #fff;
    background: var(--primary);
}

.official-course-marker {
    color: #7f4c00;
    border: 1px solid #efbd59;
    background: #fff2bd;
}

.minute-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 38px;
}

.minute-chip.is-next-departure,
.column-minute.is-next-departure,
.full-time-item.is-next-departure {
    color: #4d3900;
    background: #fff2a8;
    box-shadow: inset 0 0 0 2px #e6bd28;
}

.hour-row.has-next-departure .hour-label {
    color: #4d3900;
    background: #f4cf45;
}

.next-label {
    display: inline-block;
    margin-left: 3px;
    color: #735600;
    font-size: 8px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* Widok: pełna lista godzin, zbliżony do klasycznej listy MZDiK. */
.full-time-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.full-time-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 3px 10px;
    align-items: center;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.full-time-clock {
    grid-row: 1 / span 2;
    color: var(--primary);
    font-size: 20px;
    font-variant-numeric: tabular-nums;
}

.full-time-destination {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.full-time-markers {
    min-height: 22px;
}

/* Widok: pionowe kolumny godzin. */
.departure-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
    gap: 9px;
    align-items: start;
}

.departure-column {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
}

.departure-column > header {
    padding: 8px;
    color: #fff;
    background: var(--primary);
    text-align: center;
    font-size: 18px;
    font-weight: 950;
}

.departure-column > div {
    display: grid;
    gap: 5px;
    padding: 8px;
}

.column-minute {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border-radius: 8px;
    background: var(--soft);
    font-variant-numeric: tabular-nums;
}

.column-minute > strong {
    font-size: 16px;
}

/* Dalszy przebieg z czasami od wybranego przystanku. */
.mini-route-list li {
    padding-right: 4px;
}

.mini-route-list li > .mini-route-marker {
    position: absolute;
    left: -6px;
    top: 8px;
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 1px rgba(214, 40, 57, .30);
}

.mini-route-list li > a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.mini-route-list li > a small {
    color: var(--muted);
    font-weight: 850;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .full-time-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .route-list-legend {
        margin-left: 0;
    }

    .full-time-list {
        grid-template-columns: 1fr;
    }

    .timetable-layout-switcher {
        display: grid;
        grid-template-columns: 1fr;
    }

    .timetable-layout-switcher a {
        text-align: center;
    }
}


/* ==========================================================================
   v0.6.2 — czytelność, zespoły przystankowe, kalendarz
   ========================================================================== */

.brand-mark {
    background:
        linear-gradient(135deg, var(--primary), var(--accent));
}

.line-number,
.departure-line,
.line-chip {
    background: var(--primary);
    box-shadow: inset 0 -3px 0 rgba(214, 40, 57, .28);
}

.eyebrow,
.panel-kicker,
.text-link,
.line-arrow {
    color: var(--accent);
}

.search-box button,
.button-primary {
    background: var(--accent);
}

.search-box button:hover,
.button-primary:hover {
    background: var(--accent-dark);
}

.direction-tab.is-active,
.timetable-layout-switcher a.is-active {
    border-color: var(--primary);
    background: var(--primary);
}

.direction-tab.is-active {
    color: #fff;
}

.direction-tab.is-active small,
.direction-tab.is-active em {
    color: rgba(255, 255, 255, .72);
}

.direction-tab.is-active .direction-tab-arrow {
    color: var(--primary);
    background: var(--yellow);
}

.schedule-type {
    color: #fff;
    background: var(--accent);
}

.feature-step {
    color: var(--primary);
    background: var(--yellow-soft);
}

/* Ostatni przystanek nie jest linkiem do rozkładu. */
.stop-timeline li.is-final-stop {
    border-left-color: transparent;
}

.final-stop-row {
    cursor: default;
    color: var(--muted);
    background: rgba(16, 42, 86, .035);
    border-color: var(--line) !important;
    box-shadow: none !important;
}

.final-stop-row .stop-link-action {
    color: var(--muted);
}

.final-stop-row .stop-travel-time {
    color: #fff;
    background: var(--accent);
}

/* Nowocześniejsza obudowa pola daty.
   Sam popup kalendarza jest kontrolowany przez przeglądarkę/OS. */
.date-picker-form {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(16, 42, 86, .06);
}

.date-input-shell {
    min-width: 190px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    padding: 0 10px;
    border: 1px solid #bfc9d8;
    border-radius: 10px;
    background: var(--soft);
}

.date-input-shell:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 42, 86, .10);
}

.date-input-icon {
    color: var(--accent);
    font-size: 16px;
}

.date-picker-form .date-input-shell input[type="date"] {
    width: 100%;
    min-height: 42px;
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    color: var(--primary);
    background: transparent;
    font-weight: 800;
}

.date-picker-form button {
    background: var(--primary);
}

.date-picker-form button:hover {
    background: var(--primary-dark);
}

.date-range-note {
    margin-top: 14px;
}

/* Godziny po północy pokazujemy jako zwykły zegar 00/01/02. */
.hour-label {
    align-content: center;
}

.hour-label strong,
.hour-label small {
    display: block;
    text-align: center;
}

.hour-label small,
.departure-column > header small {
    margin-top: 1px;
    color: rgba(255, 255, 255, .72);
    font-size: 8px;
    font-weight: 800;
}

.departure-column > header strong {
    display: block;
}

/* Żółte tło = najbliższy planowy odjazd, bez tekstu w każdej komórce. */
.minute-chip.is-next-departure,
.column-minute.is-next-departure,
.full-time-item.is-next-departure {
    color: #3d3100;
    background: var(--yellow-soft);
    box-shadow: inset 0 0 0 2px var(--yellow);
}

.hour-row.has-next-departure .hour-label {
    color: var(--primary-dark);
    background: var(--yellow);
}

.hour-row.has-next-departure .hour-label small {
    color: rgba(9, 26, 56, .70);
}

.nearest-departure-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 13px;
    color: var(--muted);
    font-size: 11px;
}

.nearest-swatch {
    width: 24px;
    height: 16px;
    display: inline-block;
    border: 2px solid var(--yellow);
    border-radius: 5px;
    background: var(--yellow-soft);
}

/* Czytelne oznaczenia literowe. */
.course-marker {
    color: #fff;
    background: var(--accent);
}

.official-course-marker {
    color: var(--primary-dark);
    border-color: #d6ae18;
    background: var(--yellow-soft);
}

/* Lista odjazdów: godzina u góry, kierunek pod spodem tylko gdy się różni. */
.full-time-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.full-time-item {
    display: flex;
    min-height: 94px;
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
}

.full-time-clock {
    color: var(--primary);
    font-size: 25px;
    font-weight: 950;
}

.full-time-destination {
    overflow: visible;
    color: var(--muted);
    font-size: 11px;
    white-space: normal;
}

.full-time-destination b {
    color: var(--ink);
}

.full-time-markers {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: auto;
}

.next-day-note {
    color: var(--accent);
    font-size: 9px;
    font-weight: 850;
}

.timetable-validity {
    margin: 18px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    text-align: center;
    font-size: 11px;
}

.timetable-validity strong {
    color: var(--ink);
}

/* Zespoły przystankowe w wyszukiwarce. */
.stop-group-results {
    display: grid;
    gap: 12px;
}

.stop-group-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(16, 42, 86, .04);
}

.stop-group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--soft);
}

.stop-group-header strong,
.stop-group-header small {
    display: block;
}

.stop-group-header small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

.stop-group-marker {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    border: 3px solid var(--accent);
    border-radius: 50%;
    background: var(--accent);
}

.stop-group-marker.is-request-stop {
    background: #fff;
}

.stop-group-members {
    display: grid;
}

.stop-group-member {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
}

.stop-group-member:first-child {
    border-top: 0;
}

.stop-group-member:hover {
    background: #fff9e2;
}

.member-code {
    min-width: 42px;
    padding: 6px 8px;
    border-radius: 8px;
    color: #fff;
    background: var(--primary);
    text-align: center;
    font-size: 11px;
    font-weight: 900;
}

.member-copy {
    min-width: 0;
}

.member-copy strong,
.member-copy small {
    display: block;
}

.member-copy strong {
    font-size: 11px;
    line-height: 1.45;
}

.member-copy small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
}

@media (max-width: 760px) {
    .full-time-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .date-picker-form {
        width: 100%;
    }

    .date-input-shell {
        min-width: 0;
        width: 100%;
    }

    .full-time-list {
        grid-template-columns: 1fr;
    }

    .stop-group-member {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .stop-group-member .line-arrow {
        display: none;
    }
}


/* ==========================================================================
   v0.7.0 — globalny feedback
   ========================================================================== */

.nav-feedback-link {
    color: var(--accent) !important;
}

.feedback-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 80;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px 10px 10px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    color: #fff;
    background: var(--accent);
    box-shadow: 0 14px 34px rgba(16, 42, 86, .22);
    font-size: 11px;
    font-weight: 850;
    transition:
        transform .15s ease,
        background .15s ease;
}

.feedback-fab:hover {
    transform: translateY(-2px);
    background: var(--accent-dark);
}

.feedback-fab > span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--accent);
    background: #fff;
    font-size: 17px;
    font-weight: 950;
}

.feedback-hero {
    background:
        radial-gradient(
            circle at 85% 20%,
            rgba(244, 196, 48, .22),
            transparent 26%
        ),
        linear-gradient(
            180deg,
            #f7f8fb 0%,
            #fff 100%
        );
}

.feedback-alert {
    display: grid;
    gap: 3px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 12px;
}

.feedback-alert-error {
    color: #7d1d29;
    border: 1px solid #efb2ba;
    background: #fff0f2;
}

.feedback-context-card {
    display: grid;
    gap: 3px;
    margin-bottom: 18px;
    padding: 13px 16px;
    border-left: 4px solid var(--yellow);
    border-radius: 11px;
    background: var(--soft);
}

.feedback-context-card span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.feedback-context-card strong {
    overflow-wrap: anywhere;
    font-size: 12px;
}

.feedback-form {
    display: grid;
    gap: 22px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(16, 42, 86, .06);
}

.feedback-fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

.feedback-fieldset legend,
.feedback-field > span {
    display: block;
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 900;
}

.feedback-field > span b {
    color: var(--accent);
}

.feedback-field > span small {
    color: var(--muted);
    font-weight: 650;
}

.feedback-type-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.feedback-type-option {
    position: relative;
    cursor: pointer;
}

.feedback-type-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.feedback-type-option > span {
    min-height: 76px;
    display: grid;
    align-content: center;
    gap: 3px;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--soft);
}

.feedback-type-option strong,
.feedback-type-option small {
    display: block;
}

.feedback-type-option small {
    color: var(--muted);
    font-size: 9px;
    line-height: 1.35;
}

.feedback-type-option input:checked + span {
    color: #fff;
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 42, 86, .09);
}

.feedback-type-option input:checked + span small {
    color: rgba(255, 255, 255, .72);
}

.feedback-field textarea,
.feedback-field input[type="text"] {
    width: 100%;
    border: 1px solid #bfc9d8;
    border-radius: 12px;
    outline: 0;
    color: var(--ink);
    background: #fff;
    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}

.feedback-field textarea {
    resize: vertical;
    min-height: 180px;
    padding: 14px;
    line-height: 1.55;
}

.feedback-field input[type="text"] {
    min-height: 46px;
    padding: 0 13px;
}

.feedback-field textarea:focus,
.feedback-field input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 42, 86, .09);
}

.feedback-security-note {
    padding: 12px 14px;
    border: 1px solid #ead99b;
    border-radius: 11px;
    background: #fff9df;
}

.feedback-security-note strong {
    font-size: 11px;
}

.feedback-security-note p {
    margin: 3px 0 0;
    color: #74652d;
    font-size: 9px;
    line-height: 1.5;
}

.feedback-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.button-secondary {
    display: inline-block;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: var(--primary);
    background: #fff;
    font-size: 12px;
    font-weight: 850;
}

.button-secondary:hover {
    border-color: var(--primary);
}

.feedback-submit {
    padding-inline: 24px;
}

.feedback-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.feedback-success-card {
    max-width: 640px;
    margin: 40px auto;
    padding: 42px 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(16, 42, 86, .08);
    text-align: center;
}

.feedback-success-icon {
    width: 64px;
    height: 64px;
    display: grid;
    margin: 0 auto 16px;
    place-items: center;
    border-radius: 50%;
    color: var(--primary-dark);
    background: var(--yellow);
    font-size: 30px;
    font-weight: 950;
}

.feedback-success-card h1 {
    margin: 5px 0 10px;
}

.feedback-success-card p {
    color: var(--muted);
}

.feedback-duplicate-note {
    margin: 16px auto;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--soft);
    font-size: 11px;
}

@media (max-width: 760px) {
    .feedback-type-grid {
        grid-template-columns: 1fr;
    }

    .feedback-fab strong {
        display: none;
    }

    .feedback-fab {
        padding: 8px;
    }

    .feedback-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .feedback-actions a,
    .feedback-actions button {
        width: 100%;
        text-align: center;
    }
}

/* ==========================================================================
   v0.8.8 — kompaktowa lista odjazdów
   ========================================================================== */

.full-time-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
}

.full-time-item {
    min-height: 68px;
    padding: 9px 10px;
    gap: 3px;
}

.full-time-clock {
    font-size: 22px;
    line-height: 1.05;
}

.full-time-variant {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.35;
}

.full-time-variant .course-marker {
    flex: 0 0 auto;
    margin-top: 1px;
}

.full-time-variant strong {
    color: var(--ink);
}

.full-time-markers {
    min-height: 18px;
}

@media (max-width: 840px) {
    .full-time-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .full-time-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 440px) {
    .full-time-list {
        grid-template-columns: 1fr;
    }
}



/* ==========================================================================
   v0.9.0 — GTFS-Realtime / LIVE
   ========================================================================== */

.stop-live-strip {
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 40px;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--muted);
    background: var(--soft);
    font-size: 12px;
    font-weight: 700;
}

.live-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #9ca6b5;
    box-shadow: 0 0 0 4px rgba(156, 166, 181, .13);
}

.stop-live-strip.is-live,
.live-status-card.is-live {
    border-color: rgba(30, 144, 92, .28);
    color: #17693f;
    background: rgba(30, 144, 92, .07);
}

.stop-live-strip.is-live .live-dot,
.live-status-card.is-live .live-dot {
    background: #1e905c;
    box-shadow: 0 0 0 4px rgba(30, 144, 92, .14);
}

.stop-live-strip.is-stale,
.live-status-card.is-stale {
    border-color: rgba(184, 126, 0, .3);
    color: #7b5708;
    background: rgba(244, 196, 48, .13);
}

.stop-live-strip.is-stale .live-dot,
.live-status-card.is-stale .live-dot {
    background: #b87e00;
    box-shadow: 0 0 0 4px rgba(184, 126, 0, .13);
}

.stop-live-strip.is-error,
.live-status-card.is-error {
    border-color: rgba(191, 48, 48, .25);
    color: #8b2929;
    background: rgba(191, 48, 48, .06);
}

.stop-live-strip.is-error .live-dot,
.live-status-card.is-error .live-dot {
    background: #bf3030;
    box-shadow: 0 0 0 4px rgba(191, 48, 48, .12);
}

.departure-clock-row {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: baseline;
    justify-content: flex-end;
    gap: 6px;
    white-space: nowrap;
}

.departure-time [data-scheduled-time].is-replaced {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    text-decoration: line-through;
}

.departure-time .realtime-clock {
    color: #17693f;
    font-size: 21px;
    font-weight: 900;
}

.live-badge {
    padding: 3px 5px;
    border-radius: 5px;
    color: #fff;
    background: #1e905c;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .06em;
    line-height: 1;
}

.realtime-meta {
    width: 100%;
    min-width: 0;
    min-height: 13px;
    color: #17693f !important;
    font-weight: 700;
    line-height: 1.25;
    text-align: right;
    white-space: normal;
    overflow-wrap: anywhere;
}

.live-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(270px, 360px);
    gap: 30px;
    align-items: end;
}

.live-hero p {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.live-status-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.live-status-card > div {
    display: grid;
    gap: 3px;
}

.live-status-card small {
    color: inherit;
    opacity: .78;
}

.live-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 34px;
}

.live-summary-grid .stat-card {
    min-height: 112px;
}

.live-summary-grid .stat-card strong {
    font-size: 30px;
}

.live-section-heading {
    margin-top: 4px;
}

.live-table-shell {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(16, 42, 86, .05);
}

.live-table {
    width: 100%;
    min-width: 850px;
    border-collapse: collapse;
}

.live-table th,
.live-table td {
    padding: 11px 13px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
    font-size: 12px;
}

.live-table th {
    color: var(--muted);
    background: var(--soft);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.live-table tbody tr:last-child td {
    border-bottom: 0;
}

.live-table tbody tr:hover td {
    background: #fbfbfc;
}

.live-loading {
    padding: 28px !important;
    color: var(--muted);
    text-align: center !important;
}

.live-route-badge {
    display: inline-grid;
    min-width: 34px;
    min-height: 30px;
    padding: 4px 7px;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: var(--primary);
    font-weight: 900;
}

.live-alert-heading {
    margin-top: 38px;
}

.live-alerts {
    display: grid;
    gap: 10px;
}

.live-alert-card {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.live-alert-card strong {
    display: block;
    margin-bottom: 6px;
}

.live-alert-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

@media (max-width: 840px) {
    .live-hero {
        grid-template-columns: 1fr;
    }

    .live-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .live-summary-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .departure-clock-row {
        flex-wrap: wrap;
    }
}


.departure-row.is-realtime-canceled {
    background: rgba(191, 48, 48, .055);
}

.departure-row.is-realtime-canceled .departure-time,
.departure-row.is-realtime-canceled .realtime-meta {
    color: #a02828 !important;
}

.departure-row.is-realtime-canceled [data-scheduled-time] {
    text-decoration: line-through;
}

.departure-row.is-realtime-skipped {
    background: rgba(184, 126, 0, .06);
}

.departure-row.is-realtime-skipped .realtime-meta {
    color: #7b5708 !important;
}


/* ==========================================================================
   v0.9.3 — mapa LIVE, personalizacja, katalog linii i service day
   ========================================================================== */

.route-count-note {
    margin: -4px 0 15px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.line-number-stack,
.line-badge-stack {
    display: inline-grid;
    justify-items: center;
    gap: 5px;
}

.line-number-stack small,
.line-badge-stack small {
    color: var(--muted);
    font-size: 8px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: .06em;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
}

.line-badge-stack small {
    max-width: 110px;
    font-size: 9px;
}

.line-card.is-suspended {
    border-color: #d4d8df;
    background: #f3f4f6;
}

.line-card.is-suspended:hover {
    border-color: #b9bec8;
    box-shadow: 0 10px 24px rgba(31, 42, 56, .06);
}

.line-card.is-suspended .line-number {
    color: #fff;
    background: #7b8492;
}

.line-card.is-suspended .line-arrow {
    color: #8d95a0;
}

.line-card.is-suspended .line-card-copy strong {
    color: #5f6772;
}

.line-card.is-suspended .line-card-copy small {
    color: #7d8490;
    white-space: normal;
    line-height: 1.35;
}

.line-badge-large.is-suspended {
    background: linear-gradient(135deg, #717a88, #9ba2ad);
    box-shadow: 0 14px 34px rgba(50, 58, 70, .15);
}

.line-suspended-message {
    padding: 26px;
    border: 1px solid #d6dae0;
    border-radius: var(--radius);
    background: #f4f5f7;
}

.line-suspended-message strong {
    display: block;
    margin-bottom: 8px;
    color: #555e6b;
    font-size: 20px;
}

.line-suspended-message p {
    margin: 0 0 18px;
    color: #6f7782;
    line-height: 1.6;
}

.favorite-toggle {
    display: inline-flex;
    align-items: center;
    margin: 12px 0 0;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--primary);
    background: #fff;
    font: inherit;
    font-size: 11px;
    font-weight: 850;
    cursor: pointer;
    transition:
        border-color .15s ease,
        background .15s ease,
        transform .15s ease;
}

.favorite-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(16, 42, 86, .28);
}

.favorite-toggle.is-favorite {
    border-color: rgba(202, 149, 0, .35);
    color: #795700;
    background: rgba(244, 196, 48, .14);
}

.line-live-map-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    color: #17693f;
    font-size: 11px;
    font-weight: 850;
}

.line-live-map-link:hover {
    text-decoration: underline;
}

.service-day-continuation-note {
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px solid rgba(16, 42, 86, .12);
    border-radius: 12px;
    color: #42516a;
    background: rgba(16, 42, 86, .045);
    font-size: 12px;
    line-height: 1.5;
}

.service-day-continuation-note strong {
    color: var(--primary);
}

.realtime-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
    margin: 0 0 12px;
}

.realtime-toolbar .stop-live-strip,
.realtime-toolbar .timetable-live-strip {
    margin: 0;
}

.timetable-live-strip {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 40px;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--muted);
    background: var(--soft);
    font-size: 12px;
    font-weight: 700;
}

.timetable-live-strip.is-live {
    border-color: rgba(30, 144, 92, .28);
    color: #17693f;
    background: rgba(30, 144, 92, .07);
}

.timetable-live-strip.is-live .live-dot {
    background: #1e905c;
    box-shadow: 0 0 0 4px rgba(30, 144, 92, .14);
}

.timetable-live-strip.is-stale {
    border-color: rgba(184, 126, 0, .3);
    color: #7b5708;
    background: rgba(244, 196, 48, .13);
}

.timetable-live-strip.is-stale .live-dot {
    background: #b87e00;
}

.timetable-live-strip.is-error {
    border-color: rgba(191, 48, 48, .25);
    color: #8b2929;
    background: rgba(191, 48, 48, .06);
}

.timetable-live-strip.is-error .live-dot {
    background: #bf3030;
}

.stop-live-strip.is-disabled,
.timetable-live-strip.is-disabled {
    border-color: #d9dde3;
    color: #78818e;
    background: #f5f6f8;
}

.stop-live-strip.is-disabled .live-dot,
.timetable-live-strip.is-disabled .live-dot {
    background: #9da5af;
    box-shadow: none;
}

.realtime-toggle {
    min-width: 148px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--primary);
    background: #fff;
    font-size: 11px;
    font-weight: 850;
    cursor: pointer;
    user-select: none;
}

.realtime-toggle input {
    width: 16px;
    height: 16px;
    accent-color: #1e905c;
}

.timetable-realtime-slot {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    border-radius: 6px;
    color: #17693f;
    font-size: 9px;
    font-weight: 900;
    line-height: 1.2;
    white-space: normal;
}

.timetable-realtime-slot[hidden] {
    display: none !important;
}

.full-time-item .timetable-realtime-slot {
    grid-column: 1 / -1;
    margin-top: -2px;
    font-size: 10px;
}

.minute-chip .timetable-realtime-slot,
.column-minute .timetable-realtime-slot {
    margin-left: 3px;
    font-size: 8px;
}

.minute-chip.is-live-departure,
.column-minute.is-live-departure {
    border-color: rgba(30, 144, 92, .32);
    box-shadow: inset 0 0 0 1px rgba(30, 144, 92, .08);
}

.full-time-item.is-live-departure {
    border-color: rgba(30, 144, 92, .26);
}

.full-time-item.is-realtime-canceled,
.minute-chip.is-realtime-canceled,
.column-minute.is-realtime-canceled {
    color: #9a2f2f;
    background: rgba(191, 48, 48, .08);
    text-decoration: line-through;
}

.full-time-item.is-realtime-skipped,
.minute-chip.is-realtime-skipped,
.column-minute.is-realtime-skipped {
    color: #7b5708;
    background: rgba(184, 126, 0, .08);
}

/* LIVE map */

.live-map-toolbar {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.live-map-toolbar label {
    min-width: 190px;
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.live-map-toolbar select {
    min-height: 40px;
    padding: 8px 34px 8px 11px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    background: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
}

.live-map-fit-button {
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--primary);
    background: #fff;
    font: inherit;
    font-size: 11px;
    font-weight: 850;
    cursor: pointer;
}

.live-map-fit-button:hover {
    border-color: rgba(16, 42, 86, .28);
    background: var(--soft);
}

.live-map-visible-count {
    margin-left: auto;
    padding: 7px 10px;
    border-radius: 999px;
    color: #17693f;
    background: rgba(30, 144, 92, .09);
    font-size: 11px;
    font-weight: 850;
}

.live-map-shell {
    height: min(62vh, 620px);
    min-height: 430px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #eef1f4;
    box-shadow: 0 14px 38px rgba(16, 42, 86, .07);
}

.live-map-placeholder {
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.live-map-note {
    margin-top: 9px;
}

.live-vehicle-list-heading {
    margin-top: 34px;
}

.vehicle-map-icon-container {
    border: 0 !important;
    background: transparent !important;
}

.vehicle-map-marker {
    position: relative;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 3px solid #fff;
    border-radius: 50%;
    color: #fff;
    background: var(--primary);
    box-shadow:
        0 4px 12px rgba(16, 42, 86, .28),
        0 0 0 1px rgba(16, 42, 86, .18);
}

.vehicle-map-marker strong {
    font-size: 13px;
    font-weight: 950;
    line-height: 1;
}

.vehicle-map-bearing {
    position: absolute;
    top: -9px;
    left: 15px;
    width: 12px;
    height: 12px;
    color: var(--accent);
    font-size: 12px;
    line-height: 12px;
    transform-origin: 50% 15px;
    text-shadow: 0 1px 2px #fff;
}

.vehicle-popup {
    min-width: 190px;
    display: grid;
    gap: 6px;
    color: var(--text);
    font-family: inherit;
}

.vehicle-popup-route {
    justify-self: start;
    padding: 4px 7px;
    border-radius: 6px;
    color: #fff !important;
    background: var(--primary);
    font-weight: 900;
}

.vehicle-popup > strong {
    font-size: 15px;
}

.vehicle-popup ul {
    display: grid;
    gap: 3px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: #596579;
    font-size: 11px;
}

.vehicle-popup-stop {
    font-size: 11px;
    font-weight: 800;
}

.live-table td.is-delay {
    color: #b42318;
    font-weight: 900;
}

.live-table td.is-early {
    color: #177245;
    font-weight: 900;
}

.live-table td.is-on-time {
    color: var(--text);
    font-weight: 750;
}

.vehicle-popup li.is-delay {
    color: #b42318;
    font-weight: 850;
}

.vehicle-popup li.is-early {
    color: #177245;
    font-weight: 850;
}

.vehicle-popup li.is-on-time {
    color: var(--text);
    font-weight: 750;
}

.live-table td a:not(.live-route-badge) {
    color: var(--primary);
    font-weight: 750;
}

.live-route-badge {
    text-decoration: none;
}

/* Ustawienia */

.settings-lead {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.settings-card {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 10px 30px rgba(16, 42, 86, .045);
}

.settings-card-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.settings-card-heading h2 {
    margin: 3px 0 0;
    font-size: 20px;
}

.settings-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--primary);
    background: var(--accent-soft);
    font-size: 18px;
    font-weight: 950;
}

.settings-field {
    display: grid;
    gap: 7px;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
}

.settings-field select {
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    background: #fff;
    font: inherit;
}

.settings-help {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.settings-switch {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    cursor: pointer;
}

.settings-switch > input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.settings-switch-ui {
    position: relative;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #cbd1d9;
    transition: background .15s ease;
}

.settings-switch-ui::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .18);
    transition: transform .15s ease;
}

.settings-switch > input:checked + .settings-switch-ui {
    background: #1e905c;
}

.settings-switch > input:checked + .settings-switch-ui::after {
    transform: translateX(18px);
}

.settings-switch strong,
.settings-switch small {
    display: block;
}

.settings-switch small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
}

.settings-favorites-card {
    margin-top: 14px;
}

.favorites-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.favorites-heading {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

.settings-text-button {
    padding: 0;
    border: 0;
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-size: 10px;
    font-weight: 750;
    cursor: pointer;
}

.settings-text-button:hover {
    color: var(--accent);
}

.favorites-list {
    display: grid;
    gap: 6px;
    padding-top: 8px;
}

.favorite-settings-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 9px;
    background: var(--soft);
}

.favorite-settings-item a {
    min-width: 0;
    overflow: hidden;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.favorite-settings-item button {
    padding: 4px 6px;
    border: 0;
    color: #8b2929;
    background: transparent;
    font: inherit;
    font-size: 9px;
    font-weight: 800;
    cursor: pointer;
}

.settings-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 14px;
    padding: 14px 0;
}

.settings-save-status {
    color: var(--muted);
    font-size: 11px;
}

.button-secondary {
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--primary);
    background: #fff;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 760px) {
    .settings-grid,
    .favorites-columns {
        grid-template-columns: 1fr;
    }

    .realtime-toolbar {
        grid-template-columns: 1fr;
    }

    .realtime-toggle {
        min-height: 40px;
    }

    .live-map-shell {
        height: 58vh;
        min-height: 360px;
        border-radius: 14px;
    }

    .live-map-visible-count {
        margin-left: 0;
    }
}

@media (max-width: 520px) {
    .line-number-stack small {
        font-size: 7px;
    }

    .settings-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .button-secondary {
        width: 100%;
    }

    .live-map-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .live-map-toolbar label,
    .live-map-fit-button {
        width: 100%;
    }
}


/* ==========================================================================
   v0.9.4 — mapy wariantów + pasażerska mapa sieci LIVE
   ========================================================================== */

.route-variant-switcher {
    align-items: stretch;
}

.route-variant-card {
    min-width: 0;
    display: grid;
    grid-template-rows: 1fr auto;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
}

.route-variant-card.is-active {
    border-color: rgba(16, 42, 86, .28);
    box-shadow: 0 8px 24px rgba(16, 42, 86, .07);
}

.route-variant-card .variant-pill {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.route-variant-card.is-active .variant-pill {
    background: var(--primary);
}

.route-map-toggle {
    min-height: 34px;
    padding: 7px 10px;
    border: 0;
    border-top: 1px solid var(--line);
    color: var(--primary);
    background: #fafbfc;
    font: inherit;
    font-size: 10px;
    font-weight: 850;
    cursor: pointer;
}

.route-map-toggle:hover {
    background: var(--accent-soft);
}

.route-map-panel {
    margin: 16px 0 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(16, 42, 86, .06);
}

.route-map-panel[hidden] {
    display: none !important;
}

.route-map-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
}

.route-map-panel-header > div:first-child {
    display: grid;
    gap: 3px;
}

.route-map-panel-header strong {
    color: var(--text);
    font-size: 13px;
}

.route-map-panel-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.route-map-main-toggle,
.route-map-live-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}

.route-map-main-toggle input,
.route-map-live-toggle input {
    width: 15px;
    height: 15px;
    accent-color: var(--primary);
}

.route-map-main-toggle[hidden] {
    display: none !important;
}

.route-map-full-link {
    color: var(--primary);
    font-size: 10px;
    font-weight: 850;
}

.route-map-close {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: #fff;
    font-size: 18px;
    cursor: pointer;
}

.route-map-canvas {
    height: 440px;
    min-height: 360px;
    background: #eef1f4;
}

.route-map-source-note {
    margin: 0;
    padding: 10px 14px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    background: #fafbfc;
    font-size: 10px;
    line-height: 1.45;
}

.route-map-stop-icon-container {
    border: 0 !important;
    background: transparent !important;
}

.route-map-stop-marker {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    background: var(--primary);
    box-shadow:
        0 3px 9px rgba(16, 42, 86, .25),
        0 0 0 1px rgba(16, 42, 86, .18);
}

.route-map-stop-marker strong {
    font-size: 9px;
    font-weight: 950;
}

.route-map-stop-marker.is-request {
    border-color: var(--primary);
    color: var(--primary);
    background: #fff;
}

.route-map-stop-marker.is-first {
    color: #fff;
    background: #1e905c;
}

.route-map-stop-marker.is-last {
    color: #fff;
    background: #b93636;
}

.route-stop-popup {
    min-width: 210px;
    display: grid;
    gap: 5px;
    font-family: inherit;
}

.route-stop-popup-sequence {
    color: var(--muted);
    font-size: 9px;
    font-weight: 850;
    text-transform: uppercase;
}

.route-stop-popup > strong {
    color: var(--text);
    font-size: 13px;
}

.route-stop-popup > small {
    color: var(--muted);
    line-height: 1.4;
}

.route-stop-popup > a {
    color: var(--primary);
    font-size: 10px;
    font-weight: 850;
}

.route-map-page-heading {
    display: flex;
    align-items: center;
    gap: 18px;
}

.route-map-page-heading h1 {
    margin: 3px 0 5px;
}

.route-map-page-heading p {
    margin: 0;
    color: var(--muted);
}

.route-map-page-controls {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.route-map-page-controls > label:not(.route-map-main-toggle):not(.route-map-live-toggle) {
    min-width: 190px;
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 850;
    text-transform: uppercase;
}

.route-map-page-controls select {
    min-height: 40px;
    padding: 8px 32px 8px 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    font: inherit;
    font-size: 11px;
    font-weight: 750;
}

.route-map-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 14px;
    align-items: stretch;
}

.route-map-page-canvas {
    min-height: 680px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: #eef1f4;
    box-shadow: 0 12px 34px rgba(16, 42, 86, .06);
}

.route-map-page-sidebar {
    max-height: 680px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: #fff;
}

.route-map-page-source {
    padding: 14px;
    border-bottom: 1px solid var(--line);
}

.route-map-page-source strong {
    display: block;
    margin: 3px 0 5px;
}

.route-map-page-source p {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.route-map-stop-list {
    margin: 0;
    padding: 8px;
    overflow-y: auto;
    list-style: none;
}

.route-map-stop-list li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 7px;
    align-items: center;
    padding: 6px;
    border-radius: 9px;
}

.route-map-stop-list li:hover {
    background: var(--soft);
}

.route-map-stop-list li > span {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--primary);
    font-size: 9px;
    font-weight: 900;
}

.route-map-stop-list button {
    min-width: 0;
    padding: 0;
    border: 0;
    text-align: left;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.route-map-stop-list strong,
.route-map-stop-list small {
    display: block;
}

.route-map-stop-list strong {
    overflow: hidden;
    color: var(--text);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.route-map-stop-list small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
}

/* Przystanki na mapie LIVE */

.network-stop-popup {
    min-width: 190px;
    display: grid;
    gap: 7px;
    font-family: inherit;
}

.network-stop-popup > strong {
    color: var(--text);
    font-size: 13px;
}

.network-stop-popup-lines {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.network-stop-popup-lines a {
    min-width: 24px;
    min-height: 22px;
    display: grid;
    place-items: center;
    padding: 3px 5px;
    border-radius: 5px;
    color: #fff !important;
    background: var(--primary);
    font-size: 9px;
    font-weight: 900;
    text-decoration: none;
}

.network-stop-popup-link {
    color: var(--primary) !important;
    font-size: 10px;
    font-weight: 850;
}

.live-stop-status {
    color: var(--muted);
    font-size: 9px;
    font-weight: 750;
}

.departure-time [data-relative-time].is-departed {
    color: #6f7782;
    font-weight: 750;
}

@media (max-width: 900px) {
    .route-map-page {
        grid-template-columns: 1fr;
    }

    .route-map-page-canvas {
        min-height: 520px;
    }

    .route-map-page-sidebar {
        max-height: none;
    }

    .route-map-stop-list {
        max-height: 430px;
    }
}

@media (max-width: 680px) {
    .route-map-panel-header,
    .route-map-page-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .route-map-panel-actions {
        justify-content: flex-start;
    }

    .route-map-canvas {
        height: 54vh;
        min-height: 330px;
    }

    .route-map-page-heading {
        align-items: flex-start;
    }

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

    .route-map-page-controls > label:not(.route-map-main-toggle):not(.route-map-live-toggle) {
        width: 100%;
    }
}


/* ==========================================================================
   v0.9.8 — LIVE UX, hierarchia mapy, statystyki chwilowe
   ========================================================================== */

.vehicle-map-bus {
    position: relative;
    width: 50px;
    height: 40px;
    display: grid;
    grid-template-columns: 24px 1fr;
    align-items: center;
    gap: 2px;
    padding: 4px 5px 4px 4px;
    border: 2px solid #fff;
    border-radius: 13px;
    color: #fff;
    background: #536173;
    box-shadow:
        0 5px 14px rgba(16, 42, 86, .30),
        0 0 0 1px rgba(16, 42, 86, .14);
}

.vehicle-map-bus.is-delayed {
    background: #b42318;
}

.vehicle-map-bus.is-early {
    background: #177245;
}

.vehicle-map-bus.is-on-time {
    background: var(--primary);
}

.vehicle-map-bus.is-unknown {
    background: #6f7885;
}

.vehicle-map-bus-symbol {
    width: 23px;
    height: 23px;
    fill: currentColor;
}

.vehicle-map-bus-route {
    min-width: 16px;
    overflow: hidden;
    font-size: 12px;
    font-weight: 950;
    line-height: 1;
    text-align: center;
    text-overflow: ellipsis;
}

.vehicle-map-direction {
    position: absolute;
    top: -10px;
    left: 20px;
    width: 10px;
    height: 10px;
    color: inherit;
    font-size: 10px;
    line-height: 10px;
    transform-origin: 50% 20px;
    filter: drop-shadow(0 1px 1px #fff);
}

.vehicle-popup-brigade {
    justify-self: start;
    padding: 2px 6px;
    border-radius: 999px;
    color: #526079;
    background: #eef1f5;
    font-size: 9px;
    font-weight: 850;
}

.live-now-dashboard {
    margin-top: 26px;
}

.live-punctuality-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.live-punctuality-card {
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.live-punctuality-card span,
.live-punctuality-card strong,
.live-punctuality-card small {
    display: block;
}

.live-punctuality-card span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.live-punctuality-card strong {
    margin-top: 3px;
    font-size: 27px;
    line-height: 1;
}

.live-punctuality-card small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 9px;
}

.live-punctuality-card.is-delayed strong {
    color: #b42318;
}

.live-punctuality-card.is-early strong {
    color: #177245;
}

.live-punctuality-card.is-on-time strong {
    color: var(--primary);
}

.live-dashboard-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.live-dashboard-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fff;
}

.live-dashboard-card-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: end;
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
}

.live-dashboard-card-heading h3 {
    margin: 2px 0 0;
    font-size: 15px;
}

.live-dashboard-card-heading > small {
    color: var(--muted);
    font-size: 8px;
    text-align: right;
}

.live-line-punctuality,
.live-line-vehicles {
    max-height: 390px;
    overflow-y: auto;
    padding: 7px;
}

.live-line-punctuality-row {
    display: grid;
    grid-template-columns: 23px 34px minmax(0, 1fr);
    gap: 7px;
    align-items: center;
    padding: 7px;
    border-radius: 9px;
    color: inherit;
    text-decoration: none;
}

.live-line-punctuality-row:hover,
.live-line-vehicles-row:hover {
    background: var(--soft);
}

.live-line-rank {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    text-align: center;
}

.live-line-small-badge {
    min-width: 30px;
    min-height: 27px;
    display: inline-grid;
    place-items: center;
    padding: 4px 6px;
    border-radius: 7px;
    color: #fff !important;
    background: var(--primary);
    font-size: 10px;
    font-weight: 950;
    text-decoration: none;
}

.live-line-punctuality-values {
    min-width: 0;
}

.live-line-punctuality-values b,
.live-line-punctuality-values small {
    display: block;
}

.live-line-punctuality-values b {
    color: var(--text);
    font-size: 10px;
}

.live-line-punctuality-values small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 8px;
}

.live-line-punctuality-values .is-delay {
    color: #b42318;
    font-weight: 800;
}

.live-line-punctuality-values .is-early {
    color: #177245;
    font-weight: 800;
}

.live-line-vehicles-row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 7px;
    border-radius: 9px;
}

.live-line-vehicle-chips {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.live-line-vehicle-chips span {
    padding: 4px 7px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #445168;
    background: #fafbfc;
    font-size: 9px;
    font-weight: 850;
}

@media (max-width: 760px) {
    .live-dashboard-columns {
        grid-template-columns: 1fr;
    }

    .live-punctuality-summary {
        grid-template-columns: 1fr;
    }

    .live-line-punctuality,
    .live-line-vehicles {
        max-height: 320px;
    }
}


/* ==========================================================================
   v0.9.9 — przebieg linii LIVE i odjechane kursy
   ========================================================================== */

.stop-departures-table tr.is-realtime-departed > td,
.departures-table tr.is-realtime-departed > td,
[data-realtime-key].is-realtime-departed > td {
    background: #f1f3f5;
    color: #667085;
}

.stop-departures-table tr.is-realtime-departed:hover > td,
.departures-table tr.is-realtime-departed:hover > td,
[data-realtime-key].is-realtime-departed:hover > td {
    background: #e9ecef;
}

[data-realtime-key].is-realtime-departed [data-relative-time] {
    color: #596273;
    font-weight: 850;
}

.live-map-toolbar [data-live-direction-filter-shell][hidden],
.live-map-toolbar [data-live-variant-filter-shell][hidden] {
    display: none !important;
}

.route-map-live-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--primary);
    background: #fff;
    font-size: 10px;
    font-weight: 850;
    text-decoration: none;
}

.route-map-live-link:hover {
    background: var(--soft);
}

.route-map-live-link .live-dot {
    width: 7px;
    height: 7px;
}


.route-variant-actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    border-top: 1px solid var(--line);
}

.route-variant-actions .route-map-live-link {
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0;
    justify-content: center;
    background: #fafbfc;
}

.route-variant-actions .route-map-toggle {
    border-top: 0;
}


/* ==========================================================================
   v0.10.0 — moduł brygad (dane zaawansowane)
   ========================================================================== */

.live-brigade-link,
.brigade-code-link {
    color: #0f5a9a;
    font-weight: 900;
    text-decoration: none;
    text-underline-offset: 2px;
}

.live-brigade-link:hover,
.brigade-code-link:hover {
    text-decoration: underline;
}

.vehicle-popup-brigade {
    display: inline-flex;
    justify-self: start;
    padding: 3px 7px;
    border-radius: 999px;
    color: #37536d;
    background: #eef3f7;
    font-size: 9px;
    font-weight: 850;
    text-decoration: none;
}

.vehicle-popup-brigade:hover {
    text-decoration: underline;
}

.brigade-page-heading {
    align-items: flex-start;
}

.brigade-heading-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.brigade-advanced-note,
.brigade-prediction-note {
    display: grid;
    gap: 4px;
    margin: 14px 0;
    padding: 12px 14px;
    border: 1px solid #cfd8e3;
    border-radius: 12px;
    background: #f7f9fb;
}

.brigade-advanced-note strong,
.brigade-prediction-note strong {
    font-size: 11px;
}

.brigade-advanced-note span,
.brigade-prediction-note p {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.55;
}

.brigade-prediction-note {
    border-color: #d8c986;
    background: #fffbea;
}

.brigade-date-form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 8px;
    margin: 16px 0 22px;
}

.brigade-date-form label {
    display: grid;
    gap: 4px;
}

.brigade-date-form label > span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.brigade-date-form input,
.brigade-date-form button,
.brigade-date-form > a {
    min-height: 36px;
}

.brigade-date-form input {
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.brigade-date-form button,
.brigade-date-form > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    background: #fff;
    font-size: 10px;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
}

.brigade-date-form button {
    color: #fff;
    border-color: var(--primary);
    background: var(--primary);
}

.brigade-date-arrow {
    width: 36px;
    padding-inline: 0 !important;
}

.brigade-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0 20px;
}

.brigade-summary-grid article {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
}

.brigade-summary-grid span,
.brigade-summary-grid strong {
    display: block;
}

.brigade-summary-grid span {
    color: var(--muted);
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
}

.brigade-summary-grid strong {
    margin-top: 4px;
    overflow-wrap: anywhere;
    font-size: 13px;
}

.brigade-list-shell,
.brigade-trip-list-shell,
.brigade-stops-shell {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.brigade-list-table,
.brigade-trip-list,
.brigade-stops-table {
    width: 100%;
    border-collapse: collapse;
}

.brigade-list-table th,
.brigade-list-table td,
.brigade-trip-list th,
.brigade-trip-list td,
.brigade-stops-table th,
.brigade-stops-table td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
    font-size: 10px;
}

.brigade-list-table th,
.brigade-trip-list th,
.brigade-stops-table th {
    color: var(--muted);
    background: #fafbfc;
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: .035em;
}

.brigade-list-table tbody tr:last-child td,
.brigade-trip-list tbody tr:last-child td,
.brigade-stops-table tbody tr:last-child td {
    border-bottom: 0;
}

.brigade-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.brigade-chip-list a {
    min-width: 28px;
    display: inline-grid;
    place-items: center;
    padding: 4px 6px;
    border-radius: 7px;
    color: #fff;
    background: var(--primary);
    font-size: 9px;
    font-weight: 900;
    text-decoration: none;
}

.brigade-trip-list td > small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 8px;
}

.brigade-trip-list tr.is-predicted td {
    background: #fffdf4;
}

.brigade-status {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 900;
    white-space: nowrap;
}

.brigade-status.is-observed {
    color: #0d6046;
    background: #e8f7f0;
}

.brigade-status.is-predicted {
    color: #795d00;
    background: #fff0b8;
}

.brigade-trips-heading,
.brigade-details-heading {
    margin-top: 24px;
}

.brigade-trip-details {
    display: grid;
    gap: 9px;
}

.brigade-trip-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.brigade-trip-card.is-predicted {
    border-color: #dfd29b;
}

.brigade-trip-card > summary {
    display: grid;
    grid-template-columns: 58px 38px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    list-style: none;
}

.brigade-trip-card > summary::-webkit-details-marker {
    display: none;
}

.brigade-trip-card[open] > summary {
    border-bottom: 1px solid var(--line);
}

.brigade-trip-time {
    font-size: 16px;
    font-weight: 950;
}

.brigade-trip-route {
    min-width: 0;
}

.brigade-trip-route strong,
.brigade-trip-route small {
    display: block;
}

.brigade-trip-route strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
}

.brigade-trip-route small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 7px;
}

.brigade-trip-prediction {
    padding: 8px 12px;
    border-bottom: 1px solid #e8deae;
    color: #715b0a;
    background: #fffdf3;
    font-size: 9px;
}

.brigade-stops-shell {
    border: 0;
    border-radius: 0;
}

.brigade-stops-table td:first-child,
.brigade-stops-table th:first-child {
    width: 42px;
    text-align: center;
}

.brigade-stops-table td:nth-child(3),
.brigade-stops-table td:nth-child(4),
.brigade-stops-table td:nth-child(5) {
    white-space: nowrap;
}

.brigade-stops-table .is-delay {
    color: #b42318;
    font-weight: 900;
}

.brigade-stops-table .is-early {
    color: #177245;
    font-weight: 900;
}

.brigade-stops-table .is-on-time {
    color: #36516d;
    font-weight: 850;
}

.brigade-passed-label {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 7px;
}

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

@media (max-width: 980px) {
    .brigade-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .brigade-heading-actions {
        justify-content: flex-start;
    }

    .brigade-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .brigade-trip-card > summary {
        grid-template-columns: 54px 34px minmax(0, 1fr);
    }

    .brigade-trip-card > summary .brigade-status {
        grid-column: 1 / -1;
        justify-self: start;
    }
}


/* v0.10.1 — brygady: brak nawigacji do przyszłych dat */
.brigade-date-arrow.is-disabled {
    color: #a6adb7;
    border-color: #e1e5ea;
    background: #f5f6f7;
    cursor: not-allowed;
    opacity: .72;
}


/* ==========================================================================
   v0.10.2 — LIVE: postoje na pętlach + estymacja RT brygad
   ========================================================================== */

.vehicle-map-bus.is-terminal {
    background: #8a6a13;
}

.live-stop-status.is-terminal,
.live-terminal-next {
    color: #765a0c;
}

.live-terminal-next {
    font-size: 8px;
    font-weight: 750;
}

.live-vehicles-table td.is-terminal,
[data-live-vehicles] td.is-terminal {
    color: #765a0c;
    font-weight: 850;
}

.vehicle-popup .is-terminal-wait {
    color: #765a0c;
    font-weight: 850;
}

.brigade-status.is-live {
    color: #0b4d85;
    background: #e6f1fb;
}

.brigade-trip-live-note {
    padding: 8px 12px;
    border-bottom: 1px solid #cfe0ef;
    color: #315d80;
    background: #f3f8fc;
    font-size: 9px;
    line-height: 1.5;
}

.brigade-estimated-label {
    display: block;
    margin-top: 2px;
    color: #315d80;
    font-size: 7px;
    font-weight: 750;
}


/* ==========================================================================
   v0.10.4 — brygady: czytelne rozdzielenie obserwacji / GTFS-RT / predykcji
   ========================================================================== */

.brigade-data-legend {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin: -10px 0 12px;
}

.brigade-data-legend-item {
    min-width: 0;
    padding: 8px 9px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--muted);
    font-size: 8px;
    line-height: 1.35;
}

.brigade-data-legend-item b {
    display: block;
    margin-bottom: 2px;
    color: #253447;
    font-size: 8px;
    letter-spacing: .025em;
}

.brigade-data-legend-item.is-observed {
    border-color: #bcdccb;
    background: #f4fbf7;
}

.brigade-data-legend-item.is-provider {
    border-color: #c9dced;
    background: #f5f9fd;
}

.brigade-data-legend-item.is-prediction {
    border-color: #e4d69c;
    background: #fffdf4;
}

.brigade-data-legend-item.is-estimate {
    border-color: #dedfe3;
    background: #f8f8f9;
}

.brigade-stops-table-v2 th:nth-child(4) {
    min-width: 260px;
}

.brigade-stops-table-v2 th:nth-child(5) {
    min-width: 150px;
}

.brigade-stops-table-v2 .brigade-schedule-cell,
.brigade-stops-table-v2 .brigade-data-cell,
.brigade-stops-table-v2 .brigade-delay-cell {
    vertical-align: top;
}

.brigade-schedule-cell strong,
.brigade-schedule-cell small,
.brigade-data-cell strong,
.brigade-data-cell small {
    display: block;
}

.brigade-schedule-cell strong {
    font-size: 13px;
}

.brigade-schedule-cell small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 7px;
}

.brigade-data-time {
    margin-bottom: 4px;
    color: #172231;
    font-size: 14px;
    font-weight: 950;
}

.brigade-data-time.is-empty {
    color: var(--muted);
}

.brigade-data-badge {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 7px;
    font-weight: 950;
    letter-spacing: .02em;
    white-space: nowrap;
}

.brigade-data-badge.is-observed {
    color: #0d6046;
    background: #e8f7f0;
}

.brigade-data-badge.is-provider {
    color: #0b4d85;
    background: #e6f1fb;
}

.brigade-data-badge.is-prediction {
    color: #795d00;
    background: #fff0b8;
}

.brigade-data-badge.is-estimate {
    color: #545b66;
    background: #eceef1;
}

.brigade-data-badge.is-schedule,
.brigade-data-badge.is-none {
    color: #626a75;
    background: #f0f1f3;
}

.brigade-data-detail {
    max-width: 420px;
    margin-top: 5px;
    color: var(--muted);
    font-size: 8px;
    line-height: 1.45;
    white-space: normal;
}

.brigade-delay-cell {
    font-size: 9px !important;
    line-height: 1.35;
    white-space: normal !important;
}

.brigade-data-row.is-observed td:nth-child(4) {
    background: #fbfefc;
}

.brigade-data-row.is-provider td:nth-child(4) {
    background: #fbfdff;
}

.brigade-data-row.is-prediction td:nth-child(4) {
    background: #fffef9;
}

.brigade-data-row.is-estimate td:nth-child(4) {
    background: #fcfcfd;
}

@media (max-width: 980px) {
    .brigade-data-legend {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .brigade-data-legend {
        grid-template-columns: 1fr;
    }

    .brigade-stops-table-v2 th:nth-child(4) {
        min-width: 230px;
    }
}


/* ========================================================================== 
   v0.10.5 — brygady: wykres punktualności konkretnego kursu
   ========================================================================== */

.brigade-punctuality-chart {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    background: #fbfcfd;
}

.brigade-punctuality-chart-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 9px;
}

.brigade-punctuality-chart-heading > div:first-child strong,
.brigade-punctuality-chart-heading > div:first-child span {
    display: block;
}

.brigade-punctuality-chart-heading > div:first-child strong {
    color: #1c2a3a;
    font-size: 10px;
    font-weight: 950;
}

.brigade-punctuality-chart-heading > div:first-child span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 8px;
}

.brigade-punctuality-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px 10px;
    color: var(--muted);
    font-size: 7px;
    font-weight: 800;
}

.brigade-punctuality-legend span {
    position: relative;
    padding-left: 15px;
    white-space: nowrap;
}

.brigade-punctuality-legend span::before {
    position: absolute;
    top: 50%;
    left: 0;
    width: 10px;
    height: 2px;
    content: '';
    transform: translateY(-50%);
    background: #8a919a;
}

.brigade-punctuality-legend .is-observed::before {
    background: #177245;
}

.brigade-punctuality-legend .is-provider-final::before {
    background: #0b63a8;
}

.brigade-punctuality-legend .is-provider-forecast::before {
    height: 0;
    border-top: 2px dashed #0b63a8;
    background: transparent;
}

.brigade-punctuality-legend .is-prediction::before {
    height: 0;
    border-top: 2px dashed #a17a00;
    background: transparent;
}

.brigade-punctuality-legend .is-estimate::before {
    height: 0;
    border-top: 2px dotted #747b84;
    background: transparent;
}

.brigade-punctuality-chart-scroll {
    overflow: hidden;
    padding: 2px 0 4px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.brigade-punctuality-svg {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    aspect-ratio: 1000 / 320;
}

.brigade-chart-grid,
.brigade-chart-x-tick {
    stroke: #e4e8ec;
    stroke-width: 1;
}

.brigade-chart-grid.is-zero {
    stroke: #7c8792;
    stroke-width: 1.4;
}

.brigade-chart-y-label,
.brigade-chart-x-label,
.brigade-chart-now-label {
    fill: #7a8490;
    font-family: inherit;
    font-size: 8px;
}

.brigade-chart-y-label.is-zero {
    fill: #425164;
    font-weight: 900;
}

.brigade-chart-now-line {
    stroke: #b6bdc5;
    stroke-width: 1;
    stroke-dasharray: 4 4;
}

.brigade-chart-now-label {
    fill: #66717d;
    font-size: 7px;
    font-weight: 900;
}

.brigade-chart-line {
    fill: none;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.brigade-chart-line.is-observed {
    stroke: #177245;
}

.brigade-chart-line.is-provider-final {
    stroke: #0b63a8;
}

.brigade-chart-line.is-provider-forecast {
    stroke: #0b63a8;
    stroke-dasharray: 7 5;
}

.brigade-chart-line.is-prediction {
    stroke: #a17a00;
    stroke-dasharray: 7 5;
}

.brigade-chart-line.is-estimate {
    stroke: #747b84;
    stroke-dasharray: 2 5;
}

.brigade-chart-point {
    stroke: #fff;
    stroke-width: 1.5;
}

.brigade-chart-point.is-observed {
    fill: #177245;
}

.brigade-chart-point.is-provider-final,
.brigade-chart-point.is-provider-forecast {
    fill: #0b63a8;
}

.brigade-chart-point.is-prediction {
    fill: #a17a00;
}

.brigade-chart-point.is-estimate {
    fill: #747b84;
}

.brigade-punctuality-chart-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
    color: var(--muted);
    font-size: 7px;
}

@media (max-width: 760px) {
    .brigade-punctuality-chart-heading,
    .brigade-punctuality-chart-footer {
        display: grid;
        gap: 6px;
    }

    .brigade-punctuality-legend {
        justify-content: flex-start;
    }
}


/* ========================================================================== 
   v0.10.6 — wykres punktualności: responsywność i nazwy przystanków
   ========================================================================== */

.brigade-chart-x-label {
    font-size: 7px;
    font-weight: 750;
}

.brigade-chart-point {
    cursor: help;
}

@media (max-width: 760px) {
    .brigade-punctuality-svg {
        min-height: 235px;
    }

    .brigade-chart-x-label {
        font-size: 6.5px;
    }
}

/* ========================================================================== 
   v0.11.1 — publiczny moduł „Punktualność i statystyki”
   ========================================================================== */

.stats-hero {
    padding-bottom: 34px;
}

.stats-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, .7fr);
    gap: 34px;
    align-items: end;
}

.stats-hero-grid h1 {
    margin-bottom: 12px;
}

.stats-hero-grid p {
    max-width: 760px;
    margin-bottom: 0;
}

.stats-coverage-card {
    display: grid;
    gap: 4px;
    padding: 20px 22px;
    border: 1px solid rgba(16, 42, 86, .13);
    border-radius: 18px;
    background: rgba(255, 255, 255, .9);
}

.stats-coverage-card > span:first-child {
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.stats-coverage-card strong {
    font-size: 15px;
}

.stats-coverage-card small {
    margin-top: 8px;
    color: var(--muted);
}

.stats-coverage-arrow {
    color: var(--accent);
    font-weight: 900;
}

.stats-section {
    padding-top: 34px;
}

.stats-filter-card {
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--soft);
}

.stats-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.stats-filter-grid label {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.stats-filter-grid label > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.stats-filter-grid input,
.stats-filter-grid select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 9px 11px;
    border: 1px solid #cbd3df;
    border-radius: 11px;
    color: var(--ink);
    background: #fff;
    font: inherit;
}

.stats-filter-grid input:focus,
.stats-filter-grid select:focus {
    outline: 3px solid rgba(16, 42, 86, .12);
    border-color: var(--primary);
}

.stats-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.stats-filter-actions .button-primary,
.stats-filter-actions .button-secondary {
    min-height: 42px;
}

.stats-definition-note {
    margin-bottom: 20px;
    padding: 13px 16px;
    border-left: 4px solid var(--primary);
    border-radius: 0 12px 12px 0;
    background: #f2f6fc;
    color: #31415b;
    font-size: 13px;
}

.stats-definition-note strong {
    color: var(--ink);
}

.stats-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.stats-kpi-card {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.stats-kpi-card > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.stats-kpi-card > strong {
    color: var(--primary);
    font-size: 28px;
    line-height: 1.15;
}

.stats-kpi-card > small {
    color: var(--muted);
}

.stats-two-columns,
.stats-ranking-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.stats-panel {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.stats-wide-panel {
    margin-bottom: 18px;
}

.section-heading.compact {
    margin-bottom: 16px;
}

.section-heading.compact h2 {
    margin-top: 2px;
    margin-bottom: 0;
    font-size: 20px;
}

.stats-distribution {
    display: grid;
    gap: 13px;
}

.stats-distribution-row {
    display: grid;
    gap: 5px;
}

.stats-distribution-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
}

.stats-distribution-label strong {
    color: var(--primary);
}

.stats-distribution-row small {
    color: var(--muted);
    font-size: 10px;
}

.stats-bar-track {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--soft-2);
}

.stats-bar-track > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
}

.stats-coverage-list {
    margin: 0;
}

.stats-coverage-list > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid var(--soft-2);
}

.stats-coverage-list > div:last-child {
    border-bottom: 0;
}

.stats-coverage-list dt {
    color: var(--muted);
}

.stats-coverage-list dd {
    margin: 0;
    font-weight: 850;
}

.stats-method-note {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.stats-chart-hint {
    color: var(--muted);
    font-size: 11px;
}

.stats-chart-wrap {
    width: 100%;
    overflow: hidden;
}

.stats-trend-chart {
    display: block;
    width: 100%;
    height: auto;
    min-height: 240px;
}

.stats-chart-grid line {
    stroke: #e2e7ef;
    stroke-width: 1;
}

.stats-chart-grid text,
.stats-chart-xlabels text {
    fill: #68758a;
    font-size: 11px;
    font-family: inherit;
}

.stats-chart-zero {
    stroke: #8d99aa;
    stroke-width: 1.5;
    stroke-dasharray: 5 5;
}

.stats-chart-line {
    fill: none;
    stroke: var(--primary);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.stats-chart-points circle {
    fill: var(--primary);
    stroke: #fff;
    stroke-width: 2;
    cursor: help;
}

.stats-ranking-list {
    display: grid;
}

.stats-ranking-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid var(--soft-2);
}

.stats-ranking-row:last-child {
    border-bottom: 0;
}

.stats-rank-number {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    color: var(--primary);
    background: var(--soft);
    font-size: 11px;
    font-weight: 900;
}

.stats-ranking-main {
    display: grid;
    min-width: 0;
}

.stats-ranking-main strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.stats-ranking-main span {
    color: var(--muted);
    font-size: 10px;
}

.stats-ranking-value {
    display: grid;
    justify-items: end;
    gap: 3px;
}

.stats-ranking-value > strong {
    color: var(--accent-dark);
    font-size: 16px;
}

.stats-sample-badge {
    display: inline-flex;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 850;
    white-space: nowrap;
}

.stats-sample-badge.is-low {
    color: #7d4e00;
    background: #fff0ca;
}

.stats-sample-badge.is-medium {
    color: #44536b;
    background: #edf1f6;
}

.stats-sample-badge.is-good {
    color: #1b633e;
    background: #e5f5ec;
}

.stats-method-details {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--soft);
}

.stats-method-details summary {
    padding: 13px 16px;
    cursor: pointer;
    font-weight: 800;
}

.stats-method-table-wrap {
    overflow-x: auto;
    padding: 0 16px 16px;
}

.stats-method-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.stats-method-table th,
.stats-method-table td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--soft-2);
    text-align: left;
    font-size: 11px;
}

.stats-method-table th {
    color: var(--muted);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.stats-empty-panel,
.stats-empty {
    padding: 24px;
    border: 1px dashed #cbd3df;
    border-radius: 16px;
    color: var(--muted);
    background: var(--soft);
}

.stats-empty-panel h2 {
    margin-top: 0;
    color: var(--ink);
}

@media (max-width: 960px) {
    .stats-hero-grid,
    .stats-two-columns,
    .stats-ranking-grid {
        grid-template-columns: 1fr;
    }

    .stats-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .stats-filter-grid,
    .stats-kpi-grid {
        grid-template-columns: 1fr;
    }

    .stats-kpi-card > strong {
        font-size: 24px;
    }

    .stats-panel {
        padding: 15px;
    }

    .stats-ranking-row {
        grid-template-columns: 26px minmax(0, 1fr);
    }

    .stats-ranking-value {
        grid-column: 2;
        justify-items: start;
        grid-auto-flow: column;
        align-items: center;
        justify-content: start;
        gap: 8px;
    }

    .stats-trend-chart {
        min-height: 205px;
    }

    .stats-chart-grid text,
    .stats-chart-xlabels text {
        font-size: 12px;
    }
}

/* ========================================================================== 
   v0.11.2 — analityka linii + semantyczna kolorystyka punktualności
   ========================================================================== */

.stats-ranking-link {
    color: inherit;
    text-decoration: none;
}

.stats-ranking-link:hover,
.stats-ranking-link:focus-visible {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.stats-ranking-context {
    color: #40506a !important;
    font-weight: 700;
}

.stats-chart-points circle.is-delay {
    fill: #d92d20;
}

.stats-chart-points circle.is-early {
    fill: #168a4b;
}

.stats-chart-points circle.is-zero {
    fill: #7d8797;
}

.line-analytics-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.line-analytics-filter-grid label {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.line-analytics-filter-grid label > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.line-analytics-filter-grid input,
.line-analytics-filter-grid select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 9px 11px;
    border: 1px solid #cbd3df;
    border-radius: 11px;
    color: var(--ink);
    background: #fff;
    font: inherit;
}

.line-analytics-filter-grid input:focus,
.line-analytics-filter-grid select:focus {
    outline: 3px solid rgba(16, 42, 86, .12);
    border-color: var(--primary);
}

.line-date-limit-note {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-size: 10px;
}

.line-analytics-explainer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 22px;
    margin-bottom: 18px;
    padding: 12px 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--soft);
    color: #43516a;
    font-size: 11px;
}

.line-analytics-explainer > div {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.line-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    flex: 0 0 auto;
}

.line-legend-dot.is-delay {
    background: #d92d20;
}

.line-legend-dot.is-early {
    background: #168a4b;
}

.line-legend-dot.is-zero {
    background: #7d8797;
}

.line-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.line-heading-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: end;
}

.line-direction-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.line-direction-card {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 15px;
    border: 1px solid var(--soft-2);
    border-radius: 13px;
    background: var(--soft);
}

.line-direction-card > div:first-child {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.line-direction-card > div:first-child strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.line-direction-card > div:first-child span,
.line-direction-metrics span {
    color: var(--muted);
    font-size: 10px;
}

.line-direction-metrics {
    display: grid;
    gap: 3px;
    flex: 0 0 auto;
    text-align: right;
}

.line-direction-metrics strong {
    color: var(--ink);
}

.line-segment-list {
    display: grid;
}

.line-segment-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--soft-2);
}

.line-segment-row:last-child {
    border-bottom: 0;
}

.line-segment-name {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 6px;
    align-items: center;
    min-width: 0;
}

.line-segment-name strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
}

.line-segment-name > span {
    color: var(--muted);
}

.line-segment-name small {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 9px;
}

.line-segment-value {
    display: grid;
    justify-items: end;
    gap: 2px;
    white-space: nowrap;
}

.line-segment-value strong {
    font-size: 16px;
}

.line-segment-value span {
    color: var(--muted);
    font-size: 9px;
}

.line-segment-row.is-loss .line-segment-value strong {
    color: #b42318;
}

.line-segment-row.is-recovery .line-segment-value strong {
    color: #137a43;
}

.line-heatmap-panel {
    overflow: hidden;
}

.line-heatmap-note {
    margin-bottom: 14px;
}

.line-heat-legend {
    display: grid;
    grid-template-columns: auto 120px auto;
    gap: 7px;
    align-items: center;
    color: var(--muted);
    font-size: 9px;
    white-space: nowrap;
}

.line-heat-legend i {
    display: block;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #168a4b 0%, #eef1f5 50%, #d92d20 100%);
}

.line-heatmap {
    display: grid;
    gap: 5px;
    width: 100%;
    min-width: 0;
}

.line-heatmap-head,
.line-heatmap-row {
    display: grid;
    grid-template-columns: minmax(190px, 2.25fr) repeat(var(--heat-columns), minmax(22px, 1fr));
    gap: 4px;
    align-items: stretch;
}

.line-heatmap-head > span {
    display: grid;
    place-items: center;
    min-width: 0;
    padding: 4px 1px;
    color: var(--muted);
    font-size: 8px;
    font-weight: 850;
}

.line-heatmap-head .line-heatmap-route-label {
    justify-items: start;
}

.line-heatmap-segment {
    display: grid;
    align-content: center;
    min-width: 0;
    padding: 7px 9px;
    border-radius: 9px;
    background: var(--soft);
}

.line-heatmap-segment strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 9px;
}

.line-heatmap-segment small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    font-size: 8px;
}

.line-heat-cell {
    display: grid;
    place-items: center;
    align-content: center;
    min-width: 0;
    min-height: 43px;
    padding: 3px 1px;
    border: 1px solid rgba(20, 35, 60, .06);
    border-radius: 8px;
    cursor: help;
}

.line-heat-cell b {
    font-size: 8px;
    line-height: 1.05;
}

.line-heat-cell small {
    margin-top: 2px;
    font-size: 6px;
    opacity: .78;
}

.line-heat-cell.is-empty {
    color: #9aa4b2;
    background: #f5f7fa;
}

.line-trip-row .stats-ranking-main span {
    white-space: normal;
}

@media (max-width: 960px) {
    .line-analytics-filter-grid,
    .line-direction-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .line-heading-row {
        align-items: start;
        flex-direction: column;
    }

    .line-heatmap-head,
    .line-heatmap-row {
        grid-template-columns: minmax(150px, 1.7fr) repeat(var(--heat-columns), minmax(18px, 1fr));
        gap: 3px;
    }

    .line-heat-cell b {
        font-size: 7px;
    }
}

@media (max-width: 700px) {
    .line-analytics-filter-grid,
    .line-direction-grid,
    .line-kpi-grid {
        grid-template-columns: 1fr;
    }

    .line-direction-card {
        align-items: start;
        flex-direction: column;
    }

    .line-direction-metrics {
        text-align: left;
    }

    .line-heat-legend {
        width: 100%;
        grid-template-columns: auto minmax(80px, 1fr) auto;
    }

    .line-heatmap-head {
        display: none;
    }

    .line-heatmap-row {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
        padding: 9px 0 13px;
        border-bottom: 1px solid var(--soft-2);
    }

    .line-heatmap-row:last-child {
        border-bottom: 0;
    }

    .line-heatmap-segment {
        grid-column: 1 / -1;
    }

    .line-heat-cell {
        position: relative;
        min-height: 58px;
        padding-top: 18px;
    }

    .line-heat-cell::before {
        content: attr(data-hour);
        position: absolute;
        top: 4px;
        left: 0;
        right: 0;
        text-align: center;
        font-size: 7px;
        font-weight: 850;
        opacity: .72;
    }

    .line-heat-cell b {
        font-size: 9px;
    }

    .line-heat-cell small {
        font-size: 7px;
    }

    .line-segment-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .line-segment-value {
        justify-items: start;
    }
}

/* ========================================================================== 
   v0.11.3 — korekty analityki: filtry, data dzisiejsza, warianty i fragmenty
   ========================================================================== */

.stats-select-shell {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
}

.stats-select-shell::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 14px;
    width: 8px;
    height: 8px;
    margin-top: -6px;
    border-right: 2px solid #536177;
    border-bottom: 2px solid #536177;
    transform: rotate(45deg);
    pointer-events: none;
}

.stats-filter-grid .stats-select-shell select,
.line-analytics-filter-grid .stats-select-shell select {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 9px 38px 9px 11px;
    border: 1px solid #cbd3df;
    border-radius: 11px;
    color: var(--ink);
    background: #fff;
    font: inherit;
    font-weight: 750;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.stats-filter-grid .stats-select-shell select:focus,
.line-analytics-filter-grid .stats-select-shell select:focus {
    outline: 3px solid rgba(16, 42, 86, .12);
    border-color: var(--primary);
}

.stats-date-input {
    accent-color: #d92d20;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.stats-date-input.is-today {
    border-color: rgba(217, 45, 32, .72) !important;
    background: #fff5f3 !important;
    box-shadow: inset 3px 0 0 #d92d20;
}

.stats-today-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 5px;
    padding: 2px 6px;
    border-radius: 999px;
    color: #a62018;
    background: #ffe3df;
    font-size: 8px;
    font-style: normal;
    font-weight: 900;
    letter-spacing: .03em;
    text-transform: uppercase;
    vertical-align: middle;
}

.stats-today-badge.is-hidden {
    display: none;
}

.line-segment-gap {
    color: #6e7787 !important;
    font-weight: 750;
}

@media (max-width: 700px) {
    .stats-select-shell::after {
        right: 13px;
    }
}

/* ========================================================================== 
   v0.11.4 — czytelność statystyk, pomoc kontekstowa i własny kalendarz
   ========================================================================== */

/* Własny kalendarz zastępuje natywny popup przeglądarki. Dzięki temu dzisiejszy
   dzień jest jednoznacznie oznaczony, a dni niedostępne naprawdę wyglądają na
   niedostępne. */
.stats-calendar {
    position: relative;
    width: 100%;
    min-width: 0;
}

.stats-calendar-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 44px;
    padding: 9px 11px;
    border: 1px solid #cbd3df;
    border-radius: 11px;
    color: var(--ink);
    background: #fff;
    font: inherit;
    font-weight: 750;
    text-align: left;
    cursor: pointer;
}

.stats-calendar-trigger:hover {
    border-color: #aeb9c8;
}

.stats-calendar-trigger:focus-visible {
    outline: 3px solid rgba(16, 42, 86, .12);
    border-color: var(--primary);
}

.stats-calendar-icon {
    color: #536177;
    font-size: 12px;
}

.stats-calendar-popover {
    position: absolute;
    z-index: 120;
    top: calc(100% + 7px);
    left: 0;
    width: min(310px, calc(100vw - 32px));
    padding: 12px;
    border: 1px solid #cfd6e2;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(24, 39, 68, .18);
}

.stats-calendar-popover[hidden] {
    display: none !important;
}

.stats-calendar-header {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
}

.stats-calendar-month {
    text-align: center;
    font-size: 12px;
    text-transform: capitalize;
}

.stats-calendar-nav {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--ink);
    background: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.stats-calendar-nav:disabled {
    color: #b6bdc8;
    background: #f4f6f8;
    cursor: not-allowed;
}

.stats-calendar-weekdays,
.stats-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

.stats-calendar-weekdays {
    margin-bottom: 4px;
}

.stats-calendar-weekdays span {
    padding: 3px 0;
    color: var(--muted);
    font-size: 9px;
    font-weight: 850;
    text-align: center;
}

.stats-calendar-day {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    min-width: 0;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--ink);
    background: transparent;
    font: inherit;
    font-size: 11px;
    font-weight: 750;
    cursor: pointer;
}

.stats-calendar-day:hover:not(:disabled) {
    background: var(--soft);
    border-color: #cdd6e2;
}

.stats-calendar-day.is-outside:not(.is-today):not(.is-selected) {
    color: #8c96a6;
}

.stats-calendar-day.is-disabled,
.stats-calendar-day:disabled {
    color: #c4c9d1;
    background: #f4f5f7;
    cursor: not-allowed;
    opacity: .78;
}

/* Dzisiaj nigdy nie wygląda jak dzień wyłączony. */
.stats-calendar-day.is-today:not(.is-selected) {
    color: #b42318;
    border-color: #d92d20;
    background: #fff4f2;
    box-shadow: inset 0 0 0 1px #d92d20;
    font-weight: 900;
}

.stats-calendar-day.is-selected {
    color: #fff;
    border-color: var(--primary);
    background: var(--primary);
    font-weight: 900;
}

.stats-calendar-day.is-today.is-selected {
    border-color: #b42318;
    background: #d92d20;
    box-shadow: 0 0 0 2px rgba(217, 45, 32, .18);
}

.stats-calendar-footer {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--soft-2);
    color: #a62018;
    font-size: 9px;
    font-weight: 800;
    text-align: center;
}

/* Usuwamy eksperymentalne wyróżnienie samego pola daty z 0.11.3. */
.stats-date-input.is-today,
.stats-date-input {
    border-color: initial;
    background: initial;
    box-shadow: none;
}

.stats-today-badge {
    display: none !important;
}

/* Pomoc kontekstowa. Przycisk działa na hover/focus, a na ekranach dotykowych
   również po kliknięciu (klasa .is-open jest obsługiwana przez JS). */
.stats-help {
    position: relative;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid #c5ceda;
    border-radius: 999px;
    color: #536177;
    background: #fff;
    font: inherit;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    cursor: help;
}

.stats-help:hover,
.stats-help:focus-visible,
.stats-help.is-open {
    color: var(--primary);
    border-color: var(--primary);
    background: #f2f6fc;
    outline: none;
}

.stats-help::after {
    content: attr(data-help);
    position: absolute;
    z-index: 180;
    top: calc(100% + 8px);
    right: -4px;
    width: min(330px, 76vw);
    padding: 10px 12px;
    border: 1px solid #cfd6e2;
    border-radius: 11px;
    color: #24324a;
    background: #fff;
    box-shadow: 0 12px 30px rgba(24, 39, 68, .16);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.45;
    text-align: left;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-3px);
    transition: opacity .12s ease, transform .12s ease, visibility .12s ease;
}

.stats-help:hover::after,
.stats-help:focus-visible::after,
.stats-help.is-open::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.section-heading.compact,
.stats-section-title-row {
    position: relative;
}

.stats-section-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin: 2px 0 10px;
}

.stats-section-title-row h2 {
    margin: 2px 0 0;
    font-size: 18px;
}

.stats-heading-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

.line-heatmap-panel {
    overflow: visible;
}

/* Zamiast niejasnych etykiet „mała próba / próba orientacyjna” pokazujemy
   jawne n. Kolor nadal delikatnie sygnalizuje ilość danych, a znaczenie opisuje
   tooltip sekcji. */
.stats-sample-badge {
    min-width: 46px;
    text-align: center;
}

.stats-empty-state {
    display: grid;
    gap: 5px;
    margin: 8px 0 2px;
    padding: 12px 14px;
    border: 1px dashed #cbd3df;
    border-radius: 11px;
    background: #f8f9fb;
}

.stats-empty-state strong {
    color: #36445b;
    font-size: 11px;
}

.stats-empty-state span {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.stats-minmax {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 14px;
}

.stats-minmax span {
    white-space: nowrap;
}

@media (max-width: 700px) {
    .stats-calendar-popover {
        right: 0;
        left: auto;
        width: min(310px, calc(100vw - 28px));
    }

    .stats-heading-actions {
        width: 100%;
        justify-content: space-between;
    }

    .stats-help::after {
        position: fixed;
        z-index: 500;
        top: auto;
        right: 14px;
        bottom: 18px;
        left: 14px;
        width: auto;
        max-width: none;
    }
}

.stats-help-intro {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 10px;
}

.stats-help-intro > span {
    display: inline-grid;
    place-items: center;
    width: 19px;
    height: 19px;
    border: 1px solid #c5ceda;
    border-radius: 999px;
    color: #536177;
    background: #fff;
    font-weight: 900;
}

/* ========================================================================== 
   v0.11.9 — rekonstrukcja luk RT i czytelne godziny po północy
   ========================================================================== */

.brigade-data-legend-item.is-reconstructed {
    border-color: #d7c8eb;
    background: #faf7ff;
}

.brigade-data-badge.is-reconstructed {
    color: #68409a;
    background: #efe6fb;
}

.brigade-data-row.is-reconstructed td:nth-child(4) {
    background: #fcf9ff;
}

.brigade-punctuality-legend .is-reconstructed::before {
    height: 0;
    border-top: 2px dashed #7a4db3;
    background: transparent;
}

.brigade-chart-line.is-reconstructed {
    stroke: #7a4db3;
    stroke-dasharray: 5 4;
}

.brigade-chart-point.is-reconstructed {
    fill: #fff;
    stroke: #7a4db3;
    stroke-width: 2.2;
}

.brigade-next-day-note {
    display: block;
    margin-top: 2px;
    color: #7b5b20 !important;
    font-size: 7px;
    font-weight: 850;
    letter-spacing: .01em;
}

.brigade-trip-time small {
    display: block;
    margin-top: 1px;
    color: #7b5b20;
    font-size: 7px;
    font-weight: 850;
}


/* =========================================================
   v0.11.9 — mobilne menu
   ========================================================= */

@media (max-width: 420px) {
    .brand-mark {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        font-size: 20px;
    }

    .brand {
        gap: 9px;
    }

    .brand-copy small {
        font-size: 11px;
    }
}

/* ========================================================================== */
/* v0.11.14 — czas generowania + panel administratora                         */
/* ========================================================================== */
.footer-performance {
    font-variant-numeric: tabular-nums;
    cursor: help;
}

.admin-body {
    margin: 0;
    min-height: 100vh;
    background: #f4f7fb;
    color: #15213a;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.admin-header {
    background: #102a56;
    color: #fff;
    box-shadow: 0 2px 10px rgba(16, 42, 86, .18);
}

.admin-header-inner {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.admin-brand {
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: .02em;
}

.admin-brand span {
    margin-left: 8px;
    font-weight: 500;
    opacity: .72;
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-nav a {
    color: rgba(255,255,255,.82);
    text-decoration: none;
    padding: 8px 11px;
    border-radius: 8px;
}

.admin-nav a:hover,
.admin-nav a.active {
    color: #fff;
    background: rgba(255,255,255,.12);
}

.admin-main {
    padding-top: 30px;
    padding-bottom: 60px;
}

.admin-version {
    color: #7a8497;
    font-size: .78rem;
    text-align: right;
    margin-bottom: 8px;
}

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

.admin-page-heading h1 {
    margin: 0 0 5px;
    font-size: clamp(1.65rem, 4vw, 2.2rem);
}

.admin-page-heading p {
    margin: 0;
    color: #69758a;
}

.admin-count-badge,
.admin-status-pill,
.admin-feedback-type,
.admin-id {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: .78rem;
    font-weight: 700;
}

.admin-count-badge { background: #e7edf7; color: #29466f; }
.admin-id { background: #edf1f7; color: #42516a; }
.admin-feedback-type { background: #eef5ff; color: #245487; }
.admin-status-pill { background: #eef1f5; color: #4a5668; }
.status-new { background: #fff0bf !important; color: #735500 !important; }
.status-confirmed { background: #dcecff !important; color: #174b83 !important; }
.status-in_progress { background: #e7dfff !important; color: #4e358d !important; }
.status-fixed { background: #dcf7e7 !important; color: #17613a !important; }
.status-rejected { background: #fde0e0 !important; color: #8c2727 !important; }
.status-duplicate { background: #ececf0 !important; color: #51515e !important; }

.admin-dashboard-grid,
.admin-status-grid,
.admin-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.admin-status-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.admin-metric-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.admin-dashboard-card,
.admin-status-card,
.admin-metric {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    padding: 18px;
    border-radius: 14px;
    border: 1px solid #dde5f0;
    background: #fff;
    color: #172640;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(21, 47, 82, .055);
}

.admin-dashboard-card strong,
.admin-status-card strong,
.admin-metric strong {
    font-size: 1.55rem;
    font-variant-numeric: tabular-nums;
}

.admin-dashboard-card span,
.admin-status-card span,
.admin-metric span {
    color: #6c788d;
    font-size: .84rem;
}

.admin-filter-bar {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px;
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid #dde5f0;
    border-radius: 14px;
}

.admin-filter-bar label,
.admin-feedback-actions label,
.admin-form-stack label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #5d6980;
    font-size: .82rem;
    font-weight: 700;
}

.admin-filter-search { flex: 1 1 260px; }

.admin-filter-bar input,
.admin-filter-bar select,
.admin-feedback-actions input,
.admin-feedback-actions select,
.admin-form-stack input {
    min-height: 40px;
    border: 1px solid #ccd6e5;
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
    color: #172640;
    font: inherit;
}

.admin-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 40px;
    border: 1px solid #cbd6e4;
    border-radius: 8px;
    padding: 8px 14px;
    background: #fff;
    color: #213b61;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.admin-button-primary { background: #17477f; border-color: #17477f; color: #fff; }
.admin-button-light { background: #f5f7fa; }

.admin-alert {
    padding: 12px 15px;
    margin: 0 0 18px;
    border-radius: 10px;
    border: 1px solid transparent;
}
.admin-alert-success { background: #e1f7e9; border-color: #bfe8cf; color: #185d38; }
.admin-alert-error { background: #fde5e5; border-color: #efc0c0; color: #862828; }
.admin-alert-warning { background: #fff4d1; border-color: #ecdca5; color: #6d5512; }

.admin-feedback-list { display: grid; gap: 14px; }
.admin-feedback-card {
    padding: 18px;
    border: 1px solid #dce4ef;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 3px 14px rgba(21,47,82,.045);
}

.admin-feedback-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.admin-feedback-top > div { display: flex; gap: 7px; flex-wrap: wrap; }
.admin-feedback-top time { color: #7b8698; font-size: .83rem; white-space: nowrap; }
.admin-feedback-message { line-height: 1.55; margin-bottom: 14px; }
.admin-feedback-meta { display: grid; gap: 6px; margin: 0 0 16px; font-size: .86rem; }
.admin-feedback-meta div { display: grid; grid-template-columns: 90px minmax(0,1fr); gap: 8px; }
.admin-feedback-meta dt { color: #7b8698; }
.admin-feedback-meta dd { margin: 0; overflow-wrap: anywhere; }

.admin-feedback-actions {
    display: grid;
    grid-template-columns: 180px minmax(220px, 1fr) auto;
    align-items: end;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid #edf1f6;
}

.admin-section {
    margin-top: 28px;
    padding: 18px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #dde5f0;
}
.admin-section h2 { margin: 0 0 14px; font-size: 1.15rem; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.admin-table th,
.admin-table td { text-align: left; padding: 10px 9px; border-bottom: 1px solid #e9eef5; vertical-align: top; }
.admin-table th { color: #647087; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.admin-table code { white-space: nowrap; }
.admin-empty { padding: 28px; border: 1px dashed #cad5e5; border-radius: 14px; color: #748096; text-align: center; }

.admin-login-body { display: grid; place-items: center; padding: 24px; }
.admin-login-card {
    width: min(100%, 420px);
    background: #fff;
    border: 1px solid #dce4ef;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 18px 50px rgba(18,42,79,.12);
}
.admin-login-card h1 { margin: 0 0 4px; }
.admin-login-card > p { margin: 0 0 22px; color: #6f7c91; }
.admin-form-stack { display: grid; gap: 14px; }

@media (max-width: 1000px) {
    .admin-status-grid { grid-template-columns: repeat(3, 1fr); }
    .admin-metric-grid { grid-template-columns: repeat(3, 1fr); }
    .admin-dashboard-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
    .admin-header-inner { align-items: flex-start; flex-direction: column; padding-top: 12px; padding-bottom: 12px; }
    .admin-nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
    .admin-nav a { white-space: nowrap; }
    .admin-page-heading { align-items: flex-start; flex-direction: column; }
    .admin-status-grid,
    .admin-metric-grid,
    .admin-dashboard-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-feedback-actions { grid-template-columns: 1fr; }
    .admin-feedback-top { align-items: flex-start; flex-direction: column; }
    .admin-feedback-meta div { grid-template-columns: 1fr; gap: 2px; }
}

/* ===== Admin feedback workflow v0.11.15 ===== */
.status-deployed { background: #dff3ff !important; color: #15566f !important; }
.status-verified { background: #d9f5df !important; color: #145c2e !important; }

.admin-status-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-heading-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-feedback-actions {
    grid-template-columns: 180px minmax(280px, 1fr) auto;
}

.admin-feedback-actions textarea,
.admin-json-form textarea,
.admin-json-form input[type="file"] {
    width: 100%;
    border: 1px solid #ccd6e5;
    border-radius: 8px;
    padding: 9px 10px;
    background: #fff;
    color: #172640;
    font: inherit;
    font-weight: 400;
}

.admin-feedback-actions textarea {
    min-height: 64px;
    resize: vertical;
    line-height: 1.45;
}

.admin-feedback-history {
    margin: 0 0 14px;
    border: 1px solid #e4eaf2;
    border-radius: 10px;
    background: #f9fbfd;
}

.admin-feedback-history > summary {
    cursor: pointer;
    padding: 10px 12px;
    color: #46546a;
    font-weight: 700;
    user-select: none;
}

.admin-feedback-history > ol {
    list-style: none;
    margin: 0;
    padding: 0 12px 12px;
    display: grid;
    gap: 8px;
}

.admin-feedback-history li {
    padding: 10px 11px;
    border: 1px solid #e2e8f1;
    border-radius: 9px;
    background: #fff;
}

.admin-history-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 5px;
    color: #758198;
    font-size: .76rem;
}

.admin-history-source {
    padding: 2px 6px;
    border-radius: 999px;
    background: #e8eef8;
    color: #385779;
    font-weight: 700;
}

.admin-history-status {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    color: #536078;
    font-size: .84rem;
}

.admin-history-comment {
    margin-top: 7px;
    color: #25344c;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.admin-json-form {
    display: grid;
    gap: 12px;
}

.admin-json-form label {
    display: grid;
    gap: 6px;
    color: #5d6980;
    font-size: .82rem;
    font-weight: 700;
}

.admin-json-form textarea {
    min-height: 260px;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: .84rem;
    line-height: 1.45;
}

.admin-json-or {
    color: #7c8799;
    font-size: .82rem;
    text-align: center;
}

.admin-help-text,
.admin-muted {
    color: #778397;
}

.admin-import-apply-form {
    margin-top: 16px;
}

.admin-code-block {
    margin: 0;
    padding: 14px;
    border-radius: 10px;
    background: #101c2e;
    color: #e7edf7;
    overflow-x: auto;
    font-size: .82rem;
    line-height: 1.5;
}

@media (max-width: 700px) {
    .admin-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-feedback-actions { grid-template-columns: 1fr; }
    .admin-heading-actions { justify-content: flex-start; }
}

/* ===== Admin feedback JSON export v0.11.16 ===== */
.admin-export-form {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.admin-feedback-select {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin-right: 1px;
    border: 1px solid #d6dfeb;
    border-radius: 7px;
    background: #f7f9fc;
    cursor: pointer;
}

.admin-feedback-select:hover {
    background: #edf3fa;
    border-color: #bfcde0;
}

.admin-feedback-select input {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: #17477f;
}

@media (max-width: 900px) {
    .admin-export-form { width: 100%; }
}


/* ==========================================================================
   v0.11.18 — spójność osi przystanków + dopracowanie LIVE i brygad
   ========================================================================== */

/* Treść pól formularzy ma pozostać czytelna; ciężar zostawiamy etykietom. */
input,
select,
textarea {
    font-weight: 500 !important;
}

input::placeholder,
textarea::placeholder {
    font-weight: 400;
}

/* Kanoniczna oś przystanków: linia zaczyna się i kończy na koralikach. */
.stop-timeline li {
    --timeline-marker-center: 10px;
    border-left: 0;
}

.stop-timeline-selectable li {
    --timeline-marker-center: 26px;
}

.stop-timeline li::before {
    position: absolute;
    z-index: 0;
    top: 0;
    bottom: 0;
    left: -1px;
    width: 2px;
    content: "";
    background: var(--soft-2);
}

.stop-timeline li:first-child::before {
    top: var(--timeline-marker-center);
}

.stop-timeline li:last-child::before,
.stop-timeline li.is-final-stop::before {
    top: 0;
    bottom: auto;
    height: var(--timeline-marker-center);
}

.stop-timeline li:only-child::before {
    display: none;
}

.timeline-marker {
    z-index: 1;
}

/* NŻ: geometria jak zwykły koralik, ale bez czerwonego środka.
   Zewnętrzny pierścień jest neutralny (szary), nie czerwony. */
.timeline-marker.is-request-stop {
    border-color: #fff;
    background: #fff;
    box-shadow: 0 0 0 1px var(--line);
}

/* Początek trasy: większy, pełny czerwony punkt. */
.stop-timeline li:first-child .timeline-marker {
    left: -8px;
    width: 14px;
    height: 14px;
    border: 0;
    background: var(--accent);
    box-shadow: 0 0 0 2px rgba(214, 40, 57, .16);
}

.stop-timeline-selectable li:first-child .timeline-marker {
    top: 19px;
}

/* Jeżeli przystanek początkowy jest NŻ, typ NŻ ma pierwszeństwo. */
.stop-timeline li:first-child .timeline-marker.is-request-stop {
    border: 3px solid #fff;
    background: #fff;
    box-shadow: 0 0 0 1px var(--line);
}

.live-summary-grid.is-compact {
    gap: 8px;
    margin: 14px 0 28px;
}

.live-summary-grid.is-compact .stat-card {
    min-height: 64px;
    padding: 10px 14px;
    border-radius: 12px;
}

.live-summary-grid.is-compact .stat-card span {
    font-size: 9px;
}

.live-summary-grid.is-compact .stat-card strong {
    font-size: 20px;
}

.live-vehicle-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: -4px 0 12px;
}

.live-vehicle-filters button,
.live-map-vehicle-link {
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--primary);
    background: #fff;
    font: inherit;
    font-size: 11px;
    font-weight: 650;
    cursor: pointer;
}

.live-vehicle-filters button {
    padding: 6px 11px;
}

.live-vehicle-filters button:hover,
.live-vehicle-filters button.is-active {
    border-color: var(--primary);
    color: #fff;
    background: var(--primary);
}

.live-map-vehicle-link {
    padding: 5px 8px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.live-map-vehicle-link:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
    background: var(--accent-soft);
}

.live-destination-cell {
    min-width: 145px;
    font-weight: 650;
}

.brigade-trip-expand-hint {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 11px;
}

/* Pomiar pojazdu: kolor oznacza faktyczne odchylenie od planu. */
.brigade-chart-line.is-observed.is-delayed {
    stroke: #c23838;
}

.brigade-chart-line.is-observed.is-early {
    stroke: #177245;
}

.brigade-chart-line.is-observed.is-on-time {
    stroke: #163a5f;
}

.brigade-chart-point.is-observed.is-delayed {
    fill: #c23838;
}

.brigade-chart-point.is-observed.is-early {
    fill: #177245;
}

.brigade-chart-point.is-observed.is-on-time {
    fill: #163a5f;
}

.brigade-punctuality-legend .is-observed::before {
    background: linear-gradient(
        90deg,
        #177245 0 33%,
        #163a5f 33% 66%,
        #c23838 66% 100%
    );
}

@media (max-width: 760px) {
    .live-summary-grid.is-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .live-destination-cell {
        min-width: 120px;
    }
}

/* ========================================================================== 
   v0.11.19 — kanoniczne koraliki w mini-route-list (widok rozkładu)
   ========================================================================== */

/*
 * Dalszy przebieg na stronie rozkładu używa osobnego komponentu
 * .mini-route-list. Oś jest rysowana pseudo-elementem, dzięki czemu kończy
 * się dokładnie w środku pierwszego i ostatniego koralika.
 */
.mini-route-list li {
    --mini-route-marker-center: 15px;
    border-left: 0;
}

.mini-route-list li::before {
    position: absolute;
    z-index: 0;
    top: 0;
    bottom: 0;
    left: 0;
    width: 2px;
    content: "";
    background: var(--soft-2);
}

.mini-route-list li:first-child::before {
    top: var(--mini-route-marker-center);
}

.mini-route-list li:last-child::before {
    top: 0;
    bottom: auto;
    height: var(--mini-route-marker-center);
}

.mini-route-list li:only-child::before {
    display: none;
}

.mini-route-list li > .mini-route-marker {
    z-index: 1;
}

/* NŻ: ten sam rozmiar co zwykły koralik, bez czerwonego środka.
   Obrzeże pozostaje neutralne, w kolorze osi/obramowań interfejsu. */
.mini-route-list li > .mini-route-marker.is-request-stop {
    border-color: #fff;
    background: #fff;
    box-shadow: 0 0 0 1px var(--line);
}

/* Początek trasy: pełny, większy czerwony punkt bez białej obwoluty. */
.mini-route-list li:first-child > .mini-route-marker:not(.is-request-stop) {
    left: -6px;
    top: 8px;
    width: 14px;
    height: 14px;
    border: 0;
    background: var(--accent);
    box-shadow: none;
}

/* Jeśli sam przystanek początkowy jest NŻ, semantyka NŻ ma pierwszeństwo. */
.mini-route-list li:first-child > .mini-route-marker.is-request-stop {
    left: -6px;
    top: 8px;
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    background: #fff;
    box-shadow: 0 0 0 1px var(--line);
}

/* ========================================================================== 
   v0.11.20 — doprecyzowanie NŻ + kompaktowy kalendarz rozkładu
   ========================================================================== */

/* NŻ ma białe wnętrze i neutralny szary pierścień. Używamy jawnego koloru,
   aby starsze reguły czerwonego markera nie przebijały przez kaskadę. */
.timeline-marker.is-request-stop,
.mini-route-list li > .mini-route-marker.is-request-stop,
.stop-timeline li:first-child .timeline-marker.is-request-stop,
.mini-route-list li:first-child > .mini-route-marker.is-request-stop {
    border-color: #fff;
    background: #fff;
    box-shadow: 0 0 0 1px #cfd6e2;
}

/* Po przeniesieniu selektora daty stary wiersz pod nawigacją znika całkowicie. */
.date-secondary-actions.is-empty {
    display: none;
}

.timetable-section-heading.has-date-controls {
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.timetable-date-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: auto;
}

.timetable-date-controls .date-today-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    text-decoration: none;
}

.date-picker-form.is-compact {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    align-items: center;
    gap: 0;
}

.date-picker-form.is-compact label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.date-picker-form.is-compact .schedule-date-calendar {
    width: 168px;
}

.date-picker-form.is-compact .stats-calendar-trigger {
    min-height: 38px;
    padding: 7px 10px;
    border-radius: 10px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 850;
}

/* Data zmienia stronę od razu po kliknięciu dnia, więc osobny przycisk
   „Pokaż” jest zbędny i nie zajmuje miejsca. */
.date-picker-form.is-compact > button[type="submit"] {
    display: none;
}

.schedule-date-calendar .stats-calendar-popover {
    right: 0;
    left: auto;
}

@media (max-width: 760px) {
    .timetable-section-heading.has-date-controls {
        align-items: stretch;
    }

    .timetable-date-controls {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .date-picker-form.is-compact {
        width: auto;
    }

    .date-picker-form.is-compact label {
        flex-wrap: wrap;
    }
}

@media (max-width: 520px) {
    .timetable-date-controls {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: end;
    }

    .date-picker-form.is-compact {
        width: 100%;
    }

    .date-picker-form.is-compact label {
        width: 100%;
    }

    .date-picker-form.is-compact .schedule-date-calendar {
        width: 100%;
        min-width: 150px;
    }
}

/* ========================================================================== 
   v0.11.21 — endpointy trasy + przeniesienie całej nawigacji daty
   ========================================================================== */

/* Pierwszy i ostatni przystanek są endpointami trasy: pełny czerwony koralik.
   Reguła jest umieszczona po regułach NŻ, więc endpoint ma pierwszeństwo także
   wtedy, gdy źródło opisze krańcowy przystanek jako NŻ. */
.stop-timeline li:first-child .timeline-marker,
.stop-timeline li:last-child .timeline-marker,
.stop-timeline li.is-final-stop .timeline-marker,
.mini-route-list li:first-child > .mini-route-marker,
.mini-route-list li:last-child > .mini-route-marker {
    left: -7px;
    width: 14px;
    height: 14px;
    border: 0;
    background: var(--accent);
    box-shadow: 0 0 0 2px rgba(214, 40, 57, .14);
}

/* Środek koralika ma pokrywać się dokładnie z końcem osi. */
.stop-timeline li:first-child .timeline-marker,
.stop-timeline li:last-child .timeline-marker,
.stop-timeline li.is-final-stop .timeline-marker {
    top: 3px;
}

.stop-timeline-selectable li:first-child .timeline-marker,
.stop-timeline-selectable li:last-child .timeline-marker,
.stop-timeline-selectable li.is-final-stop .timeline-marker {
    top: 19px;
}

.mini-route-list li:first-child > .mini-route-marker,
.mini-route-list li:last-child > .mini-route-marker {
    top: 8px;
}

/* Dawna samodzielna sekcja wyboru daty jest po relokacji pusta. Usuwamy ją,
   żeby nie zostawiała szerokiego białego pasa między nagłówkiem a odjazdami. */
.date-navigation-source-relocated {
    display: none !important;
}

.timetable-section-heading.has-date-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(520px, 650px);
    gap: 24px;
    align-items: center;
}

.timetable-heading-main {
    min-width: 0;
    display: flex;
    align-items: end;
    gap: 16px;
    flex-wrap: wrap;
}

.timetable-heading-main .section-count {
    margin-bottom: 6px;
}

.timetable-date-panel {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(300px, 1fr) minmax(170px, 190px);
    gap: 12px;
    align-items: center;
}

.timetable-date-nav {
    min-width: 0;
}

.date-toolbar.is-embedded {
    width: 100%;
    max-width: none;
    margin: 0;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 9px;
}

.date-toolbar.is-embedded .date-arrow {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    font-size: 19px;
}

.date-toolbar.is-embedded .date-current small {
    font-size: 9px;
}

.date-toolbar.is-embedded .date-current strong {
    margin-top: 0;
    font-size: 17px;
    line-height: 1.15;
}

.date-toolbar.is-embedded .schedule-type {
    margin-top: 5px;
    padding: 3px 8px;
    font-size: 8px !important;
}

.timetable-date-extras {
    min-width: 0;
    display: grid;
    gap: 5px;
    align-items: center;
}

.timetable-date-panel .timetable-date-controls {
    width: 100%;
    display: block;
    margin: 0;
}

.timetable-date-panel .date-today-link {
    display: none;
}

.timetable-date-panel .date-picker-form.is-compact,
.timetable-date-panel .date-picker-form.is-compact label {
    width: 100%;
}

.timetable-date-panel .date-picker-form.is-compact label {
    display: grid;
    gap: 5px;
}

.timetable-date-panel .date-picker-form.is-compact .schedule-date-calendar {
    width: 100%;
}

/* Poprzednio bardziej szczegółowa reguła .date-picker-form button nadawała
   triggerowi granatowe tło. Tutaj jawnie przywracamy wygląd pola kalendarza. */
.timetable-date-panel .date-picker-form.is-compact .stats-calendar-trigger {
    min-height: 40px;
    padding: 7px 10px;
    border: 1px solid #cbd3df;
    border-radius: 10px;
    color: var(--ink);
    background: #fff;
    font-size: 11px;
    font-weight: 750;
}

.timetable-date-panel .date-picker-form.is-compact .stats-calendar-trigger:hover {
    border-color: #aeb9c8;
    background: #fff;
}

.timetable-date-panel .date-range-note {
    margin: 0;
    font-size: 8px;
    line-height: 1.25;
    text-align: right;
}

@media (max-width: 1050px) {
    .timetable-section-heading.has-date-panel {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .timetable-date-panel {
        max-width: 650px;
    }
}

@media (max-width: 640px) {
    .timetable-date-panel {
        grid-template-columns: 1fr;
    }

    .timetable-date-panel .date-range-note {
        text-align: left;
    }
}


/* ========================================================================== 
   v0.11.22 — spójny moduł daty + stabilny popup kalendarza
   ========================================================================== */

/* Panel po prawej ma teraz jedną kolumnę: toolbar z centralnym blokiem daty. */
.timetable-section-heading.has-date-panel {
    grid-template-columns: minmax(240px, 1fr) minmax(360px, 560px);
}

.timetable-date-panel {
    display: block;
    min-width: 0;
}

.timetable-date-nav {
    width: 100%;
}

.date-toolbar.is-embedded {
    grid-template-columns: 42px minmax(230px, 1fr) 42px;
    gap: 12px;
    align-items: center;
}

.date-toolbar.is-embedded .date-current {
    position: relative;
    min-width: 0;
}

/* INNA DATA jest bezpośrednio pod typem rozkładu, w tej samej osi. */
.date-current .timetable-date-controls.is-under-current-date {
    display: grid;
    justify-items: center;
    width: 100%;
    margin: 8px 0 0;
}

.date-current .timetable-date-controls.is-under-current-date .date-picker-form.is-compact {
    width: auto;
    margin: 0;
}

.date-current .timetable-date-controls.is-under-current-date .date-picker-form.is-compact label {
    display: grid;
    justify-items: center;
    gap: 4px;
    width: auto;
    text-align: center;
}

.date-current .timetable-date-controls.is-under-current-date .schedule-date-calendar {
    width: 170px;
}

.date-current .timetable-date-controls.is-under-current-date .stats-calendar-trigger {
    min-height: 36px;
    padding: 6px 10px;
    border: 1px solid #cbd3df;
    border-radius: 10px;
    color: var(--ink);
    background: #fff;
    font-size: 11px;
    font-weight: 750;
}

.date-current .timetable-date-controls.is-under-current-date .stats-calendar-trigger:hover {
    border-color: #aeb9c8;
    background: #fff;
}

/* Popup rozwija się centralnie pod polem, a nie przy prawej krawędzi panelu. */
.date-current .schedule-date-calendar .stats-calendar-popover {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    z-index: 80;
}

.date-current .date-range-note.is-under-current-date {
    margin: 5px 0 0;
    font-size: 8px;
    line-height: 1.25;
    text-align: center;
}

/* Link „Dzisiaj” (gdy oglądamy inną datę) również należy do modułu daty. */
.date-current .timetable-date-controls.is-under-current-date .date-today-link {
    display: inline-flex;
    margin-bottom: 5px;
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent;
}

@media (max-width: 1050px) {
    .timetable-section-heading.has-date-panel {
        grid-template-columns: 1fr;
    }

    .timetable-date-panel {
        max-width: 560px;
    }
}

@media (max-width: 640px) {
    .date-toolbar.is-embedded {
        grid-template-columns: 38px minmax(190px, 1fr) 38px;
        gap: 8px;
    }

    .date-current .timetable-date-controls.is-under-current-date .schedule-date-calendar {
        width: min(170px, 100%);
    }
}


/* ========================================================================== 
   v0.11.23 — redesign modułu daty na stronie rozkładu
   ========================================================================== */

/* Stare klasy 0.11.20–0.11.22 pozostają w arkuszu dla kompatybilności,
   ale nowy komponent ma własny scope i jednoznacznie przejmuje layout. */
.timetable-section-heading.has-date-redesign {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 430px) !important;
    align-items: center !important;
    gap: 28px !important;
    margin-bottom: 20px;
}

.schedule-heading-summary {
    display: flex;
    align-items: end;
    gap: 14px;
    flex-wrap: wrap;
    min-width: 0;
}

.schedule-heading-summary .section-count {
    margin-bottom: 6px;
}

/* Jedna karta = jedna odpowiedzialność: sterowanie dniem rozkładu. */
.schedule-date-card {
    width: 100%;
    min-width: 0;
    padding: 13px 15px 10px;
    border: 1px solid rgba(16, 42, 86, .11);
    border-radius: 16px;
    background: rgba(255, 255, 255, .84);
    box-shadow: 0 8px 24px rgba(16, 42, 86, .055);
}

.schedule-date-card .date-toolbar.schedule-date-card-nav {
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) 38px !important;
    align-items: center !important;
    gap: 11px !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

.schedule-date-card .date-arrow {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    border-color: rgba(16, 42, 86, .16);
    background: #fff;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(16, 42, 86, .04);
}

.schedule-date-card .date-arrow:hover {
    border-color: var(--primary);
    background: #f9fbfe;
}

.schedule-date-card .date-current {
    min-width: 0;
    text-align: center;
}

.schedule-date-card .date-current small {
    margin: 0 0 1px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.2;
    font-weight: 850;
    letter-spacing: .08em;
}

.schedule-date-card .date-current strong {
    margin: 0;
    color: var(--ink);
    font-size: 19px;
    line-height: 1.15;
    letter-spacing: -.015em;
}

.schedule-date-card .date-current .schedule-type {
    margin-top: 5px;
    padding: 3px 8px;
    font-size: 8px !important;
    line-height: 1.25;
}

/* Akcje są podrzędne względem daty — nie konkurują z nią wizualnie. */
.schedule-date-card-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 9px;
    padding-top: 8px;
    border-top: 1px solid rgba(16, 42, 86, .075);
}

.schedule-date-card .timetable-date-controls.is-redesigned {
    display: contents;
}

.schedule-date-card .date-picker-form.is-compact {
    display: block;
    width: auto;
    margin: 0;
}

.schedule-date-card .date-picker-form.is-compact .schedule-date-picker-label {
    display: block;
    width: auto;
    color: transparent;
    font-size: 0;
    line-height: 0;
    text-transform: none;
}

.schedule-date-card .date-picker-form.is-compact .schedule-date-calendar {
    width: auto;
    min-width: 0;
}

.schedule-date-card .stats-calendar-trigger {
    min-height: 34px;
    padding: 6px 11px;
    border: 1px solid rgba(16, 42, 86, .16);
    border-radius: 9px;
    color: var(--primary);
    background: #fff;
    font-size: 11px;
    line-height: 1;
    font-weight: 800;
    box-shadow: none;
}

.schedule-date-card .stats-calendar-trigger:hover {
    border-color: var(--primary);
    background: #f8fafc;
}

.schedule-date-card .stats-calendar-value {
    font-size: 11px;
    line-height: 1;
}

.schedule-date-card .stats-calendar-icon {
    margin-left: 7px;
    font-size: 9px;
}

.schedule-date-card .schedule-date-today-link {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    margin: 0;
    padding: 6px 10px;
    border: 0;
    border-radius: 9px;
    color: var(--primary);
    background: transparent;
    font-size: 11px;
    line-height: 1;
    font-weight: 800;
    text-decoration: none;
}

.schedule-date-card .schedule-date-today-link:hover {
    background: rgba(16, 42, 86, .055);
}

.schedule-date-card .schedule-date-range {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 8.5px;
    line-height: 1.25;
    text-align: center;
}

/* Popup jest częścią karty, ale może wyjść poza jej dolną krawędź. */
.schedule-date-card,
.schedule-date-card-actions,
.schedule-date-card .schedule-date-calendar {
    overflow: visible;
}

.schedule-date-card .schedule-date-calendar {
    position: relative;
}

.schedule-date-card .schedule-date-calendar .stats-calendar-popover {
    right: auto !important;
    left: 50% !important;
    z-index: 120;
    transform: translateX(-50%) !important;
    margin-top: 7px;
}

/* Dawny biały moduł daty znika całkowicie po relokacji. */
.date-navigation-source-relocated {
    display: none !important;
}

@media (max-width: 980px) {
    .timetable-section-heading.has-date-redesign {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .schedule-date-card {
        max-width: 430px;
    }
}

@media (max-width: 560px) {
    .timetable-section-heading.has-date-redesign {
        gap: 12px !important;
    }

    .schedule-heading-summary {
        gap: 10px;
    }

    .schedule-date-card {
        max-width: none;
        padding: 11px 12px 9px;
        border-radius: 14px;
    }

    .schedule-date-card .date-toolbar.schedule-date-card-nav {
        grid-template-columns: 36px minmax(0, 1fr) 36px !important;
        gap: 8px !important;
    }

    .schedule-date-card .date-arrow {
        width: 36px;
        height: 36px;
    }

    .schedule-date-card .date-current strong {
        font-size: 17px;
    }

    .schedule-date-card-actions {
        margin-top: 8px;
        padding-top: 7px;
    }

    .schedule-date-card .schedule-date-calendar .stats-calendar-popover {
        position: fixed;
        left: 50% !important;
        right: auto !important;
        top: 50% !important;
        bottom: auto !important;
        width: min(330px, calc(100vw - 24px));
        max-width: none;
        transform: translate(-50%, -50%) !important;
        margin: 0;
        z-index: 300;
        box-shadow: 0 24px 70px rgba(16, 42, 86, .24);
    }
}

/* ========================================================================== 
   v0.11.24 — LIVE: mniejsze markery, sortowanie, lokalizacja użytkownika
   ========================================================================== */

.live-map-locate-button {
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--primary);
    background: #fff;
    font: inherit;
    font-size: 11px;
    font-weight: 850;
    cursor: pointer;
}

.live-map-locate-button:hover {
    border-color: rgba(16, 42, 86, .28);
    background: var(--soft);
}

.live-map-locate-button:disabled {
    cursor: wait;
    opacity: .62;
}

.live-map-locate-status {
    max-width: 260px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.35;
}

.live-sort-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    font-weight: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    cursor: pointer;
}

.live-sort-button:hover,
.live-sort-button.is-active {
    color: var(--primary);
}

.live-sort-button [data-live-sort-indicator] {
    min-width: 10px;
    font-size: 11px;
    line-height: 1;
}

/* Marker ma być czytelny także przy dużym zagęszczeniu pojazdów. */
.vehicle-map-bus {
    width: 36px;
    height: 28px;
    grid-template-columns: 14px minmax(0, 1fr);
    gap: 1px;
    padding: 3px 4px;
    border: 2px solid #cbd3df;
    border-radius: 9px;
    color: #314056;
    background: rgba(255, 255, 255, .96);
    box-shadow:
        0 3px 8px rgba(16, 42, 86, .16),
        0 0 0 1px rgba(255, 255, 255, .70);
}

.vehicle-map-bus.is-delayed {
    color: #8f3c37;
    border-color: #e6aaa5;
    background: rgba(255, 249, 248, .97);
}

.vehicle-map-bus.is-early {
    color: #287252;
    border-color: #a9d8c1;
    background: rgba(248, 253, 250, .97);
}

.vehicle-map-bus.is-on-time {
    color: #294f83;
    border-color: #a9bfdc;
    background: rgba(248, 251, 255, .97);
}

.vehicle-map-bus.is-unknown {
    color: #5e6773;
    border-color: #cbd1d8;
    background: rgba(252, 252, 253, .97);
}

.vehicle-map-bus.is-terminal {
    color: #765f25;
    border-color: #dccd9f;
    background: rgba(255, 253, 246, .97);
}

.vehicle-map-bus-symbol {
    width: 14px;
    height: 14px;
}

.vehicle-map-bus-route {
    min-width: 12px;
    font-size: 10px;
    font-weight: 950;
}

.vehicle-map-direction {
    top: -8px;
    left: 13px;
    width: 8px;
    height: 8px;
    font-size: 8px;
}

.live-alert-section[hidden] {
    display: none !important;
}

@media (max-width: 720px) {
    .live-map-toolbar label,
    .live-map-fit-button,
    .live-map-locate-button {
        width: 100%;
    }

    .live-map-locate-status {
        max-width: none;
    }
}


/* ==========================================================================
   v0.11.25 — brygada: jedna, rozwijana lista kursów
   ========================================================================== */
.brigade-trips-help {
    max-width: 760px;
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.55;
}

/* Stare zestawienie kursów zostało usunięte z widoku. Poniższy komponent
   jest jednocześnie zestawieniem dnia i wejściem do szczegółów kursu. */
.brigade-trip-details-unified {
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.brigade-trip-table-head {
    display: grid;
    grid-template-columns: 68px 54px minmax(260px, 1fr) minmax(90px, 130px) 112px 22px;
    gap: 10px;
    align-items: center;
    padding: 9px 13px;
    color: var(--muted);
    background: #fafbfc;
    border-bottom: 1px solid var(--line);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.brigade-trip-details-unified .brigade-trip-card {
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
}

.brigade-trip-details-unified .brigade-trip-card:last-child {
    border-bottom: 0;
}

.brigade-trip-details-unified .brigade-trip-card.is-predicted {
    border-color: var(--line);
}

.brigade-trip-details-unified .brigade-trip-card > summary {
    grid-template-columns: 68px 54px minmax(260px, 1fr) minmax(90px, 130px) 112px 22px;
    gap: 10px;
    min-height: 54px;
    padding: 9px 13px;
    transition: background .14s ease;
}

.brigade-trip-details-unified .brigade-trip-card > summary:hover {
    background: #f8fafc;
}

.brigade-trip-details-unified .brigade-trip-card.is-live > summary {
    background: #f4fbff;
}

.brigade-trip-details-unified .brigade-trip-card[open] > summary {
    background: #f7f9fc;
}

.brigade-trip-details-unified .brigade-trip-card.is-live[open] > summary {
    background: #eef8ff;
}

.brigade-trip-vehicle {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: 10px;
    font-weight: 800;
}

.brigade-trip-chevron {
    display: inline-grid;
    width: 22px;
    height: 22px;
    place-items: center;
    justify-self: end;
    color: var(--muted);
    font-size: 17px;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform .16s ease, color .16s ease;
}

.brigade-trip-card[open] > summary .brigade-trip-chevron {
    color: var(--primary);
    transform: rotate(180deg);
}

.brigade-trip-details-unified .brigade-trip-route strong {
    font-size: 10px;
}

.brigade-trip-details-unified .brigade-trip-route small {
    font-size: 7.5px;
}

@media (max-width: 860px) {
    .brigade-trip-table-head {
        display: none;
    }

    .brigade-trip-details-unified .brigade-trip-card > summary {
        grid-template-columns: 58px 42px minmax(0, 1fr) 24px;
        grid-template-rows: auto auto;
        gap: 7px 8px;
        padding: 11px 12px;
    }

    .brigade-trip-details-unified .brigade-trip-time {
        grid-column: 1;
        grid-row: 1;
    }

    .brigade-trip-details-unified .live-route-badge {
        grid-column: 2;
        grid-row: 1;
    }

    .brigade-trip-details-unified .brigade-trip-route {
        grid-column: 3;
        grid-row: 1;
    }

    .brigade-trip-details-unified .brigade-trip-chevron {
        grid-column: 4;
        grid-row: 1;
    }

    .brigade-trip-details-unified .brigade-trip-vehicle {
        grid-column: 3 / 5;
        grid-row: 2;
        color: var(--muted);
        font-size: 9px;
    }

    .brigade-trip-details-unified .brigade-trip-vehicle::before {
        content: 'Pojazd: ';
        font-weight: 700;
    }

    .brigade-trip-details-unified .brigade-status {
        grid-column: 1 / 3;
        grid-row: 2;
        justify-self: start;
    }
}

@media (max-width: 520px) {
    .brigade-trip-details-unified .brigade-trip-card > summary {
        grid-template-columns: 54px 38px minmax(0, 1fr) 22px;
    }

    .brigade-trip-details-unified .brigade-trip-route strong {
        white-space: normal;
        line-height: 1.35;
    }
}

/* v0.11.26 — lista brygad: świeża obserwacja LIVE */
.brigade-list-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 7px;
    padding: 2px 6px;
    border: 1px solid #bfe3d5;
    border-radius: 999px;
    color: #176c50;
    background: #effaf5;
    font-size: 8px;
    font-weight: 900;
    line-height: 1.2;
    vertical-align: middle;
    white-space: nowrap;
}

.brigade-list-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #28a578;
    box-shadow: 0 0 0 2px rgba(40, 165, 120, .14);
}

/* v0.11.44 — mapa punktualności kursu: legenda przystanków i jawna predykcja. */
.brigade-punctuality-map-card {
    margin: 1rem 1rem 0;
    padding: 1rem;
    border: 1px solid #d7dee8;
    border-radius: 14px;
    background: #fff;
}

.brigade-punctuality-map-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .8rem;
}

.brigade-punctuality-map-heading > div:first-child {
    min-width: 0;
}

.brigade-punctuality-map-heading strong,
.brigade-punctuality-map-heading span {
    display: block;
}

.brigade-punctuality-map-heading strong {
    color: #172b4d;
    font-size: 1rem;
}

.brigade-punctuality-map-heading > div:first-child > span {
    margin-top: .25rem;
    color: #5e6c84;
    font-size: .84rem;
    line-height: 1.45;
}

.brigade-punctuality-map-legend {
    display: grid;
    gap: .42rem;
    color: #42526e;
    font-size: .77rem;
}

.brigade-punctuality-map-legend-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: .35rem .7rem;
}

.brigade-punctuality-map-legend-row > strong {
    color: #344054;
    font-size: .75rem;
}

.brigade-punctuality-map-legend span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    white-space: nowrap;
}

.brigade-punctuality-map-legend-row.is-segments span::before {
    width: 1.45rem;
    height: 4px;
    border-radius: 999px;
    background: #718096;
    content: "";
}

.brigade-punctuality-map-legend-row.is-segments .is-improving::before {
    background: #2f855a;
}

.brigade-punctuality-map-legend-row.is-segments .is-worsening::before {
    background: #c53030;
}

.brigade-punctuality-map-legend-row.is-segments .is-prediction::before {
    height: 0;
    border-top: 4px dashed #667085;
    border-radius: 0;
    background: transparent;
}

.brigade-punctuality-map-legend-row.is-stops span::before {
    width: .72rem;
    height: .72rem;
    flex: 0 0 .72rem;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #718096;
    box-shadow: 0 0 0 1px rgb(16 42 86 / 16%);
    content: "";
}

.brigade-punctuality-map-legend-row.is-stops .is-on-time::before {
    background: #2b6cb0;
}

.brigade-punctuality-map-legend-row.is-stops .is-delay::before {
    background: #c53030;
}

.brigade-punctuality-map-legend-row.is-stops .is-early::before {
    background: #2f855a;
}

.brigade-punctuality-map-legend-row.is-stops .is-prediction::before {
    border-color: #fff;
    border-style: dashed;
    background: #667085;
}

.brigade-punctuality-map-canvas {
    position: relative;
    min-height: 420px;
    overflow: hidden;
    border: 1px solid #d8e0ea;
    border-radius: 12px;
    background: #eef3f8;
}

.brigade-punctuality-map-loading {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1rem;
    color: #5e6c84;
    text-align: center;
}

.brigade-punctuality-map-footer {
    display: flex;
    justify-content: space-between;
    gap: .75rem 1rem;
    margin-top: .7rem;
    color: #6b778c;
    font-size: .76rem;
    line-height: 1.4;
}

.brigade-map-stop-icon-container {
    background: transparent;
    border: 0;
}

.brigade-map-stop-marker {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #718096;
    color: #fff;
    box-shadow: 0 1px 6px rgb(16 42 86 / 30%);
}

.brigade-map-stop-marker strong {
    font-size: .68rem;
    line-height: 1;
}

.brigade-map-stop-marker.is-delay {
    background: #c53030;
}

.brigade-map-stop-marker.is-early {
    background: #2f855a;
}

.brigade-map-stop-marker.is-on-time {
    background: #2b6cb0;
}

.brigade-map-stop-marker.is-unknown {
    background: #718096;
}

.brigade-map-stop-marker.is-predicted {
    border-style: dashed;
    background: #667085;
    opacity: .82;
}

.brigade-map-stop-marker.is-first,
.brigade-map-stop-marker.is-last {
    box-shadow: 0 0 0 3px rgb(16 42 86 / 18%), 0 1px 6px rgb(16 42 86 / 30%);
}

.brigade-map-popup {
    min-width: 240px;
}

.brigade-map-popup > strong {
    display: block;
    margin-bottom: .5rem;
    color: #172b4d;
    font-size: .95rem;
}

.brigade-map-popup dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: .22rem .65rem;
    margin: 0;
    font-size: .8rem;
}

.brigade-map-popup dt {
    color: #6b778c;
}

.brigade-map-popup dd {
    margin: 0;
    color: #172b4d;
    font-weight: 600;
}

@media (max-width: 760px) {
    .brigade-punctuality-map-card {
        margin-right: .6rem;
        margin-left: .6rem;
        padding: .75rem;
    }

    .brigade-punctuality-map-heading,
    .brigade-punctuality-map-footer {
        flex-direction: column;
    }

    .brigade-punctuality-map-legend {
        justify-content: flex-start;
    }

    .brigade-punctuality-map-canvas {
        min-height: 330px;
    }
}

/* v0.11.45 — LIVE na mapie kursu i ostatnia znana pozycja pojazdu. */
.brigade-punctuality-map-legend-row.is-stops .is-vehicle::before {
    width: 1.25rem;
    height: .78rem;
    flex-basis: 1.25rem;
    border: 2px solid #fff;
    border-radius: .26rem;
    background: #172b4d;
    box-shadow: 0 0 0 1px rgb(16 42 86 / 20%);
}

.brigade-map-vehicle-icon-container {
    overflow: visible !important;
    background: transparent;
    border: 0;
}

.brigade-map-vehicle-marker {
    position: relative;
    display: inline-flex;
    min-width: 50px;
    height: 30px;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 7px;
    border: 3px solid #fff;
    border-radius: 9px;
    background: #172b4d;
    color: #fff;
    box-shadow: 0 2px 9px rgb(16 42 86 / 38%);
    white-space: nowrap;
}

.brigade-map-vehicle-marker::after {
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 0;
    height: 0;
    border-top: 7px solid #172b4d;
    border-right: 6px solid transparent;
    border-left: 6px solid transparent;
    content: "";
    transform: translateX(-50%);
}

.brigade-map-vehicle-symbol {
    font-size: .7rem;
    line-height: 1;
    transform: rotate(90deg);
}

.brigade-map-vehicle-marker strong {
    font-size: .72rem;
    line-height: 1;
}

.brigade-punctuality-map-vehicle-status {
    flex: 1 1 100%;
    padding-top: .15rem;
    color: #172b4d;
    font-weight: 700;
}

.brigade-punctuality-map-vehicle-status::before {
    margin-right: .32rem;
    color: #2f855a;
    content: "●";
}

.brigade-punctuality-map-vehicle-status.is-stale {
    color: #667085;
}

.brigade-punctuality-map-vehicle-status.is-stale::before {
    color: #98a2b3;
}

/* 0.11.50 — wspólny panel anomalii tras i przypisań brygada-pojazd */
.route-anomalies-page {
    padding: 2rem 0 3rem;
}

.route-anomalies-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.route-anomalies-header h1 {
    margin: .15rem 0 .45rem;
}

.route-anomalies-lead {
    max-width: 900px;
    margin: 0;
    color: #475467;
    line-height: 1.6;
}

.route-anomaly-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .8rem;
    margin: 1.2rem 0;
}

.route-anomaly-metrics article {
    display: grid;
    gap: .2rem;
    padding: 1rem;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    background: #fff;
}

.route-anomaly-metrics span,
.route-anomaly-metrics small {
    color: #667085;
}

.route-anomaly-metrics strong {
    font-size: 1.7rem;
    color: #101828;
}

.route-anomaly-filters {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr)) auto;
    align-items: end;
    gap: .7rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    background: #f8fafc;
}

.route-anomaly-filters label {
    display: grid;
    gap: .35rem;
    min-width: 0;
}

.route-anomaly-filters label > span {
    font-size: .8rem;
    font-weight: 700;
    color: #475467;
}

.route-anomaly-select-shell {
    position: relative;
    display: block;
    min-width: 0;
}

.route-anomaly-select-shell::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 14px;
    width: 8px;
    height: 8px;
    margin-top: -6px;
    border-right: 2px solid #536177;
    border-bottom: 2px solid #536177;
    transform: rotate(45deg);
    pointer-events: none;
}

.route-anomaly-filters select {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 9px 38px 9px 11px;
    border: 1px solid #cbd3df;
    border-radius: 11px;
    color: var(--ink);
    background: #fff;
    font: inherit;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.route-anomaly-filters select:hover {
    border-color: #98a2b3;
}

.route-anomaly-filters select:focus {
    outline: 3px solid rgba(16, 42, 86, .12);
    border-color: var(--primary);
}

.route-anomaly-filter-actions {
    display: flex;
    gap: .45rem;
    flex-wrap: wrap;
}

.route-anomaly-list {
    display: grid;
    gap: .75rem;
}

.route-anomaly-card {
    overflow: hidden;
    border: 1px solid #e4e7ec;
    border-left-width: 5px;
    border-radius: 14px;
    background: #fff;
}

.route-anomaly-card.is-high { border-left-color: #b42318; }
.route-anomaly-card.is-medium { border-left-color: #b54708; }
.route-anomaly-card.is-low { border-left-color: #667085; }

.route-anomaly-card-main {
    display: grid;
    grid-template-columns: 145px minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
}

.route-anomaly-time {
    display: grid;
    gap: .2rem;
}

.route-anomaly-time strong {
    font-size: .9rem;
}

.route-anomaly-time span {
    font-size: .78rem;
    color: #667085;
}

.route-anomaly-description {
    min-width: 0;
}

.route-anomaly-title-row,
.route-anomaly-meta {
    display: flex;
    align-items: center;
    gap: .55rem;
    flex-wrap: wrap;
}

.route-anomaly-detail {
    color: #475467;
    font-size: .88rem;
}

.route-anomaly-meta {
    margin-top: .55rem;
    color: #667085;
    font-size: .82rem;
}

.route-anomaly-meta strong {
    color: #344054;
}

.route-anomaly-badge {
    display: inline-flex;
    align-items: center;
    padding: .32rem .55rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
}

.route-anomaly-badge.is-high {
    background: #fef3f2;
    color: #b42318;
}

.route-anomaly-badge.is-medium {
    background: #fffaeb;
    color: #b54708;
}

.route-anomaly-badge.is-low {
    background: #f2f4f7;
    color: #475467;
}

.route-anomaly-details {
    border-top: 1px solid #eaecf0;
    background: #fcfcfd;
}

.route-anomaly-details > summary {
    cursor: pointer;
    padding: .7rem 1rem;
    font-size: .84rem;
    font-weight: 700;
    color: #344054;
}

.route-anomaly-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    padding: 0 1rem 1rem;
}

.route-anomaly-details-grid h3 {
    margin: .2rem 0 .7rem;
    font-size: .92rem;
}

.route-anomaly-details-grid dl {
    display: grid;
    grid-template-columns: minmax(120px, .6fr) minmax(0, 1.4fr);
    gap: .35rem .75rem;
    margin: 0;
    font-size: .8rem;
}

.route-anomaly-details-grid dt {
    color: #667085;
    overflow-wrap: anywhere;
}

.route-anomaly-details-grid dd {
    margin: 0;
    color: #101828;
    overflow-wrap: anywhere;
}

.route-anomaly-empty {
    padding: 1.4rem;
    border: 1px dashed #d0d5dd;
    border-radius: 14px;
    background: #fff;
}

.route-anomaly-empty p,
.route-anomalies-footnote {
    color: #667085;
}

.route-anomalies-footnote {
    margin: 1.25rem 0 0;
    font-size: .82rem;
    line-height: 1.55;
}

@media (max-width: 980px) {
    .route-anomaly-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .route-anomaly-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .route-anomaly-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .route-anomalies-header {
        display: grid;
    }

    .route-anomaly-metrics,
    .route-anomaly-filters,
    .route-anomaly-details-grid {
        grid-template-columns: 1fr;
    }

    .route-anomaly-card-main {
        grid-template-columns: 1fr;
        gap: .7rem;
    }

    .route-anomaly-actions {
        justify-self: start;
    }

    .route-anomaly-details-grid dl {
        grid-template-columns: 1fr;
        gap: .15rem;
    }

    .route-anomaly-details-grid dd {
        margin-bottom: .4rem;
    }
}

/* ========================================================================== */
/* v0.11.57 — panel analityki wyszukiwarki                                    */
/* ========================================================================== */
.admin-dashboard-card-warning strong,
.admin-search-alert-metric strong {
    color: #9a3f2c;
}

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

.admin-section-heading h2 {
    margin-bottom: 4px;
}

.admin-section-heading p {
    margin: 0;
    max-width: 900px;
    color: #748096;
    font-size: .84rem;
    line-height: 1.5;
}

.admin-search-table td:first-child {
    min-width: 180px;
}

.admin-search-table td {
    font-variant-numeric: tabular-nums;
}

.admin-search-key {
    display: block;
    margin-top: 3px;
    color: #8a95a8;
    font-size: .74rem;
    font-weight: 500;
}

.admin-search-no-results-section {
    border-color: #ead8c5;
    background: #fffdfa;
}

.admin-search-no-result-cell {
    color: #9a3f2c;
    font-weight: 800;
}

.admin-search-warning-pill,
.admin-search-event {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: .75rem;
    font-weight: 800;
    white-space: nowrap;
}

.admin-search-warning-pill,
.admin-search-event-no_results {
    background: #fff0e8;
    color: #963d27;
}

.admin-search-event-suggestion_click {
    background: #e7f4ff;
    color: #245886;
}

.admin-search-event-submit {
    background: #edf0f7;
    color: #485976;
}

@media (max-width: 700px) {
    .admin-section-heading {
        flex-direction: column;
    }
}

/* ======================================================================
   0.12.0 — profile portalu: public / staging / Transportometr
   ====================================================================== */
.portal-environment-banner {
    position: relative;
    z-index: 1200;
    padding: .38rem .8rem;
    text-align: center;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .04em;
    color: #5b3b00;
    background: #fff2c6;
    border-bottom: 1px solid #e7c96b;
}


.live-brigade-link.is-noninteractive,
.vehicle-popup-brigade.is-noninteractive {
    color: inherit;
    text-decoration: none;
    cursor: default;
    border-bottom: 0;
}

.portal-profile-public .live-brigade-link.is-noninteractive:hover,
.portal-profile-public .vehicle-popup-brigade.is-noninteractive:hover {
    color: inherit;
    text-decoration: none;
}

.admin-profile-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .34rem .62rem;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 800;
    background: #eef4ff;
    color: #173b78;
    border: 1px solid #c7d7f3;
}

.admin-profile-pill.is-public {
    background: #ecfdf3;
    border-color: #abefc6;
    color: #067647;
}

.admin-profile-pill.is-development {
    background: #fff6dd;
    border-color: #f5d37a;
    color: #7a4f00;
}

.admin-feature-table td,
.admin-feature-table th {
    vertical-align: middle;
}

.admin-feature-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.4rem;
    padding: .25rem .5rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
}

.admin-feature-state.is-on {
    color: #067647;
    background: #ecfdf3;
}

.admin-feature-state.is-off {
    color: #b42318;
    background: #fef3f2;
}

.admin-runtime-note {
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e4e7ec;
    margin: 1rem 0;
}

.admin-runtime-note.is-warning {
    background: #fffaeb;
    border-color: #fedf89;
}

.admin-runtime-path {
    display: block;
    margin-top: .35rem;
    overflow-wrap: anywhere;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: .78rem;
}

/* ------------------------------------------------------------------
   0.12.1 — branded 404 page
   ------------------------------------------------------------------ */
.error-page-wrap {
    padding: 2.2rem 0 3rem;
}

.error-hero {
    display: grid;
    gap: 1.25rem;
    background: linear-gradient(135deg, #102a56 0%, #1b4f91 100%);
    color: #fff;
    border-radius: 22px;
    padding: 1.6rem;
    box-shadow: 0 20px 45px rgba(16, 42, 86, .18);
}

.error-code-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    width: fit-content;
    padding: .45rem .8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .2);
    font-size: .85rem;
    font-weight: 800;
    letter-spacing: .04em;
}

.error-hero h1 {
    margin: 0;
    font-size: clamp(1.9rem, 3vw, 2.8rem);
    line-height: 1.1;
}

.error-hero p {
    margin: 0;
    max-width: 48rem;
    color: rgba(255, 255, 255, .92);
}

.error-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1.35rem;
}

.error-panel {
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 18px;
    padding: 1.15rem 1.2rem;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .06);
}

.error-panel h2,
.error-panel h3 {
    margin: 0 0 .55rem;
}

.error-panel p {
    margin: 0;
    color: #475467;
}

.error-actions {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-top: 1rem;
}

.error-action-card {
    display: block;
    text-decoration: none;
    color: #101828;
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 16px;
    padding: 1rem 1.05rem;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .05);
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.error-action-card:hover {
    transform: translateY(-1px);
    border-color: #98a2b3;
    box-shadow: 0 14px 30px rgba(16, 24, 40, .08);
}

.error-action-card strong {
    display: block;
    margin-bottom: .25rem;
    font-size: 1rem;
}

.error-action-card span {
    display: block;
    color: #475467;
    font-size: .92rem;
}

.error-path {
    margin-top: .85rem;
    padding: .85rem 1rem;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #eaecf0;
    color: #344054;
    font-size: .95rem;
    overflow-wrap: anywhere;
}

.error-path code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: .9em;
}

.error-tips {
    margin: .85rem 0 0;
    padding-left: 1.1rem;
    color: #475467;
}

.error-tips li + li {
    margin-top: .35rem;
}

@media (min-width: 900px) {
    .error-grid {
        grid-template-columns: minmax(0, 1.25fr) minmax(300px, .85fr);
        align-items: start;
    }
}
