.app-layout {
    position: relative;
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 18px 14px;
    border-right: 1px solid color-mix(in srgb, var(--color-line-strong) 72%, transparent);
    border-radius: 0;
    background: color-mix(in srgb, var(--color-surface) 94%, var(--color-bg) 6%);
    box-shadow: 10px 0 42px rgba(17, 24, 39, 0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    overflow-y: auto;
    scrollbar-width: none;
    z-index: 20;
}

.sidebar::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
    padding: 4px 10px 12px;
    border-bottom: 1px solid var(--color-line);
}

.sidebar-logo-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    box-shadow: none;
    flex-shrink: 0;
    object-fit: cover;
}

.sidebar-logo-block {
    min-width: 0;
}

.sidebar-logo-text,
.page-title,
.hero-title,
.device-name,
.section-title,
.settings-service-title,
.sidebar-panel-value {
    font-family: var(--font-display);
}

.page-title,
.hero-title,
.section-title,
.device-name {
    text-wrap: balance;
}

.sidebar-logo-text {
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.15;
}

.sidebar-logo-subtext {
    margin-top: 2px;
    color: var(--color-text-faint);
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-close {
    display: none;
    margin-left: auto;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: var(--color-bg-soft);
    color: var(--color-text-soft);
    cursor: pointer;
    text-align: center;
    line-height: 36px;
}

.nav-section {
    margin-top: 10px;
    padding: 10px 10px 5px;
    color: var(--color-text-faint);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.nav-item {
    --nav-accent: var(--color-solar);
    --nav-accent-text: var(--color-solar-text);
    display: flex;
    align-items: center;
    gap: 10px;
    /* 40px floors the desktop sidebar tap target for touch laptops / iPadOS in
       desktop layout (sidebar is hidden ≤1100px so this is a touch-friendly bump,
       not a mobile concern). */
    min-height: 42px;
    padding: 8px 10px;
    border-radius: var(--radius-xs);
    color: var(--color-text-soft);
    text-decoration: none;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
    border: 1px solid transparent;
    width: 100%;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.nav-item:focus-visible,
.sidebar-close:focus-visible,
.mobile-nav-toggle:focus-visible,
.mobile-topbar-home-trigger:focus-visible,
.mobile-profile-link:focus-visible,
.mobile-tabbar-item:focus-visible,
.platform-tenant-trigger:focus-visible,
.toggle-btn:focus-visible,
.btn:focus-visible,
.form-input:focus-visible,
.form-select:focus-visible,
.slider:focus-visible,
.comfort-power-btn:focus-visible,
.comfort-mode-pill:focus-visible,
.tado-step-btn:focus-visible,
.slider-confirm-btn:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 2px var(--color-focus-ring);
}

.nav-item:hover {
    border-color: color-mix(in srgb, var(--color-line-strong) 52%, transparent);
    background: color-mix(in srgb, var(--color-bg-soft) 78%, transparent);
    color: var(--color-text);
}

/* Neutral (pinned/system) icon chips share --color-bg-soft with the hover row
   background, so they'd visually merge on hover. Lift the chip to --color-bg-alt
   on hover. Accent chips keep their tint — their `.nav-icon.acc-*` rule has equal
   specificity but comes later in source order, so it wins. Active chips win by
   higher specificity. */
.nav-item:hover .nav-icon {
    background: var(--color-bg-alt);
}

.nav-item.active {
    border-color: color-mix(in srgb, var(--nav-accent) 28%, transparent);
    background: color-mix(in srgb, var(--nav-accent) 10%, transparent);
    box-shadow: inset 3px 0 0 0 var(--nav-accent);
    color: var(--color-text);
    font-weight: 600;
}

/* The active row's amber spine is a box-shadow; so is the keyboard focus ring.
   box-shadow doesn't stack across rules, so an active+focused item would lose
   its focus indicator (WCAG 2.4.7). Compose both shadows here: inset spine +
   outset focus ring. Covers .nav-item--pinned.active too (higher specificity). */
.nav-item.active:focus-visible {
    outline: 0;
    box-shadow: inset 3px 0 0 0 var(--nav-accent), 0 0 0 2px var(--color-focus-ring);
}

.nav-item.acc-solar,
.nav-item.acc-energy,
.nav-item.acc-water,
.nav-item.acc-pool,
.nav-item.acc-climate,
.nav-item.acc-heatpump,
.nav-item.acc-tado,
.nav-item.acc-unifi,
.nav-item.acc-garden,
.nav-item.acc-clean,
.nav-item.acc-improvements {
    --nav-accent: var(--accent);
    --nav-accent-text: var(--accent-text, var(--accent));
}

.nav-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: var(--color-bg-soft);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--color-text-soft);
    flex-shrink: 0;
    transition: color 140ms ease, background-color 140ms ease;
}
.nav-icon svg {
    width: 14px;
    height: 14px;
}

