html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

html[data-theme="light"], html[data-theme="light"] body {
    background-color: #F4F6F8;
    color-scheme: light;
}

html[data-theme="dark"], html[data-theme="dark"] body {
    background-color: #0B1220;
    color-scheme: dark;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42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em 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

html, body {
    height: 100%;
}

.emergency-map {
    height: 100%;
}

.station-map-wrap {
    height: 380px;
    border-radius: 10px;
    overflow: hidden;
    background: #1b2535;
}

.station-map {
    height: 100%;
    min-height: 380px;
}

.station-explorer-map {
    height: 560px;
}

.station-explorer-map .station-map {
    min-height: 560px;
}

.station-rank-row {
    cursor: pointer;
}

.my-message-row {
    cursor: pointer;
}

.incident-map-wrap {
    height: 420px;
    background: #1b2535;
}

.incident-map {
    height: 100%;
    min-height: 420px;
}

.incident-cluster {
    background: rgba(229, 57, 53, 0.92);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 2px solid #fff;
}

.incident-cluster-small { width: 36px; height: 36px; font-size: 0.85rem; }
.incident-cluster-medium { width: 44px; height: 44px; font-size: 0.95rem; }
.incident-cluster-large { width: 52px; height: 52px; font-size: 1.05rem; }

@keyframes incident-row-flash {
    0% { background-color: rgba(229, 57, 53, 0.28); }
    100% { background-color: transparent; }
}

.incident-row-updated {
    animation: incident-row-flash 4s ease-out;
}

.incident-service-stripes {
    display: flex;
    flex-direction: column;
    width: 6px;
    min-height: 44px;
    border-radius: 3px;
    overflow: hidden;
    align-self: stretch;
}

.incident-service-stripes span {
    flex: 1 1 0;
    min-height: 8px;
}

.netherlands-map-wrap {
    width: 100%;
    height: 560px;
}

.brand-appbar-home {
    display: inline-flex;
    align-items: center;
    line-height: 0;
    text-decoration: none;
}

.brand-appbar-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    margin-right: 10px;
    object-fit: contain;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    position: relative;
    z-index: 1;
}

/* Banner is 3000×100 (30:1) — keep bar height in the same ratio so the image fits 1:1. */
.dash-layout-wide {
    --dash-hero-height: clamp(52px, calc(100vw / 30), 100px);
}

.dash-layout-compact {
    --dash-hero-height: clamp(44px, calc(100vw / 30), 80px);
}

.mud-appbar.dash-hero-appbar {
    position: relative;
    z-index: 1300 !important;
    height: var(--dash-hero-height) !important;
    min-height: var(--dash-hero-height) !important;
    overflow: hidden;
    background-color: #0b1220 !important;
    /* MudBlazor paints its own solid appbar color; force the brand image through. */
    background-image: none !important;
    color: #fff !important;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.mud-appbar.dash-hero-appbar::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: #0b1220;
    background-image:
        linear-gradient(
            90deg,
            rgba(8, 12, 20, 0.35) 0%,
            rgba(8, 12, 20, 0.1) 28%,
            rgba(8, 12, 20, 0.08) 55%,
            rgba(8, 12, 20, 0.35) 100%),
        url("brand/respondr-header-3000x100-v2.png");
    /* Same aspect as the bar → no crop, no stretch. */
    background-size: 100% 100%;
    background-position: center center;
    background-repeat: no-repeat;
}

.mud-appbar.dash-hero-appbar .mud-toolbar {
    position: relative;
    z-index: 1;
    height: var(--dash-hero-height) !important;
    min-height: var(--dash-hero-height) !important;
    width: 100%;
    background: transparent !important;
    color: #fff;
    align-items: center;
    padding-top: 0;
}

.mud-appbar.dash-hero-appbar .mud-toolbar .mud-button-root,
.mud-appbar.dash-hero-appbar .mud-toolbar .mud-icon-button,
.mud-appbar.dash-hero-appbar .mud-toolbar .mud-typography,
.mud-appbar.dash-hero-appbar .mud-toolbar .mud-chip {
    position: relative;
    z-index: 1;
}

.mud-appbar {
    z-index: 1300 !important;
}

.mud-drawer {
    z-index: 1100;
}

.mud-main-content,
.mud-main-content.dash-main {
    padding-top: calc(var(--dash-hero-height, var(--mud-appbar-height, 64px)) + 16px) !important;
}

.mud-overlay {
    z-index: 1200;
}

.dash-layout-compact .mud-overlay {
    z-index: 1350 !important;
}

.dash-layout-compact .mud-drawer {
    z-index: 1400 !important;
}

