.map-container {
    width: 100%;
    min-height: 100dvh;
}

.map-shell {
    position: relative;
    width: 100%;
    min-height: 100dvh;
    overflow: hidden;
}

.map-shell--fullscreen {
    position: fixed;
    inset: 0;
    z-index: 2000;
    overflow: hidden;
}

.map-shell--fullscreen .map-container {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
}

.map-toggle-btn {
    z-index: 1302;
    background: rgba(24, 24, 28, 0.35);
    color: #fff;
    backdrop-filter: blur(2px);
}

.map-toggle-anchor {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2002;
    display: flex;
    gap: 8px;
}

.map-toggle-btn:hover {
    background: rgba(24, 24, 28, 0.55);
}

.map-measure-panel {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 380px;
    max-height: calc(100dvh - 40px);
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(16, 22, 30, 0.88);
    color: #f2f7ff;
    z-index: 1301;
    transform: translateX(320px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.22s ease;
    display: flex;
    flex-direction: column;
}

.map-panel-backdrop {
    position: absolute;
    inset: 0;
    z-index: 1300;
    background: transparent;
}

.map-measure-panel--open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.map-measure-panel__header {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.map-measure-radios {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 2px;
}

.map-measure-panel .mud-radio {
    min-height: auto !important;
}

.map-measure-panel .mud-radio .mud-typography {
    font-size: 12px !important;
    line-height: 1.3 !important;
}

.map-measure-panel .mud-radio-group {
    gap: 0 !important;
}

.map-measure-radio-item {
    margin: 2px 0 !important;
    padding: 1px 0 !important;
    min-height: 22px !important;
}

.map-measure-radio-item .mud-button-root {
    padding-top: 1px !important;
    padding-bottom: 1px !important;
    min-height: 22px !important;
}

.map-measure-radio-item .mud-radio-icons {
    margin-right: 4px !important;
}

.map-measure-radio-item .mud-typography {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.station-speed-marker {
    min-width: 42px;
    padding: 4px 8px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(12, 24, 32, 0.72);
    color: #f3fbff;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
    /*transform: translate(-50%, -100%);*/
    pointer-events: auto;
}

.station-contact-marker {
    width: 18px;
    min-width: 18px;
    height: 18px;
    padding: 0;
    border-radius: 50%;
    background: #9ca3af;
    border: 3px solid rgba(255, 255, 255, .82);
    color: #6b7280;
    box-shadow: 0 0 0 4px rgba(5, 15, 32, .45), 0 0 12px rgba(156, 163, 175, .75);
}

.map-filter-block {
    padding: 8px 0 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 10px;
}

.map-filter-block__label {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
    opacity: 0.9;
}

.map-station-filter {
    width: 100%;
}

.map-refresh-status {
    margin-top: 6px;
    font-size: 10px;
    opacity: 0.7;
}

.station-speed-marker--stale {
    background: rgba(125, 20, 28, 0.88);
    border-color: #ff5964;
    box-shadow: 0 0 0 2px rgba(255, 70, 80, 0.35), 0 3px 10px rgba(0, 0, 0, 0.35);
}

.station-row-stale td {
    background: rgba(170, 25, 35, 0.16) !important;
}

.station-row-stale td:first-child {
    border-left: 3px solid #ff5964;
}

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

.wind-rose-summary__item {
    min-height: 66px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.035);
    border-radius: 8px;
    background: rgba(24, 24, 36, 0.72);
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.wind-rose-summary__item span,
.wind-rose-summary__item strong {
    display: block;
}

.wind-rose-summary__item span {
    color: #aaa8bb;
    font-size: 13px;
}

.wind-rose-summary__item strong {
    margin-top: 5px;
    color: #e8e7f2;
    font-size: 20px;
}

@media (max-width: 650px) {
    .wind-rose-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.station-speed-value {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
}

.station-speed-unit {
    font-size: 10px;
    line-height: 1;
    opacity: 0.85;
}
.public-layout .mud-appbar {
    display: none !important;
}

.public-layout .mud-main-content {
    margin-top: 0 !important;
    margin-left: 0 !important;
    padding-top: 0 !important;
}

.public-map-brand {
    position: absolute;
    top: 16px;
    left: 20px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 4px;
}

.public-map-logo-link {
    display: block;
    line-height: 0;
}

.public-map-brand img {
    display: block;
    width: 128px;
    height: auto;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.public-map-logo-link:hover img {
    transform: scale(1.04);
    opacity: 0.85;
}

.public-map-login {
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
}

.modern-map-header {
    position: absolute;
    top: 22px;
    left: 28px;
    right: 28px;
    z-index: 5;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    pointer-events: none;
    color: #f7f8ff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .65);
}

.modern-map-header__eyebrow { color: #a6b6d8; font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.modern-map-header__title { margin-top: 3px; font-size: 28px; font-weight: 800; }
.modern-map-header__updated { margin-top: 3px; color: #cbd5ee; font-size: 12px; }

.station-status-card {
    position: absolute;
    left: 28px;
    bottom: 28px;
    z-index: 5;
    width: 286px;
    padding: 17px 19px;
    border: 1px solid rgba(108, 137, 204, .38);
    border-radius: 8px;
    background: rgba(5, 18, 45, .68);
    backdrop-filter: blur(10px);
    color: #eef3ff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .26);
}

.station-status-card__title { margin-bottom: 13px; font-size: 16px; font-weight: 700; }
.station-status-card__row { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 10px; min-height: 31px; font-size: 14px; }
.station-status-card__row strong { color: #dce6ff; font-weight: 700; }
.station-status-card__total { margin-top: 12px; padding-top: 11px; border-top: 1px solid rgba(160, 180, 220, .2); font-size: 14px; }
.station-status-dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 9px currentColor; }
.station-status-dot--online { color: #36d56f; background: #36d56f; }
.station-status-dot--warning { color: #ffc32f; background: #ffc32f; }
.station-status-dot--offline { color: #ff4755; background: #ff4755; }

.station-status-marker {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, .82);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(5, 15, 32, .45), 0 0 16px currentColor;
    pointer-events: auto;
    transform: translate(-50%, -50%);
}

.station-status-marker span { display: block; width: 100%; height: 100%; border-radius: inherit; }
.station-status-marker--online { color: #36d56f; background: #36d56f; }
.station-status-marker--warning { color: #ffc32f; background: #ffc32f; }
.station-status-marker--offline { color: #ff4755; background: #ff4755; }
.station-status-marker--inactive { color: #9ca7bd; background: #9ca7bd; }

.modern-appbar {
    display: none !important;
}
.mobile-menu-toggle { display: none !important; }

.mud-layout:has(.modern-nav-drawer) .mud-main-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.modern-appbar__title {
    color: #aaa9b9;
    font-size: 27px !important;
    font-weight: 400 !important;
}

.modern-nav-drawer,
.modern-nav-drawer .mud-drawer-content {
    width: 240px !important;
    top: 0 !important;
    bottom: 0 !important;
    height: 100dvh !important;
    background: #030d25 !important;
    border-right: 1px solid rgba(113, 138, 204, .24) !important;
    box-shadow: 10px 0 30px rgba(0, 0, 0, .25);
    z-index: 1400 !important;
}

.modern-menu {
    min-height: 100dvh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 22px 14px;
}
.mobile-menu-header { display: none; }

.modern-nav-drawer .mud-nav-link,
.modern-nav-drawer .mud-nav-group > .mud-nav-link {
    display: flex !important;
    align-items: center !important;
    min-height: 58px;
    margin: 0 0 10px;
    padding: 0 18px !important;
    border-radius: 12px;
    color: #b7bfd1 !important;
    font-size: 16px;
    font-weight: 500;
    border: 1px solid transparent;
}

.modern-nav-drawer .mud-nav-link:hover { background: rgba(78, 61, 180, .18) !important; color: #f1efff !important; }
.modern-nav-drawer .mud-nav-link.active {
    background: linear-gradient(135deg, #3f2499, #4e35bd) !important;
    color: #fbfaff !important;
    border: 1px solid rgba(153, 122, 255, .75);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 5px 16px rgba(48, 24, 138, .36);
}
.modern-nav-drawer .mud-nav-link-icon { color: #c5ccdc !important; margin-right: 16px !important; font-size: 27px !important; }
.modern-nav-drawer .mud-nav-link-content { display: flex; align-items: center; min-height: 100%; }
.modern-nav-drawer .mud-nav-link.active .mud-nav-link-icon { color: #fff !important; }
.modern-nav-drawer .settings-group .mud-nav-group-expand-icon,
.modern-nav-drawer .settings-group .mud-nav-group-expand-icon * { display: none !important; }
.modern-nav-drawer .settings-group > .mud-nav-link { padding-right: 18px !important; }
.modern-nav-drawer .mud-divider { border-color: rgba(255, 255, 255, .08) !important; }
.modern-menu .logout-slot { margin-top: auto; }
.modern-menu .logout-slot .mud-nav-link { color: #ff7b86 !important; }
.modern-menu .logout-slot .mud-nav-link:hover { background: rgba(239, 68, 68, .16) !important; color: #ffd0d4 !important; }

.map-style-menu .mud-icon-button { width: 42px; height: 42px; border: 1px solid rgba(118, 145, 209, .36); border-radius: 10px; color: #b7c8e8 !important; background: rgba(5, 16, 42, .88); }
.map-style-menu .mud-icon-button:hover { color: #d9ccff !important; border-color: rgba(143, 104, 255, .85); background: rgba(81, 51, 166, .28); }

html, body, .mud-layout {
    max-width: 100%;
    overflow-x: hidden !important;
}

html:has(.export-page),
body:has(.export-page),
#app:has(.export-page),
.mud-layout:has(.export-page) {
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
}

/* Export page controls: keep the selected format and download action visibly active. */
.export-page .format button .mud-icon-root,
.export-page .format button .mud-icon-root svg {
    color: #956bff !important;
    fill: currentColor !important;
}
.export-page .format button:nth-of-type(2) .mud-icon-root,
.export-page .format button:nth-of-type(2) .mud-icon-root svg {
    color: #63d68b !important;
    fill: currentColor !important;
}
.export-page .download,
.export-page .download.mud-button-root,
.export-page .download:not(:disabled) {
    background: linear-gradient(135deg, #6d3ee8 0%, #8254ff 100%) !important;
    color: #fff !important;
    opacity: 1 !important;
    box-shadow: 0 8px 24px rgba(104, 61, 230, .42) !important;
}
.export-page .download .mud-icon-root,
.export-page .download .mud-icon-root svg {
    color: #fff !important;
    fill: currentColor !important;
}

/* The export view owns the single page scroll; remove the nested layout scrollbars and edge gutters. */
html:has(.export-page),
body:has(.export-page),
#app:has(.export-page),
#app:has(.export-page) > div {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}
.export-page {
    width: 100% !important;
    min-height: 100vh !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 24px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-width: none;
}
.export-page::-webkit-scrollbar {
    display: none;
}
.mud-layout:has(.export-page),
.mud-layout:has(.export-page) .mud-main-content,
html:has(.export-page),
body:has(.export-page) {
    overflow: hidden !important;
    scrollbar-width: none !important;
}
.mud-layout:has(.export-page)::-webkit-scrollbar,
html:has(.export-page)::-webkit-scrollbar,
body:has(.export-page)::-webkit-scrollbar {
    display: none !important;
}

.modern-nav-drawer { overflow-x: hidden !important; }

.station-dashboard-frame {
    display: block;
    width: 100%;
    height: 100dvh;
    border: 0;
    background: #07101f;
}

.mud-main-content:has(.station-dashboard-frame) {
    background: #07111f !important;
    min-height: 100dvh;
}

.mud-main-content:has(.station-dashboard-frame) .mud-container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.mud-layout:has(.station-dashboard-frame) {
    overflow-x: hidden !important;
    overflow-y: visible !important;
    scrollbar-width: none !important;
}
.mud-layout:has(.station-dashboard-frame)::-webkit-scrollbar { display: none !important; }
.station-dashboard-frame {
    display: block !important;
    width: 100% !important;
    height: 100vh !important;
    min-height: 100vh !important;
    border: 0 !important;
    margin: 0 !important;
}

/* Export metric checkboxes: override MudBlazor's default grey primary palette. */
.export-page .metric-card .mud-checkbox,
.export-page .metric-card .mud-checkbox-true,
.export-page .metric-card .mud-checkbox-checked {
    --mud-palette-primary: #8254ff !important;
    --mud-palette-primary-rgb: 130, 84, 255 !important;
    --mud-palette-action-default: #8254ff !important;
}
.export-page .metric-card .mud-checkbox .mud-icon-button,
.export-page .metric-card .mud-checkbox .mud-button-root {
    color: #8254ff !important;
}
.export-page .metric-card .mud-checkbox-checked .mud-icon-root,
.export-page .metric-card .mud-checkbox-true .mud-icon-root,
.export-page .metric-card .mud-checkbox input:checked ~ * .mud-icon-root {
    color: #ffffff !important;
    background: linear-gradient(135deg, #6d3ee8, #8254ff) !important;
    border-radius: 4px !important;
}

.station-overview { min-height: 100dvh; padding: 22px 28px; color: #edf2ff; background: #061127; }

.mud-main-content:has(.stations-page) { background: #07101f !important; min-height: 100dvh; }
.stations-page { color: #f4f6fa; padding: 8px 2px 28px; background: #07101f; min-height: calc(100dvh - 16px); }
.stations-header { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; margin-bottom:24px; }
.stations-header h1 { margin:0; font-size:32px; line-height:1.15; font-weight:700; letter-spacing:-.02em; }
.stations-header p { margin:8px 0 0; color:#94a3b8; font-size:14px; display:flex; align-items:center; gap:9px; }
.stations-dot { width:9px; height:9px; border-radius:50%; background:#895cff; box-shadow:0 0 12px rgba(137,92,255,.75); }
.stations-header .mud-button-root { min-height:44px; padding:0 20px; border-radius:10px; font-weight:700; letter-spacing:.03em; }
.stations-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-bottom:20px; }
.station-kpi { min-height:104px; display:flex; align-items:center; gap:16px; padding:18px 20px; border:1px solid #1b2b43; border-radius:15px; background:linear-gradient(135deg,#0d1b30,#0b1729); box-shadow:0 10px 26px rgba(0,0,0,.12); }
.station-kpi > div { display:flex; flex-direction:column; gap:4px; }.station-kpi strong { font-size:29px; line-height:1; }.station-kpi div span { color:#94a3b8; font-size:13px; }
.kpi-icon { width:48px; height:48px; display:grid; place-items:center; border-radius:50%; }.kpi-icon .mud-icon-root { font-size:27px; }.kpi-blue { color:#78a7ff; background:rgba(72,106,204,.25); }.kpi-green { color:#55e59a; background:rgba(49,209,124,.2); }.kpi-amber { color:#ffb340; background:rgba(245,158,11,.2); }.kpi-purple { color:#b08aff; background:rgba(124,77,255,.25); }
.stations-table-card { border:1px solid #1b2b43; border-radius:15px; background:#0b172a; overflow:hidden; box-shadow:0 14px 35px rgba(0,0,0,.14); }.stations-toolbar { display:flex; gap:12px; padding:16px; border-bottom:1px solid #1b2b43; }.station-search { min-width:250px; flex:1; }.station-filter { min-width:145px; }.stations-toolbar .mud-input-control { margin-top:0; }.stations-toolbar .mud-input-outlined-border { border-color:#31435f; }.stations-toolbar .mud-input-label,.stations-toolbar .mud-input { color:#dbe5f4; }
.stations-table-wrap { overflow-x:auto; }.stations-table { width:100%; min-width:1180px; border-collapse:collapse; font-size:14px; }.stations-table th { padding:15px 12px; text-align:left; color:#aebbd0; font-weight:600; background:#0d1b30; border-bottom:1px solid #31435f; white-space:nowrap; }.stations-table td { padding:13px 12px; border-bottom:1px solid rgba(49,67,95,.6); color:#dbe5f4; white-space:nowrap; }.stations-table tbody tr { border-left:3px solid transparent; transition:background .15s; }.stations-table tbody tr:hover { background:#10213a; }.stations-table tbody tr.station-row-healthy { border-left-color:#31d17c; }.stations-table tbody tr.station-row-stale { border-left-color:#f59e0b; }.stations-table tbody tr.station-row-error { border-left-color:#f05262; }.stations-table tbody tr.station-row-inactive { border-left-color:#65758b; }.muted-cell { color:#a7b4c8 !important; }.address-cell { max-width:230px; overflow:hidden; text-overflow:ellipsis; }.station-name { display:flex; align-items:center; gap:6px; font-weight:600; }.station-warning { color:#f59e0b !important; font-size:18px !important; }.station-issue { display:inline-block; margin-top:5px; padding:2px 7px; border-radius:6px; color:#ffbd5c; background:rgba(245,158,11,.13); font-size:11px; }.status-pill,.share-pill { display:inline-flex; align-items:center; gap:7px; padding:5px 10px; border-radius:999px; font-size:12px; font-weight:600; }.status-pill i { width:7px; height:7px; border-radius:50%; }.status-pill.healthy { color:#5ee99b; background:rgba(49,209,124,.13); }.status-pill.healthy i { background:#31d17c; }.status-pill.stale { color:#ffb340; background:rgba(245,158,11,.14); }.status-pill.stale i { background:#f59e0b; }.status-pill.inactive { color:#aab7c8; background:rgba(101,117,139,.18); }.status-pill.inactive i { background:#65758b; }.share-pill.enabled { color:#b99cff; background:rgba(124,77,255,.15); }.share-pill.disabled { color:#aab7c8; background:rgba(101,117,139,.16); }.updated-cell { color:#d8e1ed; }.station-actions { display:flex; align-items:center; gap:2px; }.station-actions .mud-icon-button { color:#78a7ff; }.station-actions .mud-icon-button:hover { background:rgba(124,77,255,.16); color:#c0a9ff; }.stations-pager { display:flex; align-items:center; gap:12px; padding:14px 18px; color:#94a3b8; font-size:13px; }.stations-pager .mud-select { width:76px; }.pager-count { margin-left:auto; }.stations-empty { padding:70px 20px; text-align:center; color:#94a3b8; }.stations-empty .mud-icon-root { font-size:54px; color:#895cff; }.stations-empty h3 { margin:13px 0 6px; color:#f4f6fa; font-size:20px; }.stations-empty p { margin:0 0 18px; }.stations-error { display:flex; align-items:center; gap:10px; margin-bottom:18px; padding:12px 16px; border:1px solid rgba(240,82,98,.35); border-radius:10px; color:#ff9ca8; background:rgba(240,82,98,.1); }
@media (max-width: 1100px) { .stations-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); } .stations-toolbar { flex-wrap:wrap; }.station-search { flex-basis:100%; } }
@media (max-width: 640px) { .stations-header { flex-direction:column; }.stations-header h1 { font-size:26px; }.stations-kpis { grid-template-columns:1fr; }.stations-pager { flex-wrap:wrap; }.pager-count { margin-left:0; } }

.mud-main-content:has(.companies-page) { background:#07101f !important; min-height:100dvh; }
.companies-page { color:#f4f6fa; padding:8px 2px 28px; background:#07101f; min-height:calc(100dvh - 16px); }
.companies-header { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:24px; }
.companies-header h1 { margin:0; font-size:32px; line-height:1.15; font-weight:700; letter-spacing:-.02em; color:#f4f6fa; }.companies-header p { margin:8px 0 0; color:#94a3b8; font-size:14px; display:flex; align-items:center; gap:9px; }.companies-dot { display:inline-block; width:10px; height:10px; border-radius:50%; background:#895cff; box-shadow:0 0 12px rgba(137,92,255,.7); }
.companies-header .mud-button { min-height:44px; padding:0 20px; border-radius:10px; font-weight:700; letter-spacing:.03em; }
.companies-error { display:flex; align-items:center; gap:10px; margin-bottom:18px; padding:12px 16px; border:1px solid rgba(240,82,98,.35); border-radius:10px; color:#ff9ca8; background:rgba(240,82,98,.1); }.companies-error .mud-button { margin-left:auto; color:#ffb3bc; }
.companies-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-bottom:20px; }.company-kpi { display:flex; align-items:center; gap:16px; min-height:104px; padding:18px 20px; border:1px solid #1b2b43; border-radius:15px; background:linear-gradient(135deg,#0d1b30,#0b1729); box-shadow:0 10px 26px rgba(0,0,0,.12); }.company-kpi-icon { display:grid; place-items:center; width:58px; height:58px; flex:0 0 58px; border-radius:50%; }.company-kpi-icon .mud-icon-root { font-size:30px; }.company-kpi-purple { color:#ad8cff; background:rgba(124,77,255,.24); }.company-kpi-green { color:#61eb9b; background:rgba(49,209,124,.2); }.company-kpi-blue { color:#7ca9ff; background:rgba(76,125,255,.2); }.company-kpi-amber { color:#ffb340; background:rgba(245,158,11,.2); }.company-kpi strong { display:block; font-size:29px; line-height:1; }.company-kpi span:last-child { display:block; margin-top:4px; color:#94a3b8; font-size:13px; }
.companies-table-card { overflow:hidden; border:1px solid #1b2b43; border-radius:15px; background:#0b172a; box-shadow:0 14px 35px rgba(0,0,0,.14); }.companies-toolbar { display:flex; align-items:center; gap:12px; padding:16px; border-bottom:1px solid #1b2b43; }.company-search { min-width:250px; flex:1; }.company-filter { min-width:145px; }.company-sort { margin-left:auto; min-height:40px; color:#dbe5f4; border-color:#31435f; }.companies-toolbar .mud-input-control { margin-top:0; }.companies-toolbar .mud-input-outlined-border { border-color:#31435f; }.companies-toolbar .mud-input-label,.companies-toolbar .mud-input { color:#dbe5f4; }
.companies-table-wrap { overflow-x:auto; }.companies-table { width:100%; min-width:980px; border-collapse:collapse; font-size:14px; }.companies-table th { padding:15px 12px; text-align:left; color:#aebbd0; font-weight:600; background:#0d1b30; border-bottom:1px solid #31435f; white-space:nowrap; }.companies-table td { padding:13px 12px; color:#dbe5f4; border-bottom:1px solid rgba(49,67,95,.6); white-space:nowrap; }.companies-table tbody tr { border-left:3px solid transparent; transition:background .15s; }.companies-table tbody tr:hover { background:#10213a; }.companies-table tbody tr.company-row-healthy { border-left-color:#31d17c; }.companies-table tbody tr.company-row-warning { border-left-color:#f59e0b; }.companies-table tbody tr.company-row-inactive { border-left-color:#65758b; }.company-name { font-weight:600; }.company-muted { color:#a7b4c8 !important; }.company-issue { display:inline-block; margin-top:5px; padding:2px 7px; border-radius:6px; color:#ffbd5c; background:rgba(245,158,11,.13); font-size:11px; }.company-admin-pill,.company-status-pill { display:inline-flex; align-items:center; gap:7px; padding:5px 10px; border-radius:999px; font-size:12px; font-weight:600; }.company-admin-pill.yes { color:#5ee99b; border:1px solid #31d17c; }.company-admin-pill.no { color:#ffb340; border:1px solid #f59e0b; }.company-status-pill.active { color:#5ee99b; background:rgba(49,209,124,.13); }.company-status-pill.inactive { color:#aab7c8; background:rgba(101,117,139,.18); }.company-status-pill i,.company-admin-pill.yes i { width:7px; height:7px; border-radius:50%; background:#31d17c; }.company-status-pill.inactive i { background:#65758b; }.company-actions { display:flex; align-items:center; gap:2px; }.company-actions .mud-icon-button { color:#78a7ff; }.company-actions .mud-icon-button:hover { color:#c0a9ff; background:rgba(124,77,255,.16); }.companies-pager { display:flex; align-items:center; gap:12px; padding:14px 18px; color:#94a3b8; font-size:13px; }.companies-pager .mud-select { width:76px; }.companies-pager .pager-count { margin-left:auto; }.companies-empty { padding:70px 20px; text-align:center; color:#94a3b8; }.companies-empty .mud-icon-root { font-size:54px; color:#895cff; }.companies-empty h3 { margin:13px 0 6px; color:#f4f6fa; font-size:20px; }.companies-empty p { margin:0 0 18px; }
@media (max-width:1100px) { .companies-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }.companies-toolbar { flex-wrap:wrap; }.company-search { flex-basis:100%; }.company-sort { margin-left:0; } }
@media (max-width:640px) { .companies-header { flex-direction:column; }.companies-header h1 { font-size:26px; }.companies-header .mud-button { width:100%; }.companies-kpis { grid-template-columns:1fr; }.companies-pager { flex-wrap:wrap; }.companies-pager .pager-count { margin-left:0; } }
.station-overview__header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid rgba(142, 167, 220, .22); }
.station-overview__header h1 { margin: 0; font-size: 30px; font-weight: 800; }
.station-overview__header p { display: flex; align-items: center; gap: 5px; margin: 6px 0 0; color: #aebbd7; font-size: 13px; }
.station-overview__back { margin: 0 0 8px -8px; color: #aebbd7; }
.station-overview__updated { padding: 10px 13px; border: 1px solid rgba(142, 167, 220, .22); border-radius: 8px; color: #bfcbe5; font-size: 12px; }
.station-overview__section { margin-top: 16px; padding: 15px; border: 1px solid rgba(112, 143, 205, .2); border-radius: 10px; background: rgba(7, 21, 48, .72); }
.station-overview__section-title { margin-bottom: 13px; font-size: 16px; font-weight: 700; }
.station-overview__section-title span { margin-left: 8px; color: #a06aff; font-size: 13px; font-weight: 500; }
.station-overview__facts { display: grid; grid-template-columns: repeat(6, minmax(150px, 1fr)); gap: 12px; }
.station-fact-card, .station-detail-card { border: 1px solid rgba(112, 143, 205, .22); border-radius: 8px; background: rgba(11, 28, 60, .7); }
.station-fact-card { min-height: 134px; padding: 15px; position: relative; }
.station-fact-card__icon { position: absolute; top: 14px; left: 14px; color: #38d2ff; font-size: 27px; }
.station-fact-card__name { min-height: 30px; padding-left: 37px; color: #c4cce1; font-size: 13px; }
.station-fact-card__value, .station-detail-card__value { margin-top: 9px; color: #fff; font-size: 29px; font-weight: 800; }
.station-fact-card__value small, .station-detail-card__value small { margin-left: 6px; color: #d8e2f6; font-size: 14px; font-weight: 600; }
.station-fact-card__meta { margin-top: 8px; color: #92a1bd; font-size: 12px; }
.station-overview__tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.station-overview__chart { height: 280px; width: 100%; }
.station-overview__empty { min-height: 160px; display: flex; align-items: center; justify-content: center; color: #9aa8c4; }
.station-overview__details { display: grid; grid-template-columns: repeat(4, minmax(190px, 1fr)); gap: 12px; margin-top: 16px; }
.station-detail-card { min-height: 150px; padding: 15px; }
.station-detail-card__header { display: flex; align-items: center; gap: 8px; color: #c4cce1; font-size: 13px; }
.station-detail-card__header .mud-icon-root { color: #a76cff; }
.station-detail-card__stats { display: flex; gap: 12px; margin-top: 13px; color: #92a1bd; font-size: 12px; }
@media (max-width: 1400px) { .station-overview__facts { grid-template-columns: repeat(3, minmax(150px, 1fr)); } }
@media (max-width: 900px) { .station-overview { padding: 16px; } .station-overview__header { flex-direction: column; } .station-overview__facts, .station-overview__details { grid-template-columns: repeat(2, minmax(140px, 1fr)); } }

/* Mobile-first overrides for shared Blazor pages. */
@media (max-width: 767px) {
    html, body, #app { min-height: 100%; height: auto !important; overflow-x: hidden !important; overflow-y: auto !important; }
    .mud-layout:has(.companies-page),
    .mud-layout:has(.stations-page),
    .mud-layout:has(.export-page),
    .mud-layout:has(.analytics-page),
    .mud-layout:has(.station-overview) {
        height: auto !important;
        min-height: 100dvh !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }
    .mud-layout:has(.companies-page) .mud-main-content,
    .mud-layout:has(.stations-page) .mud-main-content,
    .mud-layout:has(.export-page) .mud-main-content,
    .mud-layout:has(.analytics-page) .mud-main-content,
    .mud-layout:has(.station-overview) .mud-main-content {
        height: auto !important;
        min-height: 100dvh !important;
        overflow: visible !important;
    }
    .modern-appbar {
        position: sticky !important;
        top: 0;
        z-index: 1399;
        display: none !important;
        min-height: 52px !important;
        padding: 0 4px;
        background: linear-gradient(135deg, #07132b 0%, #0a1730 100%) !important;
        border-bottom: 1px solid rgba(113, 138, 204, .24);
        box-shadow: 0 6px 18px rgba(0,0,0,.18);
    }
    .modern-appbar .mud-icon-button { color: #dbe5f7 !important; }
    .modern-appbar .mud-typography { font-size: 15px !important; font-weight: 600 !important; color: #dbe5f7 !important; }
    .mobile-menu-toggle {
        display: grid !important;
        position: fixed !important;
        top: 12px;
        left: 12px;
        z-index: 1390;
        width: 42px;
        height: 42px;
        border: 1px solid rgba(113, 138, 204, .36);
        border-radius: 10px;
        background: rgba(7, 19, 43, .92) !important;
        color: #dbe5f7 !important;
        box-shadow: 0 5px 16px rgba(0,0,0,.24);
        align-items: center;
        justify-content: center;
        padding: 0;
        font-size: 24px;
        line-height: 1;
        cursor: pointer;
    }
    .modern-nav-drawer,
    .modern-nav-drawer .mud-drawer-content { width: 280px !important; max-width: calc(100vw - 48px) !important; }
    /* Responsive drawer must overlay the page on phones; it must not reserve
       the desktop 240px column beside the content. */
    .mud-layout:has(.modern-nav-drawer) .mud-main-content {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .modern-nav-drawer {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        z-index: 1400 !important;
    }
    .modern-nav-drawer.mud-drawer--closed {
        transform: translateX(-105%) !important;
        visibility: hidden !important;
    }
    .modern-nav-drawer:not(.mud-drawer--closed) {
        transform: translateX(0) !important;
        visibility: visible !important;
    }
    .modern-menu { min-height: 100dvh; padding: 14px 10px; }
    .mobile-menu-header { display: flex; justify-content: flex-end; min-height: 38px; margin-bottom: 4px; }
    .mobile-menu-header .mud-icon-button { color: #c5ccdc !important; }
    .modern-nav-drawer .mud-nav-link,
    .modern-nav-drawer .mud-nav-group > .mud-nav-link { min-height: 50px; margin-bottom: 6px; padding: 0 14px !important; }
    .modern-nav-drawer .mud-nav-link-icon { margin-right: 12px !important; font-size: 23px !important; }
    .mud-main-content > .mud-container { padding: 12px !important; }

    /* На мобільному карта займає весь доступний простір без додаткових кнопок. */
    .map-toggle-anchor { display: none !important; }
    .map-toggle-btn { width: 38px !important; height: 38px !important; }
    .map-measure-panel { top: 8px; right: 8px; width: calc(100vw - 16px); max-height: calc(100dvh - 16px); transform: translateX(calc(100vw - 8px)); }
    .modern-map-header { top: 12px; left: 14px; right: 64px; }
    .modern-map-header__title { font-size: 20px; }
    .modern-map-header__updated { font-size: 11px; }
    .station-status-card { left: 12px; bottom: 12px; width: calc(100vw - 24px); max-width: 286px; padding: 12px 14px; }
    .public-map-brand { top: 10px; left: 12px; gap: 8px; }
    .public-map-brand img { width: 100px; }

    .export-page { height: auto !important; min-height: 100dvh !important; padding: 14px !important; }
    .export-header { gap: 14px; margin-bottom: 16px; }
    .export-header h1 { font-size: 23px; }
    .export-header aside { padding: 12px; }
    .export-controls { align-items: stretch; gap: 12px; }
    .date-arrow { display: none; }
    .format-row { gap: 14px; }
    .metrics-title { align-items: flex-start; gap: 8px; }
    .metrics-title > div { display: flex; flex-wrap: wrap; gap: 4px; }
    .metrics-title button { margin-left: 0; }
    .metric-card { min-width: 0; }
    .info { align-items: flex-start; }
    .export-summary { gap: 16px; padding: 14px; }
    .export-summary span { min-width: calc(50% - 12px); margin-right: 0; padding-right: 12px; }

    .stations-page, .companies-page { padding: 4px 0 18px; }
    .stations-header, .companies-header { gap: 14px; margin-bottom: 16px; }
    .stations-header .mud-button-root, .companies-header .mud-button { width: 100%; }
    .stations-toolbar, .companies-toolbar { padding: 12px; gap: 8px; }
    .station-search, .station-filter, .company-search, .company-filter, .company-sort { min-width: 0; width: 100%; flex-basis: 100%; }
    .stations-table-wrap, .companies-table-wrap { -webkit-overflow-scrolling: touch; }
    .stations-pager, .companies-pager { padding: 12px; gap: 8px; }

    .station-overview { padding: 14px 12px; }
    .station-overview__header h1 { font-size: 24px; }
    .station-overview__updated { width: 100%; }
    .station-overview__section { padding: 12px; }
    .station-overview__facts, .station-overview__details { grid-template-columns: 1fr; }
    .station-overview__chart { height: 240px; }
    .station-overview__tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
    .station-overview__tabs .mud-button-root { flex: 0 0 auto; }
    .station-dashboard-frame { width: 100vw !important; height: calc(100dvh - 52px) !important; min-height: calc(100dvh - 52px) !important; }
}

@media (min-width: 768px) {
    .modern-nav-drawer { transform: translateX(0) !important; visibility: visible !important; }
    .modern-nav-drawer.mud-drawer--closed { transform: translateX(0) !important; visibility: visible !important; }
}

/* Map controls are hidden only on phones; keep them visible on desktop. */
@media (min-width: 768px) {
    .map-toggle-anchor { display: flex !important; }
}
