﻿html,
body {
    margin: 0;
    padding: 0;
    font-family: Inter, Arial, Helvetica, sans-serif;
    color: #111827;
    background: #f4f7fb;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

.main,
.content,
.dashboard,
.devices-page,
.device-detail-page,
.panel,
.panel__header,
.stats-grid,
.stat-card {
    min-width: 0;
}

.dashboard,
.devices-page,
.device-detail-page {
    display: grid;
    gap: 24px;
    width: 100%;
    max-width: 100%;
}

.hero-card,
.panel,
.stat-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.hero-card {
    padding: 24px;
}

.panel {
    width: 100%;
    max-width: 100%;
    padding: 20px;
}

.panel__header {
    margin-bottom: 16px;
}

.eyebrow {
    margin-bottom: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #2563eb;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
}

.stat-card {
    padding: 20px;
}

.stat-label {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #6b7280;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
}

.device-count {
    margin-left: 6px;
    font-size: 0.9rem;
    color: #6b7280;
}

/* Filters */

.device-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.device-filter-input,
.device-filter-select {
    height: 42px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    font: inherit;
}

.device-filter-input {
    min-width: 260px;
    flex: 1 1 320px;
}

.device-filter-select {
    min-width: 160px;
}

    .device-filter-input:focus,
    .device-filter-select:focus {
        outline: none;
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    }

.device-filter-clear {
    height: 42px;
    padding: 0 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

    .device-filter-clear:hover {
        background: #f9fafb;
        border-color: #9ca3af;
    }

.device-filters--compact {
    margin: 0;
    flex-wrap: nowrap;
}

    .device-filters--compact .device-filter-input {
        height: 36px;
        min-width: 220px;
    }

    .device-filters--compact .device-filter-select {
        height: 36px;
    }

    .device-filters--compact .device-filter-clear {
        height: 36px;
        padding: 0 12px;
    }

.device-list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.device-list-header__title {
    display: flex;
    flex-direction: column;
}

/* Tables / QuickGrid */

.device-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 600px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
}

.device-table {
    width: 100%;
    min-width: 0;
    font-size: 0.95rem;
    background: #fff;
}

    .device-table table {
        width: 100%;
        min-width: 900px;
        border-collapse: collapse;
        background: #fff;
    }

    .device-table thead {
        position: sticky;
        top: 0;
        z-index: 1;
        background: #f9fafb;
    }

    .device-table th {
        padding: 14px 12px;
        text-align: left;
        white-space: nowrap;
        font-size: 0.85rem;
        font-weight: 700;
        color: #6b7280;
        background: #f9fafb;
        border-bottom: 1px solid #e5e7eb;
    }

    .device-table td {
        padding: 14px 12px;
        text-align: left;
        vertical-align: middle;
        color: #111827;
        background: #fff;
        border-bottom: 1px solid #e5e7eb;
    }

    .device-table tbody tr:hover td {
        background: #f8fafc;
    }

    .device-table th button {
        all: unset;
        cursor: pointer;
        font: inherit;
        color: inherit;
    }

        .device-table th button:hover,
        .device-table th[aria-sort="ascending"],
        .device-table th[aria-sort="descending"] {
            color: #111827;
        }

/* Status badges */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

    .badge::before {
        content: "";
        width: 6px;
        height: 6px;
        margin-right: 6px;
        border-radius: 999px;
        display: inline-block;
    }

.badge--online {
    background: #ecfdf5;
    color: #166534;
}

    .badge--online::before {
        background: #22c55e;
    }

.badge--offline {
    background: #fef2f2;
    color: #991b1b;
}

    .badge--offline::before {
        background: #ef4444;
    }

/* Navigation */

.nav {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

    .nav.collapsed {
        display: none;
    }

.nav__link {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-weight: 600;
}

    .nav__link:hover {
        color: #fff;
        text-decoration: none;
        background: rgba(255, 255, 255, 0.08);
    }

    .nav__link.active {
        color: #fff;
        text-decoration: none;
        background: #1d4ed8;
    }

/* Refresh pill */

.refresh-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 0.9rem;
    font-weight: 600;
}

.refresh-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #22c55e;
}

/* Device type tiles */

.device-type-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.device-type-tile {
    width: 100%;
    min-width: 0;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    padding: 14px;
    text-align: center;
    cursor: pointer;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

    .device-type-tile:hover {
        transform: translateY(-2px);
        border-color: #cbd5e1;
        box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    }

.device-type-tile--active {
    transform: translateY(-2px);
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15), 0 12px 28px rgba(15, 23, 42, 0.08);
}

