:root {
    --sekobus-primary: #8d2524;
    --sekobus-secondary: #54708e;
    --sekobus-warning: #ff9800;
    --sekobus-success: #286f0b;
    --sekobus-danger: #da4733;
    --sekobus-dark: #1a1a1c;
    --sekobus-surface: #fffbf7;
    --sekobus-background: #f4eee7;
    --sekobus-line: #ddd4cc;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(141, 37, 36, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(84, 112, 142, 0.14), transparent 34%),
        linear-gradient(180deg, #f8f3ee 0%, #efe7dd 100%);
}

body {
    color: #2f2824;
}

a {
    color: inherit;
}

.app-logo {
    font-weight: 800;
    letter-spacing: 0.08em;
}

.app-user-area {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    min-width: 0;
    margin-left: 0.75rem;
}

.app-user-label {
    margin-right: 0;
    max-width: min(30vw, 220px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-user-menu .mud-icon-button {
    padding: 6px;
}

.main-appbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.active-icon-button {
    background: rgba(255, 255, 255, 0.16) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.12);
}

.active-icon-button:hover {
    background: rgba(255, 255, 255, 0.24) !important;
}

.main-drawer {
    background:
        linear-gradient(180deg, rgba(255, 251, 247, 0.98) 0%, rgba(246, 238, 230, 0.98) 100%);
    border-right: 1px solid var(--sekobus-line);
}

.main-drawer.drawer-initializing,
.main-drawer.drawer-initializing * {
    transition: none !important;
    animation: none !important;
}

.filter-drawer {
    background:
        linear-gradient(180deg, rgba(255, 251, 247, 0.99) 0%, rgba(244, 236, 227, 0.99) 100%);
}

/* ====================== Horizontal menu (podle Erplitex shell.css) ====================== */

.horizontal-menu-shell {
    /* Ukotvení pod fixním appbarem. top musí sedět na renderovanou výšku appbaru,
       kterou MudBlazor mění responsivně — breakpointy jsou zrcadlené z MudBlazoru:
       base 7/8, landscape 3/4, ≥600px plná --mud-appbar-height. */
    position: sticky;
    top: calc(var(--mud-appbar-height, 64px) - var(--mud-appbar-height, 64px)/8);
    z-index: 100;
    height: var(--shell-menu-height, 58px);
    min-height: var(--shell-menu-height, 58px);
    border-bottom: 1px solid var(--sekobus-line);
    background: rgba(255, 251, 247, 0.96);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(8px);
}

@media (orientation: landscape) {
    .horizontal-menu-shell {
        top: calc(var(--mud-appbar-height, 64px) - var(--mud-appbar-height, 64px)/4);
    }
}

@media (min-width: 600px) {
    .horizontal-menu-shell {
        top: var(--mud-appbar-height, 64px);
    }
}

.horizontal-menu-strip {
    display: flex;
    align-items: flex-start;
    gap: 0.22rem;
    height: 100%;
    padding: 0.16rem 0.32rem;
}

.horizontal-menu-row {
    display: grid;
    grid-auto-columns: max-content;
    grid-auto-flow: column;
    align-items: start;
    column-gap: 0.35rem;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.2rem;
    scrollbar-width: none;
}

.horizontal-menu-row::-webkit-scrollbar {
    display: none;
}

.horizontal-scroll-arrow {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    opacity: 0.7;
    align-self: center;
}

.horizontal-menu-item {
    min-width: 98px;
    max-width: 114px;
    min-height: 46px;
    padding: 0.24rem 0.25rem;
    border: 1px solid transparent;
    border-radius: 10px;
    text-transform: none;
    transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.horizontal-menu-item:hover {
    background: rgba(141, 37, 36, 0.07);
}

.horizontal-menu-item-active,
.horizontal-menu-item-active:hover {
    background: var(--mud-palette-primary) !important;
    color: var(--mud-palette-primary-text) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.horizontal-menu-item-inner {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.08rem;
    width: 100%;
    line-height: 1;
}

.horizontal-menu-item-icon {
    font-size: 1.03rem;
}

.horizontal-menu-item-label {
    display: block;
    max-width: 100%;
    font-size: 0.68rem;
    font-weight: 600;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.horizontal-menu-cell {
    display: flex;
    min-width: 0;
}

.horizontal-menu-item.menu-group-item {
    border: 1px solid rgba(141, 37, 36, 0.15);
    background: rgba(141, 37, 36, 0.03);
}

.horizontal-menu-item.menu-group-item:hover {
    background: rgba(141, 37, 36, 0.07);
}

.horizontal-menu-item-active .horizontal-menu-item-label,
.horizontal-menu-item-active .horizontal-menu-item-icon {
    color: var(--mud-palette-primary-text) !important;
}

.horizontal-submenu-popover {
    padding-top: 0.85rem;
}

.horizontal-submenu-menu-surface {
    width: min(86vw, 300px);
    max-width: min(86vw, 300px);
    padding: 0.55rem;
    border-radius: 18px;
    border: 1px solid rgba(141, 37, 36, 0.12);
    background: color-mix(in srgb, var(--mud-palette-surface) 92%, white 8%);
    box-shadow: 0 16px 36px rgba(92, 24, 24, 0.18), 0 4px 14px rgba(92, 24, 24, 0.08);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.horizontal-submenu-menu-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.34rem;
    width: 100%;
    max-height: min(calc(100dvh - var(--mud-appbar-height, 64px) - 5rem), 70vh);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.horizontal-submenu-link {
    width: 100%;
    border-radius: 12px;
    text-transform: none;
    white-space: normal;
    min-height: 42px;
    padding: 0.34rem 0.95rem;
    font-size: 0.88rem;
    font-weight: 600;
    justify-content: flex-start;
    line-height: 1.2;
}

.horizontal-submenu-link .mud-button-label {
    width: 100%;
    justify-content: flex-start;
}

.horizontal-submenu-link-active {
    background: var(--mud-palette-primary) !important;
    color: var(--mud-palette-primary-text) !important;
    border-color: transparent !important;
}

.main-shell {
    min-height: calc(100vh - 64px - var(--shell-menu-height, 0px));
}

.main-shell-content {
    min-height: calc(100vh - 64px - var(--shell-menu-height, 0px));
    padding: 1.5rem clamp(1rem, 2vw, 2rem) 2rem;
}

.page-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-title-row h1 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.1;
    color: var(--sekobus-primary);
}

.page-title-row h1:focus,
.page-title-row h1:focus-visible {
    outline: none;
    box-shadow: none;
}

/* Rychlé hledání nad tabulkou (knihovní DataGridToolbar) — knihovna ho roztahuje jen v MudDataGrid,
   Sekobus používá MudTable, proto stejná pravidla i tady. */
.mud-table .mud-table-toolbar > .page-toolbar {
    width: 100%;
    flex: 1 1 100%;
    min-width: 0;
}

.mud-table .mud-table-toolbar .data-grid-toolbar-search {
    display: flex;
    flex: 1 1 24rem;
    min-width: 0;
}

.mud-table .mud-table-toolbar .data-grid-toolbar-search .data-grid-toolbar-search__field {
    flex: 1 1 auto;
}

/* Seznamy: zkrácené dlouhé texty v buňkách. */
.table-cell-truncate {
    display: inline-block;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

.page-subtitle {
    margin: 0.35rem 0 0;
    color: var(--sekobus-secondary);
}

.calendar-period-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.35rem;
    border: 1px solid rgba(141, 37, 36, 0.12);
    border-radius: 999px;
    background: rgba(255, 251, 247, 0.9);
}

.calendar-period-label {
    padding: 0 0.4rem 0 0.5rem;
    font-weight: 700;
    color: var(--sekobus-primary);
    white-space: nowrap;
}

.calendar-stats {
    margin-bottom: 1rem;
}

.calendar-density-toggle,
.calendar-layout-toggle {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    border: 1px solid rgba(141, 37, 36, 0.12);
    border-radius: 999px;
    background: rgba(255, 251, 247, 0.82);
    box-shadow: 0 10px 20px rgba(84, 112, 142, 0.08);
}

.calendar-density-label {
    padding: 0 0.25rem 0 0.1rem;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sekobus-secondary);
}

.calendar-axis-primary,
.calendar-axis-secondary {
    display: block;
}

.calendar-axis-primary {
    line-height: 1.2;
}

.calendar-axis-secondary {
    margin-top: 0.2rem;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.calendar-dirty-chip {
    margin-top: 0.6rem;
}

.toolbar-card {
    margin-bottom: 1rem;
}

.filter-root {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.filter-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    /* Knihovní FilterContainer nechává odsazení obsahu na aplikaci. */
    padding: 1rem;
}

.filter-action-bar {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 1rem;
    border-bottom: 1px solid rgba(141, 37, 36, 0.12);
    background: linear-gradient(180deg, rgba(255, 251, 247, 0.98) 0%, rgba(251, 245, 239, 0.98) 100%);
}

.section-gap {
    margin-top: 1rem;
}

.field-gap {
    margin-top: 0.75rem;
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(141, 37, 36, 0.14);
    border-radius: 16px;
    background: rgba(255, 251, 247, 0.86);
    box-shadow: 0 10px 24px rgba(84, 112, 142, 0.08);
}

.calendar-legend-title {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sekobus-primary);
}

.calendar-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #3b3531;
}

.calendar-legend-swatch {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 4px 10px rgba(15, 23, 42, 0.12);
}

/* Stav položky jízdy (AttendanceChip) — stejné barvy jako bloky na plachtě. */
.attendance-chip.att-type-1,
.attendance-chip.att-type-2,
.attendance-chip.att-type-3,
.attendance-chip.att-type-4,
.attendance-chip.att-type-5 {
    color: #fff !important;
}

.attendance-chip.att-type-1 { background: var(--sekobus-warning) !important; }
.attendance-chip.att-type-2 { background: var(--sekobus-success) !important; }
.attendance-chip.att-type-3 { background: var(--sekobus-danger) !important; }
.attendance-chip.att-type-4 { background: var(--sekobus-secondary) !important; }
.attendance-chip.att-type-5 { background: #a28c4e !important; }

.calendar-legend-swatch.att-type-1 {
    background: var(--sekobus-warning);
}

.calendar-legend-swatch.att-type-2 {
    background: var(--sekobus-success);
}

.calendar-legend-swatch.att-type-3 {
    background: var(--sekobus-danger);
}

.calendar-legend-swatch.att-type-4 {
    background: var(--sekobus-secondary);
}

.calendar-legend-swatch.att-type-5 {
    background: #a28c4e;
}

.calendar-legend-swatch.inactive {
    background: #94a3b8;
}

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

/* Editor jízdy: položky (úseky) jako karty se souhrnným řádkem. */
.route-item-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.route-item-card {
    overflow: hidden;
}

.route-item-card-conflict {
    border-color: var(--mud-palette-error) !important;
}

.route-item-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    cursor: pointer;
    user-select: none;
}

.route-item-card-header:hover {
    background: var(--mud-palette-action-default-hover);
}

.route-item-card-title {
    flex: 1 1 auto;
    min-width: 0;
}

.route-item-card-label {
    display: flex;
    gap: 0.35rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.route-item-card-order {
    color: var(--mud-palette-text-secondary);
}

.route-item-card-summary {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.route-item-card-badges,
.route-item-card-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
}

.route-item-card-price {
    font-weight: 600;
    white-space: nowrap;
}

.route-item-card-body {
    padding: 0.75rem 1rem 1rem;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.route-item-price-field {
    display: flex;
    align-items: flex-start;
    gap: 0.25rem;
}

.route-item-price-field > .mud-input-control {
    flex: 1 1 auto;
    min-width: 0;
}

@media (max-width: 599.98px) {
    .route-item-card-header {
        flex-wrap: wrap;
    }

    .route-item-card-title {
        flex-basis: calc(100% - 3rem);
    }

    .route-item-card-badges {
        margin-left: 2.25rem;
    }

    .route-item-card-actions {
        margin-left: auto;
    }
}

/* Odkud ⇄ Kam: celý řádek formuláře, na úzkém displeji pod sebou. */
.route-place-fields {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    gap: 0.25rem;
}

.route-place-fields > .mud-input-control {
    flex: 1 1 0;
    min-width: 0;
}

.route-place-swap {
    margin-top: 0.45rem;
}

@media (max-width: 599.98px) {
    .route-place-fields {
        flex-direction: column;
        align-items: stretch;
    }

    .route-place-swap {
        align-self: center;
        margin-top: 0;
        transform: rotate(90deg);
    }
}

/* Dashboard (Přehled): panely se seznamy jízd, kolizí a neúplných jízd. */
.section-gap-bottom {
    margin-bottom: 1rem;
}

.dashboard-panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
    gap: 1rem;
}

.dashboard-panel {
    padding: 0.85rem 1rem 1rem;
    border-radius: 16px;
    background: rgba(255, 251, 247, 0.94);
}

.dashboard-panel-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.dashboard-panel-title {
    font-weight: 700;
}

.dashboard-panel-empty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0;
    color: var(--sekobus-secondary);
}

.dashboard-list {
    display: flex;
    flex-direction: column;
}

.dashboard-list-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.55rem 0.5rem;
    border-radius: 10px;
    text-decoration: none;
    border-bottom: 1px solid rgba(141, 37, 36, 0.08);
}

.dashboard-list-item:hover {
    background: rgba(141, 37, 36, 0.05);
}

.dashboard-list-primary {
    font-weight: 600;
}

.dashboard-list-secondary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: #6e625b;
}

.auth-loading-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-panel {
    width: 100%;
    max-width: 420px;
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid rgba(141, 37, 36, 0.16);
    background: rgba(255, 251, 247, 0.94);
    box-shadow: 0 24px 64px rgba(84, 112, 142, 0.16);
    backdrop-filter: blur(10px);
}

.login-brand {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    color: #8d2524;
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-caption {
    color: var(--sekobus-secondary);
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-remember {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 40px;
    cursor: pointer;
}

.login-remember input {
    width: 18px;
    height: 18px;
    accent-color: var(--sekobus-primary);
}

.route-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.vehicle-calendar-wrapper {
    position: relative;
    overflow: auto;
    height: max(420px, calc(100vh - 18rem - var(--shell-menu-height, 0px)));
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    box-shadow: inset 0 0 0 1px rgba(141, 37, 36, 0.08);
    /* scrollbar-gutter: stable both-edges; */
}

.vehicle-calendar-wrapper::-webkit-scrollbar {
    width: 16px;
    height: 16px;
}

.vehicle-calendar-wrapper::-webkit-scrollbar-thumb {
    background: rgba(141, 37, 36, 0.78);
    border-radius: 999px;
    border: 3px solid #f7f2ec;
}

.vehicle-calendar-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(141, 37, 36, 0.92);
}

.vehicle-calendar-wrapper::-webkit-scrollbar-track {
    background: rgba(234, 215, 215, 0.75);
}

.calendar-workspace {
    display: block;
}

/* Kalendář vyplní výšku okna pod menu. Kolečko nad kalendářem nejdřív posune stránku
   (calendar-shortcuts.js), teprve pak kalendář uvnitř — hlavička kalendáře pak zůstává vidět. */
.calendar-main-card {
    min-width: 0;
}

.calendar-main-card .vehicle-calendar-wrapper {
    height: max(420px, calc(100vh - var(--mud-appbar-height, 64px) - var(--shell-menu-height, 0px) - 1.5rem));
}

.calendar-main-card-content {
    height: 100%;
}

/* Rychlá editace jako plovoucí panel u místa výběru; hlavičkou jde přetáhnout. */
.calendar-popover {
    position: fixed;
    z-index: 1150;
    top: 120px;
    right: 16px;
    width: min(540px, calc(100vw - 32px));
    max-height: calc(100vh - var(--mud-appbar-height, 64px) - var(--shell-menu-height, 0px) - 24px);
    display: flex;
}

.calendar-popover:not(.placed) {
    visibility: hidden;
}

.calendar-popover.dragging {
    user-select: none;
}

.calendar-side-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 100%;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(52, 24, 24, 0.28), 0 4px 14px rgba(52, 24, 24, 0.12) !important;
    border: 1px solid rgba(141, 37, 36, 0.16);
}

.calendar-popover-handle {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 0.75rem 0.5rem 1rem;
    cursor: move;
    background: rgba(141, 37, 36, 0.05);
    border-bottom: 1px solid rgba(141, 37, 36, 0.12);
    touch-action: none;
}

.calendar-popover-handle > .calendar-popover-title {
    flex: 1 1 auto;
    min-width: 0;
}

.calendar-side-panel-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    padding: 0.75rem 1rem 1rem;
}