.mud-dialog-container,
.mud-overlay-dialog {
    z-index: 1700 !important;
}

.mud-dialog {
    z-index: 1700 !important;
}

.mud-popover {
    z-index: 1800 !important;
}

.admin-search-field {
    position: relative;
    z-index: 2;
}

.brand-title {
    font-weight: 700;
    letter-spacing: -0.04em;
}

.stats-row {
    padding: 0 4px;
}

.feed-split {
    display: grid;
    grid-template-columns: minmax(0, var(--messages-pct, 60%)) 12px minmax(0, var(--details-pct, 40%));
    width: 100%;
    align-items: stretch;
    min-height: 280px;
}

.feed-col {
    min-width: 0;
    height: 100%;
}

.feed-col-messages,
.feed-col-details {
    min-width: 0;
}

.feed-col-details .emergency-detail {
    width: 100%;
    height: 100%;
}

.feed-splitter {
    display: block;
    cursor: default;
    background: transparent;
    position: relative;
    pointer-events: none;
    align-self: stretch;
}

.layout-editing .feed-splitter {
    cursor: col-resize;
    pointer-events: auto;
}

.feed-splitter::after {
    content: none;
}

.layout-editing .feed-splitter::after {
    content: "";
    position: absolute;
    inset: 8px 2px;
    border-radius: 4px;
    background: #D2100B;
    opacity: 0.55;
}

.dash-section-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 8px;
}

.layout-editing .dash-section-bar {
    cursor: grab;
}

.dash-section-hint {
    display: none;
    font-size: 0.72rem;
    opacity: 0.65;
    flex: 1;
}

.layout-editing .dash-section-hint {
    display: inline;
}

.dash-section-actions {
    margin-left: auto;
    display: none;
}

.layout-editing .dash-section-actions {
    display: inline-flex;
}

.section-resize-handle {
    display: none;
    height: 10px;
    cursor: ns-resize;
    margin: 4px 8px 0;
    border-radius: 4px;
    background: #D2100B;
    opacity: 0.45;
}

.layout-editing .section-resize-handle {
    display: block;
}

.dash-section-always {
    margin-left: auto;
    display: inline-flex;
}

.dash-sections {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.dash-section {
    min-width: 0;
}

.dash-section-span-1 {
    grid-column: span 1;
}

.dash-section-span-2 {
    grid-column: 1 / -1;
}

@media (max-width: 900px) {
    .dash-sections {
        grid-template-columns: minmax(0, 1fr);
    }

    .dash-section-span-1,
    .dash-section-span-2 {
        grid-column: 1 / -1;
    }
}

.dash-section.drag-over,
[data-section].drag-over {
    outline: 2px dashed #D2100B;
    outline-offset: 2px;
}

[data-section].is-dragging {
    opacity: 0.55;
}

body.is-resizing {
    cursor: col-resize;
    user-select: none;
}

.new-message-row {
    animation: new-message-flash 3.6s ease-out;
}

@keyframes new-message-flash {
    0% { background-color: rgba(255, 193, 7, 0.55); }
    100% { background-color: transparent; }
}

.map-splash {
    font-size: 12px;
    line-height: 1.3;
    max-width: 240px;
}

.map-splash strong {
    display: block;
    margin-bottom: 4px;
}

.feed-table-paper {
    min-width: 0;
    overflow: hidden;
}

.compact-messages .mud-table-cell {
    padding: 2px 8px !important;
    font-size: 0.75rem;
    line-height: 1.2;
    white-space: nowrap;
}

.compact-messages .mud-table-cell:last-child {
    white-space: normal;
}

.service-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.message-cell {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    line-height: 1.25;
}

.priority-text {
    font-weight: 700;
    font-size: 0.72rem;
}

.priority-text.priority-high {
    color: #ef5350;
}

.priority-text.priority-medium {
    color: #ffb74d;
}

.priority-text.priority-low {
    color: #4fc3f7;
}

.feed-table-paper {
    min-width: 0;
    overflow: hidden;
}

.filter-summary {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 12px;
}

.mud-layout {
    min-height: 100vh;
}

.hourly-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 88px;
    margin-top: 8px;
}

.hourly-chart__col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.hourly-chart__bar {
    width: 100%;
    max-width: 10px;
    background: #ef5350;
    border-radius: 3px 3px 0 0;
    min-height: 3px;
}

.hourly-chart--24 {
    height: 120px;
}

.hourly-chart__bar--info {
    background: #42a5f5;
}

.hourly-chart__label--flat {
    transform: none;
}