.device-type-tile__image-wrap {
    flex: 1;
    min-height: 0;
    margin-bottom: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
    background: #f8fafc;
}

.device-type-tile__image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.device-type-tile__label {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    color: #111827;
}

.device-type-tile__count {
    margin-top: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    color: #6b7280;
}

/* Device row link */

.device-row-link {
    all: unset;
    cursor: pointer;
    display: inline-block;
    padding: 2px 6px;
    border-radius: 6px;
    color: #111827;
    font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease;
}

    .device-row-link:hover {
        background: #eef2ff;
        color: #1d4ed8;
    }

/* Device detail top tiles */

.device-detail-top-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
    align-items: stretch;
}

    .device-detail-top-grid > .panel {
        aspect-ratio: 1 / 1;
        min-width: 0;
    }

.device-detail-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 10px;
}

.device-detail-status-row {
    flex: 0 0 auto;
    margin-top: 0;
}

.device-image-panel {
    display: flex;
    min-width: 0;
    padding: 20px;
}

.device-image-tile {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 14px;
    min-width: 0;
    min-height: 0;
}

.device-detail-header__image {
    width: 100%;
    min-height: 0;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #d1d5db;
    border-radius: 14px;
    background: #f9fafb;
    overflow: hidden;
}

.device-detail-image {
    width: 100%;
    max-width: 260px;
    max-height: 100%;
    object-fit: contain;
}

.device-detail-mini-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
}

.device-detail-mini-stats--bottom {
    margin-top: 0;
}

.device-detail-mini-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    min-height: 64px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

    .device-detail-mini-stat:hover {
        background: #f1f5f9;
        border-color: #d1d5db;
    }

.device-detail-mini-stat__content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.device-detail-mini-stat__label {
    margin-bottom: 4px;
    font-size: 0.62rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.15;
}

.device-detail-mini-stat__value {
    font-size: 0.82rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
}

.device-detail-mini-stat__icon {
    width: 50px;
    height: 50px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

    .device-detail-mini-stat__icon .icon {
        width: 48px;
        height: 48px;
        color: #334155;
    }

    .device-detail-mini-stat__icon img {
        width: 48px;
        height: 48px;
        object-fit: contain;
        opacity: 0.75;
    }

.device-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 24px;
}

.device-info-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px;
    padding: 6px 8px;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 6px;
}

    .device-info-row:hover {
        background: #f9fafb;
    }

.device-info-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
}

.device-info-value {
    font-weight: 600;
    color: #111827;
    word-break: break-word;
}

.device-status-activity {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.device-status-activity__title {
    margin-bottom: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #6b7280;
}

.device-status-activity__item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    font-size: 0.92rem;
    color: #374151;
}

    .device-status-activity__item strong {
        color: #111827;
        font-weight: 700;
    }

.device-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.chart-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 16px;
}

.chart-panel-summary {
    text-align: right;
    flex: 0 0 auto;
}

.chart-panel-summary__label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.chart-panel-summary__value {
    margin-top: 4px;
    font-size: 1.1rem;
    font-weight: 800;
    color: #111827;
}

.chart-filter-tabs {
    display: inline-flex;
    gap: 8px;
    margin-bottom: 18px;
    padding: 4px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

    .chart-filter-tab,
    .chart-filter-tabs button {
        height: 34px;
        padding: 0 12px;
        border: none;
        border-radius: 8px;
        background: transparent;
        color: #4b5563;
        font: inherit;
        font-weight: 600;
        cursor: pointer;
    }

        .chart-filter-tab--active,
        .chart-filter-tabs button.chart-filter-tab--active {
            background: #fff;
            color: #111827;
            box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
        }

.chart-placeholder {
    height: 260px;
    padding: 16px;
    border: 1px dashed #d1d5db;
    border-radius: 14px;
    background: #f9fafb;
}

.chart-placeholder__bars {
    height: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18px, 1fr));
    gap: 10px;
    align-items: end;
}

.chart-placeholder__bar-wrap {
    height: 100%;
    display: flex;
    align-items: end;
}

.chart-placeholder__bar {
    width: 100%;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
    min-height: 12px;
}

.chart-placeholder--line {
    position: relative;
}