.nav-icon.acc-solar,
.nav-icon.acc-energy,
.nav-icon.acc-water,
.nav-icon.acc-pool,
.nav-icon.acc-climate,
.nav-icon.acc-heatpump,
.nav-icon.acc-tado,
.nav-icon.acc-unifi,
.nav-icon.acc-garden,
.nav-icon.acc-clean,
.nav-icon.acc-improvements {
    color: var(--accent-text, var(--accent));
    background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.nav-item.active .nav-icon {
    background: color-mix(in srgb, var(--nav-accent) 18%, transparent);
    border: 0;
    color: var(--nav-accent-text);
}

.nav-item.active .nav-icon.acc-solar,
.nav-item.active .nav-icon.acc-energy,
.nav-item.active .nav-icon.acc-water,
.nav-item.active .nav-icon.acc-pool,
.nav-item.active .nav-icon.acc-climate,
.nav-item.active .nav-icon.acc-heatpump,
.nav-item.active .nav-icon.acc-tado,
.nav-item.active .nav-icon.acc-unifi,
.nav-item.active .nav-icon.acc-garden,
.nav-item.active .nav-icon.acc-clean,
.nav-item.active .nav-icon.acc-improvements {
    color: var(--nav-accent-text);
    background: color-mix(in srgb, var(--nav-accent) 18%, transparent);
}

.nav-label {
    font-size: 0.86rem;
    font-weight: 500;
    color: inherit;
}

.nav-item.active .nav-label {
    font-weight: 600;
}

.nav-content {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    gap: 1px;
}

.nav-label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.nav-meta {
    color: var(--color-text-faint);
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.35;
}

.nav-item.active .nav-meta {
    color: var(--color-text-muted);
}

.nav-item .nav-meta {
    transition: color 140ms ease;
}

.nav-live-value {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--color-text-muted);
    flex-shrink: 0;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Sidebar cooldown / rate-limit indicator. Inline pill rendered next to the
 * service label when its backend envelope reports {unavailable, code:
 * cooldown|rate_limit}. Non-interactive — informational only. */
.nav-cooldown-pill {
    margin-left: 8px;
    padding: 2px 8px;
    border: 1px solid var(--color-warning-soft-strong);
    border-radius: var(--radius-pill);
    background: var(--color-warning-soft-faint);
    color: var(--color-warning-text);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.4;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.nav-item.nav-item--dim {
    opacity: 0.55;
}

.nav-item.nav-item--dim .nav-live-value,
.nav-item.nav-item--dim .nav-label {
    color: var(--color-text-faint);
}

/* A configured-but-offline service can still be the active route, making a row
   both --dim and .active. Don't let 0.55 opacity wash out the amber active spine
   + focus ring (which would drop the focus ring below WCAG 2.4.11 3:1); the muted
   label/value + status dot already carry the "offline" read at full opacity. */
.nav-item.nav-item--dim.active {
    opacity: 1;
}

.nav-service-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    margin: 0 6px;
}

.nav-item--pinned {
    margin-bottom: 6px;
    border: 0;
    background: transparent;
}
.nav-item--pinned.active {
    background: var(--color-solar-soft);
    box-shadow: inset 3px 0 0 0 var(--color-solar);
}

.sidebar-spacer {
    flex: 1;
}

.sidebar-panel {
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-line);
    background: var(--color-bg-soft);
}