.calendar-side-panel-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(141, 37, 36, 0.12);
    background: rgba(255, 251, 247, 0.98);
}

.calendar-side-panel-actions .calendar-side-actions-spacer {
    flex: 1 1 auto;
}

.calendar-side-action-button {
    width: 100%;
    min-height: 42px;
}

.calendar-side-action-button .mud-button-label {
    white-space: normal;
    text-align: center;
    line-height: 1.2;
}

.calendar-side-section-title {
    color: var(--sekobus-primary);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.calendar-side-action-menu,
.calendar-side-action-menu .mud-menu-activator {
    display: block;
    width: 100%;
}

.calendar-side-header {
    align-items: flex-start;
    margin-bottom: 0;
}

.calendar-side-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.calendar-time-field {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
}

.calendar-time-input {
    flex: 1 1 auto;
}

.calendar-time-stepper {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding-top: 0.45rem;
}

.calendar-time-step-button {
    width: 32px;
    height: 24px;
    border-radius: 10px;
    background: rgba(141, 37, 36, 0.08);
}

.calendar-time-step-button:hover {
    background: rgba(141, 37, 36, 0.14);
}

.calendar-selection-empty {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
}

.vehicle-calendar {
    position: relative;
    width: max-content;
    min-width: max-content;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
}

.vehicle-calendar th,
.vehicle-calendar td {
    border: 1px solid #dbe3ec;
}

.vehicle-calendar .vehicle-head {
    position: sticky;
    left: 0;
    z-index: 10;
    min-width: 220px;
    max-width: 220px;
    padding: 0.85rem 1rem;
    text-align: left;
    background: #fff7f5;
    box-shadow: 1px 0 0 rgba(141, 37, 36, 0.08);
}

.vehicle-calendar .vehicle-scale-head {
    font-size: 0.75rem;
    color: #5b6670;
}

.vehicle-calendar .day-head {
    position: sticky;
    top: 0;
    z-index: 11;
    width: 180px;
    min-width: 180px;
    padding: 0.75rem;
    height: 56px;
    text-align: center;
    background: var(--sekobus-primary);
    color: #fff;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.12);
}

.vehicle-calendar .day-head.today {
    background: var(--sekobus-secondary);
}

/* Víkendy a státní svátky (CzechHolidayCalendar). */
.vehicle-calendar .day-head.non-working:not(.today) {
    background: #6a1b1a;
}

.vehicle-calendar .day-head .calendar-axis-secondary {
    color: rgba(255, 255, 255, 0.84);
}

.vehicle-calendar .vehicle-column-head {
    white-space: normal;
    word-break: break-word;
    line-height: 1.25;
}

.vehicle-calendar .day-scale-head {
    position: sticky;
    top: 56px;
    z-index: 10;
    width: 180px;
    min-width: 180px;
    padding: 0.5rem 0.75rem;
    background: #f8fafc;
    box-shadow: inset 0 -1px 0 rgba(141, 37, 36, 0.08);
}

.vehicle-calendar thead .vehicle-head {
    top: 0;
    z-index: 14;
    background: var(--sekobus-primary);
    color: #fff;
    box-shadow: 1px 0 0 rgba(255, 255, 255, 0.08), inset 0 -1px 0 rgba(255, 255, 255, 0.12);
}

.vehicle-calendar thead .vehicle-scale-head {
    top: 56px;
    z-index: 15;
    background: linear-gradient(180deg, #7d201f 0%, #6f1c1b 100%);
    color: #fff7f5;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.vehicle-calendar .day-row-head {
    background: #fffaf7;
}

.vehicle-calendar .day-row-head.non-working:not(.today) {
    background: #f3e6df;
}

.vehicle-calendar .day-row-head.today {
    background: #fff1e9;
    color: var(--sekobus-primary);
}

.vehicle-calendar .day-row-head .calendar-axis-secondary {
    margin-top: 0.25rem;
    color: #6b7280;
}

.vehicle-calendar .vehicle-day {
    width: 180px;
    min-width: 180px;
    padding: 0;
    background: rgba(255, 255, 255, 0.92);
}

.vehicle-calendar .vehicle-day.today {
    background: rgba(255, 247, 237, 0.92);
}

.day-scale {
    position: relative;
    height: 22px;
    font-size: 0.72rem;
    color: #64748b;
}

.day-scale .tick {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
}

.day-scale .tick.start {
    left: 0;
    transform: none;
}

.day-scale .tick.end {
    left: 100%;
    transform: translateX(-100%);
}

.day-inner {
    position: relative;
    min-height: 110px;
    overflow: visible;
}

.day-inner.drag-target {
    background: rgba(84, 112, 142, 0.05);
}

.calendar-drop-surface {
    position: absolute;
    inset: 0;
    z-index: 6;
    border: 2px dashed transparent;
    border-radius: 10px;
    background: rgba(84, 112, 142, 0.04);
}

.calendar-drop-surface.active {
    border-color: rgba(84, 112, 142, 0.75);
    background: rgba(84, 112, 142, 0.14);
}

.calendar-selection-preview {
    position: absolute;
    z-index: 3;
    border: 2px dashed rgba(84, 112, 142, 0.8);
    border-radius: 10px;
    background: rgba(84, 112, 142, 0.18);
    pointer-events: none;
}

.calendar-hover-line {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 3;
    width: 0;
    border-left: 1px dashed rgba(84, 112, 142, 0.95);
    pointer-events: none;
}

.calendar-hover-badge {
    position: absolute;
    /* Při tažení nesmí štítek ani čára zachytit myš — OffsetX by se počítal relativně k nim. */
    pointer-events: none;
    top: 0.35rem;
    z-index: 8;
    transform: translateX(-50%);
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    background: rgba(47, 40, 36, 0.92);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.16);
    pointer-events: none;
    transition: left 110ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 140ms ease;
}

.calendar-drag-preview {
    position: absolute;
    z-index: 7;
    min-height: 36px;
    border-radius: 10px;
    border: 2px dashed rgba(84, 112, 142, 0.9);
    background: rgba(84, 112, 142, 0.18);
    box-sizing: border-box;
    pointer-events: none;
    transform-origin: center center;
    transition: left 110ms cubic-bezier(0.22, 1, 0.36, 1), width 110ms cubic-bezier(0.22, 1, 0.36, 1), top 110ms cubic-bezier(0.22, 1, 0.36, 1), height 110ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 140ms ease, transform 140ms ease;
}

.calendar-drag-preview-badge {
    pointer-events: none;
    position: absolute;
    top: 0.35rem;
    z-index: 9;
    transform: translateX(-50%);
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    background: rgba(84, 112, 142, 0.96);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
    pointer-events: none;
    transition: left 110ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 140ms ease;
}

.calendar-create-link {
    position: absolute;
    right: 0.35rem;
    bottom: 0.35rem;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 24px;
    padding: 0 0.55rem;
    border-radius: 999px;
    border: 1px dashed rgba(141, 37, 36, 0.18);
    background: rgba(255, 255, 255, 0.56);
    backdrop-filter: blur(8px);
    color: rgba(141, 37, 36, 0.74);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
    opacity: 0;
    pointer-events: none;
    transform: translateY(0.22rem) scale(0.98);
    transition: opacity 140ms ease, transform 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.day-inner:hover .calendar-create-link,
.day-inner:focus-within .calendar-create-link,
.day-inner.drag-target .calendar-create-link {
    opacity: 0.96;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.calendar-create-link:hover,
.calendar-create-link:focus-visible {
    background: rgba(255, 247, 245, 0.94);
    border-color: rgba(141, 37, 36, 0.5);
    color: #8d2524;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.09);
}

.current-time-line {
    position: absolute;
    pointer-events: none;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(220, 38, 38, 0.5);
    z-index: 2;
}

.calendar-block {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.05rem;
    padding: 0.2rem 0.45rem;
    min-height: 36px;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    box-sizing: border-box;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
    overflow: visible;
    z-index: 4;
    border: 0;
    text-align: left;
    font: inherit;
    cursor: pointer;
    transform-origin: center center;
    transition: box-shadow 140ms ease, filter 140ms ease, transform 140ms ease;
}

.calendar-block-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.05rem;
    min-width: 0;
    /* Blok obsah centruje — bez omezení by delší popisek u úzkého bloku přetekl na obě strany místo „…“. */
    max-width: 100%;
    overflow: hidden;
}

.calendar-block:hover {
    z-index: 18;
    filter: brightness(1.05);
}

.calendar-block:focus-visible {
    z-index: 18;
}

/* Kolize vozidla nebo řidiče (RouteConflictDetector) — výrazný přerušovaný okraj a ikona. */
.calendar-block.conflict {
    outline: 2px dashed #fff;
    outline-offset: -4px;
    box-shadow: 0 0 0 2px var(--sekobus-danger), 0 8px 18px rgba(15, 23, 42, 0.2);
}

.calendar-block.conflict .calendar-block-main::before {
    content: "⚠ ";
}

/* Úsek pokračuje mimo buňku (vozidla ve sloupcích: po dnech; jinak okraj zobrazeného období) — rovný okraj. */
.calendar-block.continues-before {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.calendar-block.continues-after {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.calendar-block.selected {
    z-index: 12;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.96), 0 0 0 4px rgba(84, 112, 142, 0.6), 0 14px 28px rgba(15, 23, 42, 0.22);
    filter: brightness(1.03);
}

.calendar-block.resizing {
    z-index: 20;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.96), 0 0 0 4px rgba(141, 37, 36, 0.42), 0 14px 28px rgba(15, 23, 42, 0.22);
    pointer-events: none;
    transition: left 110ms cubic-bezier(0.22, 1, 0.36, 1), width 110ms cubic-bezier(0.22, 1, 0.36, 1), top 110ms cubic-bezier(0.22, 1, 0.36, 1), height 110ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 140ms ease, transform 140ms ease;
}

.calendar-block-tooltip {
    position: absolute;
    left: 50%;
    top: calc(100% + 0.65rem);
    z-index: 80;
    width: max-content;
    max-width: min(360px, calc(100vw - 2rem));
    padding: 0.8rem 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    background:
        linear-gradient(145deg, rgba(24, 28, 38, 0.98) 0%, rgba(52, 34, 30, 0.96) 100%);
    color: #fffaf4;
    font-size: 0.79rem;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.01em;
    white-space: pre-line;
    box-shadow: 0 22px 40px rgba(15, 23, 42, 0.3), 0 8px 18px rgba(141, 37, 36, 0.18);
    backdrop-filter: blur(12px);
    transform: translateX(-50%) translateY(0.35rem);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s ease;
}

.calendar-block-tooltip::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -0.48rem;
    width: 0.95rem;
    height: 0.95rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    border-left: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(145deg, rgba(24, 28, 38, 0.98) 0%, rgba(52, 34, 30, 0.96) 100%);
    transform: translateX(-50%) rotate(45deg);
}

.calendar-block-tooltip::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.calendar-block:hover .calendar-block-tooltip,
.calendar-block:focus-visible .calendar-block-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.calendar-block-resize-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 10px;
    z-index: 2;
    cursor: ew-resize;
}

