.azure-cost-dashboard {
    display: grid;
    gap: 14px;
}

.azure-cost-title-row {
    flex-wrap: wrap;
}

.azure-cost-header-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
}

.azure-cost-window-selector {
    display: inline-flex;
    gap: 2px;
    padding: 2px;
    border: 1px solid var(--ops-border);
    border-radius: 9px;
    background: var(--ops-surface);
}

.azure-cost-window-selector button {
    min-height: 30px;
    padding: 0 10px;
    border: 0;
    border-radius: 7px;
    color: var(--ops-muted);
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.azure-cost-window-selector button.is-selected {
    color: var(--ops-text);
    background: var(--ops-card);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.azure-cost-window-selector button:focus-visible {
    outline: 2px solid var(--ops-accent-strong);
    outline-offset: 1px;
}

.azure-cost-window-selector button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.azure-cost-unavailable {
    padding: 14px;
    border: 1px solid rgba(255, 149, 0, 0.26);
    border-radius: 8px;
    color: #5f3500;
    background: #fff4df;
    font-size: 14px;
    font-weight: 500;
}

.azure-cost-history-panel {
    display: grid;
    gap: 12px;
}

.azure-cost-history-range {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
}

.azure-cost-history-range label {
    display: grid;
    gap: 4px;
    color: var(--ops-muted);
    font-size: 12px;
    font-weight: 600;
}

.azure-cost-history-range input {
    min-height: 32px;
    padding: 4px 8px;
    border: 1px solid var(--ops-border);
    border-radius: 6px;
    color: var(--ops-text);
    background: var(--ops-surface);
    font: inherit;
}

.azure-cost-history-apply {
    min-height: 32px;
    padding: 4px 10px;
    border: 1px solid var(--ops-border);
    border-radius: 6px;
    color: var(--ops-text);
    background: var(--ops-card);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.azure-cost-history-apply:disabled {
    cursor: wait;
    opacity: 0.65;
}

.azure-cost-history-status,
.azure-cost-history-summary {
    color: var(--ops-muted);
    font-size: 12px;
}

.azure-cost-history-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.azure-cost-history-summary strong {
    color: var(--ops-text);
}

.azure-cost-history-table {
    margin-top: 0;
}

.azure-cost-summary-grid,
.azure-cost-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.azure-cost-summary-card {
    min-height: 116px;
}

.azure-cost-summary-card span,
.azure-cost-summary-card small,
.azure-cost-row span,
.azure-cost-row small {
    display: block;
}

.azure-cost-summary-card span,
.azure-cost-row span {
    color: var(--ops-muted);
    font-size: 12px;
    font-weight: 500;
}

.azure-cost-summary-card strong {
    display: block;
    margin-top: 14px;
    color: var(--ops-text);
    font-size: 26px;
    font-weight: 600;
    line-height: 1;
    overflow-wrap: anywhere;
}

.azure-cost-summary-card small,
.azure-cost-row small {
    margin-top: 8px;
    color: var(--ops-muted);
    font-size: 12px;
}

.azure-cost-breakdown {
    display: grid;
    align-content: start;
    gap: 10px;
}

.azure-cost-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    padding-top: 10px;
    border-top: 1px solid var(--ops-border);
}

.azure-cost-row:first-of-type {
    border-top: 0;
}

.azure-cost-row strong {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

.azure-cost-row i {
    grid-column: 1 / -1;
    display: block;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8e8ed;
}

.azure-cost-row i::before {
    content: "";
    display: block;
    width: var(--cost-share, 0%);
    height: 100%;
    border-radius: inherit;
    background: #2f7dd1;
}

.azure-cost-trend {
    min-width: 0;
}

.azure-cost-bars {
    display: flex;
    align-items: end;
    gap: 8px;
    height: 220px;
    overflow-x: auto;
    padding-top: 10px;
    border-top: 1px solid var(--ops-border);
}

.azure-cost-bars div {
    display: grid;
    align-items: end;
    gap: 8px;
    min-width: 0;
    height: 180px;
    flex: 1 0 32px;
    grid-template-rows: 150px 22px;
}

.azure-cost-bars i {
    display: block;
    height: max(4px, var(--cost-trend, 0%));
    border-radius: 5px 5px 0 0;
    background: #2474c6;
}

.azure-cost-bars span {
    color: var(--ops-muted);
    font-size: 11px;
    text-align: center;
    overflow-wrap: anywhere;
}

.azure-cost-table-panel {
    overflow: hidden;
}

.azure-cost-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.azure-cost-table th,
.azure-cost-table td {
    padding: 9px 8px;
    border-top: 1px solid var(--ops-border);
    color: var(--ops-text);
    font-size: 12px;
    line-height: 1.3;
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.azure-cost-table th {
    color: var(--ops-muted);
    font-weight: 600;
}

.azure-cost-table td span,
.azure-cost-table td small {
    display: block;
}

.azure-cost-table td small {
    margin-top: 3px;
    color: var(--ops-muted);
}

@media (max-width: 1120px) {
    .ops-hero,
    .operations-grid {
        grid-template-columns: 1fr;
    }

    .ops-hero-card {
        min-height: auto;
    }

    .agent-row,
    .signal-grid,
    .evaluation-grid,
    .azure-cost-summary-grid,
    .azure-cost-grid,
    .orleans-silo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .agent-row,
    .evaluation-grid {
        grid-template-columns: 1fr;
    }

    .ops-hero h1 {
        font-size: 26px;
    }

    .signal-grid,
    .azure-cost-summary-grid,
    .azure-cost-grid,
    .orleans-silo-grid,
    .orleans-meter-grid {
        grid-template-columns: 1fr;
    }

    .ops-hero-card dl {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ops-section-title,
    .capability-copy {
        align-items: flex-start;
        flex-direction: column;
    }

    .azure-cost-header-actions {
        align-items: stretch;
        justify-content: space-between;
        width: 100%;
        margin-left: 0;
    }

    .azure-cost-window-selector {
        flex: 1;
    }

    .azure-cost-history-range {
        align-items: stretch;
    }

    .azure-cost-window-selector button {
        flex: 1;
        padding: 0 6px;
    }

    .request-row,
    .trace-list > div {
        grid-template-columns: 1fr;
    }

    .trace-list strong {
        text-align: left;
    }

    ::deep fluent-tab-panel {
        max-width: 100%;
        overflow-wrap: anywhere;
    }
}

.azure-cost-empty { color: var(--ops-muted); line-height: 1.6; font-size: 13px; }
.azure-cost-history-details summary { cursor: pointer; color: var(--ops-accent-strong); padding: 10px 0; font-weight: 600; }
.azure-cost-history-scroll { max-height: 320px; overflow: auto; }
.azure-cost-history-scroll th { position: sticky; top: 0; background: var(--ops-card); }
.azure-cost-history-details summary:focus-visible,
.azure-cost-history-scroll:focus-visible { outline: 2px solid var(--ops-accent-strong); outline-offset: 2px; }

.azure-cost-observation-chart svg { display: block; width: 100%; max-height: 220px; }
.azure-cost-chart-axis { display: flex; justify-content: space-between; gap: 8px; color: var(--ops-muted); font-size: 12px; }

.azure-cost-basis { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 16px; border: 1px solid var(--ops-border); border-radius: 10px; background: var(--ops-card); }
.azure-cost-basis strong { font-size: 13px; }
.azure-cost-basis p, .azure-cost-basis small { margin: 4px 0 0; color: var(--ops-muted); font-size: 12px; line-height: 1.5; }
.azure-cost-basis small { flex-basis: 100%; }
.azure-cost-basis button { padding: 9px 12px; border: 1px solid var(--ops-border); border-radius: 8px; color: var(--ops-accent-strong); background: var(--ops-card); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.azure-cost-model-spend { min-width: 0; }
.azure-cost-model-rows { max-height: 280px; overflow: auto; }
.azure-cost-model-rows .azure-cost-row span { overflow-wrap: anywhere; color: var(--ops-text); }
.azure-cost-basis button:focus-visible, .azure-cost-bars [tabindex]:focus-visible, .azure-cost-model-rows:focus-visible { outline: 2px solid var(--ops-accent-strong); outline-offset: 2px; }