.sidebar-panel {
    margin-top: 10px;
    background: var(--color-bg-soft);
}

.home-switcher-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.home-context-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-line-strong);
    background: transparent;
}

/* Success tint only when every configured service is actually live — otherwise
   a "0/4 live" pill would render green/healthy. Driven by a class in Sidebar.js
   (configuredCount > 0 && liveCount === configuredCount). */
.home-context-badge--full {
    border-color: transparent;
    background: var(--color-success-soft);
}

.home-context-status-value {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--color-text-muted);
}

.home-context-status-label {
    color: var(--color-text-muted);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.10em;
}

.home-context-badge--full .home-context-status-value,
.home-context-badge--full .home-context-status-label {
    color: var(--color-success-text);
}

/* Unified context panel: wraps the platform-admin tenant switcher and the
   active-home switcher in one block. The platform-admin variant stays neutral;
   amber is reserved for selected/interactive accents so the sidebar does not
   read like a permanent warning state. */
.context-panel {
    display: grid;
    gap: 0;
    margin: 0 0 12px;
    padding: 10px;
    border: 1px solid color-mix(in srgb, var(--color-line-strong) 54%, transparent);
    border-radius: 14px;
    background:
        linear-gradient(180deg,
            color-mix(in srgb, var(--color-bg-alt) 42%, transparent),
            transparent 76%),
        color-mix(in srgb, var(--color-bg-soft) 72%, transparent);
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--color-text) 6%, transparent);
}

.context-panel--admin {
    gap: 10px;
    border-color: color-mix(in srgb, var(--color-line-strong) 64%, transparent);
    background:
        linear-gradient(180deg,
            color-mix(in srgb, var(--color-bg-alt) 46%, transparent),
            transparent),
        color-mix(in srgb, var(--color-bg-soft) 90%, var(--color-bg-alt));
    color: var(--color-text);
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--color-text) 7%, transparent);
}

.context-panel--admin:hover {
    border-color: color-mix(in srgb, var(--color-line-strong) 86%, transparent);
}

/* Both rows share one eyebrow → control rhythm (8px) so the tenant and home
   switchers read as a single unit. (Standalone, the home row's eyebrow carried
   margin-bottom: 6px on top of a 6px grid gap = 12px; here the gap owns the
   spacing and the nested margin is zeroed so it doesn't stack.) */
.context-panel-row {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.context-panel-row .home-switcher-row {
    margin-bottom: 0;
}

.context-panel-divider {
    height: 1px;
    margin: 1px 0;
    background: color-mix(in srgb, var(--color-line) 86%, transparent);
}

.context-panel-label--admin {
    color: var(--color-text-faint);
}

.platform-tenant-dropdown-wrap {
    position: relative;
}

.platform-tenant-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    padding: 8px 10px 8px 11px;
    border: 1px solid color-mix(in srgb, var(--color-line-strong) 74%, transparent);
    border-radius: 11px;
    background: color-mix(in srgb, var(--color-bg-alt) 78%, var(--color-bg-soft));
    color: var(--color-text);
    cursor: pointer;
    font-family: var(--font-sans);
    text-align: left;
    transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.platform-tenant-trigger:hover,
.platform-tenant-trigger.open {
    border-color: color-mix(in srgb, var(--color-solar) 34%, var(--color-line-strong));
    background: color-mix(in srgb, var(--color-bg-alt) 70%, var(--color-bg-soft));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-solar) 7%, transparent);
}

.platform-tenant-trigger:disabled {
    cursor: progress;
    opacity: 0.75;
}