.calendar-block-resize-handle::before {
    content: "";
    position: absolute;
    top: 3px;
    bottom: 3px;
    width: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 0 1px rgba(47, 40, 36, 0.14);
}

.calendar-block-resize-handle.start {
    left: 0;
}

.calendar-block-resize-handle.start::before {
    left: 2px;
}

.calendar-block-resize-handle.end {
    right: 0;
}

.calendar-block-resize-handle.end::before {
    right: 2px;
}

.calendar-block.tiny {
    min-width: 10px;
    height: 16px;
    min-height: 16px;
    padding: 0;
}

.calendar-block.default {
    background: var(--sekobus-primary);
}

.calendar-block.att-type-1 {
    background: var(--sekobus-warning);
}

.calendar-block.att-type-2 {
    background: var(--sekobus-success);
}

.calendar-block.att-type-3 {
    background: var(--sekobus-danger);
}

.calendar-block.att-type-4 {
    background: var(--sekobus-secondary);
}

.calendar-block.att-type-5 {
    background: #a28c4e;
}

.calendar-block.inactive {
    background: #94a3b8;
}

.calendar-block-main,
.calendar-block-time {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.72rem;
    line-height: 1.05;
}

.calendar-block-time {
    opacity: 0.85;
}

.calendar-selection-preview,
.calendar-drag-preview,
.calendar-block.resizing {
    transform-origin: center center;
}

