html, body {
    height: 100%;
    margin: 0;
}

app {
    display: block;
    height: 100%;
}

.header-logo {
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask: url('../images/Logo.svg');
    mask: url('../images/Logo.svg');
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    width: 28px;
    height: 24px;
}

#blazor-error-ui {
    background: inherit;
    bottom: 0;
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 100001;
}

.kartodromi-page {
    box-sizing: border-box;
    min-height: 100dvh;
    padding: 1.5rem;
    background: #111827;
    color: #f9fafb;
    overflow: hidden;
}

.kartodromi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.kartodromo-card,
.kartodromo-panel {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 16px;
    padding: 1rem;
    color: #f9fafb;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
}

.kartodromo-card a {
    display: inline-block;
    margin-top: .75rem;
    color: #93c5fd;
    font-weight: 600;
}

.kartodromo-live-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 1rem;
    height: calc(100dvh - 8.5rem);
    min-height: 0;
    overflow: hidden;
}

.kartodromo-panel {
    display: flex;
    flex-direction: column;
    max-height: 100%;
    overflow: hidden;
}

.kartodromo-panel > div:last-child {
    flex: 1;
    overflow-y: auto;
}

.kartodromo-map {
    height: 100%;
    min-height: 0;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #374151;
}

.kartodromo-live-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: .75rem;
}

.kartodromo-live-header h1 {
    margin-top: 0;
}

.kartodromo-live-header a {
    color: #93c5fd;
}

.kartodromo-status {
    color: #9ca3af;
    margin-bottom: 1rem;
}

.telemetry-card {
    border-top: 1px solid #374151;
    padding: .85rem 0;
}

.telemetry-card:first-child {
    border-top: 0;
}

.telemetry-card h3 {
    font-size: 1rem;
    margin: 0 0 .5rem 0;
}

.telemetry-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .45rem .75rem;
    color: #d1d5db;
    font-size: .9rem;
}

.telemetry-metrics strong {
    color: #f9fafb;
}

@media (max-width: 1000px) {
    .kartodromo-live-layout {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }

    .kartodromo-map {
        min-height: 460px;
    }

    .kartodromi-page {
        overflow: auto;
    }
}