.platform-tenant-trigger-copy {
    display: grid;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.platform-tenant-trigger-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--color-text);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.18;
}

.platform-tenant-caret {
    width: 10px;
    height: 7px;
    color: var(--color-text-muted);
    flex-shrink: 0;
    transition: transform 200ms ease;
}

.platform-tenant-trigger.open .platform-tenant-caret {
    transform: rotate(180deg);
}

.platform-tenant-panel {
    position: absolute;
    top: calc(100% + 7px);
    left: 0;
    right: 0;
    display: grid;
    gap: 4px;
    max-height: min(58vh, 280px);
    overflow-y: auto;
    padding: 6px;
    border: 1px solid color-mix(in srgb, var(--color-line-strong) 82%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--color-bg-alt) 94%, var(--color-bg-soft));
    box-shadow: var(--shadow-panel);
    z-index: 70;
    animation: rise-in 150ms ease both;
}

.platform-tenant-panel:focus {
    outline: 0;
}

.platform-tenant-option {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--color-text-soft);
    cursor: pointer;
    font-family: var(--font-sans);
    text-align: left;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.platform-tenant-option:hover,
.platform-tenant-option.focused {
    border-color: color-mix(in srgb, var(--color-solar) 18%, var(--color-line));
    background: color-mix(in srgb, var(--color-solar) 6%, var(--color-bg-soft));
    color: var(--color-text);
}

.platform-tenant-option.active {
    border-color: color-mix(in srgb, var(--color-solar) 28%, var(--color-line));
    background: color-mix(in srgb, var(--color-solar) 9%, var(--color-bg-soft));
    color: var(--color-text);
}

.platform-tenant-option-mark {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-bg-soft) 72%, transparent);
    color: var(--color-text-muted);
}

.platform-tenant-option-mark svg {
    width: 13px;
    height: 10px;
}

.platform-tenant-option-mark--selected {
    color: var(--color-solar);
    background: color-mix(in srgb, var(--color-solar) 12%, var(--color-bg-soft));
}

.platform-tenant-option-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.platform-tenant-option-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.18;
}

.platform-tenant-message {
    padding: 0 1px;
    color: var(--color-text-muted);
    font-size: 0.68rem;
    font-weight: 700;
}

.platform-tenant-message--error {
    color: var(--color-error);
}

.home-dropdown-wrap {
    position: relative;
}

.home-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    background: color-mix(in srgb, var(--color-bg-alt) 78%, var(--color-bg-soft));
    border: 1px solid color-mix(in srgb, var(--color-line-strong) 64%, transparent);
    border-radius: var(--radius-xs);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    transition: border-color 150ms ease, background-color 150ms ease;
}

.home-dropdown-trigger:hover,
.home-dropdown-trigger.open {
    border-color: color-mix(in srgb, var(--color-solar) 26%, var(--color-line-strong));
    background: color-mix(in srgb, var(--color-bg-alt) 66%, var(--color-bg-soft));
}

.home-dropdown-caret {
    width: 10px;
    height: 7px;
    color: var(--color-text-muted);
    flex-shrink: 0;
    transition: transform 200ms ease;
}

.home-dropdown-trigger.open .home-dropdown-caret {
    transform: rotate(180deg);
}

.home-dropdown-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-md);
    padding: 6px;
    z-index: 50;
    box-shadow: var(--shadow-panel);
    animation: rise-in 150ms ease both;
}

.home-dropdown-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 7px 10px;
    background: transparent;
    border: none;
    border-radius: var(--radius-xs);
    color: var(--color-text-soft);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 140ms ease, color 140ms ease;
}

.home-dropdown-option:hover {
    background: var(--color-bg-soft);
    color: var(--color-text);
}

.home-dropdown-option.active {
    color: var(--color-text);
    font-weight: 600;
}

/* Visual counterpart to aria-activedescendant — keyboard arrow navigation
   highlights the current option. Mirrors :hover so mouse + keyboard users
   see the same indicator. */