.chart-placeholder__line-area {
    position: relative;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18px, 1fr));
    align-items: end;
}

.chart-placeholder__point-wrap {
    position: relative;
    height: 100%;
}

.chart-placeholder__point {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #0ea5e9;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.back-link-button {
    all: unset;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #f8fafc;
    color: #1f2937;
    font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease;
}

    .back-link-button:hover {
        background: #eef2ff;
        color: #1d4ed8;
    }

.activity-list {
    display: grid;
    gap: 12px;
}

.activity-item {
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
}

.activity-item__time {
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #6b7280;
}

.activity-item__text {
    color: #111827;
}

/* Pagination */

.paginator {
    margin-top: 14px;
}

    .paginator button {
        height: 36px;
        min-width: 36px;
        padding: 0 10px;
        margin-right: 6px;
        border: 1px solid #d1d5db;
        border-radius: 8px;
        background: #fff;
        color: #111827;
        font: inherit;
        cursor: pointer;
    }

        .paginator button:hover:not(:disabled) {
            background: #f9fafb;
            border-color: #9ca3af;
        }

        .paginator button:disabled {
            opacity: 0.45;
            cursor: not-allowed;
        }

.paginator-summary {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Fleet expandable table */

.fleet-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 16px 0 12px;
    flex-wrap: wrap;
}

.fleet-toolbar__summary {
    font-size: 14px;
    color: #4b5563;
}

.fleet-toolbar__controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fleet-page-size-label {
    font-size: 14px;
    color: #374151;
}

.fleet-page-size-select {
    height: 36px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
}

.fleet-header,
.fleet-row__summary {
    --fleet-columns: 34px 1.15fr 1.15fr 0.95fr 0.8fr 0.7fr 0.9fr;
    display: grid;
    grid-template-columns: var(--fleet-columns);
    align-items: center;
    column-gap: 0;
    width: 100%;
}

.fleet-header {
    min-width: 0;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    overflow: hidden;
}

.fleet-header__cell {
    min-width: 0;
    padding: 12px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #6b7280;
    white-space: nowrap;
}

.fleet-rows {
    border: 1px solid #e5e7eb;
    border-top: 0;
    border-radius: 0 0 14px 14px;
    overflow: hidden;
    background: #fff;
}

.fleet-row {
    border-top: 1px solid #e5e7eb;
}

    .fleet-row:first-child {
        border-top: 0;
    }

.fleet-row__summary {
    width: 100%;
    min-width: 0;
    border: 0;
    background: #fff;
    padding: 0;
    margin: 0;
    text-align: left;
    cursor: pointer;
    transition: background 0.18s ease;
}

    .fleet-row__summary:hover {
        background: #f9fafb;
    }

.fleet-row--expanded > .fleet-row__summary {
    background: #f8fbff;
}

.fleet-row__chevron,
.fleet-row__cell {
    min-width: 0;
    padding: 12px 10px;
}

.fleet-row__chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 14px;
}

.fleet-row__cell {
    display: flex;
    align-items: center;
    min-height: 56px;
}

.fleet-row__label {
    display: none;
}

.fleet-row__value {
    min-width: 0;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #111827;
    font-size: 13px;
}

.fleet-row__value--strong {
    font-weight: 600;
}

.fleet-row__details {
    padding: 18px 20px 20px 20px;
    border-top: 1px solid #e5e7eb;
    background: #fcfdff;
}

.fleet-row__details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.fleet-detail-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
}

.fleet-detail-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

    .fleet-detail-card__header h3 {
        margin: 0;
        font-size: 15px;
        font-weight: 600;
        color: #111827;
    }

.fleet-detail-card__summary {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
}

.fleet-mini-chart {
    height: 96px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    align-items: end;
    gap: 8px;
}

.fleet-mini-chart__bar-wrap,
.fleet-mini-chart__point-wrap {
    position: relative;
    height: 100%;
}

.fleet-mini-chart__bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
}

.fleet-mini-chart--line .fleet-mini-chart__point {
    position: absolute;
    left: 50%;
    width: 10px;
    height: 10px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: #2563eb;
}

.fleet-row__meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

    .fleet-row__meta > div {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 14px 16px;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
    }

    .fleet-row__meta span {
        font-size: 12px;
        color: #6b7280;
    }

    .fleet-row__meta strong {
        font-size: 14px;
        color: #111827;
    }

.fleet-row__actions {
    display: flex;
    justify-content: flex-end;
}

