.dashboard-page .liquid-bg {
    background: linear-gradient(rgba(0, 0, 0, 0.122), rgba(0, 0, 0, .122)), var(--bg-1) url("../img/bg.jpg") center / cover no-repeat;
}

.dashboard-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 24px;
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass-fill);
    backdrop-filter: blur(10px) saturate(125%);
    -webkit-backdrop-filter: blur(10px) saturate(125%);
    flex-wrap: wrap;
    min-height: 72px;
}

.header-left,
.header-logos,
.header-right {
    display: flex;
    align-items: center;
}

.header-left {
    gap: 18px;
    flex-wrap: wrap;
}

.header-logos {
    gap: 15px;
}

.header-logos .logo-wrap {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-logos .logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.header-logos .logo-wrap.andover-wrap {
    width: 46px;
    height: 46px;
}

.header-logos .logo-wrap.andover-wrap img {
    filter: brightness(0) invert(1);
    transform: scale(2);
}

.header-title h1 {
    font-size: 23px;
    font-weight: 700;
    letter-spacing: 1.4px;
    line-height: 1.2;
}

.header-title p {
    font-size: 13px;
    font-weight: 1000;
    letter-spacing: 1px;
    line-height: 1.4;
    color: red;
    text-decoration: bold;
    font-family: futura, sans-serif;
}

.header-right {
    gap: 10px;
}

.header-readouts {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.header-clock {
    min-width: 164px;
    color: var(--text-secondary);
    font: 600 11px/1.3 var(--font-data);
    letter-spacing: .3px;
    text-align: right;
    white-space: nowrap;
}

.header-coordinates {
    color: var(--text-primary);
    font: 600 10px/1.3 var(--font-data);
    letter-spacing: .2px;
    white-space: nowrap;
}

.back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .4px;
    border: 1px solid var(--glass-border);
    background: var(--glass-fill-strong);
    cursor: pointer;
    white-space: nowrap;
}

.back-button {
    padding: 9px 18px;
}

.back-button:hover {
    border-color: var(--glass-border-strong);
    transform: translateY(-1px);
}

.badge-lane {
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .7px;
    background: var(--grad-cool);
    color: #fff;
}

.badge-lane:hover {
    border-color: var(--glass-border-strong);
}

@media (max-width: 480px) {
    .badge-lane {
        padding: 5px 9px;
        font-size: 9px;
    }
}

.dashboard-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px 16px 30px;
    flex: 1;
}

@media (min-width: 640px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 22px 24px 32px;
        gap: 20px;
    }
}

@media (min-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
        padding: 24px 28px 36px;
        gap: 22px;
    }
}

.panel {
    border-radius: var(--radius-lg);
    padding: 18px 16px 20px;
    display: flex;
    flex-direction: column;
    transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
    content-visibility: auto;
    contain-intrinsic-size: 360px 420px;
}

.panel:hover {
    border-color: var(--glass-border-strong);
    transform: translateY(-3px);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding-bottom: 10px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.panel-header.centered-header {
    justify-content: center;
}

.camera-status {
    display: inline-flex;
    flex-shrink: 0;
    margin-left: auto;
    align-items: center;
    gap: 6px;
    padding: 4px 12px 4px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    background: var(--panel-recess);
    border: 1px solid var(--glass-border);
    white-space: nowrap;
}

.camera-status.online {
    border-color: var(--status-online);
    color: var(--status-online);
}

.camera-status.offline {
    border-color: var(--status-offline);
    color: var(--status-offline);
}

.camera-status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    background: var(--text-secondary);
}

.camera-status.online .dot {
    background: var(--status-online);
    box-shadow: 0 0 8px var(--status-online);
}

.camera-status.offline .dot {
    background: var(--status-offline);
    box-shadow: 0 0 6px var(--status-offline);
}

.panel-body,
.camera-stream-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 12px;
}

.camera-video-wrapper {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--panel-recess);
    border: 1px solid var(--glass-border);
}

.video-5-4 {
    aspect-ratio: 5/4;
    width: 100%;
}

