:root {
    --saving-reserve-savings-accent: #0F766E;
    --saving-reserve-reserve-accent: #B45309;
}

.titleLink {
    color: #00aee1;
    text-decoration: underline;
    cursor: pointer;
}

.saving-plan-reserve-page .lcd-confirmation .actions .bg-gray {
    display: none;
}

.saving-plan-reserve-page .lcd-confirmation>.all>.body>.actions {
    justify-content: center !important;
}

.saving-plan-reserve-page .lcd-confirmation>.all>.body>.title .lc-iconlink {
    display: none;
}

.lcdashboard .card-frame.saving-reserve-list-shell {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    justify-content: stretch !important;
    height: 100%;
    min-height: 0;
    overflow: visible;
}

.lcdashboard .card-frame.saving-reserve-list-shell:hover {
    box-shadow: none !important;
}

.lcdashboard .card-frame.saving-reserve-list-shell .card-content-body {
    max-height: 100% !important;
    min-height: 0 !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    justify-content: stretch !important;
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden;
}

.lcdashboard .card-frame.saving-reserve-list-shell .card-content-body-content {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    flex: 1 1 auto !important;
    overflow: visible !important;
}

.lcdashboard .card-frame.saving-reserve-list-shell .card-content-body-content > * {
    width: 100%;
    height: 100%;
    flex: 1 1 auto;
    min-height: 0;
}