.hour-heat {
    display: grid;
    grid-template-columns: 36px repeat(24, minmax(8px, 1fr));
    gap: 3px;
    align-items: center;
}

.hour-heat__hour,
.hour-heat__day {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.55);
}

.hour-heat__hour {
    text-align: center;
}

.hour-heat__cell {
    height: 14px;
    border-radius: 2px;
}

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

.nav-live {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.nav-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9e9e9e;
    flex-shrink: 0;
}

.nav-live-dot.is-live {
    background: #2e7d32;
    box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.55);
    animation: nav-live-pulse 1.8s ease-out infinite;
}

.nav-live-dot.is-connecting {
    background: #f9a825;
}

.nav-live-dot.is-offline {
    background: #9e9e9e;
}

@keyframes nav-live-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.55);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(46, 125, 50, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(46, 125, 50, 0);
    }
}

.timeline-message-line {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timeline-vehicle-line {
    display: flex;
    align-items: center;
    padding-left: 0.25rem;
}

.incident-timeline .timeline-card {
    width: 100%;
}

.incident-timeline-item--message .timeline-card {
    min-width: 100%;
}

.incident-timeline-item--nested .timeline-card--nested {
    margin-left: 2.25rem;
    width: calc(100% - 2.25rem);
}

.incident-timeline-item--scale .timeline-card--scale {
    background: color-mix(in srgb, var(--service-color, #ef6c00) 14%, transparent);
    border-radius: 6px;
}

.timeline-tooltip {
    max-width: 420px;
    white-space: pre-wrap;
    font-size: 0.8125rem;
    line-height: 1.35;
}

.incident-vehicles-table {
    font-size: 0.8125rem;
}

.incident-vehicles-table th,
.incident-vehicles-table td {
    padding: 4px 8px !important;
}

.incident-timeline-item {
    --mud-palette-primary: var(--service-color, #78909c);
}

.incident-timeline-item .mud-timeline-item-dot,
.incident-timeline-item .mud-timeline-dot {
    background-color: var(--service-color, #78909c) !important;
    border-color: var(--service-color, #78909c) !important;
}

.service-slice {
    cursor: pointer;
}

.details-section-body {
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.details-section-body > * {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
}

.emergency-detail {
    width: 100%;
    height: 100%;
    overflow: auto;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.go-to-map-btn.mud-button-root {
    min-height: 22px;
    padding: 0 8px;
    font-size: 0.7rem;
    line-height: 1.2;
}

.detail-minimap {
    position: relative;
    height: 202px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: #1b2535;
}

.incident-detail-map {
    width: 100%;
    height: 280px;
    border: 0;
    border-radius: 10px;
    background: #1b2535;
}

.detail-minimap-frame,
.detail-map-overlay-frame {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.detail-minimap-frame {
    pointer-events: none;
}

.detail-minimap-hit {
    position: absolute;
    inset: 0;
}

.detail-map-overlay {
    position: fixed;
    inset: 0;
    z-index: 2500;
    background: #111;
    display: flex;
    flex-direction: column;
}

.detail-map-overlay-bar {
    padding: 10px 12px;
    background: #161616;
}

.detail-map-overlay-frame {
    flex: 1;
    min-height: 0;
}

.selected-message-row {
    background-color: rgba(239, 83, 80, 0.16) !important;
}

.e-grid {
    border-radius: 8px;
    overflow: hidden;
}

.admin-location-picker {
    height: 220px;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #1b2535;
}

.status-instance-title,
.status-worker-title,
.status-subscribers-title {
    min-height: 1.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hub-subscriber-table {
    width: 100%;
}

.hub-subscriber-table table {
    table-layout: fixed;
    width: 100%;
}

.hub-subscriber-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--mud-palette-surface);
    box-shadow: inset 0 -1px 0 var(--mud-palette-lines-default);
}

.hub-subscriber-table th,
.hub-subscriber-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hub-subscriber-table col.col-user { width: 16%; }
.hub-subscriber-table col.col-app { width: 12%; }
.hub-subscriber-table col.col-ip { width: 16%; }
.hub-subscriber-table col.col-host { width: 16%; }
.hub-subscriber-table col.col-browser { width: 28%; }
.hub-subscriber-table col.col-beat { width: 12%; }

.dash-ad-slot {
    border-style: dashed !important;
    border-color: rgba(210, 16, 11, 0.35) !important;
    background: rgba(210, 16, 11, 0.04);
}

.dash-ad-slot-nav {
    font-size: 0.85rem;
}

.nav-ad-wrap {
    border-top: 1px solid var(--mud-palette-lines-default);
}

.dash-ad-slot-footer {
    margin-bottom: 1rem;
}