: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: "Inter", 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: "Inter", 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; }

/*
 * Formulário dos painéis laterais do AI Gateway no padrão do Portal (PPInput, PPDropDown, PPTextArea, LcCheckBox e pp-button),
 * medido na tela em 11/11: rótulo de 12 px sem negrito, campo de 28 px com borda #ddd e canto de 4 px, valor de 14 px, caixa de
 * marcar roxa ao lado do texto, e Cancelar e Salvar de 40 px num rodapé com linha em cima.
 * Os painéis usam campos nativos, e cada um trazia a sua regra (36 px, rótulo em negrito, caixa em volta do grupo). O prefixo
 * `.side-modal.aig-side-panel > .body` vence essas regras sem depender da ordem dos arquivos; o painel compartilhado não muda.
 */
/* O `form` do Portal tem altura de 100%: no painel, o rodapé preso só fica preso dentro do formulário, e parava no meio. */
.side-modal.aig-side-panel > .body form { height: auto; }

.side-modal.aig-side-panel > .body :is(label, legend, .aig-key-field, .aig-credential-field > label) {
    color: #2e1956;
    color: var(--text-default, #2e1956);
    font-family: 'Ubuntu', sans-serif;
    font-size: 12px;
    font-weight: 400;
}

.side-modal.aig-side-panel > .body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]), select) {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 28px;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #2e1956;
    color: var(--text-default, #2e1956);
    font: 400 14px 'Ubuntu', sans-serif;
    transition: border-color .2s;
}

.side-modal.aig-side-panel > .body textarea {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 54px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #2e1956;
    color: var(--text-default, #2e1956);
    font: 400 14px/1.4 'Ubuntu', sans-serif;
    resize: vertical;
    transition: border-color .2s;
}

.side-modal.aig-side-panel > .body :is(input, select, textarea)::placeholder { color: #9196a7; }
.side-modal.aig-side-panel > .body :is(input, select, textarea):hover:not(:disabled) { border-color: #898da6; }
.side-modal.aig-side-panel > .body :is(input, select, textarea):focus { border-color: #141b4d; outline: none; }
.side-modal.aig-side-panel > .body :is(input, select, textarea):disabled { background-color: #ebebeb; color: #6b7088; cursor: not-allowed; }
.side-modal.aig-side-panel > .body :is(input, select, textarea)[aria-invalid="true"] { border-color: #f44336; }

.side-modal.aig-side-panel > .body :is(input[type="checkbox"], input[type="radio"]) {
    flex: none;
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #8c40e3;
    cursor: pointer;
}

/* Caixa de marcar: o texto é a opção, no tamanho do valor de campo, como o título do LcCheckBox. */
.side-modal.aig-side-panel > .body label:has(> input[type="checkbox"], > input[type="radio"]) { font-size: 14px; cursor: pointer; }

/* Dica embaixo do campo ou da opção. */
.side-modal.aig-side-panel > .body :is(label, .aig-key-field, .aig-credential-field) small {
    color: #647084;
    color: var(--aig-muted, #647084);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
}

/* Seção embutida no painel (limites da API, política de chaves): a frase e as ações sem a faixa branca de cartão por trás. */
.side-modal.aig-side-panel > .body .aig-section-heading { padding-top: 0; background: transparent; }

/*
 * Linha de campo com botão (acrescentar membro, preço da ferramenta): o texto ocupa o que sobra, a escolha tem largura própria,
 * tudo numa linha. O AiGatewayModelsPanel.css faz de todo label do painel uma grade, e o preço empilhava rótulo, campo e botão.
 */
.side-modal.aig-side-panel > .body :is(.aig-policy-toolbar, label.aig-policy-inline):has(> :is(input, select)) { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; }
.side-modal.aig-side-panel > .body .aig-policy-toolbar:has(> :is(input, select)) > input { flex: 1 1 auto; width: auto; }
.side-modal.aig-side-panel > .body label.aig-policy-inline:has(> input) > input { flex: 0 1 160px; width: auto; }
/* Botão de arquivo (label com input escondido): ícone ao lado do texto, como os outros botões. */
.side-modal.aig-side-panel > .body label:is(.aig-primary-button, .aig-secondary-button) { display: inline-flex; align-items: center; gap: 6px; }
/* Selo de onde a regra vale: no painel, do mesmo tamanho do cartão. */
.side-modal.aig-side-panel > .body .aig-assigned-guardrail { font-size: 12px; }
.side-modal.aig-side-panel > .body .aig-policy-toolbar:has(> :is(input, select)) > select { flex: 0 1 180px; width: auto; }
.side-modal.aig-side-panel > .body .aig-policy-toolbar:has(> :is(input, select)) > span { flex: 1 1 auto; min-width: 0; }

/* Título de bloco dentro do formulário (membros do time): nível 2, como os outros blocos. */
.side-modal.aig-side-panel > .body .aig-policy-form > strong { margin-top: 4px; color: #2e1956; color: var(--text-default, #2e1956); font: 600 13px 'Ubuntu', sans-serif; }

/* Botão na mesma linha de um campo (acrescentar membro, tag, variável): na altura do campo. */
.side-modal.aig-side-panel > .body :is(.aig-policy-toolbar, .aig-policy-inline):has(> :is(input, select)) > :is(.aig-primary-button, .aig-secondary-button) {
    height: 28px;
    min-height: 28px;
    margin: 0;
    padding: 0 12px;
}

/* Lista da rota no painel: uma regra global de lista dava 20 px de recuo, e os itens não alinhavam com os campos. */
.side-modal.aig-side-panel > .body .aig-fallback-chain { padding-left: 0; }

/* Grupo de campos sem caixa em volta: o nome do grupo vem como rótulo, em cima. */
.side-modal.aig-side-panel > .body fieldset { min-width: 0; margin: 0; padding: 0; border: 0; background: transparent; }
.side-modal.aig-side-panel > .body legend:not(.aig-visually-hidden) { margin: 0 0 6px; padding: 0; }
/* Botão de acrescentar item dentro do grupo (mensagem, variável): no tamanho do texto, não uma faixa de lado a lado. */
.side-modal.aig-side-panel > .body fieldset > :is(.aig-secondary-button, .aig-link-button) { justify-self: start; }

/* Opções avançadas: uma linha que abre, sem caixa, separada dos campos de cima por uma linha. */
.side-modal.aig-side-panel > .body details:is(.aig-advanced, .ai-gateway-key-advanced) { margin: 4px 0 0; padding: 12px 0 0; border: 0; border-top: 1px solid #e2e6f3; border-radius: 0; background: transparent; }
.side-modal.aig-side-panel > .body details:is(.aig-advanced, .ai-gateway-key-advanced) > summary { color: #2e1956; color: var(--text-default, #2e1956); font-family: 'Ubuntu', sans-serif; font-size: 13px !important; font-weight: 600; cursor: pointer; }

/*
 * Rodapé: linha em cima, Cancelar à esquerda e a ação à direita; enquanto os campos rolam, ele fica preso embaixo do painel. O
 * corpo do painel tem 32 px de respiro embaixo, e o texto que rolava aparecia nessa faixa, debaixo do rodapé: o rodapé desce até
 * a borda (bottom e margem negativos) e cobre a faixa com o próprio fundo.
 */
.side-modal.aig-side-panel > .body .aig-form-actions {
    position: sticky;
    bottom: -32px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 16px;
    margin-bottom: -32px;
    padding: 12px 0 44px;
    border-top: 1px solid #e2e6f3;
    background: #fafafa;
}

.aig-form-actions-main { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.side-modal.aig-side-panel > .body .aig-form-actions :is(.aig-primary-button, .aig-secondary-button, .aig-danger-button) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    min-height: 40px;
    min-width: 135px;
    margin: 0;
    padding: 0 19px;
    border: 0;
    border-radius: 4px;
    font: 600 13px 'Ubuntu', sans-serif;
}

/* Remover no rodapé: caixa como as outras, em vermelho claro. */
.side-modal.aig-side-panel > .body .aig-form-actions .aig-danger-button { background: #fdecec; color: #b42318; }
.side-modal.aig-side-panel > .body .aig-form-actions .aig-danger-button:hover:not(:disabled) { background: #f9d7d7; }

/* Acesso por rede: introdução, redes vistas e prévia, no corpo do painel. */
.side-modal.aig-side-panel > .body .ai-gateway-network-intro { margin: 0; font-size: 13px; color: #34506e; }
.side-modal.aig-side-panel > .body .ai-gateway-network-suggestions { display: grid; grid-gap: 4px; gap: 4px; font-size: 13px; overflow-wrap: anywhere; }
.side-modal.aig-side-panel > .body .ai-gateway-network-suggestions .aig-link-button { justify-self: start; }
.side-modal.aig-side-panel > .body .ai-gateway-network-preview { display: grid; grid-gap: 6px; gap: 6px; justify-items: start; }
.side-modal.aig-side-panel > .body .ai-gateway-network-preview p { margin: 0; font-size: 13px; }

/* Endereço do cliente: linhas com valor para copiar e um bloco por domínio. */
.side-modal.aig-side-panel > .body .ai-gateway-endpoint-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; grid-column-gap: 6px; column-gap: 6px; font-size: 13px; }
.side-modal.aig-side-panel > .body .ai-gateway-endpoint-line small { grid-column: 1 / -1; color: #6b7088; }
.side-modal.aig-side-panel > .body .ai-gateway-endpoint-line code { min-width: 0; overflow-wrap: anywhere; }
.side-modal.aig-side-panel > .body .ai-gateway-endpoint-domain { display: grid; grid-gap: 6px; gap: 6px; padding: 8px 0; border-bottom: 1px solid #dfe6ee; font-size: 13px; }
.side-modal.aig-side-panel > .body .ai-gateway-endpoint-actions { display: flex; gap: 10px; align-items: center; }

.aig-root {
    --aig-ink: var(--text-default, #172033);
    --aig-muted: var(--text-dark, #647084);
    --aig-line: var(--line-default, #dce3ec);
    --aig-panel: var(--background-white, #ffffff);
    --aig-blue: var(--color-primary-blue, #1769aa);
    --aig-cyan: #087f8c;
    --aig-amber: #a85b00;
    --aig-red: #a33232;
    --aig-green: #2f783a;
    margin: 0 0 28px;
    color: var(--aig-ink);
    font-family: 'Inter', sans-serif;
    min-width: 0;
}

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

.aig-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 20px 10px;
    color: var(--aig-ink);
    border-bottom: 1px solid var(--aig-line);
}

.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: 20px !important;
    line-height: 28px;
}

.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;
    color: var(--aig-muted);
    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: var(--aig-muted);
    background: #fafbfd;
    background: var(--background-lightest, #fafbfd);
}

.aig-icon-button:hover { color: var(--aig-blue); background: var(--aig-panel); }

.aig-status-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 10px 20px;
    color: var(--aig-muted);
    font-size: 12px !important;
}

.aig-section {
    margin-top: 8px;
    padding: 20px;
    border-top: 1px solid var(--aig-line);
    background: var(--aig-panel);
}

.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: 16px !important;
    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 {
    box-sizing: border-box;
    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-route-policy-modal .aig-form-grid { grid-template-columns: minmax(0, 1fr); }
.aig-route-policy-modal .aig-policy-route { min-width: 0; }
.aig-route-policy-modal select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 36px;
    padding: 6px 9px;
    border: 1px solid #cbd5df;
    border-radius: 4px;
    background: #fff;
    color: var(--aig-ink);
    font-family: inherit;
    font-size: 13px;
}
.aig-route-policy-modal .aig-policy-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
}
.aig-route-policy-modal .aig-policy-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-height: 16px;
    flex: 0 0 16px;
    padding: 0;
    margin: 0;
    accent-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 { filter: brightness(.92); }
.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-connection { display: inline-flex; align-items: center; gap: 6px; color: var(--aig-cyan); font-size: 12px !important; }
.aig-connection::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.aig-connection--warning { color: var(--aig-amber); }
.aig-tabs { border: 0; margin: 0; padding: 0; min-width: 0; }
.aig-tabs:disabled button { opacity: .6; cursor: wait; }
.aig-utilization { margin-top: 8px; }
.aig-utilization progress { width: 100%; max-width: 240px; height: 6px; accent-color: var(--aig-cyan); }
.aig-unavailable { padding: 24px 20px; border-top: 1px solid var(--aig-line); }
.aig-unavailable-heading { display: flex; align-items: center; gap: 14px; }
.aig-unavailable-heading > svg { flex-shrink: 0; color: var(--aig-amber); }
.aig-unavailable-heading > div { flex: 1 1; min-width: 0; }
.aig-unavailable-heading h2 { margin: 0; font-size: 16px !important; }
.aig-unavailable-heading p { margin: 6px 0 0; color: var(--aig-muted); font-size: 12px !important; line-height: 1.5; }
.aig-resource-status { margin: 20px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-column-gap: 32px; column-gap: 32px; }
.aig-resource-status li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--aig-line); font-size: 12px !important; }
.aig-resource-status li > span { font-size: 12px !important; }
.aig-resource-unavailable { color: var(--aig-red); }
.aig-resource-ready { color: var(--aig-cyan); }
.aig-root .aig-status-strip > span,
.aig-root .aig-inline-error { font-size: 12px !important; }
.aig-grid { height: 300px; width: 100%; min-width: 0; overflow: hidden; margin-top: 12px; background: var(--aig-panel); }
.aig-grid revo-grid .rgHeaderCell,
.aig-grid revo-grid .rgCell,
.aig-grid revo-grid .rgHeaderCell *,
.aig-grid revo-grid .rgCell * { font-size: 12px !important; }
.aig-grid revo-grid .rgHeaderCell { padding: 4px 8px !important; letter-spacing: 0; }
.aig-grid revo-grid .rgCell { padding: 4px 8px !important; background: transparent !important; border: none !important; box-sizing: border-box; }
.aig-grid revo-grid .rgCell > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aig-grid-actions { display: flex; align-items: center; gap: 8px; height: 100%; }
.aig-grid-actions button { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 0; background: transparent; color: var(--aig-muted); cursor: pointer; }
.aig-grid-actions button:hover { color: var(--aig-blue); }
.aig-grid-actions button:disabled { cursor: wait; opacity: .5; }
.aig-budget-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0; }
.aig-budget-toolbar > span { font-size: 12px !important; color: var(--aig-muted); }
.aig-rule-modal, .aig-rule-modal > .body { box-sizing: border-box; max-width: 100vw; }
.aig-rule-modal .aig-rule-form { padding: 0; border: 0; background: transparent; }
.aig-rule-modal fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.aig-rule-modal .aig-form-grid { grid-template-columns: minmax(0, 1fr); }
.aig-rule-modal .aig-form-grid label { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.aig-rule-modal .aig-form-grid input { min-width: 0; }
.aig-rule-modal .aig-form-grid input:disabled { background: #fafbfd; background: var(--background-lightest, #fafbfd); color: var(--aig-muted); }
/* Salvar do painel lateral no tamanho do texto, à esquerda, como nos outros formulários: largura toda virava faixa. */
.aig-rule-modal .aig-primary-button { justify-self: start; width: auto; }
.aig-metrics .lcdashboard { min-height: 0; }
.aig-metrics .lcdashboard-cards-panel-body { grid-template-rows: minmax(128px, auto) !important; }
.aig-metric .truncate-container { min-width: 0; max-width: calc(100% - 42px); height: auto; max-height: none; }
.aig-metric .data { height: auto; max-height: none; line-height: 30px; flex-shrink: 0; }
.aig-metric .data > div { font-size: 24px !important; line-height: 30px; }
.aig-metric-value { font-size: 24px !important; line-height: 30px; }
.aig-metrics .lcdashboard .iconvaluecontent .description { font-size: 12px !important; line-height: 18px; height: auto; max-height: none; white-space: normal; overflow-wrap: anywhere; }
.aig-list-row { border: 0; border-bottom: 1px solid var(--aig-line); padding: 12px 0; }
.aig-recommendation { border: 0; border-bottom: 1px solid var(--aig-line); background: var(--aig-panel); padding: 12px 0; }
.aig-empty { border: 0; background: #fafbfd; background: var(--background-lightest, #fafbfd); font-size: 12px !important; }
@media (max-width: 1023px) {
    .aig-metrics .lcdashboard-cards-panel-body { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; grid-template-rows: auto !important; grid-auto-rows: minmax(128px, auto); }
    .aig-metrics .card-frame { grid-column: auto !important; grid-row: auto !important; min-width: 0; min-height: 128px; }
}
@media (max-width: 767px) {
    .aig-hero { flex-wrap: wrap; gap: 8px; padding: 16px; }
    .aig-unavailable { padding: 20px 16px; }
    .aig-unavailable-heading { flex-wrap: wrap; align-items: flex-start; }
    .aig-unavailable-heading > div { flex-grow: 1; flex-shrink: 1; flex-basis: calc(100% - 42px); }
    .aig-unavailable-heading > button { margin-left: 42px; }
    .aig-resource-status { grid-template-columns: minmax(0, 1fr); }
    .aig-metrics .lcdashboard-cards-panel-body { grid-template-columns: minmax(0, 1fr) !important; }
    .aig-value { white-space: normal; overflow-wrap: anywhere; }
    .aig-status-strip { padding: 10px 16px; }
}
/* Revisão de UX: grupos dentro das abas, resumo em tabela e dobras de opção avançada. */
/*
 * Sub-abas, ajuste de 10/11: controle segmentado compacto, nas cores das abas do Portal. Um trilho só, com a aba ativa em branco e
 * texto roxo; a pílula roxa cheia pesava mais que as abas de cima.
 */
.aig-subtabs { display: inline-flex; flex-wrap: wrap; align-self: flex-start; gap: 2px; margin: 12px 20px 4px; padding: 3px; border-radius: 8px; background: #e2e6f3; background: var(--background-light, #e2e6f3); }
.aig-section .aig-subtabs { margin: 10px 0; }
.aig-metric .description, .aig-metrics .description { color: #4d5468 !important; color: var(--text-dark, #4d5468) !important; }
.aig-subtab { min-height: 26px; padding: 3px 12px; border: 0; border-radius: 6px; background: transparent; color: #464c5e; cursor: pointer; font: 500 12px/20px 'Ubuntu', sans-serif !important; white-space: nowrap; transition: background .15s ease, color .15s ease; }
.aig-subtab:hover { background: rgba(255, 255, 255, .6); color: #2e1956; color: var(--text-default, #2e1956); }
/* Cores fixas: o `--text-dark` do Portal é cinza claro e ficava abaixo de 4,5:1 sobre o trilho. */
.aig-subtab[aria-pressed="true"] { background: #fff; background: var(--background-white, #fff); color: #7a30d0; box-shadow: 0 1px 2px rgba(46, 25, 86, .14); }
.aig-subtab:focus-visible, .aig-link-button:focus-visible { outline: 2px solid #1a5fb4; outline-offset: 2px; }

.aig-root select { min-height: 28px; }
.aig-period { display: inline-flex; align-items: center; gap: 6px; padding: 0; }
.aig-period select { min-height: 32px; padding: 4px 8px; border: 1px solid var(--aig-line); border-radius: 5px; background: var(--aig-panel); color: var(--aig-ink); font: inherit; font-size: 13px !important; }

.aig-table { width: 100%; margin: 4px 0 10px; border-collapse: collapse; font-size: 13px !important; }
.aig-table th, .aig-table td { padding: 8px 10px; border-bottom: 1px solid var(--aig-line); text-align: left; font-size: 13px !important; }
.aig-table thead th { color: var(--aig-muted); font-weight: 400; }
.aig-table tbody th { font-weight: 700; }
.aig-table small { font-weight: 400; color: var(--aig-muted); font-size: 11px !important; overflow-wrap: anywhere; }
.aig-table-row--alert { background: #fdf4f4; }
.aig-limit { font-size: 13px !important; }
.aig-limit--error { color: #a33232; font-weight: 700; }
.aig-limit--attention { color: #8a4b00; font-weight: 700; }
.aig-limit--ok { color: #2f783a; font-weight: 700; }
.aig-table-number { text-align: right !important; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; white-space: nowrap; }
.aig-table-scroll { overflow-x: auto; }
.aig-log-filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-gap: 10px; gap: 10px; margin: 8px 0 12px; }
.aig-log-filters label { display: grid; grid-gap: 4px; gap: 4px; font-size: 12px !important; font-weight: 700; color: var(--aig-ink); }
.aig-log-filters select, .aig-log-filters input { width: 100%; min-height: 32px; padding: 4px 8px; border: 1px solid var(--aig-line); border-radius: 5px; background: var(--aig-panel); font: inherit; font-size: 13px !important; font-weight: 400; }
.aig-log-outcome { font-weight: 700; font-size: 13px !important; }
.aig-log-outcome--served { color: #2f783a; }
.aig-log-outcome--cached { color: #1a5fb4; }
.aig-log-outcome--refused { color: #8a4b00; }
.aig-log-outcome--failed { color: #a33232; }
.aig-log-reason { display: block; color: var(--aig-muted); font-size: 11px !important; }
.aig-log-detail { display: grid; grid-gap: 10px; gap: 10px; margin: 0; }
.aig-log-detail dt { font-size: 11px !important; color: var(--aig-muted); }
.aig-log-detail dd { margin: 0; font-size: 13px !important; overflow-wrap: anywhere; }
@media (max-width: 1100px) { .aig-log-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.aig-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; white-space: nowrap; }

.aig-disclosure { display: inline-block; margin: 4px 0 10px; font-size: 13px !important; }
.aig-advanced { margin: 10px 0; padding: 8px 12px; border: 1px solid var(--aig-line); border-radius: 5px; }
.aig-advanced > summary { min-height: 24px; color: var(--aig-ink); cursor: pointer; font-size: 13px !important; font-weight: 700; }
.aig-advanced[open] > summary { margin-bottom: 10px; }
.aig-advanced pre { overflow-x: auto; padding: 10px; background: #f4f6fa; font-size: 12px !important; }

.aig-next-step { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0; padding: 12px 14px; border-left: 3px solid #2f783a; background: #f1f8f2; font-size: 13px !important; }
.aig-next-step span { font-size: 13px !important; }

.aig-usage { display: grid; grid-gap: 2px; gap: 2px; width: 100%; line-height: 1.2; }
.aig-usage span { font-size: 12px !important; }
.aig-usage progress { width: 100%; height: 6px; accent-color: #5d2e8c; }

.aig-budget-effect { margin: 10px 0 0; padding: 8px 12px; border-left: 3px solid #a85b00; background: #fff8ec; color: #6b3d00; font-size: 12px !important; }

@media (max-width: 1023px) {
    .aig-subtabs { margin-left: 12px; margin-right: 12px; }
    .aig-hero { flex-wrap: wrap; }
}

/* Padrão visual do Portal (cartões do LCDashboard e LcIconLink), pedido em 09/11: os painéis do Gateway são cartões como os do AI Spend. */
.aig-root .aig-section,
.aig-root .aig-models,
.aig-root .ai-gateway-keys-panel {
    margin: 12px 0 0;
    padding: 12px 16px;
    border: 0;
    border-radius: 0.25rem;
    background: #fff;
    box-shadow: 4px 4px 18px 0 rgba(58, 79, 135, 0.06);
}
.aig-root .ai-gateway-keys-panel .MuiCardContent-root { padding: 0; }
.aig-root .aig-section-title { color: #2e1956; color: var(--text-dark, #2e1956); }
.aig-root .aig-section-title > svg { display: none; }
.aig-root .aig-section-title h2,
.aig-root .aig-models .aig-model-toolbar h2,
.aig-root .ai-gateway-keys-title {
    margin: 0;
    color: #2e1956;
    color: var(--text-dark, #2e1956);
    font: 300 15px/160% 'Ubuntu', sans-serif !important;
}
.aig-root .ai-gateway-keys-title svg { display: none; }
.aig-root .aig-section-heading { margin-bottom: 12px; }
/* Cor fixa: --text-dark vem claro neste Portal e o icone ficava cinza-claro, abaixo de 3:1. Desabilitado fica bem mais claro. */
.aig-root .aig-icon-button,
.aig-root .aig-icon-button--light {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #464c5e;
}
.aig-root .aig-icon-button:hover,
.aig-root .aig-icon-button--light:hover { background: #e2e6f3; color: #2e1956; }
.aig-root .aig-icon-button:disabled,
.aig-root .aig-icon-button--light:disabled { background: transparent; color: #b8bdca; cursor: default; }
.aig-root .aig-status-strip { padding: 8px 4px; }

/* Logs na lista padrão do Portal, com os filtros em painel lateral. */
.aig-root .aig-log-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 0 0 8px; }
.aig-root .aig-log-filter-summary { margin-right: auto; color: #2e1956; color: var(--text-dark, #2e1956); font-size: 12px !important; }
.aig-log-filters--side { grid-template-columns: minmax(0, 1fr); }
.aig-root .aig-log-table { min-height: 160px; }
.aig-root .aig-log-cell { display: inline-flex; flex-direction: column; gap: 2px; min-width: 0; }

/*
 * Padrão do Portal, pedido em 09/11: a página não rola. A raiz ocupa a altura do .page, as abas ficam fixas e o corpo da aba fica
 * com o resto. Cada painel é um cartão que rola por dentro, e as listas rolam no próprio corpo, com o cabeçalho parado.
 */
.aig-root.aig-root--fit { display: flex; flex-direction: column; height: 100%; margin: 0; overflow: hidden; }
.aig-root--fit > * { flex: none; }
.aig-root--fit > .aig-body { flex: 1 1; display: flex; flex-direction: column; gap: 12px; min-height: 0; padding: 0 2px 6px; overflow: auto; }
.aig-root--fit > .aig-body > * { flex: none; margin-top: 0 !important; }
.aig-root--fit .aig-subtabs { margin: 2px 0 0; }

/* Painel sozinho na aba: ocupa o corpo inteiro e rola por dentro. */
.aig-root--fit > .aig-body > .aig-section,
.aig-root--fit > .aig-body > .aig-models,
.aig-root--fit > .aig-body > .ai-gateway-keys-panel,
.aig-root--fit > .aig-body > .aig-view { flex: 1 1; min-height: 0; }
.aig-root--fit > .aig-body > .aig-section,
.aig-root--fit > .aig-body > .aig-models,
.aig-root--fit > .aig-body > .ai-gateway-keys-panel { overflow: auto; }
/* Os avisos e os primeiros passos da Visão geral têm o tamanho do texto. */
.aig-root--fit > .aig-body > .aig-getting-started { flex: none; overflow: visible; }

/* Abas com mais de um painel: colunas de cartões. Cada cartão cresce com o que tem e encolhe com rolagem própria. */
.aig-view { display: flex; gap: 12px; min-width: 0; }
.aig-col { display: flex; flex: 1 1; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; }
.aig-col--wide { flex-grow: 1.5; }
.aig-root .aig-col > * { flex: 1 1 auto; min-height: 72px; margin: 0 !important; overflow: auto; }
.aig-root .aig-col > :only-child { flex-basis: 0; }
/* O global.css do Portal dá height: 100% a todo form. Com o cartão de altura fixa, o form esticava até o fim do cartão. */
.aig-root--fit form:not(.side-modal *) { height: auto; }
/* Cartão mais alto que o conteúdo: o conteúdo fica no topo, sem esticar as linhas do grid. */
.aig-root .aig-col > *,
.aig-root--fit > .aig-body > .aig-section { align-content: start; }

/* O título do cartão fica parado enquanto o conteúdo rola. */
.aig-root--fit .aig-section > .aig-section-heading,
.aig-root--fit .aig-models > .aig-model-toolbar:first-of-type { position: sticky; top: -12px; z-index: 3; margin-top: -12px; padding-top: 12px; background: #fff; }

/* Cartão com uma grade que ocupa o espaço que sobra (gasto, regras de budget, auditoria). */
.aig-root .aig-section--fill { display: flex; flex-direction: column; overflow: hidden; }
.aig-root .aig-section--fill > * { flex: none; }
.aig-root .aig-grid.aig-grid--fill { flex: 1 1; min-height: 150px; height: auto; }

/* Visão geral: os números em cima, e embaixo o gasto ao lado de previsão, anomalias e economia. */
.aig-root--fit > .aig-body--overview > .aig-unavailable { padding: 10px 16px; border: 0; border-radius: 0.25rem; background: #fff; box-shadow: 4px 4px 18px 0 rgba(58, 79, 135, 0.06); }
.aig-root--fit > .aig-body--overview > .aig-unavailable p { margin-top: 2px; }
.aig-root--fit .aig-metrics .lcdashboard-cards-panel-body { grid-template-rows: minmax(96px, auto) !important; }
.aig-view--overview .aig-col > .aig-section { min-height: 72px; }
/* Visão geral em três colunas: o gasto leva a tabela inteira sem rolar de lado; onde economizar e previsão dividem o resto. */
.aig-view--overview > .aig-col--wide { flex-grow: 1.7; }

/* Testar modelo: a conversa ocupa o meio e rola; a mensagem e o Enviar ficam embaixo, como num chat. */
/* Testar modelo como os chats do Portal: a tela nao rola; so a conversa, e o campo de mensagem fica embaixo. */
.aig-root--fit > .aig-body--playground > .aig-section { display: flex; flex-direction: column; overflow: hidden; }
.aig-root--fit > .aig-body--playground > .aig-section > * { flex: none; }
.aig-root--fit > .aig-body--playground .aig-playground-conversation { flex: 1 1; min-height: 96px; max-height: none; margin: 8px 0; overflow: auto; }
.aig-root--fit > .aig-body--playground form[aria-label="Enviar mensagem"] { gap: 8px; }
.aig-root--fit > .aig-body--playground form[aria-label="Enviar mensagem"] .aig-primary-button { margin-top: 0; }

/* Logs: a lista ocupa o cartão; o carregar mais fica no pé. */
.aig-root--fit > .aig-body--logs > .aig-section { display: flex; flex-direction: column; overflow: hidden; }
.aig-root--fit > .aig-body--logs > .aig-section > * { flex: none; }
.aig-root--fit > .aig-body--logs .aig-log-table { flex: 1 1; min-height: 160px; }

/* Fornecedores e modelos: faixa de fornecedores e, embaixo, as duas listas lado a lado. */
.aig-root--fit > .aig-body > .aig-models { display: flex; flex-direction: column; }
.aig-root--fit > .aig-body > .aig-models > * { flex: none; }
.aig-root--fit .aig-models .aig-provider-cards { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); grid-template-columns: none; overflow-x: auto; padding-bottom: 4px; }
.aig-root--fit .aig-models > .aig-model-lists { flex: 1 1; display: flex; gap: 16px; min-height: 260px; }
.aig-model-block { display: flex; flex: 1 1; flex-direction: column; min-width: 0; min-height: 0; }
.aig-model-block:first-child { flex-grow: 1.3; }
.aig-model-block > * { flex: none; }
.aig-root .aig-model-block > .aig-model-table { flex: 1 1; min-height: 120px; }

/* Chaves: endereço do Gateway compacto, e a lista de chaves ocupa o resto do cartão. */
.aig-root--fit > .aig-body > .ai-gateway-keys-panel { display: flex; flex-direction: column; }
.aig-root--fit .ai-gateway-keys-panel > .MuiCardContent-root { display: flex; flex: 1 1; flex-direction: column; min-height: 0; }
.aig-root--fit .ai-gateway-keys-panel > .MuiCardContent-root > * { flex: none; }
.aig-root--fit .ai-gateway-keys-panel .ai-gateway-key-list { display: flex; flex: 1 1; flex-direction: column; min-height: 240px; }
.aig-root--fit .ai-gateway-key-list > * { flex: none; }
.aig-root--fit .ai-gateway-key-list > .ai-gateway-key-table { flex: 1 1; min-height: 160px; }
.aig-root--fit .ai-gateway-key-list > .ai-gateway-section-title { margin: 10px 0 6px; }
.aig-root--fit .ai-gateway-endpoint { margin: 8px 0 0; padding: 8px 12px; }
.aig-root--fit .ai-gateway-endpoint-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 6px; }
.aig-root--fit .ai-gateway-endpoint-urls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.aig-root--fit .ai-gateway-endpoint-url { grid-template-columns: minmax(0, 1fr) auto; padding: 4px 8px; gap: 0 8px; }
.aig-root--fit .ai-gateway-endpoint-url > span { grid-column: 1 / -1; }
.aig-root--fit .ai-gateway-endpoint-url > code { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
.aig-root--fit .ai-gateway-endpoint-url > small { grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aig-root--fit .ai-gateway-endpoint-more { margin-top: 6px; }
.ai-gateway-policy-modal .aig-section { margin: 0; padding: 0; box-shadow: none; }
.ai-gateway-policy-modal .aig-section-heading h2,
.ai-gateway-policy-modal .aig-section-heading > .aig-section-title > svg { display: none; }

/*
 * O menu da linha (LcDropDown) é absoluto dentro do corpo da lista, que rola, e ficava cortado em cima e embaixo. Fixo, na posição
 * dos três pontos que o painel grava no clique (placeRowMenu), ele abre inteiro, para baixo ou para cima, fora do recorte da rolagem.
 */
.aig-root .lc-datatableinfinite .lc-dropdown > .body { position: fixed; top: auto; top: var(--aig-menu-y, auto); left: auto; left: var(--aig-menu-x, auto); right: auto; }

/* Botões no padrão do Portal: principal como o lc-button bg-info, secundário como o lc-button simples. */
.aig-root .aig-primary-button,
.aig-rule-modal .aig-primary-button { border: 0; border-radius: 4px; background: #9fa3ff; background: var(--button-primary-default, #9fa3ff); color: #2e1956; color: var(--text-default, #2e1956); font-family: 'Ubuntu', sans-serif; font-weight: 500; }
.aig-root .aig-primary-button:hover:not(:disabled),
.aig-rule-modal .aig-primary-button:hover:not(:disabled) { background: #c3c6fd; filter: none; }
.aig-root .aig-secondary-button,
.aig-rule-modal .aig-secondary-button { border: 0; border-radius: 4px; background: #e2e6f3; background: var(--button-secondary-default, #e2e6f3); color: #2e1956; color: var(--text-default, #2e1956); font-family: 'Ubuntu', sans-serif; font-weight: 500; }
.aig-root .aig-secondary-button:hover:not(:disabled),
.aig-rule-modal .aig-secondary-button:hover:not(:disabled) { background: #d3d8eb; color: #2e1956; color: var(--text-default, #2e1956); }
.aig-root .lc-button, .aig-rule-modal .lc-button { white-space: nowrap; }

/* Barras das duas listas de modelos: título numa linha, ações quebram à direita. */
.aig-model-block .aig-model-toolbar--list { flex-wrap: wrap; margin-top: 8px; padding: 8px 0; }
.aig-model-block .aig-model-toolbar--list h3 { white-space: nowrap; }
.aig-model-block .aig-model-toolbar--list > div { justify-content: flex-end; }
.aig-model-block .aig-model-toolbar--list button { white-space: nowrap; }
.aig-model-block .aig-model-search input { width: 170px; }
.aig-root--fit .aig-models > .aig-model-toolbar { padding: 8px 0; }

/* Fornecedores em faixa compacta. */
.aig-root--fit .aig-provider-card { gap: 6px; padding: 8px 10px; }
.aig-root--fit .aig-provider-card .aig-link-button { font-size: 12px !important; }
.aig-root--fit .aig-provider-card-connect { min-height: 28px; padding: 3px 10px; }

/* Chaves emitidas e o filtro de chaves de teste na mesma linha, e a lista embaixo. */
.aig-root--fit .ai-gateway-keys-panel .ai-gateway-key-list { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); align-items: center; grid-column-gap: 16px; column-gap: 16px; }
.aig-root--fit .ai-gateway-key-list > .ai-gateway-section-title { grid-column: 1; grid-row: 1; }
.aig-root--fit .ai-gateway-key-list > .ai-gateway-test-keys { grid-column: 2; grid-row: 1; margin: 0; }
.aig-root--fit .ai-gateway-key-list > .ai-gateway-key-table,
.aig-root--fit .ai-gateway-key-list > .ai-gateway-empty { grid-column: 1 / -1; grid-row: 2; align-self: stretch; min-height: 160px; margin-top: 0; }

/* Cadastro de credencial do Gateway (cópia da tela de assinaturas) em painel lateral. */
.aig-credential-editor { display: grid; grid-gap: 12px; gap: 12px; }
.aig-credential-providers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 8px; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.aig-credential-providers legend { margin-bottom: 6px; font-size: 12px; font-weight: 700; color: #2e1956; color: var(--text-dark, #2e1956); }
.aig-credential-provider { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 10px; border: 1px solid #dce3ec; border-radius: 6px; background: #fff; color: #2e1956; color: var(--text-default, #2e1956); font: 13px 'Ubuntu', sans-serif; cursor: pointer; text-align: left; }
.aig-credential-provider:hover { border-color: #9fa3ff; }
.aig-credential-provider--selected { border-color: #5d2e8c; box-shadow: 0 0 0 1px #5d2e8c; }
.aig-credential-guidance { margin: 0; font-size: 13px; color: #2e1956; color: var(--text-dark, #2e1956); }
.aig-credential-warning { display: flex; align-items: flex-start; gap: 8px; }
.aig-credential-editor .aig-primary-button { justify-self: start; width: auto; min-width: 200px; margin-top: 4px; }
/* Grade dos campos: rótulo de uma linha, caixa de 36 px e explicação embaixo; numa linha, as caixas ficam na mesma altura. */
.aig-credential-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); grid-gap: 14px 16px; gap: 14px 16px; align-items: start; }
.aig-credential-field { display: grid; grid-template-rows: auto 36px auto; grid-gap: 4px; gap: 4px; min-width: 0; }
.aig-credential-field--wide { grid-column: 1 / -1; }
.aig-credential-field label { display: block; overflow: hidden; color: #2e1956; color: var(--text-dark, #2e1956); font: 600 12px/18px 'Ubuntu', sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.aig-credential-required { color: #a33232; }
/*
 * O AiGatewayModelsPanel.css dá display: grid a todo label do .aig-model-modal e carrega depois: o asterisco caía para a linha de
 * baixo, e na Nova chave a caixa de cada modelo ficava em cima do nome. Aqui, mais específico, cada um volta ao seu formato.
 */
.aig-side-panel .aig-credential-field > label { display: block; }

/* Paineis laterais, um padrao so de campo: rotulo 12px em negrito em cima, campo de 34px, dica de 11px embaixo. */
.aig-side-panel .ai-gateway-key-form { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.aig-side-panel .aig-key-field { display: grid; grid-gap: 5px; gap: 5px; min-width: 0; color: #435168; font-size: 12px; font-weight: 600; }
.aig-side-panel .aig-key-field-label { display: inline-flex; align-items: center; gap: 2px; }
.aig-side-panel .aig-key-field input,
.aig-side-panel .aig-key-field select {
    width: 100%; min-width: 0; height: 34px; padding: 6px 10px; border: 1px solid #c7d2ca; border-radius: 4px;
    font: 12px Ubuntu, sans-serif; background: #fff; color: #27332e; box-sizing: border-box;
}
.aig-side-panel .aig-key-field input[aria-invalid="true"] { border-color: #b42318; }
.aig-side-panel .aig-key-field small { color: var(--aig-muted); font-size: 11px; font-weight: 400; line-height: 1.4; }
.aig-side-panel .aig-key-field small.aig-key-field-error { color: #b42318; }

/* Times, projetos e clientes: no painel o formulario e uma coluna, sem caixa por dentro, campo branco como os outros. */
.aig-side-panel .aig-identity-create { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 0; border: 0; background: transparent; }
.aig-side-panel .aig-identity-create label { color: #435168; }
.aig-side-panel .aig-identity-create input,
.aig-side-panel .aig-identity-create select { background: #fff; }

/* Agentes: rotulo do mesmo tamanho dos outros paineis e espaco entre abas, dados e campo. */
.aig-side-panel.aig-agent-modal .aig-rule-form label { color: #435168; font-size: 12px; font-weight: 600; }
.aig-side-panel.aig-agent-modal .aig-agent-detail { margin: 12px 0 16px; }
.aig-side-panel.aig-agent-modal .aig-rule-form input { font-weight: 400; }

/* Caixa de marcar com texto de duas partes (titulo e detalhe): caixa na altura da primeira linha. */
.aig-side-panel .aig-policy-check:has(> .aig-policy-check-text) { align-items: flex-start; }
.aig-side-panel .aig-policy-check:has(> .aig-policy-check-text) > input { margin: 1px 0 0; flex: none; }
.aig-policy-check-text { display: grid; grid-gap: 2px; gap: 2px; }

/* Secao recolhida aberta no painel: o mesmo espaco entre campos do formulario de fora, e a dica perto do campo dela. */
/* `details` nao vira grade em todo navegador: o espaco vem de margem entre os itens. */
.aig-side-panel .aig-advanced[open] > :not(summary) { margin-top: 0; margin-bottom: 0; }
.aig-side-panel .aig-advanced[open] > :not(summary) + :not(summary) { margin-top: 12px; }
.aig-side-panel .aig-advanced[open] > label + p.aig-row-meta { margin-top: 4px; }
.aig-side-panel .aig-advanced[open] > label:not(.aig-model-checkbox) { display: grid; grid-gap: 5px; gap: 5px; }

/* Caixa de marcar solta dentro do avancado da chave: ao lado do texto, como as outras. */
.aig-side-panel .ai-gateway-key-advanced > label:not(.aig-key-field) {
    display: flex; align-items: center; gap: 8px; color: #435168; font-size: 12px; font-weight: 500;
}
.aig-side-panel .ai-gateway-key-advanced > label:not(.aig-key-field) > input { flex: none; width: 16px; height: 16px; margin: 0; }
.aig-side-panel .ai-gateway-key-advanced > :not(summary) { margin-top: 0; margin-bottom: 0; }
.aig-side-panel .ai-gateway-key-advanced > :not(summary) + :not(summary) { margin-top: 12px; }
.aig-policy-check-text > small { color: var(--aig-muted); font-size: 11px; font-weight: 400; line-height: 1.4; }
.aig-side-panel .ai-gateway-model-selection > label { display: inline-flex; align-items: center; gap: 6px; }
.aig-credential-field input, .aig-credential-field select { box-sizing: border-box; width: 100%; height: 36px; min-width: 0; padding: 6px 10px; border: 1px solid #c7d2e0; border-radius: 4px; background: #fff; color: #172033; font: 13px 'Ubuntu', sans-serif; }
.aig-credential-field input:focus, .aig-credential-field select:focus { border-color: #5d2e8c; outline: 2px solid rgba(93, 46, 140, .18); }
.aig-credential-field input:disabled, .aig-credential-field select:disabled { background: #f4f6fa; color: #647084; }
.aig-credential-field small { color: #647084; font-size: 11px !important; line-height: 1.4; }
.aig-credential-field--error input, .aig-credential-field--error select { border-color: #a33232; }
.aig-credential-field--error small { color: #a33232; }
/* Opcionais sem caixa em volta: as colunas batem com as dos obrigatórios. */
.aig-credential-editor .aig-credential-optional { margin: 0; padding: 10px 0 0; border: 0; border-top: 1px solid #dce3ec; border-radius: 0; }
.aig-credential-optional[open] > summary { margin-bottom: 12px; }
/* Expandido, o formulário não estica de ponta a ponta: as linhas ficam legíveis. */
.aig-side-panel--expanded .aig-credential-editor { max-width: 1100px; margin: 0 auto; }
.aig-side-panel--expanded .aig-credential-providers { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/*
 * Hierarquia de informação, pedida em 09/11. Nível 1: título do cartão (15 px, 300, padrão do Portal). Nível 2: bloco dentro do
 * cartão (13 px, 600). Nível 3: texto e metadado (12 a 13 px). Antes, os blocos de dentro eram maiores que o título do cartão.
 */
.aig-root .aig-section h3, .aig-root .aig-section h4, .aig-root .aig-models h3, .aig-root .aig-block-title,
.aig-root .aig-section .aig-form-heading h3 { margin: 14px 0 6px; color: #2e1956; color: var(--text-dark, #2e1956); font: 600 13px/1.4 'Ubuntu', sans-serif !important; letter-spacing: 0; }
.aig-root .aig-section .aig-policy-toolbar h3, .aig-root .aig-models .aig-model-toolbar h3 { margin: 0; }

/*
 * Cartão das colunas com foco: o invólucro dá a altura e o botão; o painel de dentro rola. O invólucro não é posicionado: o painel
 * lateral do Portal é position: absolute e se prende ao ancestral posicionado mais próximo, e abria espremido dentro do cartão.
 * O botão fica no fluxo, no canto, e a margem negativa sobe o painel de dentro para debaixo dele.
 */
.aig-root .aig-col > .aig-slot { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.aig-slot > :not(.aig-slot-focus) { flex: 1 1 auto; min-height: 0; margin: 0 !important; }
.aig-slot > :not(.aig-slot-focus):not(.aig-section--fill) { overflow: auto; }
.aig-slot > section > .aig-section-heading { padding-right: 40px; }
.aig-slot-focus { position: relative; z-index: 5; flex: none; align-self: flex-end; margin: 12px 12px -40px 0; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #2e1956; color: var(--text-dark, #2e1956); cursor: pointer; }
.aig-slot-focus:hover, .aig-slot-focus:focus-visible { background: #e2e6f3; outline: none; }
.aig-view:has(.aig-slot--focused) > .aig-col:not(:has(.aig-slot--focused)) { display: none; }
.aig-col:has(.aig-slot--focused) > .aig-slot:not(.aig-slot--focused) { display: none; }
.aig-root .aig-col > .aig-slot--focused { flex: 1 1; }

/* Resumo no cartão: uma linha por item, com o principal à esquerda e o estado à direita. O resto abre no painel lateral. */
.aig-summary-list { display: grid; }
.aig-summary-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 16px; align-items: center; grid-gap: 12px; gap: 12px; width: 100%; padding: 10px 6px; border: 0; border-bottom: 1px solid var(--aig-line); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.aig-summary-row:hover { background: #f6f7fb; }
.aig-summary-row:focus-visible { outline: 2px solid #5d2e8c; outline-offset: -2px; }
.aig-summary-row--signal { grid-template-columns: minmax(0, 1fr) 16px; }
.aig-summary-main { display: grid; grid-gap: 2px; gap: 2px; min-width: 0; }
.aig-summary-main strong { overflow: hidden; color: #2e1956; color: var(--text-dark, #2e1956); font-size: 13px !important; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.aig-summary-main .aig-row-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aig-summary-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.aig-summary-value { color: #2e1956; color: var(--text-dark, #2e1956); font-size: 13px !important; font-weight: 600; white-space: nowrap; }
.aig-summary-caret { color: #8b90a3; }
.aig-status-chip--warn { background: #fff4e0; color: #8a4b00; }
/* Linha do teto diário no cartão Regras de budget. */
.aig-metric-extra { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 6px; margin-top: 4px; color: #2e1956; color: var(--text-dark, #2e1956); font-size: 12px !important; text-align: right; }
.aig-metric-extra--warn { color: #8a4b00; }
.aig-metric-extra .aig-link-button { font-size: 12px !important; font-weight: 600; }

/* Detalhe no painel lateral: título do item, números em blocos iguais e as ressalvas embaixo. */
.aig-detail { display: grid; grid-gap: 14px; gap: 14px; }
.aig-detail > h3 { margin: 0; color: #2e1956; color: var(--text-dark, #2e1956); font: 500 16px/1.4 'Ubuntu', sans-serif !important; }
.aig-detail > p { margin: 0; font-size: 13px !important; line-height: 1.5; }
.aig-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); grid-gap: 10px; gap: 10px; margin: 0; }
.aig-detail-row { padding: 8px 12px; border: 1px solid #e2e6f3; border-radius: 4px; background: #fafbfd; }
.aig-detail-row dt { color: #647084; font-size: 11px !important; }
.aig-detail-row dd { margin: 2px 0 0; color: #2e1956; color: var(--text-dark, #2e1956); font-size: 14px !important; font-weight: 600; }
.aig-detail-row .aig-utilization { display: grid; grid-gap: 4px; gap: 4px; margin: 0; }
.aig-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.aig-side-panel--expanded .aig-detail { max-width: 1100px; margin: 0 auto; }

/* Cartão cujo painel não tem o que mostrar (a migração de motor sem LiteLLM) não deixa a moldura vazia com o botão de expandir. */
.aig-root .aig-col > .aig-slot:not(:has(> :not(.aig-slot-focus))) { display: none; }

/*
 * Operações, pedido em 10/11: o cartão mostra o que está em vigor em blocos curtos e muda pelo painel lateral; o que cresce com
 * o uso (destinos, entregas com falha) rola na própria lista, e o cartão não.
 */
.aig-ops-facts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 6px 0 0; }
.aig-ops-facts .aig-detail-row dd { font-size: 13px !important; }
.aig-ops-facts .aig-status-chip { white-space: normal; }
/* Configurações e saúde tem o tamanho do que mostra; a sobra da coluna vai para a lista de destinos, que é a que cresce. */
.aig-root .aig-col > .aig-slot[data-card="settings"] { flex: 0 1 auto; }
.aig-settings-modal form { height: auto; align-content: start; }
.aig-ops-health { margin-top: 14px; }
.aig-ops-health-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.aig-root .aig-section .aig-ops-health-heading h3 { margin: 0; }
.aig-ops-jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); grid-gap: 6px; gap: 6px; margin: 0; padding: 0; list-style: none; }
.aig-ops-jobs > li { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 7px 10px; border: 1px solid #e2e6f3; border-left: 3px solid #cfd6e4; border-radius: 4px; background: #fff; font-size: 12px !important; }
.aig-ops-jobs > li strong { overflow: hidden; color: #2e1956; color: var(--text-dark, #2e1956); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.aig-ops-jobs > li span { flex: none; color: #647084; white-space: nowrap; }
.aig-ops-jobs > li.aig-health-row--busy { border-left-color: #6f78d8; }
.aig-ops-jobs > li.aig-health-row--busy span { color: #3a46a3; }
.aig-ops-jobs > li.aig-health-row--alert { border-left-color: #c24545; }
.aig-ops-jobs > li.aig-health-row--alert span { color: #9e2d2d; font-weight: 600; }
.aig-root .aig-ops-callbacks > .aig-ops-scroll { display: grid; flex: 1 1 auto; align-content: start; grid-gap: 12px; gap: 12px; min-height: 0; overflow: auto; }
.aig-ops-callbacks .aig-policy-toolbar { margin: 10px 0; }
.aig-ops-callbacks .aig-policy-card { padding: 10px 12px; }
.aig-ops-callbacks .aig-policy-card-header { flex-wrap: nowrap; align-items: center; }
.aig-ops-callbacks .aig-policy-card-header > :first-child { min-width: 0; }
.aig-ops-callbacks .aig-policy-card-header .aig-row-meta { overflow-wrap: anywhere; }
.aig-root .aig-icon-button--danger:hover:not(:disabled) { background: #fdeeee; color: #9e2d2d; }
/* Console de cutover no painel lateral: em 620 px a lista e o contador ficam um embaixo do outro. */
.aig-cutover-modal:not(.aig-side-panel--expanded) .aig-cutover-layout,
.aig-cutover-modal:not(.aig-side-panel--expanded) .aig-cutover-checklist-grid { grid-template-columns: minmax(0, 1fr); }
.aig-side-panel--expanded .aig-cutover-console { max-width: 1100px; margin: 0 auto; }
.aig-cutover-console .aig-primary-button { width: auto; }

/* Tela estreita: as colunas empilham e o corpo da aba rola, como último recurso. */
/*
 * Botões, pedido em 10/11: menores, com ícone e mais leves. Ação de linha (editar, testar, apagar, copiar, abrir) é só ícone, com a
 * dica no title e o nome acessível de sempre. Botão com texto tem 30 px, ícone de 15 px e fonte do Portal; apagar e remover não têm
 * caixa vermelha, só a cor no texto. `.aig-body` dá a especificidade para valer sobre os tamanhos que cada painel definia.
 */
.aig-root :is(.aig-primary-button, .aig-secondary-button, .aig-danger-button),
.aig-root .aig-body :is(.aig-primary-button, .aig-secondary-button, .aig-danger-button) {
    min-height: 30px; margin-top: 0; padding: 5px 12px; gap: 6px; border-radius: 6px;
    font: 500 12px/18px 'Ubuntu', sans-serif !important; letter-spacing: 0; white-space: nowrap;
}
.aig-root :is(.aig-primary-button, .aig-secondary-button, .aig-danger-button) > svg,
.aig-root .aig-body :is(.aig-primary-button, .aig-secondary-button, .aig-danger-button) > svg { flex: none; width: 15px; height: 15px; }
.aig-root .aig-body .aig-danger-button { border: 0; background: transparent; color: #a33232; }
.aig-root .aig-body .aig-danger-button:hover:not(:disabled) { background: #fdeeee; }
.aig-root .aig-body :is(.aig-primary-button, .aig-secondary-button, .aig-danger-button):disabled { cursor: not-allowed; opacity: .5; }
.aig-root .aig-body .aig-icon-action { flex: none; width: 28px; height: 28px; border-radius: 6px; color: #5b6478; }
.aig-root .aig-body .aig-icon-action:hover:not(:disabled) { background: #e2e6f3; color: #2e1956; color: var(--text-dark, #2e1956); }
.aig-root .aig-body .aig-icon-action.aig-icon-button--danger { color: #a33232; }
.aig-root .aig-body .aig-icon-action.aig-icon-button--danger:hover:not(:disabled) { background: #fdeeee; color: #8a2424; }
.aig-root .aig-body .aig-icon-action:disabled { cursor: not-allowed; opacity: .4; }
.aig-root .aig-body .aig-icon-action:focus-visible { outline: 2px solid #5d2e8c; outline-offset: 1px; }
/* Ações em fila na linha ficam juntas, sem o espaço de botão grande. */
.aig-root .aig-body .aig-policy-actions:has(> .aig-icon-action) { gap: 2px; }

@media (max-width: 1100px) {
    .aig-view, .aig-root--fit .aig-models > .aig-model-lists { flex-direction: column; flex: none; }
    .aig-root .aig-col > * { flex: none; max-height: 70vh; }
    .aig-model-block { flex: none; height: 420px; }
}

/* Regras de budget em lista: escopo e alvo, métrica e período, uso contra o limite e as ações, sem rolagem lateral. */
.aig-budget-search {
    width: 100%;
    height: 34px;
    margin-bottom: 8px;
    padding: 0 10px;
    border: 1px solid #d5dbe5;
    border-radius: 6px;
    font-size: 12px;
}

.aig-budget-list {
    flex: 1 1;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.aig-budget-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, 220px) auto;
    align-items: center;
    grid-gap: 12px;
    gap: 12px;
    padding: 8px 4px;
    border-bottom: 1px solid var(--aig-line);
}

.aig-budget-row-main {
    display: grid;
    grid-gap: 2px;
    gap: 2px;
    min-width: 0;
}

.aig-budget-row-title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.aig-budget-row-title strong {
    overflow: hidden;
    color: var(--aig-ink);
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aig-budget-row-usage {
    display: grid;
    grid-gap: 4px;
    gap: 4px;
    color: #435168;
    font-size: 12px;
}

.aig-budget-row-usage strong {
    color: var(--aig-ink);
    font-weight: 600;
}

.aig-budget-row-usage progress {
    width: 100%;
    height: 6px;
    accent-color: #1f9d55;
}

.aig-budget-row-usage progress.aig-budget-progress--warn { accent-color: #d97706; }
.aig-budget-row-usage progress.aig-budget-progress--high { accent-color: #d64545; }

@media (max-width: 767px) {
    .aig-budget-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .aig-budget-row-usage {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

/* Contagem à esquerda; ajuda e nova regra juntas à direita, como nas outras barras da tela. */
.aig-budget-toolbar { justify-content: flex-start; gap: 4px; }
.aig-budget-toolbar > span:first-child { margin-right: auto; }

/* Busca na mesma linha da contagem, da ajuda e do novo: uma barra só em cima da lista. */
.aig-budget-toolbar .aig-budget-search {
    flex: 0 1 280px;
    width: auto;
    margin: 0 4px 0 0;
}

/* Budgets sem rolagem: linha de altura fixa (é ela que diz quantas cabem), a lista ocupa o que sobra do cartão e o resto
   vai para a próxima página. */
.aig-root .aig-section--fill > .aig-budget-list {
    flex: 1 1;
    min-height: 0;
    overflow: hidden;
}

.aig-budget-row {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(190px, 260px) auto;
    height: 46px;
    padding: 0 4px;
    box-sizing: border-box;
}

.aig-budget-row-meta {
    overflow: hidden;
    color: #5b6b85;
    color: var(--aig-muted, #5b6b85);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aig-fit-pager {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    padding-top: 6px;
    color: #5b6b85;
    font-size: 12px;
}

.aig-fit-pager > span {
    margin-right: 6px;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

@media (max-width: 1023px) {
    .aig-budget-row {
        grid-template-columns: minmax(0, 1fr) minmax(160px, 220px) auto;
    }

    .aig-budget-row-meta {
        display: none;
    }
}

/*
 * Ações da tela na linha das abas: a tela que ocupa a aba não tem título de página, o nome já está na aba. A linha é flex e o
 * lugar das ações não é posicionado: a ajuda leva junto o painel lateral, que é absolute e se prende ao ancestral posicionado.
 */
.aig-tabs-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.aig-tabs-row > .aig-tabs { flex: 1 1 auto; }
.aig-page-actions-slot { flex: none; display: flex; align-items: center; }
.aig-page-actions { display: flex; align-items: center; gap: 4px; }
/* Painel sozinho, fora do Gateway inteiro: as ações no topo do cartão, à direita, sem linha de título. */
.aig-section > .aig-page-actions { justify-content: flex-end; }

/* Budgets: o cartão é a tela inteira da aba, sem botão de foco (expandir não mudava nada e cobria o Nova regra). */
.aig-view--cost > .aig-col > .aig-section--rules { flex: 1 1 auto; min-height: 0; margin: 0; }

/* Telas de vínculo de consumidor (WP-35), políticas de prompt (WP-39) e resiliência (WP-36). */
.aig-policy-section .aig-section-heading { align-items: flex-start; }
.aig-policy-section .aig-section-title { align-items: flex-start; }
.aig-policy-subtitle { margin: 5px 0 0; color: var(--aig-muted); font-size: 12px; line-height: 1.45; }
.aig-policy-actions { display: flex; align-items: center; gap: 8px; }
.aig-policy-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0; flex-wrap: wrap; }
.aig-policy-list { display: grid; grid-gap: 10px; gap: 10px; }
.aig-policy-card { display: grid; grid-gap: 8px; gap: 8px; padding: 12px 14px; border: 1px solid #dfe6ee; border-radius: 6px; background: #fff; }
.aig-policy-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.aig-policy-card-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.aig-policy-card-title strong { font-size: 14px; color: #1f2f44; }
.aig-policy-badge { padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; color: #4b5b70; background: #eef2f7; }
.aig-policy-badge--active { color: #1d6b3a; background: #e3f4e9; }
.aig-policy-badge--warning { color: #8a5a00; background: #fff3d6; }
.aig-policy-badge--danger { color: #983232; background: #ffeaea; }
.aig-policy-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.aig-policy-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 8px; border-radius: 12px; background: #e8f0fb; color: #23497a; font-size: 12px; }
.aig-policy-chip button { display: inline-flex; border: 0; background: transparent; color: inherit; cursor: pointer; padding: 2px; }
.aig-policy-chip--static { padding-right: 8px; }
/* minmax(0) e min-width 0: fieldset e item de grid nao encolhem abaixo do conteudo por padrao, e no celular o form passava da tela. */
.aig-policy-form { display: grid; grid-template-columns: minmax(0, 1fr); grid-gap: 14px; gap: 14px; }
.aig-policy-form fieldset { display: grid; grid-template-columns: minmax(0, 1fr); grid-gap: 10px; gap: 10px; min-width: 0; margin: 0; padding: 12px; border: 1px solid #dfe6ee; border-radius: 6px; }
.aig-policy-form legend { padding: 0 4px; font-size: 12px; font-weight: 700; color: #34506e; }
.aig-policy-form label { display: grid; grid-gap: 5px; gap: 5px; font-size: 12px; color: #435168; font-weight: 600; }
.aig-policy-form small, .aig-policy-hint { color: var(--aig-muted); font-size: 11px; font-weight: 400; line-height: 1.4; }
.aig-policy-form input:not([type="checkbox"]), .aig-policy-form select, .aig-policy-form textarea {
    width: 100%; min-width: 0; padding: 6px 10px; border: 1px solid #c7d2ca; border-radius: 4px;
    font: 12px Ubuntu, sans-serif; background: #fff; color: #27332e; box-sizing: border-box;
}
.aig-policy-form input:not([type="checkbox"]), .aig-policy-form select { height: 34px; }
.aig-policy-form textarea { font-family: Consolas, 'Courier New', monospace; resize: vertical; }
.aig-policy-form .aig-policy-check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.aig-policy-form .aig-policy-check input { width: 16px; height: 16px; }
.aig-policy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 10px; gap: 10px; }
/* Coluna com dica embaixo nao empurra o campo da coluna ao lado: o rotulo esticado nao estica as linhas dele. */
.aig-policy-grid > label { align-content: start; }
.aig-policy-inline { display: flex; align-items: flex-end; gap: 8px; }
.aig-policy-inline > label { flex: 1 1; }
/* Mensagem da lista: um cartão leve por item (a lista se repete), papel com largura de escolha e a lixeira na linha do campo. */
.aig-policy-message { display: grid; grid-gap: 10px; gap: 10px; padding: 10px 12px; border: 1px solid #e2e6f3; border-radius: 4px; background: #fff; }
.aig-policy-message-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.aig-policy-message-header > label { flex: 0 1 220px; }
.aig-policy-variable { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto minmax(0, 1fr) auto; grid-gap: 6px; gap: 6px; align-items: end; }
.aig-policy-preview { max-height: 260px; overflow: auto; padding: 10px; border-radius: 4px; background: #f4f7fb; font: 12px Consolas, 'Courier New', monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.aig-policy-help-body p { font-size: 13px !important; line-height: 1.5; }
.aig-policy-help-body ul { margin: 0 0 12px; padding-left: 18px; font-size: 13px; line-height: 1.5; }
.aig-policy-section .aig-grid { height: 240px; margin-top: 12px; }
label.aig-secondary-button { cursor: pointer; }
.aig-form-grid select { width: 100%; min-width: 0; height: 36px; padding: 6px 10px; border: 1px solid #c7d2ca; border-radius: 4px; font: 12px Ubuntu, sans-serif; background: #fff; }
.aig-form-grid .aig-budget-aggregate { display: flex; align-items: center; gap: 8px; }
.aig-form-grid .aig-budget-aggregate input { width: 16px; height: 16px; }
.aig-policy-card details summary { cursor: pointer; font-size: 12px; font-weight: 600; color: #34506e; }
.aig-policy-version details { flex-basis: 100%; }
.aig-policy-versions { display: grid; grid-gap: 6px; gap: 6px; }
.aig-policy-version { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 6px 8px; border-radius: 4px; background: #f8fafc; font-size: 12px; }
/* Corrente de reserva: o principal e as reservas na ordem em que o Gateway tenta, com subir e descer em cada uma. */
.aig-fallback-chain { display: grid; grid-template-columns: minmax(0, 1fr); grid-gap: 4px; gap: 4px; margin: 6px 0 0; padding: 0; list-style: none; font-size: 12px; }
.aig-fallback-chain > li { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 30px; padding: 2px 4px 2px 8px; border-radius: 6px; background: #f5f6fb; overflow-wrap: anywhere; }
.aig-fallback-chain-step { flex: none; min-width: 72px; color: #5b6478; font-weight: 500; }
.aig-fallback-chain-name { flex: 1 1; min-width: 0; }
.aig-fallback-chain-main { color: #2e1956; color: var(--text-default, #2e1956); }
/* Nomes publicos reserva: o cliente pode ter dezenas; colunas e altura fixa, com rolagem so dentro da lista. */
.aig-fallback-aliases { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); grid-gap: 2px 12px; gap: 2px 12px; max-height: 132px; overflow-y: auto; margin: 4px 0 0; }
.aig-fallback-aliases > .aig-policy-check { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) {
    .aig-policy-grid { grid-template-columns: minmax(0, 1fr); }
    .aig-policy-variable { grid-template-columns: minmax(0, 1fr); }
}

/* WP-38 fase 2: risco do cache semântico; mais forte que o aviso comum, de propósito. */
.aig-cache-risk { padding: 11px 13px; border: 1px solid var(--aig-red); border-left-width: 5px; border-radius: 4px; background: #fff3f3; color: var(--aig-red); font-size: 13px; font-weight: 600; line-height: 1.45; }
.aig-cache-confirm { display: grid; grid-gap: 8px; gap: 8px; padding: 12px; border: 1px solid var(--aig-amber); border-radius: 4px; background: #fff8e9; color: #5c4210; font-size: 12px; line-height: 1.45; }
.aig-cache-confirm p { margin: 0; }

/* Leitura de acertos do cache. */
.aig-cache-usage { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); grid-gap: 12px; gap: 12px; margin: 0; }
.aig-cache-usage dt { font-size: 12px; font-weight: 600; color: #34506e; }
.aig-cache-usage dd { margin: 2px 0 0; font-size: 22px; line-height: 28px; font-weight: 600; }
.aig-cache-usage small { display: block; margin-top: 2px; color: var(--aig-muted); font-size: 11px; }
.aig-cache-usage-levels { display: grid; grid-gap: 2px; gap: 2px; margin: 0; padding-left: 18px; font-size: 12px; color: #435168; }

/* A2A: o interruptor é a resposta a incidente e precisa ser visto antes de qualquer outro controle. */
.aig-a2a { display: grid; grid-gap: 12px; gap: 12px; min-width: 0; }
.aig-a2a-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid; border-left-width: 6px; border-radius: 4px; flex-wrap: wrap; }
.aig-a2a-switch > div { display: grid; grid-gap: 2px; gap: 2px; flex: 1 1 240px; min-width: 0; }
.aig-a2a-switch strong { font-size: 15px; }
.aig-a2a-switch span { font-size: 12px; line-height: 1.4; }
.aig-a2a-switch--on { border-color: #1d6b3a; background: #e3f4e9; color: #1d6b3a; }
.aig-a2a-switch--off { border-color: #8a5a00; background: #fff3d6; color: #5c4210; }
.aig-a2a-alert { display: grid; grid-gap: 6px; gap: 6px; }
.aig-a2a-alert strong { display: flex; align-items: center; gap: 6px; }
.aig-a2a-alert ul { margin: 0; padding-left: 18px; font-weight: 400; overflow-wrap: anywhere; }
.aig-a2a-actions { flex-wrap: wrap; }

/* WP-53: rotas fechadas e mapeamentos do SSO. */
.aig-closed-routes { display: grid; grid-gap: 4px; gap: 4px; margin-top: 12px; font-size: 12px; }
.aig-closed-routes ul { margin: 0; padding-left: 18px; overflow-wrap: anywhere; }
.aig-sso-mapping { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) minmax(0, 1.2fr) minmax(0, 0.8fr) auto; grid-gap: 8px; gap: 8px; align-items: center; }
@media (max-width: 760px) { .aig-sso-mapping { grid-template-columns: minmax(0, 1fr); } }
/* No painel lateral, cinco campos numa linha cortavam o papel: duas linhas (claim e escopo, alvo e papel) e a lixeira ao lado. */
.aig-side-panel .aig-sso-mapping { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; padding: 10px 12px; border: 1px solid #e2e6f3; border-radius: 4px; background: #fff; }
.aig-side-panel .aig-sso-mapping > :nth-child(3) { grid-column: 1; grid-row: 2; }
.aig-side-panel .aig-sso-mapping > :nth-child(4) { grid-column: 2; grid-row: 2; }
.aig-side-panel .aig-sso-mapping > :nth-child(5) { grid-column: 3; grid-row: 1 / span 2; }

/* WP-52: filas, saúde de MCP e descoberta de modelos. */
.aig-health-table { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 12px; }
.aig-health-table th, .aig-health-table td { padding: 6px 8px; border-bottom: 1px solid #dfe6ee; text-align: left; }
.aig-health-row--alert td { color: var(--aig-red); font-weight: 600; }
.aig-mcp-health { display: grid; grid-gap: 4px; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 12px; }
.aig-discovery { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

/* Testar modelo: a conversa rola sozinha, e os números ficam colados na resposta que mediram. */
.aig-playground-conversation { display: grid; grid-gap: 12px; gap: 12px; max-height: 480px; overflow-y: auto; margin: 12px 0; padding: 12px; border: 1px solid #dfe6ee; border-radius: 8px; }
.aig-playground-turn { display: grid; grid-gap: 6px; gap: 6px; min-width: 0; }
.aig-playground-prompt { justify-self: end; max-width: 80%; margin: 0; padding: 8px 12px; border-radius: 8px; background: #eaf1fb; white-space: pre-wrap; overflow-wrap: anywhere; }
.aig-playground-answer { max-width: 90%; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.aig-playground-metrics { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; list-style: none; font-size: 12px; color: var(--aig-muted); }
.aig-playground-guardrail { font-weight: 600; color: #983232; }
.aig-playground-links { justify-content: flex-start; gap: 16px; font-size: 12px; }
.aig-section-heading > .aig-playground-links { flex-wrap: wrap; justify-content: flex-end; gap: 4px 14px; margin: 0; }
.aig-playground-setup { gap: 6px; }
.aig-playground-setup .aig-advanced { margin: 0; }
.aig-playground-conversation > .aig-playground-snippet { margin: 0; }
/* Campo de mensagem dos chats do Portal: caixa arredondada, o texto cresce ate umas cinco linhas e o enviar fica dentro. */
.aig-playground-composer { gap: 6px; }
.aig-playground-input { display: flex; align-items: flex-end; gap: 8px; padding: 5px 5px 5px 12px; border: 1px solid #dfe6ee; border-radius: 8px; background: #fff; }
.aig-playground-input:focus-within { border-color: #7a30d0; box-shadow: 0 0 0 1px #7a30d0; }
.aig-policy-form .aig-playground-input textarea { flex: 1 1; min-width: 0; height: 32px; max-height: 132px; padding: 5px 0; border: 0; border-radius: 0; outline: 0; box-shadow: none; resize: none; background: transparent; font: 400 14px/22px Ubuntu, sans-serif; overflow-y: auto; }
.aig-playground-send { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 6px; background: #7a30d0; color: #fff; cursor: pointer; }
.aig-playground-send:disabled { background: #c9cede; cursor: default; }
.aig-playground-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; font-size: 12px; }
.aig-playground-tools > .aig-link-button { display: inline-flex; align-items: center; gap: 4px; }
.aig-playground-tools > .aig-advanced { margin: 0; padding: 2px 8px; }
.aig-playground-tools > .aig-advanced > summary { min-height: 20px; font-size: 12px !important; }
/* Opcoes abertas viram uma linha inteira, com rolagem propria, para nao empurrar a conversa para fora. */
.aig-playground-tools > .aig-advanced[open] { flex-basis: 100%; order: 1; max-height: 38vh; overflow-y: auto; padding: 6px 10px; }
.aig-playground-hint { margin-left: auto; }
@media (max-width: 600px) {
    .aig-section-heading:has(> .aig-playground-links) { flex-wrap: wrap; }
    .aig-section-heading > .aig-playground-links { flex-basis: 100%; justify-content: flex-start; }
    /* No toque nao ha Shift + Enter: o botao de enviar e o caminho. */
    .aig-playground-hint { display: none; }
}
.aig-block-title { display: block; margin-top: 12px; }
.aig-policy-badge--inline { display: inline-block; margin-bottom: 8px; }
.aig-link-button { padding: 0; border: 0; background: none; color: #1a5fb4; text-decoration: underline; cursor: pointer; font: inherit; }
.aig-getting-started ol { display: grid; grid-gap: 10px; gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }
.aig-getting-started li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; grid-gap: 12px; gap: 12px; }
.aig-getting-started li > div { display: grid; grid-gap: 2px; gap: 2px; min-width: 0; }

.aig-policy-list { margin: 8px 0 0; padding: 0; list-style: none; display: grid; grid-gap: 6px; gap: 6px; }
.aig-policy-list li { padding: 8px 10px; border: 1px solid var(--aig-line); border-radius: 6px; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.aig-policy-list small { color: var(--aig-muted); }

/* Revisão de UX. */
.aig-guard-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 16px; gap: 16px; align-items: start; }
.aig-guard-columns > .aig-policy-form { margin: 0; }
@media (max-width: 1100px) { .aig-guard-columns { grid-template-columns: minmax(0, 1fr); } }
.aig-link-button { min-height: 24px; }
.aig-channel-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.aig-policy-form > * { min-width: 0; }
.aig-route-filter { display: inline-flex; align-items: center; gap: 6px; }
.aig-route-filter input { min-height: 30px; padding: 4px 8px; border: 1px solid #dce3ec; border: 1px solid var(--aig-line, #dce3ec); border-radius: 5px; font: inherit; }
.aig-policy-section h3 { margin: 16px 0 6px; }
.aig-policy-section .aig-policy-toolbar h3 { margin: 0; }

.aig-provider-guidance { display: grid; grid-gap: 6px; gap: 6px; padding: 10px 12px; border-left: 3px solid #5f4bb6; background: #f5f3fb; }
.aig-provider-guidance p { margin: 0; font-size: 12px !important; line-height: 1.45; overflow-wrap: anywhere; }
.aig-verdict { display: grid; grid-gap: 4px; gap: 4px; padding: 10px 12px; border-left: 3px solid; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.aig-verdict--good { border-color: #2f783a; background: #f1f8f2; }
.aig-verdict--warn { border-color: #9a6100; background: #fdf6e7; }
.aig-verdict--bad { border-color: #b23a3a; background: #fdf0f0; }
.aig-snippets { display: grid; grid-gap: 8px; gap: 8px; min-width: 0; }
.aig-snippet-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid #dfe6ee; }
.aig-snippet-tabs button { min-height: 32px; padding: 6px 12px; border: 0; border-bottom: 2px solid transparent; background: none; color: #46515f; font: 12px Ubuntu, sans-serif; cursor: pointer; }
.aig-snippet-tabs button.is-active { border-bottom-color: #5f4bb6; color: #27332e; font-weight: 700; }
.aig-snippet-code { display: grid; grid-gap: 8px; gap: 8px; min-width: 0; }
.aig-snippet-code pre { min-width: 0; margin: 0; overflow-x: auto; padding: 10px; background: #f4f6fa; font-size: 12px !important; white-space: pre; }
.aig-snippet-code button { justify-self: start; }
.aig-playground-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 12px; gap: 12px; min-width: 0; }
.aig-playground-side { display: grid; align-content: start; grid-gap: 6px; gap: 6px; min-width: 0; padding: 8px 10px; border: 1px solid #dfe6ee; border-radius: 6px; }
.aig-playground-side > strong { font-size: 12px; overflow-wrap: anywhere; }
.aig-playground-reserve { font-weight: 600; color: #7a4d00; }
@media (max-width: 720px) { .aig-playground-pair { grid-template-columns: minmax(0, 1fr); } }
.aig-capabilities { overflow-x: auto; }
.aig-capabilities table { width: 100%; border-collapse: collapse; font-size: 12px; }
.aig-capabilities th, .aig-capabilities td { padding: 6px 10px; border-bottom: 1px solid #dfe6ee; text-align: left; vertical-align: top; font-weight: 400; }
.aig-capabilities thead th { font-weight: 700; }

/* Roteamento (os combos do 9router): um cartao por nome publico, com a lista em ordem, o modo e as acoes. */
.aig-routes-search { width: min(100%, 320px); height: 34px; margin: 0 0 10px; padding: 0 10px; border: 1px solid #dfe6ee; border-radius: 6px; font-size: 13px; }
.aig-route-list { display: grid; grid-gap: 8px; gap: 8px; }
.aig-route-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; min-width: 0; padding: 10px 12px; border: 1px solid #dfe6ee; border-radius: 8px; background: #fff; }
.aig-route-card--off { background: #f7f8fb; }
.aig-route-card-main { display: grid; flex: 1 1 420px; grid-gap: 6px; gap: 6px; min-width: 0; }
.aig-route-card-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.aig-route-card-title > code { font-size: 14px; font-weight: 600; color: #2e1956; overflow-wrap: anywhere; }
.aig-route-chain { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0; padding: 0; list-style: none; font-size: 12px; }
.aig-route-chain > li { display: inline-flex; align-items: center; gap: 4px; min-width: 0; padding: 2px 8px 2px 2px; border-radius: 12px; background: #f1f3f9; overflow-wrap: anywhere; }
.aig-route-chain > li + li::before { content: '→'; margin: 0 2px 0 -2px; color: #8a90a2; }
.aig-route-chain-alias { background: #f4ecfd !important; }
.aig-route-step { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; color: #464c5e; font-size: 11px; font-weight: 600; }
.aig-route-chain small { color: #5b6478; }
.aig-route-summary { margin: 0; }
.aig-route-card-actions { display: flex; flex: none; align-items: center; gap: 4px; }
.aig-route-card-actions > select { height: 32px; min-width: 170px; padding: 0 8px; border: 1px solid #dfe6ee; border-radius: 6px; background: #fff; font-size: 12px; }
.aig-route-modes { display: grid; grid-gap: 6px; gap: 6px; }
.aig-policy-form .aig-route-mode { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border: 1px solid #dfe6ee; border-radius: 6px; font-weight: 400; cursor: pointer; }
.aig-policy-form .aig-route-mode > input[type="radio"] { flex: none; width: 16px; min-width: 16px; max-width: 16px; height: 16px; margin: 2px 0 0; padding: 0; box-shadow: none; }
.aig-route-mode > span { display: grid; flex: 1 1; grid-gap: 2px; gap: 2px; min-width: 0; justify-items: start; text-align: left; }
.aig-route-mode--active { border-color: #7a30d0 !important; box-shadow: 0 0 0 1px #7a30d0; }
@media (max-width: 600px) {
    .aig-route-card-actions { width: 100%; }
    .aig-route-card-actions > select { flex: 1 1; min-width: 0; }
}
/* Templates e vinculos por quem chama, na tela de roteamento. */
.aig-routes-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 10px; }
.aig-routes-toolbar > .aig-routes-search { margin: 0; }
.aig-route-bindings { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0; padding: 0; list-style: none; font-size: 12px; }
.aig-route-bindings > li { display: inline-flex; align-items: center; gap: 4px; padding: 0 2px 0 8px; border: 1px dashed #c9b3ec; border-radius: 12px; background: #fbf8ff; overflow-wrap: anywhere; }

/* Rótulo em linha com o campo (Período dos acertos, Limpar cache de): mesmo tamanho e campo dos formulários. */
label.aig-policy-inline {
    align-items: center;
    color: #435168;
    font-size: 12px;
    font-weight: 600;
}

label.aig-policy-inline select {
    height: 34px;
    padding: 0 8px;
    border: 1px solid #d5dbe5;
    border-radius: 6px;
    background: #fff;
    color: #273248;
    color: var(--aig-ink, #273248);
    font-size: 12px;
    font-weight: 400;
}

/* Aviso que não é erro (o que muda ao ligar algo): âmbar, não vermelho. */
.aig-heads-up {
    padding: 8px 12px;
    border-left: 3px solid #d97706;
    border-radius: 0 6px 6px 0;
    background: #fff8ec;
    color: #6b3d00;
    font-size: 12px;
}

.aig-heads-up summary {
    cursor: pointer;
    font-weight: 600;
}

.aig-heads-up ul {
    margin: 6px 0 4px;
    padding-left: 18px;
}

/* Guarda de custo em tela própria: três quadros de estado em cima; avisos enviados e conta do fornecedor embaixo, ocupando o
   resto da altura. Nada rola: a lista de avisos mostra o que cabe e pagina. */
.aig-view--guard > .aig-guard-screen {
    display: flex;
    flex: 1 1;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    min-height: 0;
}

.aig-guard-tiles {
    display: grid;
    flex: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-gap: 12px;
    gap: 12px;
}

.aig-guard-tile {
    display: grid;
    align-content: start;
    grid-gap: 4px;
    gap: 4px;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid #e4e8ef;
    border: 1px solid var(--aig-line, #e4e8ef);
    border-top: 3px solid #c9d1dd;
    border-radius: 8px;
    background: #fff;
}

.aig-guard-tile--on {
    border-top-color: #1f9d55;
}

.aig-guard-tile header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #5b6b85;
}

.aig-guard-tile header h3 {
    flex: 1 1;
    margin: 0;
    color: #435168;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.aig-guard-tile-state {
    color: #273248;
    color: var(--aig-ink, #273248);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.aig-guard-tile .aig-row-meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aig-guard-tile-warning {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #9a5b00;
    font-size: 12px;
    font-weight: 600;
}

.aig-guard-tile-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.aig-guard-flag {
    padding: 1px 8px;
    border-radius: 10px;
    background: #f1f3f7;
    color: #5b6b85;
    font-size: 11px;
    font-weight: 600;
}

.aig-guard-flag--on {
    background: #e6f6ec;
    color: #136c3a;
}

/* Avisos enviados sozinho embaixo, preso à altura que sobra: a linha da grade nunca cresce além da tela. */
.aig-guard-main {
    display: grid;
    flex: 1 1;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    grid-gap: 12px;
    gap: 12px;
    min-height: 0;
}

.aig-root .aig-guard-main > .aig-section {
    min-height: 0;
    margin: 0 !important;
}

.aig-guard-sent .aig-subtabs {
    flex: none;
    align-self: flex-start;
    margin: 0 0 6px;
}

.aig-root .aig-section--fill > .aig-guard-alert-list {
    flex: 1 1;
    min-height: 0;
    overflow: hidden;
}

.aig-guard-alert-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.aig-guard-alert-list li {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    align-items: center;
    grid-gap: 10px;
    gap: 10px;
    height: 46px;
    padding: 0 2px;
    border-bottom: 1px solid #e4e8ef;
    border-bottom: 1px solid var(--aig-line, #e4e8ef);
    box-sizing: border-box;
    font-size: 12px;
}

.aig-guard-alert-list li > div {
    display: grid;
    grid-gap: 1px;
    gap: 1px;
    min-width: 0;
}

.aig-guard-alert-list li > div > span {
    overflow: hidden;
    color: #273248;
    color: var(--aig-ink, #273248);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aig-guard-alert-list li small {
    color: #5b6b85;
    font-size: 11px;
}

.aig-alert-badge {
    justify-self: start;
    overflow: hidden;
    max-width: 70px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aig-alert-badge--info { background: #eef3fb; color: #2e5aa8; }
.aig-alert-badge--warn { background: #fff4e5; color: #9a5b00; }
.aig-alert-badge--high { background: #fdecec; color: #b42318; }

/* No painel lateral o título já está no cabeçalho do painel: fica só a frase e as ações. */
.aig-section-heading--embedded {
    align-items: flex-start;
}

@media (max-width: 1023px) {
    .aig-guard-tiles,
    .aig-guard-main {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Conteúdo embutido no painel lateral: sem caixa dentro do painel e com subtítulo no tamanho do formulário. */
.aig-side-panel [data-testid="ai-gateway-transparency-panel"] {
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
}

.aig-side-panel [data-testid="ai-gateway-provider-channels"] h3 {
    margin: 16px 0 6px;
    color: #435168;
    font-size: 12px;
    font-weight: 600;
}

/* Quadros e cartões da guarda sem borda, como os outros cartões da tela; ligado ou desligado vira o ponto ao lado do título. */
.aig-guard-tile,
.aig-guard-tile--on {
    border: 0;
    border-radius: 6px;
}

.aig-guard-tile header h3::after {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-left: 8px;
    border-radius: 50%;
    background: #c9d1dd;
    vertical-align: middle;
}

.aig-guard-tile--on header h3::after {
    background: #1f9d55;
}

.aig-root .aig-guard-main > .aig-section {
    border: 0;
}

/* Foco dos cartões na guarda: o cartão em foco ocupa a aba (somem os quadros e o outro cartão), como o foco das colunas. */
.aig-guard-main > .aig-slot {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

.aig-guard-screen:has(.aig-slot--focused) > .aig-guard-tiles {
    display: none;
}

.aig-guard-main:has(.aig-slot--focused) {
    grid-template-columns: minmax(0, 1fr);
}

.aig-guard-main:has(.aig-slot--focused) > .aig-slot:not(.aig-slot--focused) {
    display: none;
}

.aig-root .aig-guard-main .aig-section {
    border: 0;
}

/* Linha do aviso é botão: abre o detalhe no painel lateral. */
.aig-guard-alert-list li {
    display: block;
    padding: 0;
}

.aig-guard-alert-row {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    align-items: center;
    grid-gap: 10px;
    gap: 10px;
    width: 100%;
    height: 100%;
    padding: 0 6px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.aig-guard-alert-row:hover,
.aig-guard-alert-row[aria-pressed="true"] {
    background: #f2f5fa;
}

.aig-guard-alert-row:focus-visible {
    outline: 2px solid #1769aa;
    outline: 2px solid var(--aig-blue, #1769aa);
    outline-offset: -2px;
}

.aig-guard-alert-row > div {
    display: grid;
    grid-gap: 1px;
    gap: 1px;
    min-width: 0;
}

.aig-guard-alert-row > div > span {
    overflow: hidden;
    color: #273248;
    color: var(--aig-ink, #273248);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aig-guard-alert-row small {
    color: #5b6b85;
    font-size: 11px;
}

/* Detalhe do aviso no painel lateral: selo e assunto, o que quer dizer, os números e os atalhos. */
.aig-alert-detail {
    display: grid;
    grid-gap: 12px;
    gap: 12px;
}

.aig-alert-detail-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.aig-alert-detail-head strong {
    color: #273248;
    color: var(--aig-ink, #273248);
    font-size: 15px;
    font-weight: 600;
}

.aig-alert-detail > .aig-row-meta {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
}

.aig-alert-detail-facts {
    display: grid;
    margin: 0;
    border-top: 1px solid #e4e8ef;
    border-top: 1px solid var(--aig-line, #e4e8ef);
}

.aig-alert-detail-facts > div {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    grid-gap: 12px;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #e4e8ef;
    border-bottom: 1px solid var(--aig-line, #e4e8ef);
    font-size: 12px;
}

.aig-alert-detail-facts dt {
    color: #5b6b85;
}

.aig-alert-detail-facts dd {
    margin: 0;
    color: #273248;
    color: var(--aig-ink, #273248);
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* Projeto com gasto e sem corte no fornecedor: ponto vermelho no quadro da conta. */
.aig-guard-tile--alert header h3::after {
    background: #d64545;
}

.aig-guard-tile-warning svg {
    flex: none;
}

/* Painel da conta do fornecedor: explicação, leitura e avisos, e a tabela de projetos com o conferir de novo. */
.aig-provider-panel {
    display: grid;
    grid-gap: 12px;
    gap: 12px;
}

.aig-provider-panel > .aig-row-meta {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
}

.aig-provider-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.aig-provider-panel-heading h3 {
    margin: 0;
    color: #435168;
    font-size: 12px;
    font-weight: 600;
}

@media (min-width: 1024px) and (max-width: 1279px) {
    .aig-guard-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Com quatro quadros, o detalhe quebra em até duas linhas em vez de cortar no meio. */
.aig-guard-tile .aig-row-meta {
    display: -webkit-box;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* Avisos antes do limite: as três caixas que valem na hora ficam juntas, uma embaixo da outra. */
.aig-guard-switches { display: grid; grid-gap: 10px; gap: 10px; }

/* Login único na tela: o estado e o emissor; o formulário abre no painel lateral. */
.aig-sso-summary { display: grid; grid-gap: 10px; gap: 10px; justify-items: start; }
.aig-sso-summary > dl { justify-self: stretch; }

/* Reserva e saúde na tela: o nome público e o resumo da política; o formulário abre no painel lateral. */
.aig-resilience-summary { display: grid; grid-gap: 10px; gap: 10px; }
.aig-resilience-summary-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.aig-resilience-pick > label { display: grid; grid-gap: 6px; gap: 6px; max-width: 420px; color: #2e1956; color: var(--text-default, #2e1956); font: 400 12px 'Ubuntu', sans-serif; }
.aig-resilience-pick > label > select { height: 28px; min-height: 28px; padding: 0 10px; border: 1px solid #ddd; border-radius: 4px; background: #fff; color: #2e1956; color: var(--text-default, #2e1956); font: 400 14px 'Ubuntu', sans-serif; }

/* Servidor MCP no painel lateral: o nome já está no cabeçalho do painel; o detalhe sem moldura de cartão. */
.aig-mcp-detail-modal [data-testid="ai-gateway-mcp-detail"] { padding: 0; border: 0; background: transparent; box-shadow: none; }
.aig-mcp-detail-modal [data-testid="ai-gateway-mcp-detail"] > .aig-policy-card-header > strong { display: none; }

.ai-spend-consumption-status {
    padding: 12px 16px;
    color: var(--text-default);
}

.ai-spend-dashboard-cost { width: 100%; min-width: 0; }
.ai-spend-dashboard-cost dl { display: grid; grid-gap: 8px; gap: 8px; margin: 0; }
.ai-spend-dashboard-cost dl > div { display: grid; grid-template-columns: minmax(0, 1fr); align-items: baseline; grid-gap: 2px; gap: 2px; min-width: 0; max-width: 100%; }
.ai-spend-dashboard-cost dt { font-size: 14px !important; }
.ai-spend-dashboard-cost dd { margin: 0; font-size: 24px !important; line-height: 30px; text-align: right; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ai-spend-dashboard-cost small { grid-column: 1 / -1; font-size: 12px !important; text-align: right; overflow-wrap: anywhere; }
.ai-spend-dashboard-cost .ai-spend-cost-brl { margin: 4px 0 0; font-size: 12px !important; line-height: 16px; text-align: right; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ai-spend-dashboard-cost .ai-spend-cost-currency { display: none; }
.ai-spend-dashboard-cost .ai-spend-cost-unavailable { font-size: 12px !important; line-height: 18px; }
.ai-spend-consumption .ai-spend-billing-kpi .card-content-body { max-height: none; }

@media (min-width: 1024px) {
    .ai-spend-consumption .ai-spend-kpi .data > div { font-size: 22px !important; }
    .ai-spend-consumption .ai-spend-kpi .icone { width: 28px; min-width: 28px; }
    .ai-spend-consumption .ai-spend-kpi .icone svg { width: 28px; height: 28px; }
    .ai-spend-consumption .ai-spend-kpi .truncate-container { max-width: calc(100% - 36px); }
}

.ai-spend-consumption-status,
.ai-spend-consumption-status > div {
    font-size: 12px !important;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.ai-spend-consumption .ai-spend-kpi .truncate-container {
    min-width: 0;
    max-width: calc(100% - 48px);
    height: auto;
    max-height: none;
    gap: 4px;
}

.ai-spend-consumption .ai-spend-kpi .data {
    flex-shrink: 0;
    height: auto;
    max-height: none;
    line-height: 34px;
}

.ai-spend-consumption .ai-spend-kpi .data > div {
    font-size: 28px !important;
    line-height: 34px;
}

.ai-spend-consumption .ai-spend-kpi .description {
    color: #4d5468 !important;
    color: var(--text-dark, #4d5468) !important;
    font-size: 12px !important;
    line-height: 18px;
    height: auto;
    max-height: none;
    white-space: normal;
    overflow-wrap: anywhere;
}

.ai-spend-consumption .ai-spend-chart .card-content-body {
    min-height: 0;
    max-height: none;
}

@media (max-width: 1023px) {
    .ai-spend-consumption .lcdashboard,
    .ai-spend-consumption .lcdashboard-cards,
    .ai-spend-consumption .lcdashboard-cards-panel,
    .ai-spend-consumption .lcdashboard-cards-panel-body {
        min-height: 0;
        max-height: none;
    }

    .ai-spend-consumption .lcdashboard-cards-panel,
    .ai-spend-consumption .lcdashboard-cards-panel-body {
        grid-template-rows: auto !important;
    }

    .ai-spend-consumption .lcdashboard-cards-panel-body {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-auto-rows: auto;
    }

    .ai-spend-consumption .card-frame {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
        min-width: 0;
    }

    .ai-spend-consumption .ai-spend-kpi {
        height: 144px;
    }

    .ai-spend-consumption .ai-spend-chart {
        height: auto;
        min-height: 376px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .ai-spend-consumption .lcdashboard-cards-panel-body {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .ai-spend-consumption .ai-spend-kpi {
        grid-column: auto !important;
    }
}

.ai-spend-navigation { border: 0; margin: 0; padding: 0; min-width: 0; }
.ai-spend-navigation:disabled .lct-tab { opacity: 0.55; cursor: wait; }
.ai-spend-details { min-width: 0; max-width: 100%; padding: 16px; }
.ai-spend-details h3 { font-size: 16px !important; line-height: 24px; margin: 16px 0 8px; }
.ai-spend-details [role="status"],
.ai-spend-details [role="status"] > span,
.ai-spend-details p { font-size: 12px !important; line-height: 1.5; overflow-wrap: anywhere; }
.ai-spend-grid { background: #fff; background: var(--background-white, #fff); overflow: hidden; }
.ai-spend-details revo-grid .rgCell,
.ai-spend-details revo-grid .rgCell *,
.ai-spend-details revo-grid .rgHeaderCell,
.ai-spend-details revo-grid .rgHeaderCell * { font-size: 12px !important; }
.ai-spend-details revo-grid .rgHeaderCell { letter-spacing: 0; padding: 4px 8px !important; }
.ai-spend-details revo-grid .rgCell {
    box-sizing: border-box;
    padding: 4px 8px !important;
    background: transparent !important;
    border: none !important;
}
.ai-spend-details revo-grid .rgCell > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-spend-filters { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.ai-spend-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; min-width: 0; }
.ai-spend-filters select, .ai-spend-filters input { width: 100%; max-width: 100%; min-height: 32px; box-sizing: border-box; }
.ai-spend-currency-totals { display: flex; flex-wrap: wrap; gap: 16px; padding: 8px 0; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.ai-spend-filter-modal, .ai-spend-filter-modal > .body,
.ai-spend-sync-modal, .ai-spend-sync-modal > .body { max-width: 100vw; box-sizing: border-box; }
.ai-spend-filter-modal fieldset { border: 0; margin: 0; padding: 0; min-width: 0; width: 100%; }
.ai-spend-page-state { padding: 24px; }
.ai-spend-sync-toolbar { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.ai-spend-sync-toolbar label { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ai-spend-sync-toolbar select { min-height: 32px; max-width: 100%; width: 100%; }
.ai-spend-sync-toolbar p { margin: 0; overflow-wrap: anywhere; }

.ai-spend-freshness { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 8px; padding: 6px 10px; color: #4d5468; color: var(--text-dark, #4d5468); font-size: 12px !important; line-height: 1.4; }
.ai-spend-freshness span { font-size: 12px !important; }
.ai-spend-freshness > div { display: grid; grid-gap: 2px; gap: 2px; flex: 1 1 280px; min-width: 0; }
.ai-spend-freshness--error { border-left-color: #a33232; background: #fdf1f1; color: #7c2020; }
.ai-spend-freshness--warning { border-left: 3px solid #a85b00; background: #fff8ec; color: #6b3d00; }
.ai-spend-freshness svg { flex-shrink: 0; }
.ai-spend-empty { display: grid; grid-gap: 8px; gap: 8px; justify-items: start; max-width: 720px; margin: 24px 12px; padding: 20px 24px; background: #fff; background: var(--background-white, #fff); }
.ai-spend-empty h2 { margin: 0; font-size: 16px !important; }
.ai-spend-empty p { margin: 0; font-size: 13px !important; line-height: 1.5; color: #4d5468; color: var(--text-dark, #4d5468); }
.ai-spend-link-button { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: #1a5fb4; text-decoration: underline; cursor: pointer; font: inherit; font-size: 12px !important; }

.ai-spend-consumption .ai-spend-peak-card .card-content-body { max-height: none; }
.ai-spend-peak { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; align-items: center; grid-gap: 16px 24px; gap: 16px 24px; width: 100%; min-width: 0; }
.ai-spend-peak-main { display: grid; grid-gap: 2px; gap: 2px; min-width: 0; }
.ai-spend-peak-main > span { font-size: 12px !important; line-height: 1.4; color: #4d5468; color: var(--text-dark, #4d5468); overflow-wrap: anywhere; }
.ai-spend-peak-main strong { font-size: 28px !important; line-height: 34px; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; color: #172033; color: var(--text-default, #172033); overflow-wrap: anywhere; }
.ai-spend-peak-main .ai-spend-peak-date { display: inline-flex; align-items: center; gap: 6px; font-size: 14px !important; font-weight: 700; color: #172033; color: var(--text-default, #172033); }
.ai-spend-peak--alert .ai-spend-peak-main .ai-spend-peak-date { color: #8a4b00; }
.ai-spend-peak-causes { display: grid; grid-gap: 8px; gap: 8px; margin: 0; min-width: 0; }
.ai-spend-peak-causes dt { font-size: 11px !important; line-height: 1.3; color: #4d5468; color: var(--text-dark, #4d5468); }
.ai-spend-peak-causes dd { margin: 0; font-size: 13px !important; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.ai-spend-peak-causes small { font-size: 11px !important; font-weight: 400; color: #4d5468; color: var(--text-dark, #4d5468); white-space: nowrap; }
.ai-spend-peak-action { white-space: nowrap; }
/* Acao solta na tela e icone, como no AI Gateway; o lc-button do Portal tem largura de botao de texto. */
.ai-spend-icon-button { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #464c5e; cursor: pointer; }
.ai-spend-icon-button:hover { background: #e2e6f3; color: #2e1956; }
.ai-spend-icon-button:disabled { background: transparent; color: #b8bdca; cursor: default; }

@media (max-width: 1279px) {
    .ai-spend-peak { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .ai-spend-peak-action { grid-column: 1 / -1; justify-self: start; }
}

/* Custo do mês à esquerda, previsão e orçamento à direita: o cartão cresce para o lado, e não para baixo. */
.ai-spend-dashboard-cost { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; grid-gap: 16px; gap: 16px; }
.ai-spend-dashboard-cost-total { min-width: 0; }
.ai-spend-outlook,
.ai-spend-outlook-note { min-width: 0; margin: 0; padding-left: 16px; border-left: 1px solid #e2e6f3; }
.ai-spend-outlook { display: grid; grid-gap: 8px; gap: 8px; }
.ai-spend-outlook > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; grid-gap: 4px 8px; gap: 4px 8px; min-width: 0; }
.ai-spend-outlook dt { font-size: 12px !important; line-height: 1.3; color: #4d5468; color: var(--text-dark, #4d5468); overflow-wrap: anywhere; }
.ai-spend-outlook dd { margin: 0; font-size: 14px !important; font-weight: 700; line-height: 1.3; text-align: right; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ai-spend-outlook small { grid-column: 1 / -1; font-size: 11px !important; font-weight: 400; color: #4d5468; color: var(--text-dark, #4d5468); }
.ai-spend-outlook dd small { white-space: normal; }
.ai-spend-outlook-note { font-size: 12px !important; line-height: 1.4; color: #4d5468; color: var(--text-dark, #4d5468); }
.ai-spend-outlook-change { display: inline-flex; align-items: center; gap: 4px; }
.ai-spend-outlook-change--up { color: #a15c00; }
.ai-spend-outlook-change--down { color: #2f783a; }
.ai-spend-budget-bar { position: relative; grid-column: 1 / -1; height: 6px; border-radius: 3px; background: #e2e6f3; }
.ai-spend-budget-bar > span { display: block; height: 100%; border-radius: 3px; background: #5D2E8C; }
.ai-spend-budget-bar > i { position: absolute; top: -3px; width: 2px; height: 12px; margin-left: -1px; background: #2B304F; }
.ai-spend-budget--warning .ai-spend-budget-bar > span { background: #d98a00; }
.ai-spend-budget--over .ai-spend-budget-bar > span { background: #c62828; }
.ai-spend-budget--over dd { color: #c62828; }
.ai-spend-budget--none .ai-spend-icon-button { width: 28px; height: 28px; }
/* Painel do orçamento: os botões do Gateway leem a cor de uma variável que só existe dentro da tela do Gateway. */
.ai-spend-budget-panel { --aig-blue: var(--color-primary-blue, #1769aa); --aig-ink: var(--text-default, #172033); --aig-muted: var(--text-dark, #647084); }
.ai-spend-budget-thresholds { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.ai-spend-budget-error { margin: 0; color: #b42318; font-size: 12px !important; }
.side-modal.aig-side-panel > .body .ai-spend-budget-intro { margin: 0; color: #2e1956; color: var(--text-default, #2e1956); font-size: 13px !important; line-height: 1.5; }

@media (max-width: 1279px) {
    .ai-spend-dashboard-cost { grid-template-columns: minmax(0, 1fr); }
    .ai-spend-outlook,
    .ai-spend-outlook-note { padding: 8px 0 0; border-top: 1px solid #e2e6f3; border-left: 0; }
}

/* Alocação: agrupamento, números do período e exportar numa linha; a tabela ocupa o resto sem rolar a página. */
.ai-spend-allocation { display: grid; grid-gap: 10px; gap: 10px; min-width: 0; width: 100%; }
.ai-spend-allocation-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; min-width: 0; }
.ai-spend-allocation-groups { display: inline-flex; flex: none; border: 1px solid #ddd; border-radius: 4px; overflow: hidden; }
.ai-spend-allocation-groups button { height: 28px; padding: 0 14px; border: 0; border-right: 1px solid #ddd; background: #fff; color: #2e1956; font: 400 13px 'Ubuntu', sans-serif; cursor: pointer; }
.ai-spend-allocation-groups button:last-child { border-right: 0; }
.ai-spend-allocation-groups button:hover { background: #f4f1fa; }
.ai-spend-allocation-groups button.is-active { background: #5D2E8C; color: #fff; }
.ai-spend-allocation-kpis { display: flex; flex: 1 1 auto; flex-wrap: wrap; gap: 4px 24px; margin: 0; min-width: 0; }
.ai-spend-allocation-kpis > div { display: grid; grid-gap: 0; gap: 0; min-width: 0; }
.ai-spend-allocation-kpis dt { font-size: 11px !important; line-height: 1.3; color: #4d5468; color: var(--text-dark, #4d5468); }
.ai-spend-allocation-kpis dd { margin: 0; font-size: 14px !important; font-weight: 700; line-height: 1.3; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ai-spend-allocation-grid { height: min(520px, calc(100vh - 330px)); min-height: 240px; min-width: 0; width: 100%; }
.ai-spend-allocation-note { margin: 0; font-size: 12px !important; line-height: 1.4; color: #4d5468; color: var(--text-dark, #4d5468); }

