.temporal-shell {
    gap: 24px;
}

.temporal-shell #temporal-filtros,
.temporal-shell #temporal-graficos {
    scroll-margin-top: 96px;
}

.temporal-hero-grid {
    gap: 22px;
}

.temporal-hero-panel,
.temporal-control-panel,
.temporal-chart-panel {
    min-width: 0;
}

.temporal-hero-copy .alerta-form-title {
    max-width: none;
    white-space: normal;
}

.temporal-hero-copy .alerta-form-description {
    max-width: 72ch;
}

.temporal-hero-actions .btn {
    width: 100%;
}

.temporal-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.temporal-command-card {
    align-self: start;
}

.temporal-command-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.temporal-overview-grid {
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
}

.temporal-filters {
    display: grid;
    gap: 16px;
    height: 100%;
}

.temporal-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.temporal-field-span-2,
.temporal-filter-grid .field-span-2 {
    grid-column: span 2;
}

.temporal-filter-meta {
    margin-top: 2px;
}

.temporal-filter-callout {
    margin-top: 0;
    font-size: 14px;
    line-height: 1.65;
}

.temporal-filter-actions {
    margin-top: 2px;
}

.temporal-filter-actions .alerta-form-actions-right {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.temporal-filter-panel .alerta-section-text,
.temporal-governance-panel .alerta-section-text {
    max-width: 68ch;
}

.temporal-insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.temporal-mini-card {
    min-height: 0;
}

.temporal-info-callout {
    font-size: 14px;
    line-height: 1.6;
}

.temporal-actions {
    margin-top: 4px;
}

.temporal-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.temporal-action-buttons .btn {
    width: fit-content;
}

.temporal-chart-panel {
    gap: 18px;
}

.temporal-section-head {
    margin-bottom: 0;
}

.temporal-chart-toolbar {
    align-items: flex-start;
}

.temporal-analytics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}

.temporal-chart-section {
    min-width: 0;
}

.temporal-chart-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.temporal-chart-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15, 61, 87, 0.08);
    color: var(--usuarios-accent);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.temporal-chart-card {
    --temporal-chart-height: 500px;
    --temporal-chart-max-height: 700px;
    display: grid;
    gap: 14px;
    position: relative;
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(15, 61, 87, 0.08);
    border-radius: 20px;
    background: #ffffff;
}

.temporal-chart-card--tall {
    --temporal-chart-height: 620px;
    --temporal-chart-max-height: 840px;
}

.temporal-chart-stage {
    position: relative;
    width: 100%;
    min-width: 0;
    height: var(--temporal-chart-height);
    min-height: var(--temporal-chart-height);
    max-height: var(--temporal-chart-max-height);
    overflow: hidden;
}

.temporal-chart-stage--tall {
    height: var(--temporal-chart-height);
    min-height: var(--temporal-chart-height);
}

.temporal-chart-canvas {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.temporal-empty-state {
    align-content: center;
    min-height: 500px;
    text-align: left;
    background: linear-gradient(180deg, rgba(15, 61, 87, 0.04), rgba(15, 61, 87, 0.01));
}

.temporal-empty-state strong {
    color: var(--usuarios-accent);
    font-size: 18px;
}

.temporal-empty-state p {
    margin: 0;
    color: var(--usuarios-muted);
    line-height: 1.6;
}

@media (max-width: 1440px) {
    .temporal-overview-grid {
        grid-template-columns: 1fr;
    }

    .temporal-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .temporal-chart-card {
        --temporal-chart-height: 460px;
        --temporal-chart-max-height: 620px;
    }

    .temporal-chart-card--tall {
        --temporal-chart-height: 560px;
        --temporal-chart-max-height: 740px;
    }
}

@media (max-width: 1080px) {
    .temporal-filter-grid {
        grid-template-columns: 1fr;
    }

    .temporal-field-span-2,
    .temporal-filter-grid .field-span-2 {
        grid-column: auto;
    }

    .temporal-chart-card {
        --temporal-chart-height: 400px;
        --temporal-chart-max-height: 540px;
    }

    .temporal-chart-card--tall {
        --temporal-chart-height: 500px;
        --temporal-chart-max-height: 660px;
    }
}

@media (max-width: 900px) {
    .temporal-command-grid,
    .temporal-insight-grid {
        grid-template-columns: 1fr;
    }

    .temporal-action-buttons {
        width: 100%;
        justify-content: stretch;
    }

    .temporal-action-buttons .btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .temporal-summary-grid {
        grid-template-columns: 1fr;
    }

    .temporal-hero-actions {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .temporal-hero-actions .btn,
    .temporal-filter-actions .btn,
    .temporal-action-buttons .btn {
        width: 100%;
    }

    .temporal-section-head,
    .temporal-chart-toolbar,
    .temporal-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .temporal-chart-card {
        --temporal-chart-height: 320px;
        --temporal-chart-max-height: 430px;
    }

    .temporal-chart-card--tall {
        --temporal-chart-height: 400px;
        --temporal-chart-max-height: 520px;
    }

    .temporal-empty-state {
        min-height: 320px;
    }
}