.calendar-selection-preview.snap-feedback-a,
.calendar-selection-preview.snap-feedback-b,
.calendar-drag-preview.snap-feedback-a,
.calendar-drag-preview.snap-feedback-b,
.calendar-block.resizing.snap-feedback-a,
.calendar-block.resizing.snap-feedback-b {
    animation: calendar-snap-pulse 170ms ease-out;
}

@keyframes calendar-snap-pulse {
    0% {
        transform: scale(0.992);
        filter: brightness(1);
    }

    45% {
        transform: scale(1.014);
        filter: brightness(1.04);
    }

    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}

.calendar-workspace.density-compact .calendar-block {
    min-height: 24px;
    padding: 0.04rem 0.28rem;
    border-radius: 7px;
    box-shadow: 0 6px 14px rgba(14, 30, 37, 0.14);
}

.calendar-workspace.density-compact .calendar-block.tiny {
    height: 12px;
    min-height: 12px;
}

.calendar-workspace.density-compact .calendar-block-main {
    gap: 0.1rem;
    font-size: 0.62rem;
}

.calendar-workspace.density-compact .calendar-block-time {
    font-size: 0.54rem;
}

.calendar-workspace.density-compact .calendar-create-link {
    right: 0.24rem;
    bottom: 0.24rem;
    min-width: 36px;
    height: 18px;
    padding: 0 0.4rem;
    font-size: 0.58rem;
}