.fleet-row__action-button {
    height: 40px;
    padding: 0 16px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

    .fleet-row__action-button:hover {
        background: #f9fafb;
    }

.fleet-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
}

.fleet-pagination__button {
    height: 38px;
    padding: 0 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
}

    .fleet-pagination__button:disabled {
        opacity: 0.45;
        cursor: not-allowed;
    }

.fleet-pagination__summary {
    font-size: 14px;
    color: #374151;
}

.fleet-table-scroll {
    width: 100%;
    overflow: visible;
}

/* Location filters */

.location-filter-groups {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.location-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.location-filter-group__title {
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #6b7280;
}

.location-filter-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.location-filter-groups .device-type-grid--compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.location-filter-groups .device-type-tile.device-type-tile--filter.device-type-tile--compact {
    aspect-ratio: auto !important;
    min-height: 68px !important;
    height: 68px !important;
    padding: 10px 12px !important;
    border-radius: 12px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

    .location-filter-groups .device-type-tile.device-type-tile--filter.device-type-tile--compact .device-type-tile__label {
        margin: 0;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.2;
        text-align: center;
    }

    .location-filter-groups .device-type-tile.device-type-tile--filter.device-type-tile--compact .device-type-tile__count,
    .location-filter-groups .device-type-tile.device-type-tile--filter.device-type-tile--compact .device-type-tile__image-wrap {
        display: none !important;
    }

/* Responsive */

@media (max-width: 1200px) {
    .device-type-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .device-list-header {
        flex-direction: column;
        align-items: stretch;
    }

    .device-filters--compact {
        flex-wrap: wrap;
    }

    .device-detail-mini-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .location-filter-groups .device-type-grid--compact {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .location-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 16px;
    }

    .location-header__text {
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 900px) {
    .fleet-row__details-grid {
        grid-template-columns: 1fr;
    }

    .fleet-row__meta {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }

    .location-filter-groups .device-type-grid--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .device-detail-top-grid {
        grid-template-columns: 1fr;
    }

        .device-detail-top-grid > .panel {
            aspect-ratio: auto;
        }

    .device-detail-heading-row {
        flex-wrap: wrap;
    }

    .device-detail-mini-stats {
        grid-template-columns: 1fr;
    }

    .device-info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .fleet-row__meta {
        grid-template-columns: 1fr;
    }

    .fleet-toolbar {
        align-items: stretch;
    }

    .fleet-toolbar__controls {
        justify-content: flex-start;
    }

    .fleet-pagination {
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .location-filter-groups .device-type-grid--compact {
        grid-template-columns: 1fr;
    }

    .location-filter-actions {
        justify-content: stretch;
    }

        .location-filter-actions .device-filter-clear {
            width: 100%;
        }
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }


#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }
/*.page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
    background: #f4f7fb;
}

.sidebar {
    background: #0f172a;
    color: #fff;
    border-right: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
}

.nav-menu {
    display: grid;
    gap: 8px;
    padding: 18px 14px;
}

.navbar-toggler {
    border: 0;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.45rem 0.65rem;
    border-radius: 10px;
}

.navbar-toggler-icon {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
}
*/
/* desktop */
@media (min-width: 901px) {
    .sidebar {
        width: 100%;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .page.sidebar-collapsed {
        grid-template-columns: 84px 1fr;
    }

        .page.sidebar-collapsed .nav {
            display: none;
        }

    .page.sidebar-open .nav {
        display: grid;
    }

    .page.sidebar-collapsed .navbar-brand {
        display: none;
    }
    .sidebar {
        background: #0f172a;
        color: #fff;
        border-right: 1px solid rgba(255,255,255,0.08);
        overflow: hidden;
    }
}
@media (max-width: 900px) {
    .page.sidebar-collapsed .nav {
        display: none !important;
    }

    .page.sidebar-open .nav {
        display: grid !important;
    }
}
/*@media (max-width: 900px) {
    .page,
    .page.sidebar-collapsed,
    .page.sidebar-open {
        display: block;
    }

    .sidebar {
        width: 100%;
        height: auto;
        min-height: 0;
        position: static;
        top: auto;
        border-right: 0;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        overflow: hidden;
        background: #0f172a;
        color: #fff;
    }

    .main {
        width: 100%;
    }

    .page.sidebar-collapsed .nav {
        display: none;
    }

    .page.sidebar-open .nav {
        display: grid;
    }
}
*/