.home-dropdown-option.focused {
    background: var(--color-bg-soft);
    color: var(--color-text);
    outline: 1px solid color-mix(in srgb, var(--color-focus-ring, currentColor) 50%, transparent);
    outline-offset: -1px;
}

.home-dropdown-option-name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-dropdown-check {
    width: 14px;
    height: 10px;
    color: var(--color-solar);
    flex-shrink: 0;
    margin-left: 8px;
}

.home-dropdown-check svg {
    width: 14px;
    height: 10px;
}

.home-label {
    color: var(--color-text-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.sidebar-panel-value {
    margin-top: 10px;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
}

.sidebar-panel-value span {
    color: var(--color-text-muted);
    font-size: 1rem;
    margin-left: 4px;
}

.home-name {
    margin-top: 6px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0;
}

.home-switcher-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.home-switcher-caret {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: transparent;
    color: var(--color-text-soft);
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.home-switcher-panel {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--color-line);
}

.home-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    padding: 7px 10px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--color-text);
    text-align: left;
    cursor: pointer;
    transition: background-color 150ms ease;
}

.home-option:hover {
    background: transparent;
}

.home-option.active {
    background: var(--color-solar-soft);
}

.home-option-name {
    font-size: 0.875rem;
    font-weight: 600;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-option-meta {
    color: var(--color-text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    flex-shrink: 0;
}

.home-option.active .home-option-meta {
    color: var(--color-solar);
}

.home-quick-add {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid var(--color-line);
}

.home-switcher-message {
    color: var(--color-warning);
    font-size: 0.76rem;
    line-height: 1.4;
}

/* FOOT-GUN: .main-content left padding MUST stay 0 (the shorthand here has no
   left component). Sidebar margin handles the indent. Has regressed twice;
   see CLAUDE.md § feedback_main_content_padding. */
.main-content {
    position: relative;
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 28px clamp(24px, 2.5vw, 48px) 48px;
    min-height: 100vh;
    min-width: 0;
    transition: margin-left 160ms ease;
}

.content-shell {
    position: relative;
    z-index: 1;
    max-width: 1420px;
    padding: clamp(2px, 0.8vw, 8px) 0 0;
}

.route-progress {
    position: relative;
    z-index: 3;
    max-width: 1420px;
    height: 2px;
    margin: -4px 0 12px;
    border-radius: 999px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-3px);
    background: color-mix(in srgb, var(--color-line-strong) 42%, transparent);
    transition: opacity 140ms ease, transform 140ms ease;
    pointer-events: none;
}

.route-progress::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 42%;
    border-radius: inherit;
    background:
        linear-gradient(
            90deg,
            color-mix(in srgb, var(--color-solar) 18%, transparent),
            var(--color-solar),
            var(--color-water)
        );
    transform: translateX(-115%);
    box-shadow: 0 0 18px color-mix(in srgb, var(--color-solar) 42%, transparent);
}

.route-progress--active {
    opacity: 1;
    transform: translateY(0);
}

.route-progress--active::before {
    animation: route-progress-sweep 920ms cubic-bezier(0.45, 0, 0.15, 1) infinite;
}

.route-swap-enter-active,
.route-swap-leave-active {
    transition: opacity 90ms ease, transform 90ms ease;
}

.route-swap-enter-from {
    opacity: 0;
    transform: translateY(3px);
}

.route-swap-leave-to {
    opacity: 0;
    transform: translateY(-2px);
}

@keyframes route-progress-sweep {
    0% { transform: translateX(-115%); }
    58% { transform: translateX(92%); }
    100% { transform: translateX(245%); }
}

/* Mobile: bottom tabbar + Meer own navigation; desktop sidebar is hidden. */
@media (max-width: 1100px) {
    .main-content { margin-left: 0; }
    .sidebar {
        display: none;
    }
}

.mobile-topbar {
    display: none;
}

.mobile-tabbar {
    display: none;
}