/* ====================== Seznam jízd (/admin/routes) ====================== */

.route-list-table .mud-table-body .mud-table-cell {
    vertical-align: top;
}

.route-list-muted {
    color: var(--mud-palette-text-secondary);
}

.route-list-secondary {
    margin-top: 0.15rem;
    font-size: 0.8rem;
    color: var(--mud-palette-text-secondary);
}

.route-list-warning-text {
    color: var(--sekobus-warning);
    font-weight: 600;
}

.mud-icon-root.route-list-icon {
    flex: 0 0 auto;
    font-size: 1rem;
    color: var(--sekobus-secondary);
}

.route-list-term {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
}

.route-list-term-days {
    font-weight: 600;
}

.route-list-term-times {
    font-size: 0.82rem;
    color: var(--sekobus-secondary);
}

.route-list-term-live {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.15rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--sekobus-success);
}

.route-list-term-live::before {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: currentColor;
}

/* Položky jako text: číslo, začátek a popis na nejvýš dva řádky (celý text v detailu a v title). */
.route-list-items {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.route-list-item {
    display: grid;
    grid-template-columns: 1.3rem auto minmax(0, 1fr);
    column-gap: 0.45rem;
    align-items: baseline;
}

.route-list-items.single .route-list-item {
    grid-template-columns: minmax(0, 1fr);
}

.route-list-item-no {
    color: var(--mud-palette-text-secondary);
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.route-list-item-time {
    font-size: 0.82rem;
    color: var(--sekobus-secondary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.route-list-item-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.route-list-item-places {
    font-weight: 600;
}

.route-list-item-separator {
    color: var(--mud-palette-text-secondary);
}

.route-list-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--sekobus-primary);
    font: inherit;
    font-size: 0.82rem;
    cursor: pointer;
}

.route-list-link:hover {
    text-decoration: underline;
}

.route-list-link .route-list-icon {
    color: inherit;
}

.route-list-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.1rem 1rem;
    font-size: 0.82rem;
    color: var(--mud-palette-text-secondary);
}

.route-list-note {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
    max-width: 100%;
    margin-top: 0.25rem;
}

.route-list-note-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.route-list-customer {
    font-weight: 500;
    overflow-wrap: anywhere;
}

.route-list-job {
    white-space: nowrap;
}

.route-list-assignee,
.route-list-vehicle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Dlouhý název vozidla se SPZ se zalomí — ikona zůstane u prvního řádku. */
.route-list-vehicle {
    align-items: flex-start;
}

.route-list-vehicle .route-list-icon {
    margin-top: 0.15rem;
}

.route-list-vehicle {
    margin-top: 0.2rem;
    font-size: 0.85rem;
    color: var(--mud-palette-text-secondary);
}

.route-list-assignee-cell .mud-chip {
    margin: 0 0 0.2rem;
}

.license-plate {
    display: inline-block;
    padding: 0 0.35rem;
    border: 1px solid var(--sekobus-line);
    border-radius: 4px;
    background: #fff;
    color: var(--mud-palette-text-primary);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.route-list-status-cell .route-chip-list .mud-chip {
    margin: 0;
}

.route-list-actions-cell {
    white-space: nowrap;
}

/* Rozbalený řádek navazuje na svůj řádek jízdy (stejné podbarvení, bez dělicí čáry). */
.route-list-table .mud-table-row.route-list-row-expanded,
.route-list-table .mud-table-row.route-list-detail-row {
    background: rgba(141, 37, 36, 0.045);
}

.route-list-table .route-list-row-expanded > .mud-table-cell {
    border-bottom: 0;
}

.route-list-detail-cell {
    padding: 0.25rem 1rem 1rem 3.25rem !important;
}

@media (min-width: 961px) {
    .route-list-table .mud-table-cell {
        padding-left: 10px;
        padding-right: 10px;
    }

    .route-list-toggle-cell {
        width: 44px;
        padding-right: 0 !important;
    }

    .route-list-term-cell {
        width: 1%;
    }

    .route-list-main-cell {
        min-width: 200px;
    }

    .route-list-customer-cell {
        min-width: 110px;
        max-width: 220px;
    }

    .route-list-assignee-cell {
        min-width: 140px;
        max-width: 250px;
    }

    .route-list-status-cell {
        width: 1%;
        min-width: 110px;
        max-width: 200px;
    }
}

@media (min-width: 1100px) {
    .route-list-customer-cell {
        min-width: 130px;
    }
}

@media (min-width: 1280px) {
    .route-list-main-cell {
        min-width: 280px;
    }

    /* Stav a kolize vedle sebe. */
    .route-list-status-cell {
        min-width: 180px;
    }
}

@media (max-width: 960px) {
    .route-list-detail-cell {
        padding: 0.25rem 0.75rem 0.75rem !important;
    }

    /* Karty ze 2ndSide zarovnávají hodnotu doprava — delší obsah (jízda, obsazení) dát pod popisek a vlevo. */
    .route-list-table .mud-table-cell.route-list-main-cell::before,
    .route-list-table .mud-table-cell.route-list-assignee-cell::before {
        flex-basis: 100%;
    }

    .route-list-table .mud-table-cell.route-list-main-cell > *,
    .route-list-table .mud-table-cell.route-list-assignee-cell > * {
        flex-basis: 100%;
        text-align: start;
    }
}

.route-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

@media (min-width: 961px) {
    .route-detail {
        grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    }
}

.route-detail-heading {
    margin-bottom: 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sekobus-secondary);
}

.route-detail-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.route-detail-item {
    --att-color: var(--sekobus-line);
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--sekobus-line);
    border-left: 4px solid var(--att-color);
    border-radius: 6px;
    background: var(--sekobus-surface);
}