.saving-reserve-list-card {
    display: flex !important;
    flex-direction: column;
    height: 100% !important;
    width: 100% !important;
    min-height: 0;
    background: #fff;
    background: var(--background-white, #fff);
    border: none;
    border-radius: 0.25rem;
    box-shadow: 4px 4px 18px 0px rgba(58, 79, 135, 0.06);
    overflow: hidden;
}

.saving-reserve-list-card > .lc-loading {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.saving-reserve-list-card > .lc-loading > * {
    flex: 1 1 auto;
    min-height: 0;
}

.saving-reserve-tab-panel-body {
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0.75rem 0.75rem;
    flex: 1 1 auto;
}

.saving-reserve-list-empty {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.saving-reserve-provider-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.saving-reserve-plan-link,
.saving-reserve-cell-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.saving-reserve-plan-link {
    color: #2E1956;
    color: var(--text-default, #2E1956);
    text-decoration: none;
    cursor: pointer;
}

.saving-reserve-plan-link:hover {
    text-decoration: underline;
}

.saving-reserve-type-chip,
.saving-reserve-status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 18px;
    padding: 2px 6px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.625rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
}

.saving-reserve-type-chip--savings {
    color: #0F766E;
    color: var(--saving-reserve-savings-accent, #0F766E);
    background: color-mix(in srgb, #0F766E 12%, #fff);
    background: color-mix(in srgb, var(--saving-reserve-savings-accent, #0F766E) 12%, #fff);
    border-color: color-mix(in srgb, #0F766E 28%, #fff);
    border-color: color-mix(in srgb, var(--saving-reserve-savings-accent, #0F766E) 28%, #fff);
}

.saving-reserve-type-chip--reserve {
    color: #B45309;
    color: var(--saving-reserve-reserve-accent, #B45309);
    background: color-mix(in srgb, #B45309 12%, #fff);
    background: color-mix(in srgb, var(--saving-reserve-reserve-accent, #B45309) 12%, #fff);
    border-color: color-mix(in srgb, #B45309 28%, #fff);
    border-color: color-mix(in srgb, var(--saving-reserve-reserve-accent, #B45309) 28%, #fff);
}

.saving-reserve-type-chip--default {
    color: #6B6F7D;
    color: var(--text-secondary, #6B6F7D);
    background: #F5F6FA;
    border-color: #E2E6F3;
}

.saving-reserve-chip-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.saving-reserve-status-chip--active {
    color: #3ebb3f;
    color: var(--status-green, #3ebb3f);
    background: color-mix(in srgb, #3ebb3f 12%, #fff);
    background: color-mix(in srgb, var(--status-green, #3ebb3f) 12%, #fff);
    border-color: color-mix(in srgb, #3ebb3f 28%, #fff);
    border-color: color-mix(in srgb, var(--status-green, #3ebb3f) 28%, #fff);
}

.saving-reserve-status-chip--expiring {
    color: #d99a00;
    color: var(--status-yellow, #d99a00);
    background: color-mix(in srgb, #d99a00 15%, #fff);
    background: color-mix(in srgb, var(--status-yellow, #d99a00) 15%, #fff);
    border-color: color-mix(in srgb, #d99a00 32%, #fff);
    border-color: color-mix(in srgb, var(--status-yellow, #d99a00) 32%, #fff);
}

.saving-reserve-status-chip--expired {
    color: #dc291e;
    color: var(--status-red, #dc291e);
    background: color-mix(in srgb, #dc291e 10%, #fff);
    background: color-mix(in srgb, var(--status-red, #dc291e) 10%, #fff);
    border-color: color-mix(in srgb, #dc291e 26%, #fff);
    border-color: color-mix(in srgb, var(--status-red, #dc291e) 26%, #fff);
}

.saving-reserve-status-chip--unknown {
    color: #6B6F7D;
    color: var(--text-secondary, #6B6F7D);
    background: #F5F6FA;
    border-color: #E2E6F3;
}

@media (max-width: 900px) {
    .saving-reserve-list-empty {
        min-height: 180px;
    }
}
.detailsPlan {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.headerPlanDetails {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(250px, .95fr);
    align-items: stretch;
    grid-gap: 24px;
    gap: 24px;
    padding: 5px 16px 0 0;
}

.detailsPlan--expanded .detailSavingsPlanOrReserve {
    width: auto;
    box-sizing: border-box;
    padding-right: 24px;
    border-right: 1px solid #E2E6F3;
    border-right: 1px solid var(--background-light, #E2E6F3);
}

.detailsPlan--expanded .graphDetails {
    width: auto;
    padding-left: 24px;
}

.detailsPlan--compact .headerPlanDetails {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.detailsPlan--compact .detailSavingsPlanOrReserve,
.detailsPlan--compact .graphDetails {
    width: 100%;
}

.detailsPlan--compact .detailSavingsPlanOrReserve {
    padding-bottom: 16px;
    border-bottom: 1px solid #E2E6F3;
    border-bottom: 1px solid var(--background-light, #E2E6F3);
}

.detailsPlan--compact .graphDetails {
    padding-top: 4px;
}

.detailsPlan--compact .detailSavingsPlanOrReserve {
    box-sizing: border-box;
}

.rowPlanDetails {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    grid-gap: 16px;
    gap: 16px;
}

.inicialInfo {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(110px, auto);
    align-items: start;
    grid-gap: 24px;
    gap: 24px;
    margin-bottom: 0;
    padding-bottom: 14px;
    border-bottom: 1px solid #E2E6F3;
    border-bottom: 1px solid var(--background-light, #E2E6F3);
}

.detailsName {
    width: auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detailsName h4 {
    min-width: 0;
    margin: 0;
    font-size: 15px;
    font-family: "Ubuntu", sans-serif;
    font-weight: bold;
    color: #2B304F;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.detailsName > .row {
    display: flex;
    align-items: center;
    min-width: 0;
    margin: 0;
}

.detailsName > .row.mt-4 {
    margin-top: 0 !important;
}

.bagdeStatusPlan {
    margin-left: 5px;
    padding: 3px 8px;
    color: white;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.labelGray {
    color: #a4a9b9;
    font-size: 11px;
}

.labelGray.textSmall {
    font-size: 10px;
}

.resource_scope {
    display: flex;
    flex-direction: column;
    width: auto;
    min-width: 0;
    text-align: end;
    justify-content: flex-start;
    gap: 4px;
    font-size: 12px;
}

.resource_scope p {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: bold;
}

.useDetails {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-gap: 18px;
    gap: 18px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #E2E6F3;
    border-bottom: 1px solid var(--background-light, #E2E6F3);
}

.percente {
    width: auto;
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    grid-gap: 12px;
    gap: 12px;
}

.percente h6 {
    margin: 0;
    font-size: 11px;
    color: #2E1956;
    color: var(--text-default, #2E1956);
    white-space: nowrap;
}

.totalPercente {
    width: 100%;
    height: 20px;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 4px;
    background-color: #e5e7ed;
    color: #fff;
    text-align: center;
    font-size: 11px;
}

.totalPercente p {
    position: absolute;
    z-index: 1;
    width: 100%;
    margin: 0;
    top: 50%;
    transform: translateY(-50%);
}

.totalPercente > .usePercente {
    height: 100%;
    min-width: 0;
    border-radius: 4px 0 0 4px;
    background-color: var(--text-default);
}

.usedAndReservedInfo {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 10px;
    white-space: nowrap;
}

.usedAndReservedInfo p {
    margin: 0;
}

.usedAndReservedInfo .labelGray {
    font-size: 10px;
}

.restDetails {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-top: 16px;
}

.rowPlanDetails > div {
    min-width: 0;
}

.rowPlanDetails > div > .labelGray {
    display: block;
    margin-bottom: 4px;
    line-height: 1.25;
}

.rowPlanDetails p,
.divDetails p {
    max-width: 100%;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
}

.divDetails {
    display: flex;
    justify-content: flex-start;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.divDetails > .row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    width: 100%;
    margin: 0 !important;
}

.graphDetails {
    width: 50%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.graphDetails > div {
    width: 100%;
    min-width: 0;
}

.details-provider-icon {
    min-width: 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.detailSavingsPlanOrReserve {
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.subTitlePlan {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: #2B304F;
}

.bodySystem {
    padding: 18px 16px 0 0;
    border-top: 1px solid #E2E6F3;
    border-top: 1px solid var(--background-light, #E2E6F3);
}

.bodySystem h4 {
    margin: 0 0 12px;
    color: #2E1956;
    color: var(--text-default, #2E1956);
    font-size: 14px;
    font-weight: 600;
}

.saving-reserve-resource-grid {
    min-height: 220px;
}

.saving-reserve-resource-grid revo-grid {
    background-color: #fff !important;
}

.saving-reserve-resource-grid revo-grid .rgRow,
.saving-reserve-resource-grid revo-grid .rgCell {
    background-color: #fff !important;
}

.saving-reserve-resource-grid revo-grid .rgRow {
    border-bottom: 1px solid #F1F3F8 !important;
}

.saving-reserve-resource-grid revo-grid .rgCell {
    border-bottom: 1px solid #F1F3F8 !important;
}

.saving-reserve-resource-grid revo-grid .rgRow:hover,
.saving-reserve-resource-grid revo-grid .rgRow:hover .rgCell {
    background-color: #FAFBFD !important;
}

.saving-reserve-resource-grid revo-grid .rgCell {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .detailsPlan--expanded .headerPlanDetails {
        display: flex;
        flex-direction: column;
    }

    .detailsPlan--expanded .detailSavingsPlanOrReserve {
        width: 100%;
        padding-right: 0;
        padding-bottom: 16px;
        border-right: none;
        border-bottom: 1px solid #E2E6F3;
        border-bottom: 1px solid var(--background-light, #E2E6F3);
    }

    .detailsPlan--expanded .graphDetails {
        width: 100%;
        padding-left: 0;
    }

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

@media (max-width: 520px) {
    .headerPlanDetails {
        padding-right: 0;
    }

    .inicialInfo,
    .useDetails,
    .rowPlanDetails {
        grid-template-columns: 1fr;
    }

    .resource_scope {
        text-align: left;
    }

    .usedAndReservedInfo {
        flex-direction: row;
        justify-content: space-between;
    }
}

h4 {
	color: #8B90A3;
	font-family: "Ubuntu", sans-serif;
	font-weight: 500;
}
/* Governança de Commitments (P4) — painel em modal na página Savings/Reservas */
.cgov-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.cgov-guardrail {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #e7e9f0;
}

.cgov-guardrail > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cgov-guardrail strong {
    font-size: 0.92rem;
    color: #1f2937;
}

.cgov-guardrail span {
    font-size: 0.78rem;
    color: #667085;
}

.cgov-guardrail.ok {
    background: #ecfdf3;
    border-color: #abefc6;
    color: #067647;
}

.cgov-guardrail.block {
    background: #fef3f2;
    border-color: #fecdca;
    color: #b42318;
}

.cgov-grid {
    display: grid;
    grid-gap: 12px;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.cgov-card {
    background: #fff;
    border: 1px solid #e7e9f0;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 92px;
}

.cgov-card-head {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475467;
}

/* Valores numéricos financeiros alinhados à direita */
.cgov-card-value {
    font-size: 1.45rem;
    font-weight: 700;
    color: #1f2937;
    text-align: right;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    margin-top: auto;
}

.cgov-card-value.tone-positive { color: #067647; }
.cgov-card-value.tone-warning { color: #b54708; }
.cgov-card-value.tone-danger { color: #b42318; }
.cgov-card-value.tone-muted { color: #667085; }

.cgov-card-hint {
    font-size: 0.7rem;
    color: #98a2b3;
    text-align: right;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.cgov-table-wrap {
    overflow: auto;
    border: 1px solid #e7e9f0;
    border-radius: 10px;
}

.cgov-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.cgov-table thead th {
    position: sticky;
    top: 0;
    background: #f9fafb;
    color: #475467;
    font-weight: 600;
    text-align: left;
    padding: 9px 12px;
    border-bottom: 1px solid #eaecf0;
    white-space: nowrap;
}

.cgov-table tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid #f2f4f7;
    color: #344054;
}

.cgov-table tbody tr:last-child td {
    border-bottom: none;
}

/* Colunas numéricas alinhadas à direita (separador decimal) */
.cgov-table th.num,
.cgov-table td.num {
    text-align: right;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.cgov-action {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
    white-space: nowrap;
}

.cgov-action.tone-positive { background: #ecfdf3; color: #067647; }
.cgov-action.tone-warning { background: #fffaeb; color: #b54708; }
.cgov-action.tone-danger { background: #fef3f2; color: #b42318; }
.cgov-action.tone-muted { background: #f2f4f7; color: #475467; }
.cgov-action.tone-default { background: #eff4ff; color: #173192; }

.aig-root {
    --aig-ink: #172033;
    --aig-muted: #647084;
    --aig-line: #dce3ec;
    --aig-panel: #ffffff;
    --aig-blue: #1769aa;
    --aig-cyan: #087f8c;
    --aig-amber: #a85b00;
    --aig-red: #a33232;
    margin: 0 0 28px;
    color: var(--aig-ink);
}

.aig-loading {
    padding: 22px 24px;
    border: 1px solid #dce3ec;
    background: #fff;
    color: #647084;
}

.aig-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 28px;
    color: #fff;
    background: linear-gradient(118deg, #173192 0%, #1769aa 54%, #087f8c 100%);
    border-radius: 8px;
}

.aig-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: #b8e9ef;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
}

.aig-hero h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.05;
}

.aig-hero p {
    max-width: 680px;
    margin: 10px 0 0;
    color: #e8f7f8;
    font-size: 14px;
}

.aig-hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.aig-period {
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 5px;
    color: #fff;
    font-size: 13px;
}

.aig-icon-button,
.aig-primary-button,
.aig-secondary-button,
.aig-danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 0;
    border-radius: 5px;
    cursor: pointer;
    font: inherit;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.aig-icon-button {
    width: 38px;
    height: 38px;
    color: #fff;
    background: rgba(255, 255, 255, .16);
}

.aig-icon-button:hover { background: rgba(255, 255, 255, .28); }

.aig-status-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 24px;
    margin: 12px 0 18px;
    padding: 11px 14px;
    border: 1px solid #c9e6e8;
    border-left: 4px solid var(--aig-cyan);
    background: #f0fbfb;
    color: #31535b;
    font-size: 12px;
}

.aig-section {
    margin-top: 16px;
    padding: 20px;
    border: 1px solid var(--aig-line);
    border-radius: 8px;
    background: var(--aig-panel);
    box-shadow: 0 8px 24px rgba(23, 32, 51, .05);
}

.aig-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.aig-section-title {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--aig-blue);
}

.aig-section-title h2 {
    margin: 0;
    color: var(--aig-ink);
    font-size: 19px;
    font-weight: 700;
}

.aig-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-gap: 12px;
    gap: 12px;
}

.aig-kpi-card {
    min-height: 112px;
    padding: 16px;
    border: 1px solid #dfe6ee;
    border-top: 3px solid var(--aig-blue);
    background: #fbfcfe;
}

.aig-kpi-card--caution { border-top-color: var(--aig-amber); }

.aig-kpi-label,
.aig-kpi-note,
.aig-list-row span,
.aig-recommendation span,
.aig-rule-row span {
    display: block;
}

.aig-kpi-label {
    color: var(--aig-muted);
    font-size: 12px;
}

.aig-kpi-card strong {
    display: block;
    margin: 8px 0 6px;
    color: var(--aig-ink);
    font-size: 22px;
}

.aig-kpi-note,
.aig-row-meta {
    color: var(--aig-muted);
    font-size: 12px;
}

.aig-list,
.aig-audit-list,
.aig-rules-list {
    display: grid;
    grid-gap: 8px;
    gap: 8px;
    margin-top: 14px;
}

.aig-list-row,
.aig-rule-row,
.aig-audit-row,
.aig-signal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 14px;
    border: 1px solid #e2e8ef;
    background: #fff;
}

.aig-list-row--stack {
    align-items: flex-start;
}

.aig-list-row--caution {
    border-left: 4px solid var(--aig-amber);
    background: #fffaf1;
}

.aig-list-row strong,
.aig-rule-row strong,
.aig-recommendation strong,
.aig-audit-row strong {
    display: block;
    color: var(--aig-ink);
    font-size: 14px;
}

.aig-list-row span,
.aig-rule-row span,
.aig-recommendation span,
.aig-audit-row span {
    margin-top: 4px;
    color: var(--aig-muted);
    font-size: 12px;
}

.aig-row-main {
    min-width: 0;
}

.aig-row-detail {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px 12px;
    max-width: 60%;
    text-align: right;
}

.aig-value {
    color: var(--aig-ink) !important;
    font-size: 14px !important;
    font-weight: 700;
    white-space: nowrap;
}

.aig-value--caution { color: var(--aig-amber) !important; }

.aig-caveat {
    color: var(--aig-amber) !important;
    font-size: 12px !important;
    font-weight: 600;
}

.aig-caveat--wide {
    margin-top: 10px;
    padding: 9px 11px;
    border-left: 3px solid var(--aig-amber);
    background: #fff8e9;
}

.aig-inline-error {
    margin: 8px 0;
    padding: 10px 12px;
    border-left: 3px solid var(--aig-red);
    background: #fff3f3;
    color: var(--aig-red);
    font-size: 13px;
}

.aig-empty {
    padding: 16px;
    border: 1px dashed #cbd5df;
    color: var(--aig-muted);
    font-size: 13px;
}

.aig-recommendation {
    padding: 15px;
    border: 1px solid #dfe6ee;
    border-left: 4px solid #5c3c92;
    background: #fcfbff;
}

.aig-recommendation-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.aig-recommendation p {
    margin: 10px 0 0;
    color: #354155;
    font-size: 13px;
    line-height: 1.5;
}

.aig-detector-note {
    margin-top: 14px;
    padding: 11px 13px;
    border: 1px solid #f0c978;
    background: #fff8e8;
    color: #805000;
    font-size: 13px;
    font-weight: 600;
}

.aig-signal-row {
    margin-top: 8px;
    align-items: flex-start;
}

.aig-signal-row span { max-width: 80%; }

.aig-audit-row {
    display: grid;
    grid-template-columns: 155px minmax(120px, 1fr) minmax(160px, 1fr) 100px;
}

.aig-audit-row span { margin-top: 0; }

.aig-rule-form {
    padding: 16px;
    border: 1px solid #dfe6ee;
    background: #fbfcfe;
}

.aig-form-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.aig-form-heading h3 { margin: 0; font-size: 16px; }
.aig-form-heading p { margin: 5px 0 0; color: var(--aig-muted); font-size: 12px; }

.aig-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-gap: 12px;
    gap: 12px;
}

.aig-form-grid label {
    display: grid;
    grid-gap: 5px;
    gap: 5px;
    color: #435168;
    font-size: 12px;
    font-weight: 600;
}

.aig-form-grid input {
    width: 100%;
    min-height: 36px;
    padding: 7px 9px;
    border: 1px solid #cbd5df;
    border-radius: 4px;
    background: #fff;
    color: var(--aig-ink);
    font: inherit;
    font-size: 13px;
}

.aig-form-grid input:focus {
    outline: 2px solid rgba(23, 105, 170, .2);
    border-color: var(--aig-blue);
}

.aig-primary-button,
.aig-secondary-button,
.aig-danger-button {
    min-height: 36px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 600;
}

.aig-primary-button {
    margin-top: 14px;
    color: #fff;
    background: var(--aig-blue);
}

.aig-primary-button:hover { background: #12568d; }
.aig-secondary-button { color: #34506e; border: 1px solid #bdc9d6; background: #fff; }
.aig-secondary-button:hover { border-color: var(--aig-blue); color: var(--aig-blue); }
.aig-danger-button { color: #983232; border: 1px solid #e6bebe; background: #fff8f8; }
.aig-danger-button:hover { background: #ffeaea; }

.aig-primary-button:disabled,
.aig-secondary-button:disabled,
.aig-danger-button:disabled { cursor: wait; opacity: .6; }

.aig-rule-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

@media (max-width: 900px) {
    .aig-kpi-grid,
    .aig-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .aig-audit-row { grid-template-columns: 1fr 1fr; gap: 7px 12px; }
    .aig-row-detail { max-width: 100%; text-align: left; justify-content: flex-start; }
}

@media (max-width: 620px) {
    .aig-hero { align-items: flex-start; flex-direction: column; padding: 21px; }
    .aig-hero-actions { width: 100%; justify-content: space-between; }
    .aig-section { padding: 15px; }
    .aig-hero h1 { font-size: 28px; }
    .aig-kpi-grid,
    .aig-form-grid { grid-template-columns: 1fr; }
    .aig-list-row,
    .aig-rule-row,
    .aig-recommendation-heading { align-items: flex-start; flex-direction: column; }
    .aig-rule-actions { justify-content: flex-start; }
    .aig-audit-row { display: grid; grid-template-columns: 1fr; }
}
.aig-agents-heading {
    align-items: flex-start;
}

.aig-agents-heading .aig-section-title {
    align-items: flex-start;
}

.aig-agents-subtitle {
    margin: 5px 0 0;
    color: var(--aig-muted);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
}

.aig-icon-button--light {
    flex-shrink: 0;
    border: 1px solid #bdc9d6;
    color: var(--aig-blue);
    background: #fff;
}

.aig-icon-button--light:hover {
    background: #eef6fb;
}

.aig-agent-create {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    grid-gap: 12px;
    gap: 12px;
    padding: 15px;
    border: 1px solid #dfe6ee;
    background: #fbfcfe;
}

.aig-agent-create label,
.aig-agent-rename-form label,
.aig-key-agent-controls label {
    display: grid;
    grid-gap: 5px;
    gap: 5px;
    color: #435168;
    font-size: 12px;
    font-weight: 600;
}

.aig-agent-create input,
.aig-agent-rename-form input,
.aig-key-agent-controls select {
    width: 100%;
    min-height: 36px;
    padding: 7px 9px;
    border: 1px solid #cbd5df;
    border-radius: 4px;
    background: #fff;
    color: var(--aig-ink);
    font: inherit;
    font-size: 13px;
}

.aig-agent-create input:focus,
.aig-agent-rename-form input:focus,
.aig-key-agent-controls select:focus {
    outline: 2px solid rgba(23, 105, 170, .2);
    border-color: var(--aig-blue);
}

.aig-agents-reversible-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #c9e6e8;
    background: #f0fbfb;
    color: #31535b;
    font-size: 12px;
    font-weight: 600;
}

.aig-agents-reversible-note svg {
    flex-shrink: 0;
    color: var(--aig-cyan);
}

.aig-agent-list,
.aig-key-agent-list {
    display: grid;
    grid-gap: 8px;
    gap: 8px;
    margin-top: 14px;
}

.aig-agent-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    border: 1px solid #e2e8ef;
    background: #fff;
}

.aig-agent-main {
    min-width: 0;
    flex: 1 1;
}

.aig-agent-title-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.aig-agent-title-line strong {
    color: var(--aig-ink);
    font-size: 14px;
}

.aig-agent-status {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.aig-agent-status--active {
    color: #176b45;
    background: #e8f7ef;
}

.aig-agent-status--inactive {
    color: #805000;
    background: #fff1d8;
}

.aig-agent-spend {
    display: block;
    margin-top: 7px;
    color: var(--aig-muted);
    font-size: 12px;
}

.aig-agent-spend small {
    color: var(--aig-amber);
    font-weight: 700;
}

.aig-agent-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.aig-agent-rename-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto auto;
    align-items: end;
    grid-gap: 8px;
    gap: 8px;
    margin-top: 12px;
}

.aig-key-agents-block {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--aig-line);
}

.aig-subsection-heading h3 {
    margin: 0;
    color: var(--aig-ink);
    font-size: 16px;
}

.aig-subsection-heading p {
    margin: 5px 0 0;
    color: var(--aig-muted);
    font-size: 12px;
}

.aig-key-agent-row {
    padding: 14px;
    border: 1px solid #e2e8ef;
    background: #fff;
}

.aig-key-agent-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.aig-key-agent-header strong {
    color: var(--aig-ink);
    font-size: 14px;
}

.aig-key-agent-header span {
    color: var(--aig-muted);
    font-size: 12px;
}

.aig-key-agent-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    grid-gap: 10px;
    gap: 10px;
    margin-top: 12px;
}

.aig-assigned-agent-list {
    display: grid;
    grid-gap: 7px;
    gap: 7px;
    margin-top: 12px;
}

.aig-assigned-agent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border-left: 3px solid var(--aig-cyan);
    background: #f5fbfc;
}

.aig-assigned-agent > span {
    min-width: 0;
    overflow: hidden;
    color: var(--aig-ink);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .aig-agent-create,
    .aig-key-agent-controls {
        grid-template-columns: 1fr;
    }

    .aig-agent-row {
        flex-direction: column;
    }

    .aig-agent-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .aig-agent-rename-form {
        grid-template-columns: 1fr;
    }

    .aig-key-agent-header,
    .aig-assigned-agent {
        align-items: flex-start;
        flex-direction: column;
    }

    .aig-assigned-agent .aig-secondary-button {
        width: 100%;
    }
}
.aig-cutover-subtitle {
    max-width: 620px;
    margin: 5px 0 0;
    color: var(--aig-muted);
    font-size: 12px;
    font-weight: 400;
}

.aig-cutover-heading .aig-section-title {
    align-items: flex-start;
}

.aig-cutover-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0 0 16px;
    padding: 11px 13px;
    border: 1px solid #f0c978;
    border-left: 4px solid var(--aig-amber);
    background: #fff8e8;
    color: #805000;
    font-size: 12px;
    line-height: 1.45;
}

.aig-cutover-note svg {
    flex: 0 0 auto;
}

.aig-cutover-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, .8fr);
    grid-gap: 16px;
    gap: 16px;
}

.aig-cutover-deployments,
.aig-cutover-observation {
    min-width: 0;
}

.aig-cutover-subheading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.aig-cutover-subheading h3 {
    margin: 0;
    color: var(--aig-ink);
    font-size: 16px;
}

.aig-cutover-subheading p {
    margin: 4px 0 0;
    color: var(--aig-muted);
    font-size: 12px;
}

.aig-cutover-list {
    display: grid;
    grid-gap: 9px;
    gap: 9px;
}

.aig-cutover-card {
    padding: 14px;
    border: 1px solid #dfe6ee;
    border-left: 4px solid #8aa8c1;
    background: #fff;
    transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.aig-cutover-card--selected {
    border-color: var(--aig-blue);
    border-left-color: var(--aig-blue);
    background: #f5f9fd;
    box-shadow: 0 5px 15px rgba(23, 105, 170, .12);
}

.aig-cutover-card--disabled {
    border-left-color: #c7ced7;
    background: #f7f8fa;
}

.aig-cutover-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.aig-cutover-card-heading h4 {
    margin: 0;
    color: var(--aig-ink);
    font-size: 15px;
}

.aig-cutover-card-heading code,
.aig-cutover-route code {
    display: block;
    margin-top: 4px;
    overflow-wrap: anywhere;
    color: var(--aig-muted);
    font-family: Consolas, 'Courier New', monospace;
    font-size: 11px;
}

.aig-cutover-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-gap: 9px 14px;
    gap: 9px 14px;
    margin: 14px 0 0;
}

.aig-cutover-fields div {
    min-width: 0;
}

.aig-cutover-fields dt {
    color: var(--aig-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.aig-cutover-fields dd {
    margin: 3px 0 0;
    overflow-wrap: anywhere;
    color: var(--aig-ink);
    font-size: 13px;
}

.aig-cutover-field--pricing dd {
    color: var(--aig-amber);
    font-weight: 700;
}

.aig-cutover-observation {
    padding: 15px;
    border: 1px solid #c9e6e8;
    background: #f0fbfb;
}

.aig-cutover-traffic-kpi {
    padding: 14px;
    border: 1px solid #c9e6e8;
    background: #fff;
}

.aig-cutover-traffic-kpi span,
.aig-cutover-traffic-kpi small {
    display: block;
    color: var(--aig-muted);
    font-size: 12px;
}

.aig-cutover-traffic-kpi strong {
    display: block;
    margin: 7px 0 5px;
    color: var(--aig-ink);
    font-size: 26px;
}

.aig-cutover-routes {
    display: grid;
    grid-gap: 7px;
    gap: 7px;
    margin-top: 12px;
}

.aig-cutover-route {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 9px;
    padding-bottom: 7px;
    border-bottom: 1px solid #d7ecee;
}

.aig-cutover-route code {
    margin: 0;
}

.aig-cutover-route strong {
    flex: 0 0 auto;
    color: var(--aig-ink);
    font-size: 13px;
}

.aig-cutover-checklist {
    margin: 17px 0 0;
    padding: 14px;
    border: 1px solid var(--aig-line);
}

.aig-cutover-checklist legend {
    padding: 0 7px;
    color: var(--aig-ink);
    font-size: 14px;
    font-weight: 700;
}

.aig-cutover-checklist-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-gap: 9px 15px;
    gap: 9px 15px;
}

.aig-cutover-checklist label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #435168;
    font-size: 12px;
    line-height: 1.4;
}

.aig-cutover-checklist input {
    flex: 0 0 auto;
    margin-top: 2px;
    accent-color: var(--aig-blue);
}

.aig-cutover-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 16px;
    padding: 14px;
    border: 1px solid #dfe6ee;
    background: #fbfcfe;
}

.aig-cutover-action strong {
    display: block;
    margin-top: 4px;
    color: var(--aig-ink);
    font-size: 14px;
}

.aig-cutover-action .aig-primary-button {
    margin-top: 0;
    flex: 0 0 auto;
}

.aig-cutover-result {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 12px;
    padding: 13px 14px;
    border: 1px solid;
}

.aig-cutover-result--success {
    border-color: #abd8bf;
    background: #f1fbf5;
    color: #176b43;
}

.aig-cutover-result--unchanged {
    border-color: #f0c978;
    background: #fff8e8;
    color: #805000;
}

.aig-cutover-result strong,
.aig-cutover-result span,
.aig-cutover-result small {
    display: block;
}

.aig-cutover-result strong {
    font-size: 14px;
}

.aig-cutover-result span,
.aig-cutover-result small {
    margin-top: 3px;
    color: #435168;
    font-size: 12px;
}

@media (max-width: 900px) {
    .aig-cutover-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .aig-cutover-card-heading,
    .aig-cutover-action {
        align-items: flex-start;
        flex-direction: column;
    }

    .aig-cutover-card-heading .aig-primary-button,
    .aig-cutover-card-heading .aig-secondary-button,
    .aig-cutover-action .aig-primary-button {
        width: 100%;
    }

    .aig-cutover-fields,
    .aig-cutover-checklist-grid {
        grid-template-columns: 1fr;
    }
}

.aig-identity-heading,
.aig-identity-heading .aig-section-title {
    align-items: flex-start;
}

.aig-identity-subtitle {
    margin: 5px 0 0;
    color: var(--aig-muted);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
}

.aig-identity-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-gap: 16px;
    gap: 16px;
}

.aig-identity-column {
    min-width: 0;
}

.aig-identity-subheading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 48px;
    margin-bottom: 10px;
}

.aig-identity-subheading h3 {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: var(--aig-ink);
    font-size: 16px;
}

.aig-identity-subheading p {
    margin: 4px 0 0;
    color: var(--aig-muted);
    font-size: 12px;
}

.aig-identity-create {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    grid-gap: 10px;
    gap: 10px;
    height: auto;
    padding: 14px;
    border: 1px solid var(--aig-line);
    background: var(--aig-panel);
}

.aig-identity-create--customer {
    grid-template-columns: minmax(0, 1fr);
}

.aig-identity-create label {
    display: grid;
    grid-gap: 5px;
    gap: 5px;
    color: var(--aig-muted);
    font-size: 12px;
    font-weight: 600;
}

.aig-identity-create input,
.aig-identity-create select {
    width: 100%;
    min-height: 36px;
    padding: 7px 9px;
    border: 1px solid var(--aig-line);
    border-radius: 4px;
    background: var(--aig-panel);
    color: var(--aig-ink);
    font: inherit;
    font-size: 13px;
}

.aig-identity-create input:focus,
.aig-identity-create select:focus {
    outline: 2px solid var(--aig-line);
    border-color: var(--aig-blue);
}

.aig-identity-create .aig-primary-button {
    margin-top: 0;
}

.aig-identity-create .aig-primary-button:last-child {
    grid-column: 1 / -1;
    justify-self: start;
}

.aig-identity-list {
    display: grid;
    grid-gap: 8px;
    gap: 8px;
    margin-top: 14px;
}

.aig-identity-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    grid-gap: 12px;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--aig-line);
    background: var(--aig-panel);
}

.aig-identity-card-main {
    min-width: 0;
}

.aig-identity-card-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.aig-identity-card-title strong {
    color: var(--aig-ink);
    font-size: 14px;
}

.aig-identity-status {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.aig-identity-status--active {
    color: var(--aig-cyan);
    background: var(--aig-panel);
}

.aig-identity-status--inactive {
    color: var(--aig-amber);
    background: var(--aig-panel);
}

.aig-identity-detail {
    grid-column: 1 / -1;
    padding: 11px 13px;
    border-left: 3px solid var(--aig-cyan);
    background: var(--aig-panel);
    color: var(--aig-muted);
    font-size: 12px;
}

.aig-identity-detail dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-gap: 8px 14px;
    gap: 8px 14px;
    margin: 0;
}

.aig-identity-detail dt {
    color: var(--aig-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.aig-identity-detail dd {
    margin: 3px 0 0;
    overflow-wrap: anywhere;
    color: var(--aig-ink);
    font-size: 13px;
}

@media (max-width: 1100px) {
    .aig-identity-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .aig-identity-create,
    .aig-identity-card {
        grid-template-columns: 1fr;
    }

    .aig-identity-create .aig-primary-button:last-child {
        justify-self: stretch;
    }

    .aig-identity-card .aig-secondary-button {
        width: 100%;
    }

    .aig-identity-detail dl {
        grid-template-columns: 1fr;
    }
}

.ai-gateway-keys-panel {
    margin: 0 0 18px;
    border: 1px solid #d9dee8;
    border: 1px solid var(--border-color, #d9dee8);
    border-radius: 8px;
    box-shadow: none;
}

.ai-gateway-keys-loading {
    min-height: 54px;
    margin: 0 0 18px;
    padding: 18px;
    border: 1px solid #d9dee8;
    border: 1px solid var(--border-color, #d9dee8);
    border-radius: 8px;
    color: #667085;
    color: var(--text-muted, #667085);
    background: #fff;
}

.ai-gateway-keys-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.ai-gateway-keys-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1d2733;
    color: var(--text-dark, #1d2733);
    font-size: 1rem;
    font-weight: 700;
}

.ai-gateway-keys-header p {
    margin: 6px 0 0;
    color: #667085;
    color: var(--text-muted, #667085);
    font-size: 0.875rem;
}

.ai-gateway-key-form {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(220px, 1.35fr) minmax(190px, 0.9fr) auto;
    align-items: start;
    grid-gap: 12px;
    gap: 12px;
}

.ai-gateway-key-form .lc-button {
    min-height: 40px;
    white-space: nowrap;
}

.ai-gateway-revealed-key {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding: 12px 14px;
    border-left: 3px solid #18864b;
    background: #eef9f2;
}

.ai-gateway-revealed-key > div {
    display: grid;
    grid-gap: 4px;
    gap: 4px;
    min-width: 0;
}

.ai-gateway-revealed-key code {
    overflow-wrap: anywhere;
    color: #14532d;
    font-size: 0.82rem;
}

.ai-gateway-revealed-key span,
.ai-gateway-key-row span,
.ai-gateway-key-row small,
.ai-gateway-empty {
    color: #667085;
    color: var(--text-muted, #667085);
    font-size: 0.8rem;
}

.ai-gateway-application-state {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid #d9dee8;
    border: 1px solid var(--border-color, #d9dee8);
    border-left: 3px solid #2563eb;
    background: #f8fbff;
}

.ai-gateway-application-state > div {
    display: grid;
    grid-gap: 4px;
    gap: 4px;
    min-width: 0;
}

.ai-gateway-application-state span {
    width: fit-content;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.ai-gateway-application-state span.is-active {
    color: #166534;
    background: #dcfce7;
}

.ai-gateway-application-state span.is-inactive {
    color: #92400e;
    background: #fef3c7;
}

.ai-gateway-application-state small {
    color: #667085;
    color: var(--text-muted, #667085);
    font-size: 0.8rem;
}

.ai-application-action {
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid transparent;
    border-radius: 5px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.ai-application-action:disabled {
    cursor: wait;
    opacity: 0.55;
}

.ai-application-action--deactivate {
    border-color: #f59e0b;
    color: #92400e;
    background: #fffbeb;
}

.ai-application-action--activate {
    border-color: #86efac;
    color: #166534;
    background: #f0fdf4;
}

.ai-gateway-key-list {
    display: grid;
    grid-gap: 8px;
    gap: 8px;
    margin-top: 18px;
}

.ai-gateway-key-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 56px;
    padding: 8px 10px;
    border-top: 1px solid #e6e9ef;
    border-top: 1px solid var(--border-color, #e6e9ef);
}

.ai-gateway-key-row > div {
    display: grid;
    grid-gap: 2px;
    gap: 2px;
    min-width: 0;
}

.ai-gateway-key-row--revoked {
    opacity: 0.68;
}

.ai-gateway-key-summary {
    flex: 1 1 280px;
}

.ai-gateway-key-status {
    display: inline-flex;
    width: fit-content;
    margin-top: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.ai-gateway-key-status.is-active {
    color: #166534;
    background: #dcfce7;
}

.ai-gateway-key-status.is-blocked {
    color: #92400e;
    background: #fef3c7;
}

.ai-gateway-key-status.is-revoked {
    color: #991b1b;
    background: #fee2e2;
}

.ai-gateway-key-actions {
    display: flex;
    flex: 1 1 100%;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 8px;
}

.ai-key-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 32px;
    padding: 6px 9px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
}

.ai-key-action:disabled {
    cursor: wait;
    opacity: 0.55;
}

.ai-key-action--block {
    border-color: #f59e0b;
    color: #92400e;
    background: #fffbeb;
}

.ai-key-action--unblock {
    border-color: #86efac;
    color: #166534;
    background: #f0fdf4;
}

.ai-key-action--rotate,
.ai-key-action--schedule {
    border-color: #9ca3af;
    color: #374151;
    background: #f8fafc;
}

.ai-key-action--revoke {
    border-color: #fca5a5;
    color: #991b1b;
    background: #fff7f7;
}

.ai-key-action--cancel {
    border-color: #cbd5e1;
    color: #475569;
}

.ai-key-action--confirm {
    border-color: #2563eb;
    color: #fff;
    background: #2563eb;
}

.ai-gateway-key-schedule {
    display: flex;
    flex: 1 1 100%;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 10px;
    border-left: 3px solid #2563eb;
    color: #1e3a8a;
    background: #eff6ff;
    font-size: 0.78rem;
}

.ai-gateway-key-dialog-backdrop {
    position: fixed;
    z-index: 1200;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgb(15 23 42 / 42%);
}

.ai-gateway-key-dialog {
    display: grid;
    grid-gap: 14px;
    gap: 14px;
    width: min(100%, 520px);
    padding: 20px;
    border: 1px solid #d9dee8;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 60px rgb(15 23 42 / 20%);
}

.ai-gateway-key-dialog-header,
.ai-gateway-key-dialog-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ai-gateway-key-dialog-header h3 {
    margin: 2px 0 0;
    color: #1d2733;
    color: var(--text-dark, #1d2733);
    font-size: 1.05rem;
}

.ai-gateway-key-dialog-warning {
    margin: 0;
    color: #92400e;
    font-size: 0.84rem;
    line-height: 1.45;
}

.ai-gateway-key-dialog-actions {
    justify-content: flex-end;
    margin-top: 4px;
}

.ai-gateway-key-row strong,
.ai-gateway-key-row span,
.ai-gateway-key-row small {
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    .ai-gateway-key-form {
        grid-template-columns: 1fr 1fr;
    }

    .ai-gateway-key-form .lc-button {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .ai-gateway-keys-header,
    .ai-gateway-application-state,
    .ai-gateway-revealed-key {
        align-items: stretch;
        flex-direction: column;
    }

    .ai-gateway-key-form {
        grid-template-columns: 1fr;
    }

    .ai-gateway-key-actions {
        justify-content: stretch;
    }

    .ai-key-action {
        flex-grow: 1;
        flex-shrink: 1;
        flex-basis: calc(50% - 6px);
    }

    .ai-gateway-key-dialog-actions .ai-key-action {
        flex: 1 1 auto;
    }
}

.aig-guardrails-heading {
    align-items: flex-start;
}

.aig-guardrails-heading .aig-section-title {
    align-items: flex-start;
}

.aig-guardrails-subtitle {
    margin: 5px 0 0;
    color: var(--aig-muted);
    font-size: 12px;
    line-height: 1.45;
}

.aig-guardrail-form {
    padding: 16px;
    border: 1px solid #dfe6ee;
    background: #fbfcfe;
}

.aig-guardrail-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-gap: 12px;
    gap: 12px;
}

.aig-guardrail-form-grid label,
.aig-guardrail-assignment-form label,
.aig-guardrail-dialog > label {
    display: grid;
    grid-gap: 5px;
    gap: 5px;
    color: #435168;
    font-size: 12px;
    font-weight: 600;
}

.aig-guardrail-form-grid input,
.aig-guardrail-form-grid textarea,
.aig-guardrail-assignment-form input,
.aig-guardrail-assignment-form select,
.aig-guardrail-dialog input,
.aig-guardrail-dialog textarea,
.aig-guardrail-dialog select {
    width: 100%;
    min-height: 36px;
    padding: 7px 9px;
    border: 1px solid #cbd5df;
    border-radius: 4px;
    background: #fff;
    color: var(--aig-ink);
    font: inherit;
    font-size: 13px;
}

.aig-guardrail-form-grid textarea,
.aig-guardrail-dialog textarea {
    min-height: 92px;
    resize: vertical;
}

.aig-guardrail-schema-field {
    grid-column: 1 / -1;
}

.aig-guardrail-options {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 18px;
    margin-top: 14px;
}

.aig-guardrail-options fieldset {
    flex: 1 1 360px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #dfe6ee;
}

.aig-guardrail-options legend {
    padding: 0 5px;
    color: var(--aig-muted);
    font-size: 12px;
    font-weight: 700;
}

.aig-phase-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.aig-phase-options label,
.aig-guardrail-toggle {
    display: inline-flex;
    align-items: flex-start;
    gap: 7px;
    color: #435168;
    font-size: 12px;
}

.aig-phase-options label span {
    display: grid;
    grid-gap: 2px;
    gap: 2px;
}

.aig-phase-options small {
    color: var(--aig-muted);
    font-size: 11px;
    font-weight: 400;
}

.aig-guardrail-list {
    display: grid;
    grid-gap: 10px;
    gap: 10px;
    margin-top: 16px;
}

.aig-guardrail-card {
    padding: 15px;
    border: 1px solid #e2e8ef;
    background: #fff;
}

.aig-guardrail-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.aig-guardrail-title-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.aig-guardrail-title-line strong {
    color: var(--aig-ink);
    font-size: 15px;
}

.aig-guardrail-status {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 12px;
    color: #805000;
    background: #fff1d8;
    font-size: 11px;
    font-weight: 700;
}

.aig-guardrail-status--active {
    color: #176b45;
    background: #e8f7ef;
}

.aig-guardrail-status--mandatory {
    color: #1e3a8a;
    background: #dbeafe;
}

.aig-guardrail-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.aig-guardrail-assignment-block {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--aig-line);
}

.aig-guardrail-assignment-form {
    display: grid;
    grid-template-columns: minmax(140px, .8fr) minmax(180px, 1.2fr) minmax(150px, 1fr) auto;
    align-items: end;
    grid-gap: 10px;
    gap: 10px;
    margin-top: 12px;
}

.aig-assigned-guardrail-list {
    display: grid;
    grid-gap: 7px;
    gap: 7px;
    margin-top: 12px;
}

.aig-assigned-guardrail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border-left: 3px solid var(--aig-cyan);
    background: #f5fbfc;
}

.aig-assigned-guardrail > span {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--aig-ink);
    font-size: 12px;
}

.aig-guardrail-dialog-backdrop {
    position: fixed;
    z-index: 1200;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgb(15 23 42 / 42%);
}

.aig-guardrail-dialog {
    display: grid;
    grid-gap: 14px;
    gap: 14px;
    width: min(100%, 620px);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    padding: 20px;
    border: 1px solid #d9dee8;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 60px rgb(15 23 42 / 20%);
}

.aig-guardrail-dialog-header,
.aig-guardrail-dialog-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.aig-guardrail-dialog-header h3 {
    margin: 2px 0 0;
    color: var(--aig-ink);
    font-size: 18px;
}

.aig-guardrail-delete-warning,
.aig-guardrail-test-warning {
    margin: 0;
    padding: 11px 13px;
    border-left: 3px solid var(--aig-amber);
    background: #fff8e8;
    color: #805000;
    font-size: 13px;
    line-height: 1.5;
}

.aig-guardrail-test-warning {
    border-left-color: var(--aig-cyan);
    background: #f0fbfb;
    color: #31535b;
}

.aig-guardrail-test-result {
    display: grid;
    grid-gap: 4px;
    gap: 4px;
    padding: 11px 13px;
    border-left: 3px solid #18864b;
    background: #eef9f2;
    color: #14532d;
    font-size: 13px;
}

.aig-guardrail-test-result span {
    color: #31535b;
    font-size: 12px;
}

@media (max-width: 820px) {
    .aig-guardrail-form-grid,
    .aig-guardrail-assignment-form {
        grid-template-columns: 1fr;
    }

    .aig-guardrail-card-header {
        flex-direction: column;
    }

    .aig-guardrail-actions {
        justify-content: flex-start;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .aig-guardrail-dialog-actions,
    .aig-assigned-guardrail {
        align-items: stretch;
        flex-direction: column;
    }

    .aig-guardrail-dialog-actions > button,
    .aig-assigned-guardrail > button {
        width: 100%;
    }
}

.aig-retention-heading {
    align-items: flex-start;
}

.aig-retention-heading .aig-section-title {
    align-items: flex-start;
}

.aig-retention-subtitle {
    margin: 5px 0 0;
    color: var(--aig-muted);
    font-size: 12px;
    line-height: 1.45;
}

.aig-retention-warning {
    margin-bottom: 16px;
    padding: 11px 13px;
    border-left: 3px solid var(--aig-red);
    background: var(--aig-panel);
    color: var(--aig-ink);
    font-size: 13px;
    line-height: 1.5;
}

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

.aig-retention-card {
    padding: 15px;
    border: 1px solid var(--aig-line);
    background: var(--aig-panel);
}

.aig-retention-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.aig-retention-card-heading h3 {
    margin: 0;
    color: var(--aig-ink);
    font-size: 15px;
}

.aig-retention-card-heading .aig-row-meta {
    display: block;
    margin-top: 5px;
    line-height: 1.45;
}

.aig-retention-status {
    flex-shrink: 0;
    padding: 4px 8px;
    border-radius: 12px;
    color: var(--aig-amber);
    background: var(--aig-panel);
    font-size: 11px;
    font-weight: 700;
}

.aig-retention-status--enabled {
    color: var(--aig-cyan);
}

.aig-retention-values {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-gap: 10px;
    gap: 10px;
    margin-top: 14px;
}

.aig-retention-values > div {
    padding: 10px;
    border: 1px solid var(--aig-line);
}

.aig-retention-values span {
    display: block;
    color: var(--aig-muted);
    font-size: 11px;
}

.aig-retention-values strong {
    display: block;
    margin-top: 5px;
    color: var(--aig-ink);
    font-size: 16px;
}

.aig-retention-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    grid-gap: 10px;
    gap: 10px;
    height: auto;
    margin-top: 14px;
}

.aig-retention-form label {
    display: grid;
    grid-gap: 5px;
    gap: 5px;
    color: var(--aig-ink);
    font-size: 12px;
    font-weight: 600;
}

.aig-retention-form input {
    width: 100%;
    min-height: 36px;
    padding: 7px 9px;
    border: 1px solid var(--aig-line);
    border-radius: 4px;
    background: var(--aig-panel);
    color: var(--aig-ink);
    font: inherit;
    font-size: 13px;
}

.aig-retention-form input:focus {
    outline: 2px solid var(--aig-line);
    border-color: var(--aig-blue);
}

.aig-retention-form .aig-danger-button {
    margin-top: 0;
}

.aig-retention-dialog-backdrop {
    position: fixed;
    z-index: 1200;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    background: var(--aig-ink);
}

.aig-retention-dialog {
    display: grid;
    grid-gap: 14px;
    gap: 14px;
    width: min(100%, 620px);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    padding: 20px;
    border: 1px solid var(--aig-line);
    border-radius: 8px;
    background: var(--aig-panel);
    box-shadow: 0 18px 60px var(--aig-ink);
}

.aig-retention-dialog-heading h3 {
    margin: 2px 0 0;
    color: var(--aig-ink);
    font-size: 18px;
}

.aig-retention-dialog p {
    margin: 0;
    color: var(--aig-ink);
    font-size: 13px;
    line-height: 1.55;
}

.aig-retention-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

@media (max-width: 820px) {
    .aig-retention-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .aig-retention-card-heading,
    .aig-retention-form,
    .aig-retention-dialog-actions {
        align-items: stretch;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .aig-retention-status {
        align-self: flex-start;
    }

    .aig-retention-dialog-actions > button {
        width: 100%;
    }
}