.video-3-4 {
    aspect-ratio: 3/4;
    max-height: 380px;
    width: 100%;
    margin: 0 auto;
}

.camera-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.camera-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(10, 16, 24, .55);
    backdrop-filter: blur(10px) saturate(125%);
    -webkit-backdrop-filter: blur(10px) saturate(125%);
    color: var(--text-secondary);
    font-size: 13px;
    padding: 16px;
    text-align: center;
    border-radius: var(--radius-md);
}

.camera-placeholder .camera-error {
    color: var(--status-offline);
    font-weight: 700;
    font-size: 15px;
}

.camera-placeholder .sub-text {
    color: var(--text-muted);
    font-size: 11px;
    margin-top: 6px;
}

.gps-canvas {
    background: var(--panel-recess);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    width: 100%;
    aspect-ratio: 4/3;
    display: block;
    flex: 1;
}

.clear-btn {
    padding: 10px 16px;
    font: 600 12px var(--font-ui);
    border-radius: 999px;
    background: var(--glass-fill-strong);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    cursor: pointer;
}

.clear-btn {
    width: 100%;
    max-width: 180px;
    align-self: flex-end;
    margin-top: 8px;
}

.clear-btn:hover {
    border-color: var(--glass-border-strong);
    transform: translateY(-1px);
}

.snapshot-placeholder {
    width: 100%;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--panel-recess);
    border: 1px dashed var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 13px;
    padding: 20px;
}

.snapshot-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.snapshot-state {
    color: var(--text-muted);
    font-size: 11px;
    text-align: center;
}

.snapshot-placeholder.is-loading .snapshot-state {
    color: var(--text-secondary);
}

.snapshot-placeholder.is-error .snapshot-state {
    color: var(--status-offline);
}

.vehicle-data {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.data-section h3 {
    color: var(--text-secondary);
    font-size: 9px;
    letter-spacing: 1.2px;
    margin: 6px 0 2px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px solid var(--glass-border);
}

.data-row:last-child {
    border-bottom: none;
}

.data-row span {
    color: var(--text-secondary);
    font-size: 12px;
}

.data-row strong {
    color: var(--text-primary);
    font-family: var(--font-data);
    font-size: 14px;
}

hr {
    border: 0;
    height: 1px;
    background: var(--glass-border);
    margin: 6px 0;
}

@media (max-width: 480px) {
    .dashboard-header {
        padding: 8px 14px;
    }

    .header-logos .logo-wrap {
        width: 32px;
        height: 32px;
    }

    .header-logos .logo-wrap.andover-wrap {
        width: 38px;
        height: 38px;
    }

    .header-title h1 {
        font-size: 12px;
    }

    .back-button {
        font-size: 10px;
        padding: 7px 12px;
    }

    .header-clock {
        min-width: auto;
        font-size: 9px;
    }

    .header-coordinates {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .panel {
        padding: 14px 12px 16px;
    }

    .dashboard-grid {
        padding: 12px 8px 20px;
        gap: 14px;
    }

    .video-3-4 {
        max-height: 280px;
    }

    .snapshot-placeholder {
        min-height: 120px;
        font-size: 11px;
    }
}

@media (max-width: 380px) {
    .header-left {
        gap: 8px;
    }

    .header-logos .logo-wrap {
        width: 26px;
        height: 26px;
    }

    .header-logos .logo-wrap.andover-wrap {
        width: 32px;
        height: 32px;
    }

    .header-title h1 {
        font-size: 10px;
    }

    .snapshot-placeholder {
        min-height: 105px;
        padding: 12px;
    }
}

@media (max-width: 360px) {
    .dashboard-header {
        padding: 7px 10px;
        gap: 8px;
    }

    .header-left {
        gap: 6px;
    }

    .header-right {
        gap: 6px;
        max-width: 100%;
    }

    .header-clock {
        font-size: 8px;
    }

    .back-button {
        font-size: 9px;
        padding: 6px 8px;
    }

    .badge-lane {
        padding: 4px 7px;
        font-size: 8px;
    }
}