.route-detail-item.att-type-1 { --att-color: var(--sekobus-warning); }
.route-detail-item.att-type-2 { --att-color: var(--sekobus-success); }
.route-detail-item.att-type-3 { --att-color: var(--sekobus-danger); }
.route-detail-item.att-type-4 { --att-color: var(--sekobus-secondary); }
.route-detail-item.att-type-5 { --att-color: #a28c4e; }

.route-detail-item-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.6rem;
}

.route-detail-item-head .attendance-chip {
    margin: 0 0 0 auto;
}

.route-detail-item-no {
    font-weight: 700;
    color: var(--sekobus-secondary);
}

.route-detail-item-when {
    font-weight: 600;
}

.route-detail-item-places {
    margin-top: 0.35rem;
    font-weight: 600;
    color: var(--sekobus-primary);
}

.route-detail-item-desc {
    margin-top: 0.2rem;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.route-detail-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    margin-top: 0.5rem;
    font-size: 0.82rem;
    color: var(--mud-palette-text-secondary);
}

.route-detail-item-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.route-detail-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.route-detail-note {
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--sekobus-line);
    border-radius: 6px;
    background: var(--sekobus-surface);
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.route-detail-attachments {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.route-detail-attachments a {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    color: var(--sekobus-secondary);
    text-decoration: none;
}

.route-detail-attachments a:hover .route-detail-attachment-name {
    text-decoration: underline;
}

.route-detail-attachment-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.route-detail-attachments .route-list-muted {
    flex: 0 0 auto;
    font-size: 0.78rem;
}

.driver-route-feed {
    display: grid;
    gap: 1.25rem;
    width: 100%;
    min-width: 0;
}

.driver-route-day-group {
    display: grid;
    gap: 0.85rem;
    min-width: 0;
}

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

.driver-route-day-chip {
    flex-shrink: 0;
}

.driver-route-card {
    border: 1px solid rgba(141, 37, 36, 0.12);
    background: linear-gradient(180deg, rgba(255, 251, 247, 0.96) 0%, rgba(255, 255, 255, 0.98) 100%);
    box-shadow: 0 14px 28px rgba(84, 112, 142, 0.08);
    min-width: 0;
}

.driver-route-card .mud-card-content {
    min-width: 0;
}

.driver-route-card.highlighted {
    border: 2px solid var(--sekobus-primary);
}

.driver-route-badge {
    display: inline-block;
    margin-bottom: 0.5rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: var(--sekobus-primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.driver-route-mode .mud-toggle-item {
    min-height: 36px;
}

.app-logo-link {
    display: inline-flex;
    align-items: center;
}

.driver-route-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.driver-route-time {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.05;
    color: var(--sekobus-primary);
}

.driver-route-vehicle {
    margin-top: 0.3rem;
    color: #574f49;
    font-weight: 600;
}

.driver-route-status-chip {
    flex-shrink: 0;
}

.driver-route-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin-top: 0.85rem;
    color: var(--sekobus-secondary);
    font-size: 0.86rem;
    min-width: 0;
}

.driver-route-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
}

.driver-route-detail-list {
    display: grid;
    gap: 0.85rem;
    margin-top: 0.95rem;
    min-width: 0;
}

.driver-route-detail-card {
    min-width: 0;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(141, 37, 36, 0.12);
    border-radius: 16px;
    background: rgba(255, 252, 249, 0.92);
}

.driver-route-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.driver-route-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
    min-width: 0;
}

.driver-route-detail-row {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.driver-route-detail-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sekobus-secondary);
}

.driver-route-detail-value,
.driver-route-detail-text {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #2f2824;
    line-height: 1.45;
}

.driver-route-description-panel,
.driver-route-note-panel {
    margin-top: 0.85rem;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    background: rgba(84, 112, 142, 0.08);
}

.driver-route-detail-empty {
    margin-top: 0.95rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 1px dashed rgba(141, 37, 36, 0.2);
    color: #6a625d;
    background: rgba(255, 251, 247, 0.7);
}

.driver-route-attachments-section {
    margin-top: 0.95rem;
}

.driver-route-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.55rem;
    min-width: 0;
}

.driver-route-attachment-link {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(141, 37, 36, 0.08);
    color: var(--sekobus-primary);
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.driver-route-attachment-link:hover {
    background: rgba(141, 37, 36, 0.14);
}

.driver-route-attachment-empty {
    color: #6a625d;
    font-size: 0.84rem;
}

.driver-route-empty {
    padding: 1.5rem;
    border: 1px dashed rgba(141, 37, 36, 0.2);
    border-radius: 18px;
    text-align: center;
    background: rgba(255, 251, 247, 0.88);
}

@media (max-width: 720px) {
    .app-user-area {
        margin-left: 0.45rem;
    }

    .app-user-label {
        max-width: 38vw;
    }

    .page-title-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .calendar-density-toggle,
    .calendar-layout-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .calendar-main-card .vehicle-calendar-wrapper {
        height: auto;
        min-height: 340px;
        max-height: 65vh;
    }

    /* Na telefonu je rychlá editace spodní panel přes celou šířku. */
    .calendar-popover {
        left: 8px !important;
        right: 8px !important;
        top: auto !important;
        bottom: 8px;
        width: auto;
        max-height: 70vh;
    }

    .calendar-popover:not(.placed) {
        visibility: visible;
    }

    .calendar-popover-handle {
        cursor: default;
    }

    .calendar-create-link {
        opacity: 0.96;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }

    .calendar-selection-empty {
        min-height: 320px;
    }

    .calendar-time-field {
        align-items: stretch;
    }

    .calendar-time-stepper {
        padding-top: 0.35rem;
    }

    .driver-route-page-header {
        margin-bottom: 1rem;
    }

    .driver-route-day-header,
    .driver-route-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .driver-route-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .driver-route-detail-grid {
        grid-template-columns: 1fr;
    }

    .driver-route-time {
        font-size: 1.2rem;
    }

    .driver-route-attachments {
        flex-direction: column;
        align-items: stretch;
    }

    .driver-route-attachment-link {
        width: 100%;
        box-sizing: border-box;
        justify-content: flex-start;
        align-items: flex-start;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        overflow-wrap: anywhere;
        word-break: break-word;
        line-height: 1.35;
    }
}

/* ====================== Obnova spojení (App.razor, js/reconnect.js) ====================== */
.reconnect-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(26, 26, 28, 0.35);
}

.reconnect-modal.components-reconnect-show,
.reconnect-modal.components-reconnect-failed,
.reconnect-modal.components-reconnect-rejected {
    display: flex;
}

.reconnect-card {
    max-width: 360px;
    padding: 1.5rem;
    border-radius: 18px;
    background: var(--sekobus-surface);
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.25);
    text-align: center;
}

.reconnect-spinner {
    width: 36px;
    height: 36px;
    margin: 0 auto 0.75rem;
    border: 4px solid rgba(141, 37, 36, 0.2);
    border-top-color: var(--sekobus-primary);
    border-radius: 50%;
    animation: reconnect-spin 0.9s linear infinite;
}

.reconnect-text,
.reconnect-button {
    display: none;
    margin: 0;
}

.components-reconnect-show .reconnect-text-show,
.components-reconnect-rejected .reconnect-text-rejected,
.components-reconnect-failed .reconnect-text-failed {
    display: block;
}

.components-reconnect-failed .reconnect-spinner {
    display: none;
}

.components-reconnect-failed .reconnect-button {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.6rem 1.2rem;
    border: 0;
    border-radius: 10px;
    background: var(--sekobus-primary);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

@keyframes reconnect-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Potvrzující snackbary (Uloženo, Archivováno…) v barvě Sekobusu místo zelené. */
.mud-snackbar.mud-alert-filled-success {
    background-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
}


/* Nabídky: položky kalkulace a součty */
.offer-items td {
    vertical-align: top;
    padding-top: 4px;
    padding-bottom: 4px;
}

.offer-items .mud-input-control {
    margin-top: 0;
}

.offer-totals {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.offer-totals > div {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    min-width: 280px;
}

.offer-totals-grand {
    font-size: 1.15rem;
    color: var(--mud-palette-primary);
    border-top: 1px solid var(--mud-palette-lines-default);
    padding-top: 4px;
}

@media (max-width: 720px) {
    .offer-items {
        overflow-x: auto;
    }

    .offer-totals > div {
        min-width: 0;
        width: 100%;
    }
}

/* Vozidla: nahrazené (starší) doklady */
.row-superseded td {
    color: var(--mud-palette-text-disabled);
}

/* Plachta: servis vozidla — šrafovaný pruh přes celou výšku buňky pod bloky jízd.
   Pruh nechytá myš (tažením přes něj jde založit jízdu → kolize), klikací je jen popisek. */
.calendar-maintenance-band {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    background: repeating-linear-gradient(135deg,
        rgba(90, 90, 90, 0.16) 0, rgba(90, 90, 90, 0.16) 6px,
        rgba(90, 90, 90, 0.05) 6px, rgba(90, 90, 90, 0.05) 12px);
    border-left: 2px solid var(--sekobus-secondary);
    border-right: 2px solid var(--sekobus-secondary);
}

.calendar-maintenance-label {
    position: absolute;
    left: 2px;
    bottom: 2px;
    max-width: calc(100% - 4px);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    border: 0;
    border-radius: 6px;
    background: var(--sekobus-secondary);
    color: #fff;
    font: inherit;
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    pointer-events: auto;
    z-index: 5;
}

.calendar-maintenance-label span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-legend-swatch.maintenance {
    background: repeating-linear-gradient(135deg,
        rgba(90, 90, 90, 0.35) 0, rgba(90, 90, 90, 0.35) 3px,
        rgba(90, 90, 90, 0.1) 3px, rgba(90, 90, 90, 0.1) 6px);
    border: 1px solid var(--sekobus-secondary);
}

/* Řidiči: typ nepřítomnosti */
.absence-chip {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    color: #fff;
    font-size: 0.78rem;
    white-space: nowrap;
}

.absence-color-input {
    width: 36px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 6px;
    background: none;
    cursor: pointer;
}

.absence-color-code {
    font-family: monospace;
    font-size: 0.8rem;
}

/* Plachta řidičů: nepřítomnost — pruh v barvě typu (proměnná --absence-color) */
.calendar-absence-band {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    background: repeating-linear-gradient(135deg,
        color-mix(in srgb, var(--absence-color) 28%, transparent) 0,
        color-mix(in srgb, var(--absence-color) 28%, transparent) 6px,
        color-mix(in srgb, var(--absence-color) 10%, transparent) 6px,
        color-mix(in srgb, var(--absence-color) 10%, transparent) 12px);
    border-left: 2px solid var(--absence-color);
    border-right: 2px solid var(--absence-color);
}

/* Opakování jízdy: výběr dnů a náhled termínů */
.repeat-days {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    margin-top: 4px;
}

.repeat-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-height: 180px;
    overflow-y: auto;
    margin-top: 6px;
}

.repeat-preview-date {
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--mud-palette-background-gray);
    font-size: 0.8rem;
    white-space: nowrap;
}

.fleet-costs-total td {
    font-weight: 600;
    border-top: 2px solid var(--mud-palette-lines-default);
}

/* Mobilní aplikace řidiče */
.driver-photo-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px dashed var(--mud-palette-primary);
    border-radius: 10px;
    color: var(--mud-palette-primary);
    cursor: pointer;
}

.driver-photo-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.driver-photo-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.driver-route-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.driver-contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.driver-quick-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.driver-quick-actions .mud-button-root {
    flex: 1;
    min-height: 48px;
}

.driver-report-row {
    padding: 8px 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.driver-report-row:last-child {
    border-bottom: 0;
}

.defect-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--mud-palette-lines-default);
}

.defect-row {
    padding: 10px 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.defect-row:last-child {
    border-bottom: 0;
}

/* Dílna: kalendář obsazenosti po dnech — celé týdny přes měsíc */
.workshop-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

@media (max-width: 900px) {
    .workshop-calendar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workshop-day.outside {
        display: none;
    }
}

.workshop-day {
    min-height: 112px;
    padding: 8px;
    border-radius: 10px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.workshop-day.today {
    border-color: var(--mud-palette-primary);
    box-shadow: 0 0 0 1px var(--mud-palette-primary) inset;
}

.workshop-day.non-working {
    background: var(--mud-palette-background-gray);
}

.workshop-day.over {
    border-color: var(--mud-palette-error);
    background: color-mix(in srgb, var(--mud-palette-error) 7%, var(--mud-palette-surface));
}

/* Dny sousedních měsíců jen ztlumit (ne opacity celé buňky — zprůhlednila by i tooltip). */
.workshop-day.outside {
    background: transparent;
    border-style: dashed;
}

.workshop-day.outside .workshop-day-header {
    opacity: 0.55;
}

.workshop-day-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.workshop-order {
    position: relative;
    display: block;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: inherit;
    text-decoration: none;
    background: color-mix(in srgb, var(--mud-palette-info) 14%, transparent);
    border-left: 3px solid var(--mud-palette-info);
}

/* Barvy stavů odpovídají čipům v seznamu zakázek (Workshop/Index.StatusColor). */
.workshop-order.status-1 { border-left-color: var(--mud-palette-secondary); background: color-mix(in srgb, var(--mud-palette-secondary) 14%, transparent); }
.workshop-order.status-2 { border-left-color: var(--mud-palette-warning); background: color-mix(in srgb, var(--mud-palette-warning) 14%, transparent); }
.workshop-order.status-3 { border-left-color: var(--mud-palette-success); background: color-mix(in srgb, var(--mud-palette-success) 14%, transparent); }
.workshop-order.status-4 { border-left-color: var(--mud-palette-text-secondary); background: color-mix(in srgb, var(--mud-palette-text-secondary) 13%, transparent); color: var(--mud-palette-text-secondary); }

.calendar-legend-swatch.workshop-status-0 { background: var(--mud-palette-info); }
.calendar-legend-swatch.workshop-status-1 { background: var(--mud-palette-secondary); }
.calendar-legend-swatch.workshop-status-2 { background: var(--mud-palette-warning); }
.calendar-legend-swatch.workshop-status-3 { background: var(--mud-palette-success); }
.calendar-legend-swatch.workshop-status-4 { background: var(--mud-palette-text-secondary); }

.workshop-order-title,
.workshop-order .page-subtitle {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Tooltip zakázky: vzhled z Plachty (.calendar-block-tooltip), obsah jako dvousloupcová tabulka. */
.workshop-order-tooltip {
    --tooltip-x: -50%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 0.75rem;
    row-gap: 0.2rem;
    width: max-content;
    max-width: min(340px, calc(100vw - 2rem));
    white-space: normal;
    text-align: left;
    transform: translateX(var(--tooltip-x)) translateY(0.35rem);
}

.workshop-order:hover .workshop-order-tooltip,
.workshop-order:focus-visible .workshop-order-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(var(--tooltip-x)) translateY(0);
}

.workshop-order-tooltip-title {
    grid-column: 1 / -1;
    margin-bottom: 0.2rem;
    font-size: 0.84rem;
    font-weight: 700;
}

.workshop-order-tooltip-label {
    color: rgba(255, 250, 244, 0.62);
}

.workshop-order-tooltip-clamp {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
}

.workshop-order-tooltip::before {
    left: var(--tooltip-arrow, 50%);
}

@media (min-width: 901px) {
    /* Krajní sloupce: tooltip zarovnat ke kraji buňky, ať nevyjede z obrazovky. */
    .workshop-day:nth-child(7n + 1) .workshop-order-tooltip,
    .workshop-day:nth-child(7n + 2) .workshop-order-tooltip {
        --tooltip-x: 0;
        --tooltip-arrow: 1.5rem;
        left: 0;
    }

    .workshop-day:nth-child(7n) .workshop-order-tooltip,
    .workshop-day:nth-child(7n + 6) .workshop-order-tooltip {
        --tooltip-x: 0;
        --tooltip-arrow: calc(100% - 1.5rem);
        left: auto;
        right: 0;
    }

    /* Poslední týden: tooltip nad zakázkou. */
    .workshop-day:nth-last-child(-n + 7) .workshop-order-tooltip {
        top: auto;
        bottom: calc(100% + 0.65rem);
    }

    .workshop-day:nth-last-child(-n + 7) .workshop-order-tooltip::before {
        top: auto;
        bottom: -0.48rem;
        transform: translateX(-50%) rotate(225deg);
    }
}

@media (max-width: 900px) {
    .workshop-order-tooltip {
        --tooltip-x: 0;
        --tooltip-arrow: 1.5rem;
        left: 0;
        right: 0;
        width: auto;
    }
}

.workshop-day-add {
    margin-top: auto;
    font-size: 0.78rem;
    color: var(--mud-palette-primary);
    text-decoration: none;
}

.workshop-photo {
    position: relative;
}

.workshop-photo-remove {
    position: absolute !important;
    top: -8px;
    right: -8px;
    background: var(--mud-palette-surface) !important;
}

/* ====================== Nastavení a záložky detailů ====================== */

.detail-tabs-paper {
    border-radius: 14px;
    overflow: hidden;
    background: var(--mud-palette-surface);
}

.detail-tabs-paper .mud-tabs-tabbar {
    border-bottom: 1px solid var(--sekobus-line);
}

.detail-tabs-paper .mud-tabs-panels {
    padding: 16px;
}

.detail-tabs-paper .mud-tab {
    text-transform: none;
    font-weight: 600;
}

.detail-tabs-paper .mud-tab-badge {
    margin-inline-start: 8px;
}

.settings-form-grid {
    max-width: 760px;
}

.code-list-editor .code-list-inactive td {
    opacity: 0.6;
}

/* ====================== Hlavička detailu (DetailHeader) ====================== */

.detail-header {
    /* Lepí se pod pruh menu; výšky appbaru zrcadlí breakpointy .horizontal-menu-shell. */
    --detail-header-top: calc(var(--mud-appbar-height, 64px) - var(--mud-appbar-height, 64px)/8 + var(--shell-menu-height, 0px));
    position: sticky;
    top: var(--detail-header-top);
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: -1.5rem calc(-1 * clamp(1rem, 2vw, 2rem)) 1.25rem;
    padding: 0.85rem clamp(1rem, 2vw, 2rem);
    background: rgba(255, 251, 247, 0.96);
    border-bottom: 1px solid var(--sekobus-line);
    backdrop-filter: blur(8px);
}

@media (orientation: landscape) {
    .detail-header {
        --detail-header-top: calc(var(--mud-appbar-height, 64px) - var(--mud-appbar-height, 64px)/4 + var(--shell-menu-height, 0px));
    }
}

@media (min-width: 600px) {
    .detail-header {
        --detail-header-top: calc(var(--mud-appbar-height, 64px) + var(--shell-menu-height, 0px));
    }
}

.detail-header-title {
    flex: 1 1 auto;
    min-width: 0;
}

.detail-header-heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.detail-header-heading h1 {
    margin: 0;
    font-size: 1.6rem;
    line-height: 1.15;
    color: var(--sekobus-primary);
    overflow-wrap: anywhere;
}

.detail-header-heading h1:focus,
.detail-header-heading h1:focus-visible {
    outline: none;
    box-shadow: none;
}

.detail-header-subtitle {
    margin-top: 0.15rem;
}

.detail-header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Na telefonu má kontejner stránky z knihovny 2ndSide odsazení jen 8 px — hlavička ho kopíruje, jinak přetéká do strany. */
@media (max-width: 600px) {
    .detail-header {
        margin-left: -8px;
        margin-right: -8px;
        padding-left: 8px;
        padding-right: 8px;
    }
}

@media (max-width: 700px) {
    .detail-header {
        flex-wrap: wrap;
    }

    .detail-header-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* ====================== Průběh stavů (zakázka dílny) ====================== */

.status-steps {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
}

.status-step {
    position: relative;
    flex: 1 1 0;
    min-width: 96px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    color: var(--mud-palette-text-secondary);
    font-size: 0.85rem;
}

.status-step::before {
    content: "";
    position: absolute;
    top: 13px;
    left: calc(-50% + 16px);
    right: calc(50% + 16px);
    height: 2px;
    background: var(--sekobus-line);
}

.status-step:first-child::before {
    display: none;
}

.status-step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--sekobus-line);
    background: var(--mud-palette-surface);
    color: #fff;
}

.status-step.done .status-step-dot {
    background: var(--mud-palette-success);
    border-color: var(--mud-palette-success);
}

.status-step.done::before,
.status-step.current::before {
    background: var(--mud-palette-success);
}

.status-step.current .status-step-dot {
    border-color: var(--mud-palette-primary);
    box-shadow: 0 0 0 4px rgba(141, 37, 36, 0.15);
}

.status-step.current {
    color: var(--sekobus-primary);
    font-weight: 700;
}

/* Lišta plachty na telefonu: skupiny se zalomí, navigace období zabere celý řádek. */
@media (max-width: 720px) {
    .page-toolbar {
        grid-template-columns: minmax(0, 1fr);
    }

    .page-toolbar__group {
        flex-wrap: wrap;
        min-width: 0;
        max-width: 100%;
    }

    .calendar-period-nav {
        width: 100%;
        box-sizing: border-box;
        justify-content: space-between;
    }

    .page-toolbar__group--secondary {
        width: 100%;
    }

    .calendar-period-label {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
