.finops-help-modal {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 4px 0;
    font-size: 14px;
    color: #333;
    color: var(--text-default, #333);
}

.finops-help-description {
    background: #E2E6F3;
    background: var(--bg-light-1, #E2E6F3);
    border-radius: 6px;
    padding: 12px 16px;
    font-style: italic;
    color: #444;
    color: var(--text-default, #444);
    line-height: 1.6;
}

.finops-help-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 16px;
    gap: 16px;
}

@media (max-width: 600px) {
    .finops-help-columns {
        grid-template-columns: 1fr;
    }
}

.finops-help-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.finops-help-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #E2E6F3;
    border-bottom: 1px solid var(--bg-light-1, #E2E6F3);
    padding-bottom: 6px;
    margin-bottom: 4px;
}

.finops-help-section-header h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #173192;
    color: var(--primary, #173192);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.finops-help-icon {
    font-size: 15px;
    color: #173192;
    color: var(--primary, #173192);
}

.finops-help-icon-tip {
    color: #F29100;
    color: var(--emphasis, #F29100);
}

.finops-help-list {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.finops-help-list li {
    line-height: 1.5;
    color: #444;
    color: var(--text-default, #444);
    font-size: 13px;
}

.finops-help-list-ordered {
    padding-left: 20px;
}

.finops-help-tips {
    background: #FFF8F0;
    border: 1px solid #F29100;
    border: 1px solid var(--emphasis, #F29100);
    border-radius: 6px;
    padding: 12px 16px;
}

.finops-help-tips .finops-help-section-header {
    border-bottom-color: #F2C980;
}

.finops-help-tips .finops-help-section-header h4 {
    color: #F29100;
    color: var(--emphasis, #F29100);
}


/* Adicionar ao CSS existente */
.allocation-rule-container {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.section-title {
    font-family: "Ubuntu", sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #2c3e50;
    margin: 15px 0 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e0e0e0;
}

.rule-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f0f2f5;
    border-radius: 6px;
}

.rule-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #5a6a7d;
}

.validation-errors {
    margin-top: 15px;
    padding: 12px;
    background-color: #fff8f8;
    border: 1px solid #ffebee;
    border-radius: 6px;
    color: #d32f2f;
    font-size: 14px;
}

.rule-input {
    width: 100%;
    margin-bottom: 15px;
}

.rule-input .MuiOutlinedInput-root {
    height: 40px;
    border-radius: 6px;
}

.rule-input .MuiOutlinedInput-input {
    padding: 10px 14px;
    font-size: 14px;
}

.percent-input {
    width: 100px;
}

.percent-input .MuiOutlinedInput-root {
    height: 40px;
}

.condition-row {
    margin-bottom: 15px;
    padding: 12px;
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cost-center-row {
    margin-bottom: 15px;
    padding: 12px;
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.icon-button {
    color: #5a6a7d;
    transition: all 0.2s ease;
    padding: 6px;
    border-radius: 4px;
}

.icon-button:hover {
    background-color: #e0e0e0;
    color: #2c3e50;
}

.icon-button.disabled {
    color: #b0b0b0;
    cursor: not-allowed;
}

.redistribute-button {
    padding: 6px 12px;
    background-color: #e3f2fd;
    color: #1976d2;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.redistribute-button:hover {
    background-color: #bbdefb;
}

.allocation-rule-redividir-button {
    padding: 4px 8px !important;
    font-size: 12px;
    height: 28px;
    min-width: auto !important;
}

.modal-content {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 8px;
}

.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}
.fpv-page {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px 28px 40px;
    color: #1f2937;
}

.fpv-page .MuiAlert-root {
    margin: 16px 0;
}

.fpv-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.fpv-eyebrow {
    color: #157a8a;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fpv-title {
    color: #173192;
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    font-weight: 700;
    line-height: 1.15;
    margin: 4px 0 8px;
}

.fpv-subtitle {
    color: #64748b;
    max-width: 720px;
}

.fpv-client-context {
    align-items: center;
    background: #eef7f7;
    border: 1px solid #cfe8e8;
    border-radius: 10px;
    color: #146b76;
    display: flex;
    gap: 10px;
    min-width: 230px;
    padding: 12px 14px;
}

.fpv-context-label,
.fpv-context-id {
    color: #5f7c82;
    font-size: 0.72rem;
}

.fpv-context-value {
    color: #174d57;
    font-size: 0.92rem;
    font-weight: 700;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fpv-form {
    border: 1px solid #dfe6ef;
    border-radius: 10px;
    padding: 20px;
}

.fpv-form-grid {
    display: grid;
    grid-gap: 16px;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fpv-contracts-field {
    grid-column: span 2;
}

.fpv-section-heading {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.fpv-section-heading h6 {
    color: #263b73;
    font-weight: 700;
}

.fpv-section-heading p {
    color: #708096;
}

.fpv-section-icon {
    align-items: center;
    background: #edf2ff;
    border-radius: 8px;
    color: #173192;
    display: flex;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.fpv-form-actions {
    align-items: center;
    display: flex;
    gap: 8px;
    grid-column: span 2;
    justify-content: flex-end;
    min-height: 150px;
}

.fpv-form-actions .pp-button {
    align-items: center;
    display: inline-flex;
    gap: 7px;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
}

.fpv-form-actions .fpv-submit-button {
    min-width: 155px;
}

.fpv-form-actions .fpv-cancel-button {
    min-width: 132px;
}

.fpv-field-hint {
    color: #718096;
    font-size: 0.72rem !important;
    margin-top: 5px !important;
}

.fpv-date-error {
    color: #c53030;
    font-size: 0.76rem !important;
    margin: -8px 0 12px !important;
}

.fpv-form-grid .lc-input {
    min-width: 0;
    width: 100%;
}

.fpv-form-grid .lc-input .label {
    color: #52617a;
    font-size: 0.75rem;
    font-weight: 600;
}

.fpv-form-grid .lc-input .field input,
.fpv-form-grid .lc-input .field select {
    border-color: #d5ddea;
    box-sizing: border-box;
    color: #334155;
    height: 40px;
}

.fpv-form-grid .lc-input .field select[multiple] {
    height: 150px;
        overflow: auto;
    padding: 6px 8px;
}

.fpv-form-grid .lc-input .field input:focus,
.fpv-form-grid .lc-input .field select:focus {
    border-color: #173192;
    outline: 2px solid rgba(23, 49, 146, 0.12);
}

.fpv-form-grid .lc-input .field .invalid {
    border-color: #c53030;
}

.fpv-list-heading {
    align-items: flex-end;
    display: flex;
    justify-content: space-between;
    margin: 30px 0 12px;
}

.fpv-list-heading h6 {
    color: #263b73;
    font-weight: 700;
}

.fpv-list-heading p,
.fpv-storage-note {
    color: #708096;
    font-size: 0.82rem;
}

.fpv-storage-note {
    color: #157a8a;
}

.fpv-table-shell {
    border: 1px solid #dfe6ef;
    border-radius: 10px;
    overflow: hidden;
}

.fpv-table-shell .MuiTableCell-head {
    background: #f5f7fb;
    color: #43516d;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

.fpv-table-shell .MuiTableCell-body {
    color: #334155;
    vertical-align: middle;
}

.fpv-money {
    color: #173192 !important;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    font-weight: 700 !important;
    white-space: nowrap;
}

.fpv-period {
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.fpv-period span {
    color: #94a3b8;
    font-size: 0.75rem;
    margin: 0 4px;
}

.fpv-empty {
    color: #77859a !important;
    padding: 42px 16px !important;
    text-align: center !important;
}

@media (max-width: 800px) {
    .fpv-page {
        padding: 18px 14px 32px;
    }

    .fpv-heading,
    .fpv-list-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .fpv-client-context {
        width: 100%;
    }

    .fpv-form-actions {
        grid-column: auto;
        justify-content: flex-start;
        min-height: 0;
    }

    .fpv-form-grid {
        grid-template-columns: 1fr;
    }

    .fpv-contracts-field {
        grid-column: auto;
    }

    .fpv-table-shell {
        overflow-x: auto;
    }
}

/* AlertasNotificacao — RevoGrid theme + SideModal layout helpers (segue skill-livecloud-ui-pattern) */

/* ── Grid wrapper ─────────────────────────────────────────────────────── */
.an-grid-wrapper {
    width: 100%;
    height: 100%;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    flex: 1 1;
    font-family: "Ubuntu", sans-serif;
}.an-grid-wrapper revo-grid {
    flex: 1 1;
    min-height: 0;
}

.an-grid-wrapper revo-grid .rgRow {
    cursor: pointer;
    border-bottom: 1px solid #F1F3F8;
}

.an-grid-wrapper revo-grid .rgRow:hover {
    background-color: #FAFBFD;
    background-color: var(--background-lightest, #FAFBFD);
}

.an-grid-wrapper revo-grid .header-rgRow,
.an-grid-wrapper revo-grid .rgHeaderCell {
    background-color: #fff !important;
    background-color: var(--background-white, #fff) !important;
    border-bottom: solid 1px #E2E6F3 !important;
    border-bottom: solid 1px var(--line-default, #E2E6F3) !important;
    min-height: 28px;
}

.an-grid-wrapper revo-grid .rgHeaderCell {
    font-family: "Ubuntu", sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1px;
    color: #6B6F7D;
    color: var(--text-dark, #6B6F7D);
    text-transform: none;
    border: none !important;
    box-shadow: none !important;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}

.an-grid-wrapper revo-grid .rgHeaderCell::before,
.an-grid-wrapper revo-grid .rgHeaderCell::after,
.an-grid-wrapper revo-grid .rgHeaderCell .resizable-r,
.an-grid-wrapper revo-grid .header-rgRow .resizable-r,
.an-grid-wrapper revo-grid .header-rgRow .resize-r {
    border: none !important;
    background: transparent !important;
}

.an-grid-wrapper revo-grid revogr-header,
.an-grid-wrapper revo-grid revogr-header .rgHeaderCell,
.an-grid-wrapper revo-grid revogr-viewport-scroll.colPinStart revogr-header,
.an-grid-wrapper revo-grid revogr-viewport-scroll.colPinStart revogr-header .rgHeaderCell,
.an-grid-wrapper revo-grid revogr-viewport-scroll.colPinEnd revogr-header,
.an-grid-wrapper revo-grid revogr-viewport-scroll.colPinEnd revogr-header .rgHeaderCell {
    box-shadow: none !important;
    border-left: none !important;
    border-right: none !important;
}

.an-grid-wrapper revo-grid .rgHeaderCell:hover {
    color: #2E1956;
    color: var(--text-default, #2E1956);
    background-color: #FAFBFD !important;
    background-color: var(--background-lightest, #FAFBFD) !important;
}

.an-grid-wrapper revo-grid .rgHeaderCell.sortable { cursor: pointer; }

.an-grid-wrapper revo-grid .rgHeaderCell.sort-asc,
.an-grid-wrapper revo-grid .rgHeaderCell.sort-desc {
    color: #2E1956;
    color: var(--text-default, #2E1956);
}

.an-grid-wrapper revo-grid .rgHeaderCell .sort-icon,
.an-grid-wrapper revo-grid .rgHeaderCell.sort-asc::after,
.an-grid-wrapper revo-grid .rgHeaderCell.sort-desc::after {
    color: #471FCC;
    color: var(--color-primary-blue, #471FCC);
    font-size: 0.65rem;
}

.an-grid-wrapper revo-grid .rgCell {
    font-family: "Ubuntu", sans-serif;
    font-size: 0.75rem;
    color: #2E1956;
    color: var(--text-default, #2E1956);
    padding: 4px 8px;
    border-right: none !important;
}

/* Força fundo branco em células "disabled" do RevoGrid (sobrescreve cinza padrão) */
.an-grid-wrapper revo-grid revogr-data .rgCell.disabled,
.an-grid-wrapper revo-grid .rgCell.disabled {
    background: #FFFFFF !important;
    background-color: #FFFFFF !important;
}

.an-grid-wrapper revo-grid .resizable-r {
    border-right: 1px solid #E2E6F3;
    border-right: 1px solid var(--line-default, #E2E6F3);
}

/* Utilitárias de alinhamento */
revo-grid .revo-cell--right {
    text-align: right;
    justify-content: flex-end;
}
revo-grid .revo-cell--center {
    text-align: center;
    justify-content: center;
}

/* Células numéricas: tabular-nums */
.an-num {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    white-space: nowrap;
}

/* ── SideModal: header customizado com paginação ─────────────────────── */
.an-modal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    font-family: "Ubuntu", sans-serif;
}

.an-modal-header .an-modal-title {
    flex: 1 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 20px;
    font-weight: 300;
    color: #2E1956;
    color: var(--text-default, #2E1956);
}

.an-modal-header .an-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.an-pager {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.an-pager .an-pager-count {
    font-size: 11px;
    color: #6B6F7D;
    color: var(--text-dark, #6B6F7D);
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    min-width: 38px;
    text-align: center;
}

.an-pager-btn {
    background: transparent;
    border: none;
    padding: 4px 6px;
    cursor: pointer;
    color: #2E1956;
    color: var(--text-default, #2E1956);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.an-pager-btn:hover:not(:disabled) {
    background: #FAFBFD;
    background: var(--background-lightest, #FAFBFD);
}

.an-pager-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ── SideModal body: descritivo + tabs ───────────────────────────────── */
.an-summary-text {
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.6;
    color: #2E1956;
    color: var(--text-default, #2E1956);
    font-family: "Ubuntu", sans-serif;
}

.an-summary-text .an-emph { font-weight: 500; }
.an-summary-text .an-pos { color: #DC291E; color: var(--status-red, #DC291E); font-weight: 500; }
.an-summary-text .an-neg { color: #3EBB3F; color: var(--status-green, #3EBB3F); font-weight: 500; }
.an-summary-text .an-link-color { color: #471FCC; color: var(--color-primary-blue, #471FCC); font-weight: 500; }

.an-tabs {
    display: flex;
    border-bottom: 1px solid #E2E6F3;
    border-bottom: 1px solid var(--line-default, #E2E6F3);
    margin-bottom: 16px;
    gap: 4px;
}

.an-tab {
    padding: 10px 18px;
    border: none;
    background-color: transparent;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: #6B6F7D;
    color: var(--text-dark, #6B6F7D);
    font-weight: 400;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
    margin-bottom: -1px;
    font-family: "Ubuntu", sans-serif;
    box-shadow: none;
    outline: none;
}

.an-tab:hover,
.an-tab:focus,
.an-tab:focus-visible {
    border-radius: 0;
    box-shadow: none;
    outline: none;
}

.an-tab.active {
    border-bottom-color: #8C40E3;
    border-bottom-color: var(--color-primary-purple, #8C40E3);
    color: #8C40E3;
    color: var(--color-primary-purple, #8C40E3);
    font-weight: 600;
    border-radius: 0;
}

/* ── KPI cards do modal (3 colunas) ──────────────────────────────────── */
.an-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 12px;
    gap: 12px;
    margin-bottom: 16px;
}

.an-summary-grid.expanded {
    grid-template-columns: repeat(3, 1fr);
}

.an-summary-card {
    background-color: #fff;
    background-color: var(--background-white, #fff);
    border: 1px solid #E2E6F3;
    border: 1px solid var(--line-default, #E2E6F3);
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    font-family: "Ubuntu", sans-serif;
}

.an-summary-card .an-card-icon {
    font-size: 24px;
    margin-bottom: 4px;
    color: #471FCC;
    color: var(--color-primary-blue, #471FCC);
}
.an-summary-card .an-card-icon.up { color: #DC291E; color: var(--status-red, #DC291E); }
.an-summary-card .an-card-icon.down { color: #3EBB3F; color: var(--status-green, #3EBB3F); }
.an-summary-card .an-card-icon.neutral { color: #8B90A3; color: var(--text-light, #8B90A3); }

.an-summary-card .an-card-label {
    font-size: 11px;
    color: #6B6F7D;
    color: var(--text-dark, #6B6F7D);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.an-summary-card .an-card-value {
    font-size: 18px;
    font-weight: 700;
    color: #2E1956;
    color: var(--text-default, #2E1956);
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.an-summary-card .an-card-value.up { color: #DC291E; color: var(--status-red, #DC291E); }
.an-summary-card .an-card-value.down { color: #3EBB3F; color: var(--status-green, #3EBB3F); }

.an-summary-card .an-card-sub {
    font-size: 11px;
    color: #8B90A3;
    color: var(--text-light, #8B90A3);
    margin-top: 2px;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

/* ── Sections (PPExpand wrappers) ─────────────────────────────────────── */
.an-section {
    margin-bottom: 12px;
}

.an-info-row {
    display: flex;
    margin-bottom: 6px;
    font-size: 12px;
    font-family: "Ubuntu", sans-serif;
}

.an-info-row .an-info-label {
    min-width: 130px;
    color: #6B6F7D;
    color: var(--text-dark, #6B6F7D);
    margin-right: 12px;
}

.an-info-row .an-info-value {
    color: #2E1956;
    color: var(--text-default, #2E1956);
    flex: 1 1;
}

/* ── Custom filter block (escopo customizado) ────────────────────────── */
.an-filter-row {
    margin-bottom: 6px;
    padding: 6px 8px;
    background-color: #FAFBFD;
    background-color: var(--background-lightest, #FAFBFD);
    border-radius: 4px;
    border: 1px solid #E2E6F3;
    border: 1px solid var(--line-default, #E2E6F3);
}

.an-filter-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
}

.an-filter-operator {
    color: #471FCC;
    color: var(--color-primary-blue, #471FCC);
    padding: 2px 8px;
    background-color: rgba(140, 64, 227, 0.08);
    border-radius: 4px;
}

.an-filter-field { font-weight: 500; }
.an-filter-operation { color: #6B6F7D; color: var(--text-dark, #6B6F7D); }
.an-filter-value {
    color: #2E1956;
    color: var(--text-default, #2E1956);
    padding: 2px 8px;
    background-color: #fff;
    background-color: var(--background-white, #fff);
    border: 1px solid #E2E6F3;
    border: 1px solid var(--line-default, #E2E6F3);
    border-radius: 4px;
}

/* ── Expanded mode: 2 col grid (KPIs+chart | detalhes) ───────────────── */
.an-details-grid.expanded {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-gap: 16px;
    gap: 16px;
    height: 100%;
}

.an-details-col { min-width: 0; }
.cont {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding-top: 24px;
  padding-bottom: 24px;
}

.cont-compact {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 8px 0;
}

.cont-compact .row {
  margin-bottom: 4px;
}

.sub {
  margin-right: 21px;
  min-width: 100px;
}

.filter-row {
  margin-bottom: 6px;
  padding: 6px 8px;
  background-color: #f8f9fa;
  border-radius: 4px;
  border: 1px solid #dee2e6;
}

.filter-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-operator {
  color: #667eea;
  padding: 2px 8px;
  background-color: #e7eaff;
  border-radius: 4px;
  font-size: 12px;
}

.filter-field {
  font-weight: 500;
}

.filter-operation {
  color: #666;
}

.filter-value {
  color: #333;
  padding: 2px 8px;
  background-color: #fff;
  border: 1px solid #dee2e6;
  border-radius: 4px;
}

.accordion-wrapper {
  margin-bottom: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════
   v2 — SideModal rico (header + 5 tabs + Visão geral detalhada)
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Header rico ─────────────────────────────────────────────────────── */
/* Header do SideModal: centraliza verticalmente para alinhar o pager
   com os botões de expandir/fechar (padrão do sistema) */
.side-modal > .header:has(.an-rh) { align-items: center; }

.an-rh {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
    font-family: "Ubuntu", sans-serif;
}

.an-rh-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.an-rh-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    flex-shrink: 0;
}

.an-rh-titlewrap {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.an-rh-title {
    font-size: 17px;
    font-weight: 600;
    color: #2E1956;
    color: var(--text-default, #2E1956);
    line-height: 1.2;
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.an-rh-subtitle {
    font-size: 12px;
    color: #6B6F7D;
    color: var(--text-dark, #6B6F7D);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.an-rh-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    flex-shrink: 0;
    justify-content: flex-end;
}

.an-rh-divider {
    width: 1px;
    height: 22px;
    background: #E2E6F3;
    background: var(--line-default, #E2E6F3);
    margin: 0 2px;
}

/* ── Pílulas ─────────────────────────────────────────────────────────── */
.an-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    border: 1px solid #E2E6F3;
    border: 1px solid var(--line-default, #E2E6F3);
    background: #fff;
    background: var(--background-white, #fff);
    color: #2E1956;
    color: var(--text-default, #2E1956);
    white-space: nowrap;
}

.an-pill svg { font-size: 13px; }

.an-pill-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #9CA3AF;
}

.an-pill--status.open .an-pill-dot { background: #DC291E; background: var(--status-red, #DC291E); }
.an-pill--status.reviewed .an-pill-dot { background: #3EBB3F; background: var(--status-green, #3EBB3F); }

.an-pill--priority.high { color: #DC291E; border-color: rgba(220, 41, 30, 0.30); background: rgba(220, 41, 30, 0.06); }
.an-pill--priority.med { color: #B47200; border-color: rgba(255, 160, 0, 0.35); background: rgba(255, 160, 0, 0.08); }
.an-pill--priority.low { color: #6B6F7D; }

.an-pill--impact.pos { color: #DC291E; color: var(--status-red, #DC291E); border-color: rgba(220, 41, 30, 0.30); background: rgba(220, 41, 30, 0.06); }
.an-pill--impact.neg { color: #3EBB3F; color: var(--status-green, #3EBB3F); border-color: rgba(62, 187, 63, 0.30); background: rgba(62, 187, 63, 0.06); }

.an-pager-text {
    font-size: 11px;
    color: #6B6F7D;
    color: var(--text-dark, #6B6F7D);
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

/* ── Action buttons ──────────────────────────────────────────────────── */
.an-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #E2E6F3;
    border: 1px solid var(--line-default, #E2E6F3);
    background: #fff;
    background: var(--background-white, #fff);
    color: #2E1956;
    color: var(--text-default, #2E1956);
    font-family: "Ubuntu", sans-serif;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

.an-action-btn:hover { background: #FAFBFD; background: var(--background-lightest, #FAFBFD); border-color: #8C40E3; border-color: var(--color-primary-purple, #8C40E3); }
.an-action-btn svg { font-size: 14px; }

.an-action-btn--success {
    background: rgba(62, 187, 63, 0.08);
    border-color: rgba(62, 187, 63, 0.40);
    color: #2A8B2B;
}
.an-action-btn--success:hover { background: rgba(62, 187, 63, 0.14); border-color: #3EBB3F; }

/* ── Tab panel container ─────────────────────────────────────────────── */
.an-tab-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

/* ── Visão geral: KPI row ────────────────────────────────────────────── */
.an-vg-kpis {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-gap: 6px;
    gap: 6px;
}

@media (max-width: 1200px) {
    .an-vg-kpis { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
    .an-vg-kpis { grid-template-columns: repeat(2, 1fr); }
}

.an-vg-kpi {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #E2E6F3;
    border: 1px solid var(--line-default, #E2E6F3);
    border-radius: 8px;
    background: #fff;
    background: var(--background-white, #fff);
    min-width: 0;
}

.an-vg-kpi-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    flex-shrink: 0;
}

.an-vg-kpi-content { min-width: 0; flex: 1 1; }
.an-vg-kpi-label { font-size: 11px; color: #6B6F7D; color: var(--text-dark, #6B6F7D); margin-bottom: 2px; }
.an-vg-kpi-value {
    font-size: 18px;
    font-weight: 600;
    color: #2E1956;
    color: var(--text-default, #2E1956);
    line-height: 1.2;
}
.an-vg-kpi-value.pos { color: #DC291E; color: var(--status-red, #DC291E); }
.an-vg-kpi-value.neg { color: #3EBB3F; color: var(--status-green, #3EBB3F); }
.an-vg-kpi-sub { font-size: 11px; color: #6B6F7D; color: var(--text-dark, #6B6F7D); margin-top: 2px; }

/* ── Visão geral: rows ───────────────────────────────────────────────── */
.an-vg-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-gap: 6px;
    gap: 6px;
}

@media (max-width: 1000px) {
    .an-vg-row { grid-template-columns: 1fr; }
}

.an-vg-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.an-vg-card {
    background: #fff;
    background: var(--background-white, #fff);
    border: 1px solid #E2E6F3;
    border: 1px solid var(--line-default, #E2E6F3);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.an-vg-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #E2E6F3;
    border-bottom: 1px solid var(--line-default, #E2E6F3);
}

.an-vg-card-title {
    font-family: "Ubuntu", sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #2E1956;
    color: var(--text-default, #2E1956);
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.an-vg-card-body {
    padding: 14px;
    min-width: 0;
}

/* ── Mini stats no header do gráfico ─────────────────────────────────── */
.an-mini-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.an-mini-stat {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.an-mini-stat-label {
    font-size: 10px;
    color: #6B6F7D;
    color: var(--text-dark, #6B6F7D);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.an-mini-stat-value {
    font-size: 13px;
    font-weight: 500;
    color: #2E1956;
    color: var(--text-default, #2E1956);
}

/* ── Diagnóstico / Detalhes ──────────────────────────────────────────── */
.an-diag-text p {
    font-size: 12.5px;
    line-height: 1.55;
    color: #2E1956;
    color: var(--text-default, #2E1956);
    margin: 0 0 10px;
}
.an-diag-text p:last-child { margin-bottom: 0; }
.an-diag-text strong.pos { color: #DC291E; color: var(--status-red, #DC291E); }
.an-diag-text strong.neg { color: #3EBB3F; color: var(--status-green, #3EBB3F); }

.an-details-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 12px;
    gap: 12px;
}

.an-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.an-detail-item > svg {
    font-size: 16px;
    color: #8C40E3;
    color: var(--color-primary-purple, #8C40E3);
    margin-top: 2px;
    flex-shrink: 0;
}

.an-detail-label {
    font-size: 10.5px;
    color: #6B6F7D;
    color: var(--text-dark, #6B6F7D);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.an-detail-value {
    font-size: 12.5px;
    color: #2E1956;
    color: var(--text-default, #2E1956);
    word-break: break-word;
}

.an-muted { color: #6B6F7D; color: var(--text-dark, #6B6F7D); }

/* ── Top impactos table ──────────────────────────────────────────────── */
.an-impacts-table {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.an-impact-head,
.an-impact-row {
    display: grid;
    grid-template-columns: minmax(140px, 1.8fr) minmax(100px, 1fr) minmax(110px, 1fr) minmax(90px, 0.8fr) minmax(120px, 1.2fr) 80px 110px;
    align-items: center;
    grid-gap: 10px;
    gap: 10px;
    padding: 8px 4px;
    font-size: 12px;
}

.an-impact-head {
    border-bottom: 1px solid #E2E6F3;
    border-bottom: 1px solid var(--line-default, #E2E6F3);
    color: #6B6F7D;
    color: var(--text-dark, #6B6F7D);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 10.5px;
    letter-spacing: 0.3px;
}

.an-impact-row {
    border-bottom: 1px solid #F1F3F8;
}

.an-impact-row:last-child { border-bottom: none; }

.an-impact-c--num { text-align: right; }
.an-impact-resource { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.an-impact-resource > svg { color: #8C40E3; color: var(--color-primary-purple, #8C40E3); flex-shrink: 0; }

.an-impact-c--contrib {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.an-progress {
    flex: 1 1;
    height: 6px;
    border-radius: 3px;
    background: #F1F3F8;
    overflow: hidden;
    min-width: 40px;
}

.an-progress-bar {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #471FCC, #8C40E3);
    background: linear-gradient(90deg, var(--color-primary-blue, #471FCC), var(--color-primary-purple, #8C40E3));
    border-radius: 3px;
}

.an-progress-text {
    font-size: 11px;
    color: #6B6F7D;
    color: var(--text-dark, #6B6F7D);
    min-width: 42px;
    text-align: right;
}

.an-priority-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 500;
    line-height: 1.4;
}
.an-priority-badge.high { background: rgba(220, 41, 30, 0.10); color: #DC291E; color: var(--status-red, #DC291E); }
.an-priority-badge.med { background: rgba(255, 160, 0, 0.12); color: #B47200; }
.an-priority-badge.low { background: #FAFBFD; background: var(--background-lightest, #FAFBFD); color: #6B6F7D; color: var(--text-dark, #6B6F7D); }

.an-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: #8C40E3;
    color: var(--color-primary-purple, #8C40E3);
    font-family: "Ubuntu", sans-serif;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background 0.15s ease;
}
.an-link-btn:hover { background: rgba(140, 64, 227, 0.08); }

.an-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

@media (max-width: 1000px) {
    .an-impact-head,
    .an-impact-row {
        grid-template-columns: 1.6fr 1fr 1fr 0.8fr;
    }
    .an-impact-c--contrib,
    .an-impact-c--prio,
    .an-impact-c--act { display: none; }
}

/* ── Ações recomendadas ──────────────────────────────────────────────── */
.an-rec-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.an-rec-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12.5px;
    color: #2E1956;
    color: var(--text-default, #2E1956);
    line-height: 1.4;
}

.an-rec-list li > svg {
    color: #3EBB3F;
    color: var(--status-green, #3EBB3F);
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── Histórico ───────────────────────────────────────────────────────── */
.an-history-list {
    display: flex;
    flex-direction: column;
}

.an-history-item {
    display: grid;
    grid-template-columns: 24px 1fr auto;
    align-items: center;
    grid-gap: 10px;
    gap: 10px;
    padding: 8px 4px;
    border-bottom: 1px solid #F1F3F8;
    font-size: 12.5px;
}

.an-history-item:last-child { border-bottom: none; }

.an-history-item > svg { color: #8C40E3; color: var(--color-primary-purple, #8C40E3); }

.an-history-date { color: #2E1956; color: var(--text-default, #2E1956); }
.an-history-value { color: #2E1956; color: var(--text-default, #2E1956); font-weight: 500; }

/* ── Color helpers genéricos ─────────────────────────────────────────── */
.an-num.pos { color: #DC291E; color: var(--status-red, #DC291E); }
.an-num.neg { color: #3EBB3F; color: var(--status-green, #3EBB3F); }

/* ═══════════════════════════════════════════════════════════════════════
   Tab Impactos — KPIs + filtros + tabela + sidebar
   ═══════════════════════════════════════════════════════════════════════ */
.an-imp-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.an-imp-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 12px;
    gap: 12px;
}

@media (max-width: 1100px) {
    .an-imp-kpis { grid-template-columns: repeat(2, 1fr); }
}

.an-imp-body {
    display: grid;
    grid-template-columns: minmax(0, 2.4fr) minmax(260px, 1fr);
    grid-gap: 12px;
    gap: 12px;
    align-items: start;
    min-width: 0;
}

@media (max-width: 1100px) {
    .an-imp-body { grid-template-columns: 1fr; }
}

.an-imp-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.an-imp-aside { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

/* ── Filters row ─────────────────────────────────────────────────────── */
.an-imp-filters {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 12px;
    background: #fff;
    background: var(--background-white, #fff);
    border: 1px solid #E2E6F3;
    border: 1px solid var(--line-default, #E2E6F3);
    border-radius: 8px;
    flex-wrap: wrap;
}

.an-imp-filter-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.an-imp-filter-label {
    font-size: 11px;
    color: #6B6F7D;
    color: var(--text-dark, #6B6F7D);
    margin-right: 2px;
}

.an-imp-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: #2E1956;
    color: var(--text-default, #2E1956);
    font-family: "Ubuntu", sans-serif;
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.an-imp-chip:hover { background: #FAFBFD; background: var(--background-lightest, #FAFBFD); }

.an-imp-chip.active {
    background: rgba(140, 64, 227, 0.10);
    border-color: rgba(140, 64, 227, 0.30);
    color: #8C40E3;
    color: var(--color-primary-purple, #8C40E3);
}

.an-imp-chip-arrow { font-size: 10px; }

.an-imp-search {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid #E2E6F3;
    border: 1px solid var(--line-default, #E2E6F3);
    border-radius: 6px;
    min-width: 220px;
    flex: 1 1;
    max-width: 320px;
    margin-left: auto;
}

.an-imp-search > svg { color: #6B6F7D; color: var(--text-dark, #6B6F7D); font-size: 14px; flex-shrink: 0; }

.an-imp-search > input {
    border: none;
    outline: none;
    background: transparent;
    font-family: "Ubuntu", sans-serif;
    font-size: 12px;
    color: #2E1956;
    color: var(--text-default, #2E1956);
    flex: 1 1;
    min-width: 0;
}

.an-imp-search > input::placeholder { color: #6B6F7D; color: var(--text-dark, #6B6F7D); }

/* ── Caption + table ─────────────────────────────────────────────────── */
.an-imp-caption {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 10px;
}

.an-imp-caption-sub { font-size: 11.5px; }

.an-imp-h4 {
    margin: 0;
    font-size: 13.5px;
    font-weight: 600;
    color: #2E1956;
    color: var(--text-default, #2E1956);
    font-family: "Ubuntu", sans-serif;
}

.an-imp-table {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}

.an-imp-thead,
.an-imp-trow {
    display: grid;
    grid-template-columns:
        56px            /* Prioridade  */
        minmax(120px, 1.4fr) /* Recurso     */
        minmax(110px, 1.2fr) /* Serviço     */
        minmax(110px, 1.2fr) /* Conta       */
        minmax(90px, 1fr)    /* Região      */
        minmax(80px, 0.9fr)  /* Antes       */
        minmax(80px, 0.9fr)  /* Atual       */
        minmax(90px, 1fr)    /* Impacto R$  */
        minmax(80px, 0.9fr)  /* Variação %  */
        minmax(120px, 1.2fr) /* Contribuição*/
        minmax(110px, 1fr)   /* Classific.  */
        minmax(90px, 0.9fr); /* Ação        */
    align-items: center;
    grid-gap: 8px;
    gap: 8px;
    padding: 8px 4px;
    font-size: 11.5px;
}

.an-imp-thead {
    border-bottom: 1px solid #E2E6F3;
    border-bottom: 1px solid var(--line-default, #E2E6F3);
    color: #6B6F7D;
    color: var(--text-dark, #6B6F7D);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.3px;
}

.an-imp-trow {
    border-bottom: 1px solid #F1F3F8;
    color: #2E1956;
    color: var(--text-default, #2E1956);
}

.an-imp-trow:last-child { border-bottom: none; }
.an-imp-trow:hover { background: #FAFBFD; background: var(--background-lightest, #FAFBFD); }

.an-imp-thead .r,
.an-imp-trow .r { text-align: right; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }

.an-imp-contrib {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

/* Classificação badges */
.an-class-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
}
.an-class-badge.new { background: rgba(33, 150, 243, 0.10); color: #1976D2; }
.an-class-badge.alert { background: rgba(255, 160, 0, 0.12); color: #B47200; }
.an-class-badge.normal { background: #FAFBFD; background: var(--background-lightest, #FAFBFD); color: #6B6F7D; color: var(--text-dark, #6B6F7D); }

.an-imp-showall {
    width: 100%;
    margin-top: 10px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-top: 1px solid #E2E6F3;
    border-top: 1px solid var(--line-default, #E2E6F3);
    color: #8C40E3;
    color: var(--color-primary-purple, #8C40E3);
    font-family: "Ubuntu", sans-serif;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
}
.an-imp-showall:hover:not(:disabled) { background: rgba(140, 64, 227, 0.06); }
.an-imp-showall:disabled { color: #6B6F7D; color: var(--text-dark, #6B6F7D); cursor: default; }

@media (max-width: 1280px) {
    .an-imp-thead,
    .an-imp-trow {
        grid-template-columns:
            56px
            minmax(110px, 1.4fr)
            minmax(100px, 1.2fr)
            minmax(80px, 1fr)
            minmax(80px, 1fr)
            minmax(80px, 0.9fr)
            minmax(110px, 1.1fr)
            minmax(70px, 0.9fr)
            minmax(90px, 1fr)
            minmax(90px, 1fr)
            minmax(80px, 0.9fr);
    }
    .an-imp-thead > :nth-child(6),
    .an-imp-trow > :nth-child(6) { display: none; } /* esconde "Antes" em telas médias */
}

/* ── Sidebar: Resumo dos impactos ────────────────────────────────────── */
.an-imp-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.an-imp-sum-item {
    display: grid;
    grid-template-columns: 32px 1fr;
    grid-template-rows: auto auto;
    grid-column-gap: 8px;
    column-gap: 8px;
    grid-row-gap: 2px;
    row-gap: 2px;
    align-items: center;
}

.an-imp-sum-icon {
    grid-row: 1 / span 2;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.an-imp-sum-content { min-width: 0; }

.an-imp-sum-label {
    font-size: 10.5px;
    color: #6B6F7D;
    color: var(--text-dark, #6B6F7D);
}

.an-imp-sum-title {
    font-size: 12px;
    font-weight: 600;
    color: #2E1956;
    color: var(--text-default, #2E1956);
    line-height: 1.25;
    min-width: 0;
}

.an-imp-sum-value {
    grid-column: 2 / -1;
    font-size: 11.5px;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

/* ── Sidebar: barras (top 5) ─────────────────────────────────────────── */
.an-imp-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.an-imp-bar {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) auto minmax(60px, 1fr) auto;
    grid-gap: 8px;
    gap: 8px;
    align-items: center;
    font-size: 11.5px;
    color: #2E1956;
    color: var(--text-default, #2E1956);
}

.an-imp-bar-name { color: #2E1956; color: var(--text-default, #2E1956); font-weight: 500; min-width: 0; }
.an-imp-bar-value { color: #2E1956; color: var(--text-default, #2E1956); font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.an-imp-bar-pct { color: #6B6F7D; color: var(--text-dark, #6B6F7D); font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }

/* ── RevoGrid dentro da aba Impactos ─────────────────────────────────── */
.an-imp-grid-wrapper {
    width: 100%;
    min-height: 180px;
    border: 1px solid #E2E6F3;
    border: 1px solid var(--line-default, #E2E6F3);
    border-radius: 6px;
    overflow: hidden;
    background: #fff;

    /* Override RevoGrid theme vars para fundo branco uniforme */
    --revo-row-odd-bg: #ffffff;
    --revo-row-even-bg: #ffffff;
    --revo-header-bg: #ffffff;
    --revo-bg: #ffffff;
}

.an-imp-grid-wrapper revo-grid {
    background: #fff !important;
}

.an-imp-grid-wrapper revo-grid .rgRow {
    background-color: #fff !important;
}

.an-imp-grid-wrapper revo-grid .header-rgRow,
.an-imp-grid-wrapper revo-grid .rgHeaderCell {
    background-color: #fff !important;
}

.an-imp-grid-wrapper revo-grid revogr-header {
    background-color: #fff !important;
}

.an-imp-grid-wrapper revo-grid revogr-data,
.an-imp-grid-wrapper revo-grid revogr-overlay-selection {
    background-color: #fff !important;
}

.an-imp-grid-wrapper revo-grid .rgCell .an-progress { min-width: 50px; }
.an-imp-grid-wrapper revo-grid .rgCell .an-link-btn { padding: 0; }
.an-imp-grid-wrapper revo-grid .rgCell .an-priority-badge,
.an-imp-grid-wrapper revo-grid .rgCell .an-class-badge { line-height: 1.3; }
.an-imp-grid-wrapper revo-grid .rgCell .an-imp-contrib { width: 100%; }

/* ═══════════════════════════════════════════════════════════════════════
   Compact mode — telas com altura < 768px
   Reduz alturas, paddings e fontes para caber tudo sem scroll vertical.
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-height: 768px) {
    /* Header rico do SideModal */
    .an-rh { gap: 8px; }
    .an-rh-icon { width: 30px; height: 30px; font-size: 16px; }
    .an-rh-title { font-size: 15px; font-weight: 600; }
    .an-rh-subtitle { font-size: 11px; }
    .an-rh-right { gap: 6px; }
    .an-rh-divider { height: 18px; }

    .an-pill { padding: 2px 8px; font-size: 10px; gap: 4px; }
    .an-pill svg { font-size: 11px; }
    .an-pill-dot { width: 6px; height: 6px; }

    .an-action-btn { padding: 4px 8px; font-size: 11px; gap: 4px; }
    .an-action-btn svg { font-size: 12px; }
    .an-pager-text { font-size: 10px; }

    /* Tabs */
    .an-tabs { gap: 4px; }
    .an-tab { padding: 6px 10px; font-size: 12px; }
    .an-tab-panel { padding-top: 4px; gap: 8px; }

    /* Visão geral — KPIs */
    .an-vg-kpis { gap: 8px; margin-bottom: 8px; }
    .an-vg-kpi { padding: 8px; gap: 8px; }
    .an-vg-kpi-icon { width: 32px; height: 32px; border-radius: 8px; font-size: 14px; }
    .an-vg-kpi-label { font-size: 10px; }
    .an-vg-kpi-value { font-size: 14px; }
    .an-vg-kpi-sub { font-size: 10px; }

    /* Visão geral — cards */
    .an-vg-row { gap: 8px; margin-bottom: 8px; }
    .an-vg-col { gap: 8px; }
    .an-vg-card-header { padding: 8px 12px; }
    .an-vg-card-title { font-size: 12px; }
    .an-vg-card-body { padding: 10px 12px; }

    .an-mini-stats { gap: 12px; }
    .an-mini-stat-label { font-size: 9px; }
    .an-mini-stat-value { font-size: 12px; }

    .an-diag-text p { font-size: 11.5px; line-height: 1.4; margin: 0 0 6px; }

    .an-details-grid-2 { gap: 8px; }
    .an-detail-item > svg { font-size: 14px; }
    .an-detail-label { font-size: 9.5px; }
    .an-detail-value { font-size: 11.5px; }

    /* Top impactos textuais (Visão geral) */
    .an-impact-head,
    .an-impact-row { padding: 6px 0; font-size: 11px; gap: 6px; }
    .an-impact-head { font-size: 9.5px; }
    .an-priority-badge { padding: 1px 6px; font-size: 9.5px; }
    .an-progress { height: 5px; }
    .an-progress-text { font-size: 10px; }
    .an-link-btn { font-size: 11px; padding: 2px 4px; }

    .an-rec-list { gap: 6px; }
    .an-rec-list li { font-size: 11.5px; line-height: 1.35; }
    .an-rec-list li > svg { font-size: 14px; }

    /* Histórico */
    .an-history-item { padding: 6px 4px; font-size: 11.5px; }

    /* ── Aba Impactos ── */
    .an-imp-wrap { gap: 8px; }
    .an-imp-kpis { gap: 8px; }
    .an-imp-body { gap: 8px; }
    .an-imp-main, .an-imp-aside { gap: 8px; }

    .an-imp-filters { gap: 10px; padding: 6px 10px; }
    .an-imp-filter-label { font-size: 10px; }
    .an-imp-chip { padding: 3px 8px; font-size: 10.5px; }
    .an-imp-search { min-width: 180px; padding: 3px 8px; }
    .an-imp-search > input { font-size: 11px; }
    .an-imp-search > svg { font-size: 12px; }

    .an-imp-caption { margin-bottom: 6px; }
    .an-imp-caption-sub { font-size: 10.5px; }
    .an-imp-h4 { font-size: 12px; }

    /* RevoGrid Impactos: cell font menor */
    .an-imp-grid-wrapper revo-grid .rgCell { font-size: 11px; }
    .an-imp-grid-wrapper revo-grid .rgHeaderCell { font-size: 10px; }
    .an-imp-grid-wrapper revo-grid .rgCell .an-progress { min-width: 40px; height: 5px; }

    /* Sidebar resumo */
    .an-imp-summary { gap: 8px; }
    .an-imp-sum-item { grid-template-columns: 28px 1fr; column-gap: 6px; }
    .an-imp-sum-icon { width: 28px; height: 28px; font-size: 13px; border-radius: 6px; }
    .an-imp-sum-label { font-size: 9.5px; }
    .an-imp-sum-title { font-size: 11px; }
    .an-imp-sum-value { font-size: 10.5px; }

    .an-imp-bars { gap: 7px; }
    .an-imp-bar { font-size: 10.5px; gap: 6px; }

    .an-imp-showall { padding: 6px 10px; font-size: 11px; margin-top: 6px; }

    .an-class-badge { padding: 1px 6px; font-size: 9.5px; }
}

/* Ultra-compacto: altura muito reduzida */
@media (max-height: 600px) {
    .an-vg-kpis { grid-template-columns: repeat(4, 1fr); }
    .an-vg-kpi-icon { width: 26px; height: 26px; font-size: 12px; }
    .an-vg-kpi-value { font-size: 13px; }
    .an-vg-kpi-label { font-size: 9.5px; }

    .an-rh-icon { width: 26px; height: 26px; font-size: 14px; }
    .an-rh-title { font-size: 14px; font-weight: 600; }
    .an-rh-subtitle { font-size: 10px; }

    .an-tab { padding: 4px 8px; font-size: 11px; }

    .an-imp-grid-wrapper revo-grid .rgCell { font-size: 10.5px; }
}

/* ── Toolbar acima da grid (Agrupar / Colunas) ─────────────────────── */
.an-grid-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px 8px;
    flex-wrap: wrap;
}
.an-grid-toolbar-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #475569;
}
.an-grid-toolbar-label { font-weight: 500; }
.an-grid-toolbar-select {
    height: 26px;
    padding: 0 8px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #fff;
    font-size: 11px;
    color: #1e293b;
    font-family: 'Ubuntu', sans-serif;
    cursor: pointer;
    outline: none;
}
.an-grid-toolbar-select:focus { border-color: #2E1956; }
.an-grid-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 26px;
    padding: 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #fff;
    color: #475569;
    font-size: 11px;
    cursor: pointer;
    font-family: 'Ubuntu', sans-serif;
    transition: all .15s ease;
}
.an-grid-toolbar-btn:hover { border-color: #cbd5e1; color: #1e293b; }
.an-grid-toolbar-btn.active { border-color: #2E1956; background: #f5f3fa; color: #2E1956; }

.an-grid-toolbar-iconbtn {
    width: 22px;
    height: 22px;
    margin-left: 2px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: #8a86a6;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 120ms, color 120ms, border-color 120ms;
}
.an-grid-toolbar-iconbtn:hover:not(:disabled) {
    background: #f7f5ff;
    color: #471FCC;
    color: var(--color-primary-blue, #471FCC);
    border-color: #E2E6F3;
    border-color: var(--line-default, #E2E6F3);
}
.an-grid-toolbar-iconbtn:disabled {
    color: #d4d2e0;
    cursor: not-allowed;
}

/* ── Popover de configurar colunas ─────────────────────────────────── */
.an-col-config-panel {
    position: fixed;
    width: 320px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    z-index: 9999;
    font-family: 'Ubuntu', sans-serif;
    font-size: 12px;
}
.an-col-config-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 600;
    color: #1e293b;
}
.an-col-config-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px;
    display: inline-flex;
    border-radius: 3px;
}
.an-col-config-close:hover { background: #f1f5f9; color: #475569; }
.an-col-config-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 320px;
    overflow-y: auto;
}
.an-col-config-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    transition: background .15s;
}
.an-col-config-item:hover { background: #f8fafc; }
.an-col-config-item.hidden { opacity: 0.55; }
.an-col-config-item.fixed .an-col-config-label::after {
    content: ' (fixa)';
    color: #94a3b8;
    font-size: 10px;
}
.an-col-config-vis {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #475569;
}
.an-col-config-vis:hover:not(:disabled) { border-color: #2E1956; color: #2E1956; }
.an-col-config-vis:disabled { cursor: not-allowed; opacity: 0.5; }
.an-col-config-label {
    flex: 1 1;
    color: #1e293b;
    font-size: 12px;
}
.an-col-config-arrows {
    display: inline-flex;
    gap: 2px;
}
.an-col-config-arrows button {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
}
.an-col-config-arrows button:hover:not(:disabled) { border-color: #2E1956; color: #2E1956; }
.an-col-config-arrows button:disabled { cursor: not-allowed; opacity: 0.3; }
.an-col-config-footer {
    padding: 8px 12px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
}
.an-col-config-reset {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 11px;
    color: #475569;
    cursor: pointer;
    font-family: 'Ubuntu', sans-serif;
}
.an-col-config-reset:hover { border-color: #2E1956; color: #2E1956; }


/* ── CostVariationTable: toolbar + popover discreto ─────────────── */
.cv-toolbar-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #475569;
    font-size: 11px;
}
.cv-toolbar-select {
    height: 26px;
    padding: 0 8px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #fff;
    font-size: 11px;
    color: #1e293b;
    font-family: 'Ubuntu', sans-serif;
    cursor: pointer;
    outline: none;
}
.cv-toolbar-select:focus { border-color: #2E1956; }
.cv-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 26px;
    padding: 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #fff;
    color: #475569;
    font-size: 11px;
    cursor: pointer;
    font-family: 'Ubuntu', sans-serif;
    transition: all .15s ease;
}
.cv-toolbar-btn:hover { border-color: #cbd5e1; color: #1e293b; }
.cv-toolbar-btn.active { border-color: #2E1956; background: #f5f3fa; color: #2E1956; }

.cv-grid-wrapper { width: 100%; display: flex; flex-direction: column; font-family: 'Ubuntu', sans-serif; }
.cv-grid-wrapper revo-grid { flex: 1 1; min-height: 0; }
.cv-grid-wrapper revo-grid .revo-cell--right { text-align: right; justify-content: flex-end; }
.cv-grid-wrapper revo-grid .rgRow { background: #fff; }
.cv-grid-wrapper revo-grid .rgRow:hover { background: #fafbfc; }

.cv-col-config-panel {
    position: fixed;
    width: 320px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    z-index: 9999;
    font-family: 'Ubuntu', sans-serif;
    font-size: 12px;
}
.cv-col-config-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 12px; border-bottom: 1px solid #f1f5f9;
    font-weight: 600; color: #1e293b;
}
.cv-col-config-close {
    background: none; border: none; color: #94a3b8; cursor: pointer;
    padding: 2px; display: inline-flex; border-radius: 3px;
}
.cv-col-config-close:hover { background: #f1f5f9; color: #475569; }
.cv-col-config-list { list-style: none; margin: 0; padding: 4px 0; max-height: 320px; overflow-y: auto; }
.cv-col-config-item { display: flex; align-items: center; gap: 8px; padding: 6px 12px; transition: background .15s; }
.cv-col-config-item:hover { background: #f8fafc; }
.cv-col-config-item.hidden { opacity: 0.55; }
.cv-col-config-item.fixed .cv-col-config-label::after { content: ' (fixa)'; color: #94a3b8; font-size: 10px; }
.cv-col-config-vis {
    background: none; border: 1px solid #e2e8f0; border-radius: 3px;
    width: 24px; height: 24px; display: inline-flex; align-items: center;
    justify-content: center; cursor: pointer; color: #475569;
}
.cv-col-config-vis:hover:not(:disabled) { border-color: #2E1956; color: #2E1956; }
.cv-col-config-vis:disabled { cursor: not-allowed; opacity: 0.5; }
.cv-col-config-label { flex: 1 1; color: #1e293b; font-size: 12px; }
.cv-col-config-arrows { display: inline-flex; gap: 2px; }
.cv-col-config-arrows button {
    background: none; border: 1px solid #e2e8f0; border-radius: 3px;
    width: 22px; height: 22px; display: inline-flex; align-items: center;
    justify-content: center; cursor: pointer; color: #64748b;
}
.cv-col-config-arrows button:hover:not(:disabled) { border-color: #2E1956; color: #2E1956; }
.cv-col-config-arrows button:disabled { cursor: not-allowed; opacity: 0.3; }
.cv-col-config-footer { padding: 8px 12px; border-top: 1px solid #f1f5f9; display: flex; justify-content: flex-end; }
.cv-col-config-reset {
    background: none; border: 1px solid #e2e8f0; border-radius: 4px;
    padding: 4px 10px; font-size: 11px; color: #475569; cursor: pointer;
    font-family: 'Ubuntu', sans-serif;
}
.cv-col-config-reset:hover { border-color: #2E1956; color: #2E1956; }

/* RecommendationDetailsModal (SideModal variant) */
.recdetail-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.recdetail-title-content {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1 1;
}

.recdetail-provider-badge {
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.recdetail-provider-fallback {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}

.recdetail-title-text {
    font-size: 15px;
    font-weight: 600;
    color: #2D3748;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.recdetail-title-resource {
    font-size: 11px;
    font-weight: 400;
    color: #718096;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Courier New', monospace;
}

.recdetail-nav-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.recdetail-nav-count {
    font-size: 11px;
    color: #718096;
    margin-right: 4px;
}

.recdetail-nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    color: #2D3748;
    font-size: 14px;
    line-height: 1;
}

.recdetail-nav-btn:hover:not(:disabled) {
    background: #EDF2F7;
}

.recdetail-nav-btn:disabled {
    cursor: not-allowed;
    opacity: 0.3;
}

.recdetail-content {
    padding: 16px;
    background: #f8f9fa;
    outline: none;
}

/* Em focus/expandido: conteudo em 2 colunas, IA fixa na direita */
.recdetail-content.recdetail-content--expanded {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    grid-gap: 8px;
    gap: 8px;
    height: calc(100vh - 172px);
    overflow: hidden;
}

.recdetail-content.recdetail-content--expanded .recdetail-grid {
    margin: 0;
    overflow: auto;
    align-content: start;
    padding-right: 4px;
}

.recdetail-content.recdetail-content--expanded .recdetail-ai-panel {
    margin: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.recdetail-content.recdetail-content--expanded .recdetail-ai-body {
    flex: 1 1;
    min-height: 0;
    max-height: none;
}

/* Grid de secoes */
.recdetail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    grid-gap: 8px;
    gap: 8px;
    margin-bottom: 16px;
}

.recdetail-section {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    padding: 12px 16px;
    min-width: 0;
}

.recdetail-section--wide {
    grid-column: 1 / -1;
}

.recdetail-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    color: var(--text-primary, #333);
    margin: 0 0 8px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
    border-bottom: 1px solid var(--border-color, #eee);
}

/* RevoGrid container dentro das seções */
.recdetail-grid-container {
    margin-top: 4px;
    border-radius: 6px;
    overflow: hidden;
}

.recdetail-grid-container revo-grid {
    font-family: 'Ubuntu', sans-serif;
    font-size: 12px;
}

.recdetail-grid-container revo-grid .rgHeaderCell {
    background-color: #f8f9fa !important;
    border-bottom: 1px solid #e9ecef !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #6B6F7D !important;
    padding: 6px 10px !important;
}

.recdetail-grid-container revo-grid .rgRow {
    border-bottom: 1px solid #f1f3f5 !important;
}

.recdetail-grid-container revo-grid .rgRow:last-child {
    border-bottom: none !important;
}

.recdetail-grid-container revo-grid .rgCell {
    font-size: 12px !important;
    color: #2D3748 !important;
    padding: 4px 10px !important;
}

.recdetail-grid-container revo-grid .rgCell[data-col="campo"] {
    font-weight: 500 !important;
    color: #718096 !important;
}

.recdetail-grid-container revo-grid .rgCell[data-col="valor"] {
    color: #2D3748 !important;
    word-break: break-word !important;
}

.recdetail-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    padding: 3px 0;
    font-size: 12px;
    min-width: 0;
}

.recdetail-row--full {
    flex-direction: column;
    align-items: stretch;
}

.recdetail-label {
    color: #718096;
    flex-shrink: 0;
    font-weight: 500;
}

.recdetail-value {
    color: #2D3748;
    text-align: right;
    word-break: break-word;
    min-width: 0;
}

.recdetail-row--full .recdetail-value {
    text-align: left;
    margin-top: 2px;
}

.recdetail-value--mono {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 11px;
    color: #4A5568;
}

.recdetail-text {
    font-size: 12px;
    color: #2D3748;
    line-height: 1.55;
    white-space: pre-wrap;
}

/* Painel IA */
.recdetail-ai-panel {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.recdetail-ai-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #eee;
    border-bottom: 1px solid var(--border-color, #eee);
}

.recdetail-ai-heading {
    width: 100%;
}

.recdetail-ai-heading {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.recdetail-ai-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    color: var(--text-primary, #333);
}

.recdetail-ai-icon {
    font-size: 18px;
}

.recdetail-ai-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    padding: 4px 10px;
    border-radius: 999px;
    background: #edf2f7;
    color: #4a5568;
    font-size: 11px;
    font-weight: 600;
}

.recdetail-ai-status--loading {
    background: #fff7ed;
    color: #c05621;
}

.recdetail-ai-status--error {
    background: #fff5f5;
    color: #c53030;
}

.recdetail-ai-status-spinner {
    animation: recdetail-spin 0.9s linear infinite;
}

.recdetail-ai-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    width: 100%;
}

.recdetail-ai-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: opacity 0.15s ease;
}

.recdetail-ai-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.recdetail-ai-btn--primary {
    background: #8C40E3;
    color: #fff;
}

.recdetail-ai-btn--primary:hover:not(:disabled) {
    background: #7838c9;
}

.recdetail-ai-btn--secondary {
    background: #fff;
    color: #4A5568;
    border-color: #CBD5E0;
}

.recdetail-ai-btn--secondary:hover {
    background: #F7FAFC;
}

.recdetail-ai-body {
    padding: 12px 16px;
    min-height: 80px;
    max-height: 360px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background:
        radial-gradient(circle at top right, rgba(140, 64, 227, 0.05), transparent 30%),
        linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}

.recdetail-ai-context {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(247, 250, 252, 0.95);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.recdetail-ai-context-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #718096;
}

.recdetail-ai-context-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.recdetail-ai-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    background: #ffffff;
    border: 1px solid #dbe4f0;
    border-radius: 999px;
    color: #2d3748;
    font-size: 11px;
    font-weight: 600;
}

.recdetail-ai-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 180px;
    padding: 24px;
    text-align: center;
    color: #4a5568;
}

.recdetail-ai-placeholder-spinner {
    font-size: 28px;
    color: #8c40e3;
    animation: recdetail-spin 0.9s linear infinite;
}

.recdetail-ai-placeholder-title {
    font-size: 15px;
    font-weight: 700;
    color: #2d3748;
}

.recdetail-ai-placeholder-text {
    max-width: 320px;
    font-size: 12.5px;
    line-height: 1.6;
}

.recdetail-ai-empty {
    color: #718096;
    font-size: 12.5px;
    line-height: 1.55;
    padding: 16px;
    background: #f7fafc;
    border: 1px dashed #cbd5e0;
    border-radius: 10px;
}

.recdetail-ai-empty-title {
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #2d3748;
}

.recdetail-ai-error {
    color: #E53E3E;
    font-size: 12.5px;
    background: #FFF5F5;
    border: 1px solid #FED7D7;
    border-radius: 4px;
    padding: 8px 12px;
}

.recdetail-ai-message {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 14px 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
}

.recdetail-ai-message-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8c40e3;
}

.recdetail-ai-output {
    min-width: 0;
    color: #2d3748;
}

.recdetail-ai-streaming {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #8c40e3;
    font-size: 12px;
    font-weight: 600;
}

.recdetail-md-h1,
.recdetail-md-h2,
.recdetail-md-h3 {
    color: #1a202c;
    font-weight: 700;
    line-height: 1.3;
}

.recdetail-md-h1 {
    margin: 0 0 12px;
    font-size: 20px;
}

.recdetail-md-h2 {
    margin: 18px 0 8px;
    font-size: 16px;
}

.recdetail-md-h3 {
    margin: 14px 0 6px;
    font-size: 14px;
}

.recdetail-md-p {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.75;
}

.recdetail-md-ul,
.recdetail-md-ol {
    margin: 0 0 12px;
    padding-left: 20px;
}

.recdetail-md-li {
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.7;
}

.recdetail-md-strong {
    font-weight: 700;
    color: #1a202c;
}

.recdetail-md-code {
    padding: 2px 6px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #7c2d12;
    font-size: 12px;
    font-family: Consolas, Monaco, monospace;
}

.recdetail-md-pre {
    margin: 0 0 12px;
    padding: 12px;
    border-radius: 10px;
    background: #0f172a;
    overflow-x: auto;
}

.recdetail-md-codeblock {
    color: #e2e8f0;
    font-size: 12px;
    line-height: 1.65;
    font-family: Consolas, Monaco, monospace;
}

.recdetail-md-blockquote {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-left: 3px solid #8c40e3;
    background: #faf5ff;
    color: #553c9a;
}

@keyframes recdetail-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1200px) {
    .recdetail-content.recdetail-content--expanded {
        grid-template-columns: minmax(0, 1fr) 320px;
    }
}

@media (max-width: 768px) {
    .recdetail-ai-header {
        flex-direction: column;
    }

    .recdetail-ai-actions {
        width: 100%;
        justify-content: stretch;
    }

    .recdetail-ai-btn {
        flex: 1 1;
        justify-content: center;
    }
}


/* ─── Chips de categoria/provedor/status ──────────────────────────────────── */
.recdetail-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.recdetail-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #d1d5db;
    font-size: 12px;
    font-weight: 500;
    color: #4A5568;
}
.recdetail-chip--priority strong {
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 2px;
}
.recdetail-chip--status {
    background: #EDF2F7;
    border-color: #CBD5E0;
    color: #2D3748;
}

/* ─── Estado sem economia financeira (seguranca/compliance) ──────────────── */
.recdetail-nonfinancial-state {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid #CBD5E0;
    border-left: 4px solid #718096;
    border-radius: 8px;
    background: #F7FAFC;
}
.recdetail-nonfinancial-state--security {
    border-color: #BFDBFE;
    border-left-color: #0078D4;
    background: #EFF6FF;
}
.recdetail-nonfinancial-icon {
    display: inline-flex;
    flex-shrink: 0;
    padding-top: 1px;
    color: #718096;
    font-size: 21px;
}
.recdetail-nonfinancial-state--security .recdetail-nonfinancial-icon { color: #0078D4; }
.recdetail-nonfinancial-copy { min-width: 0; flex: 1 1; }
.recdetail-nonfinancial-copy strong {
    display: block;
    color: #2D3748;
    font-size: 12px;
    font-weight: 700;
}
.recdetail-nonfinancial-copy p {
    margin: 3px 0 0;
    color: #4A5568;
    font-size: 11px;
    line-height: 1.45;
}
.recdetail-nonfinancial-badge {
    flex-shrink: 0;
    padding: 3px 8px;
    border: 1px solid #CBD5E0;
    border-radius: 999px;
    color: #718096;
    background: #fff;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

/* ─── KPI strip adaptativo ───────────────────────────────────────────────── */
.recdetail-kpi-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    grid-gap: 8px;
    gap: 8px;
    margin-bottom: 14px;
}
.recdetail-kpi-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 10px 12px;
    min-width: 0;
}
.recdetail-kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.recdetail-kpi-body { min-width: 0; flex: 1 1; }
.recdetail-kpi-label {
    font-size: 10px;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}
.recdetail-kpi-value {
    font-size: 14px;
    font-weight: 600;
    color: #2D3748;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.recdetail-kpi-hint {
    font-size: 10px;
    color: #A0AEC0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* ─── Hero (Resumo + Atual vs Recomendado) ────────────────────────────────── */
.recdetail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-gap: 12px;
    gap: 12px;
    margin-bottom: 14px;
}
@media (max-width: 900px) {
    .recdetail-hero { grid-template-columns: 1fr; }
}
.recdetail-hero-summary,
.recdetail-hero-comparison {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 14px 16px;
    min-width: 0;
}
.recdetail-hero-block + .recdetail-hero-block { margin-top: 12px; }
.recdetail-hero-title {
    font-size: 13px;
    font-weight: 600;
    color: #2D3748;
    margin: 0 0 8px 0;
}
.recdetail-hero-text {
    font-size: 12px;
    color: #4A5568;
    line-height: 1.5;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}
.recdetail-hero-block--action .recdetail-hero-text { color: #2F855A; }

/* ─── Tabela Atual vs Recomendado ─────────────────────────────────────────── */
.recdetail-comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.recdetail-comparison-table th,
.recdetail-comparison-table td {
    text-align: left;
    padding: 6px 8px;
    border-bottom: 1px solid #EDF2F7;
    word-break: break-word;
}
.recdetail-comparison-table thead th {
    background: #F7FAFC;
    font-weight: 600;
    color: #4A5568;
    font-size: 11px;
}
.recdetail-comparison-current { color: #C53030; }
.recdetail-comparison-recommended { color: #2F855A; }
.recdetail-comparison-table thead .recdetail-comparison-current { background: #FFF5F5; }
.recdetail-comparison-table thead .recdetail-comparison-recommended { background: #F0FFF4; }
.recdetail-comparison-note {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #EBF8FF;
    color: #2C5282;
    border: 1px solid #BEE3F8;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 11px;
    margin-top: 10px;
}
.recdetail-comparison-empty {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 11px;
    border: 1px dashed #CBD5E0;
    border-radius: 6px;
    background: #F8FAFC;
    color: #718096;
    font-size: 11px;
    line-height: 1.5;
}
.recdetail-comparison-empty-icon {
    flex-shrink: 0;
    color: #718096;
    font-size: 18px;
}


/* ─── Coluna esquerda adaptativa (modo expanded) ──────────────────────────── */
.recdetail-content.recdetail-content--expanded .recdetail-adaptive-col {
    min-width: 0;
    overflow: auto;
    align-content: start;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.recdetail-content.recdetail-content--expanded .recdetail-adaptive-col .recdetail-grid {
    overflow: visible;
    margin-bottom: 0;
}

/* ─── Status chip variants ────────────────────────────────────────────────── */
.recdetail-chip--status-new {
    background: #EBF8FF;
    border-color: #BEE3F8;
    color: #2C5282;
}
.recdetail-chip--status-applied {
    background: #F0FFF4;
    border-color: #C6F6D5;
    color: #2F855A;
}

/* ─── KPI variant accent (border-left subtle) ─────────────────────────────── */
.recdetail-kpi-card--success { border-left: 3px solid #38A169; }
.recdetail-kpi-card--warn    { border-left: 3px solid #F5A623; }
.recdetail-kpi-card--danger  { border-left: 3px solid #C53030; }
.recdetail-kpi-card--info    { border-left: 3px solid #3182CE; }
.recdetail-kpi-card--neutral { border-left: 3px solid #A0AEC0; }
.recdetail-kpi-card--primary { border-left: 3px solid #0078D4; }

/* ─── Definition list limpo (substitui RevoGrid nas secoes detalhe) ───────── */
.recdetail-deflist {
    display: grid;
    grid-template-columns: minmax(110px, max-content) 1fr;
    grid-gap: 4px 12px;
    gap: 4px 12px;
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
}
.recdetail-deflist-dt {
    color: #718096;
    font-weight: 500;
    padding: 4px 0;
    border-bottom: 1px solid #F1F3F5;
    white-space: nowrap;
}
.recdetail-deflist-dd {
    margin: 0;
    color: #2D3748;
    padding: 4px 0;
    border-bottom: 1px solid #F1F3F5;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}
.recdetail-deflist > :nth-last-child(-n+2) {
    border-bottom: none;
}

/* ─── Marca de IA no resumo executivo ─────────────────────────────────────── */
.recdetail-hero-ai-mark {
    color: #8C40E3;
    margin-right: 4px;
    vertical-align: -2px;
}
.recdetail-hero-ai-spinner {
    color: #8C40E3;
    animation: recdetailSpin 1s linear infinite;
    margin-right: 4px;
    vertical-align: -2px;
}
.recdetail-hero-text--muted {
    color: #A0AEC0;
    font-style: italic;
}
@keyframes recdetailSpin {
    to { transform: rotate(360deg); }
}

/* ─── Painel de criação de demanda (governanca FinOps) ─────────────────────── */
.recdetail-demand {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 18px;
    border: 1px solid #D9C7F5;
    border-left: 4px solid #8C40E3;
    border-radius: 8px;
    background: linear-gradient(180deg, #F7F1FE 0%, #FFFFFF 100%);
    box-shadow: 0 4px 16px rgba(140, 64, 227, 0.12);
}
.recdetail-demand-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.recdetail-demand-icon {
    color: #8C40E3;
    flex-shrink: 0;
    font-size: 24px;
    margin-top: 1px;
}
.recdetail-demand-headtext { min-width: 0; }
.recdetail-demand-badge {
    display: inline-block;
    margin-bottom: 6px;
    padding: 2px 9px;
    border-radius: 11px;
    background: #8C40E3;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.recdetail-demand-title {
    margin: 0 0 2px;
    font-size: 14px;
    font-weight: 700;
    color: #44337A;
}
.recdetail-demand-sub {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: #6B6480;
}
.recdetail-demand-savings {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 5px 10px;
    border-radius: 6px;
    background: #EFFBF3;
    border: 1px solid #C6F6D5;
    font-size: 12px;
    color: #276749;
}
.recdetail-demand-savings-icon {
    flex-shrink: 0;
    font-size: 16px;
    color: #38A169;
}
.recdetail-demand-savings strong {
    font-weight: 700;
    color: #22543D;
}
.recdetail-demand-savings-period {
    color: #4A7C59;
    font-weight: 500;
}
.recdetail-demand-btn {
    align-self: stretch;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: #8C40E3;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(140, 64, 227, 0.25);
    transition: background 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}
.recdetail-demand-btn:hover:not(:disabled) {
    background: #7838c9;
    box-shadow: 0 4px 12px rgba(140, 64, 227, 0.35);
}
.recdetail-demand-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.recdetail-demand-btn-spin {
    animation: recdetailSpin 1s linear infinite;
}
.recdetail-demand-result {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 12px;
}
.recdetail-demand-result--ok {
    background: #F0FFF4;
    border: 1px solid #C6F6D5;
}
.recdetail-demand-result--err {
    background: #FFF5F5;
    border: 1px solid #FED7D7;
}
.recdetail-demand-result-icon {
    flex-shrink: 0;
    font-size: 20px;
    margin-top: 1px;
}
.recdetail-demand-result--ok .recdetail-demand-result-icon { color: #38A169; }
.recdetail-demand-result--err .recdetail-demand-result-icon { color: #C53030; }
.recdetail-demand-result-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.recdetail-demand-result-body strong {
    font-size: 12px;
    font-weight: 600;
    color: #2D3748;
}
.recdetail-demand-result-text {
    color: #4A5568;
    line-height: 1.45;
}
.recdetail-demand-link {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 0;
    background: none;
    border: none;
    color: #8C40E3;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.recdetail-demand-link:hover { text-decoration: underline; }

/* Consolidated Recommendations - RevoGrid styling helpers */

.cr-grid-wrapper {
    width: 100%;
    height: 100%;
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.cr-grid-wrapper revo-grid {
    flex: 1 1;
    min-height: 0;
}

/* Linha clicavel para abrir detalhes */
.cr-grid-wrapper revo-grid .rgRow {
    cursor: pointer;
}

/* Alinhamento numerico nas celulas marcadas */
revo-grid .revo-cell--right {
    text-align: right;
    justify-content: flex-end;
}

revo-grid .revo-cell--center {
    text-align: center;
    justify-content: center;
}

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

/* ── Cabecalho RevoGrid no estilo do LcInfiniteTable ──────────────────── */
.cr-grid-wrapper revo-grid .header-rgRow,
.cr-grid-wrapper revo-grid .rgHeaderCell {
    background-color: #fff !important;
    border-bottom: solid 1px #E2E6F3 !important;
    min-height: 28px;
}

.cr-grid-wrapper revo-grid .rgHeaderCell {
    font-family: "Ubuntu", sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1px;
    color: #6B6F7D;
    text-transform: none;
    border: none !important;
    box-shadow: none !important;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}

/* Remover qualquer separador vertical/resizer no header */
.cr-grid-wrapper revo-grid .rgHeaderCell::before,
.cr-grid-wrapper revo-grid .rgHeaderCell::after,
.cr-grid-wrapper revo-grid .rgHeaderCell .resizable-r,
.cr-grid-wrapper revo-grid .header-rgRow .resizable-r,
.cr-grid-wrapper revo-grid .header-rgRow .resize-r {
    border: none !important;
    background: transparent !important;
}

/* Anular borders/box-shadows laterais herdados do tema (especialmente do
   colPinStart que separa a coluna pinada do restante do header) */
.cr-grid-wrapper revo-grid revogr-header,
.cr-grid-wrapper revo-grid revogr-header .rgHeaderCell,
.cr-grid-wrapper revo-grid revogr-viewport-scroll.colPinStart revogr-header,
.cr-grid-wrapper revo-grid revogr-viewport-scroll.colPinStart revogr-header .rgHeaderCell,
.cr-grid-wrapper revo-grid revogr-viewport-scroll.colPinEnd revogr-header,
.cr-grid-wrapper revo-grid revogr-viewport-scroll.colPinEnd revogr-header .rgHeaderCell {
    box-shadow: none !important;
    border-left: none !important;
    border-right: none !important;
}

.cr-grid-wrapper revo-grid .rgHeaderCell:hover {
    color: #2E1956;
    background-color: #FAFBFD !important;
}

.cr-grid-wrapper revo-grid .rgHeaderCell.sortable {
    cursor: pointer;
}

/* Indicador de ordenacao */
.cr-grid-wrapper revo-grid .rgHeaderCell .header-content {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cr-grid-wrapper revo-grid .rgHeaderCell.sort-asc,
.cr-grid-wrapper revo-grid .rgHeaderCell.sort-desc {
    color: #2E1956;
}

.cr-grid-wrapper revo-grid .rgHeaderCell .sort-icon,
.cr-grid-wrapper revo-grid .rgHeaderCell.sort-asc::after,
.cr-grid-wrapper revo-grid .rgHeaderCell.sort-desc::after {
    color: #471FCC;
    font-size: 0.65rem;
}

/* Linhas e celulas */
.cr-grid-wrapper revo-grid .rgRow {
    border-bottom: 1px solid #F1F3F8;
}

.cr-grid-wrapper revo-grid .rgRow:hover {
    background-color: #FAFBFD;
}

.cr-grid-wrapper revo-grid .rgCell {
    font-family: "Ubuntu", sans-serif;
    font-size: 0.75rem;
    color: #2E1956;
    padding: 4px 8px;
    border-right: none !important;
}

/* Linha de redimensionamento mais discreta */
.cr-grid-wrapper revo-grid .resizable-r {
    border-right: 1px solid #E2E6F3;
}

/* ── Popup de filtro do RevoGrid - Estilo LiveCloud ──────────────────────── */
.cr-grid-wrapper revogr-filter-panel,
revo-grid revogr-filter-panel {
    font-family: "Ubuntu", sans-serif !important;
    background: #fff !important;
    border: 1px solid #E2E6F3 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(46, 25, 86, 0.12) !important;
    padding: 12px !important;
    min-width: 200px !important;
}

/* Titulo do filtro */
.cr-grid-wrapper revogr-filter-panel .filter-header,
revo-grid revogr-filter-panel .filter-header,
.cr-grid-wrapper revogr-filter-panel label,
revo-grid revogr-filter-panel label {
    font-family: "Ubuntu", sans-serif !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    color: #2E1956 !important;
    margin-bottom: 8px !important;
}

/* Select/Dropdown do filtro */
.cr-grid-wrapper revogr-filter-panel select,
revo-grid revogr-filter-panel select {
    font-family: "Ubuntu", sans-serif !important;
    font-size: 0.8rem !important;
    color: #2E1956 !important;
    background: #fff !important;
    border: 1px solid #E2E6F3 !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    width: 100% !important;
    margin-bottom: 12px !important;
    cursor: pointer !important;
    transition: border-color 0.2s ease !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2712%27 height=%2712%27 viewBox=%270 0 12 12%27%3E%3Cpath fill=%27%236B6F7D%27 d=%27M2 4l4 4 4-4%27/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    padding-right: 30px !important;
}

.cr-grid-wrapper revogr-filter-panel select:focus,
revo-grid revogr-filter-panel select:focus {
    outline: none !important;
    border-color: #471FCC !important;
}

.cr-grid-wrapper revogr-filter-panel select:hover,
revo-grid revogr-filter-panel select:hover {
    border-color: #471FCC !important;
}

/* Input de texto do filtro */
.cr-grid-wrapper revogr-filter-panel input[type="text"],
.cr-grid-wrapper revogr-filter-panel input[type="number"],
revo-grid revogr-filter-panel input[type="text"],
revo-grid revogr-filter-panel input[type="number"] {
    font-family: "Ubuntu", sans-serif !important;
    font-size: 0.8rem !important;
    color: #2E1956 !important;
    background: #fff !important;
    border: 1px solid #E2E6F3 !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    width: 100% !important;
    margin-bottom: 12px !important;
    transition: border-color 0.2s ease !important;
}

.cr-grid-wrapper revogr-filter-panel input:focus,
revo-grid revogr-filter-panel input:focus {
    outline: none !important;
    border-color: #471FCC !important;
}

/* Container dos botoes */
.cr-grid-wrapper revogr-filter-panel .filter-actions,
revo-grid revogr-filter-panel .filter-actions,
.cr-grid-wrapper revogr-filter-panel .buttons,
revo-grid revogr-filter-panel .buttons {
    display: flex !important;
    gap: 8px !important;
    margin-top: 4px !important;
}

/* Botao base */
.cr-grid-wrapper revogr-filter-panel button,
revo-grid revogr-filter-panel button {
    font-family: "Ubuntu", sans-serif !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    flex: 1 1 !important;
    min-width: 70px !important;
    height: 32px !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
}

/* Botao OK - estilo primario */
.cr-grid-wrapper revogr-filter-panel button:first-of-type,
revo-grid revogr-filter-panel button:first-of-type,
.cr-grid-wrapper revogr-filter-panel button[type="submit"],
revo-grid revogr-filter-panel button[type="submit"] {
    background: #2E1956 !important;
    color: #fff !important;
    border: 1px solid #2E1956 !important;
}

.cr-grid-wrapper revogr-filter-panel button:first-of-type:hover,
revo-grid revogr-filter-panel button:first-of-type:hover,
.cr-grid-wrapper revogr-filter-panel button[type="submit"]:hover,
revo-grid revogr-filter-panel button[type="submit"]:hover {
    background: #471FCC !important;
    border-color: #471FCC !important;
}

/* ── Toolbar acima da grid (Agrupar / Colunas) ─────────────────────── */
.cr-grid-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px 8px;
    flex-wrap: wrap;
}
.cr-grid-toolbar-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #475569;
}
.cr-grid-toolbar-label { font-weight: 500; }
.cr-grid-toolbar-select {
    height: 26px;
    padding: 0 8px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #fff;
    font-size: 11px;
    color: #1e293b;
    font-family: 'Ubuntu', sans-serif;
    cursor: pointer;
    outline: none;
}
.cr-grid-toolbar-select:focus { border-color: #2E1956; }
.cr-grid-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 26px;
    padding: 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #fff;
    color: #475569;
    font-size: 11px;
    cursor: pointer;
    font-family: 'Ubuntu', sans-serif;
    transition: all .15s ease;
}
.cr-grid-toolbar-btn:hover { border-color: #cbd5e1; color: #1e293b; }
.cr-grid-toolbar-btn.active { border-color: #2E1956; background: #f5f3fa; color: #2E1956; }

/* Botoes discretos de expandir/recolher todos os grupos */
.cr-grid-toolbar-iconbtn {
    width: 22px;
    height: 22px;
    margin-left: 2px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: #8a86a6;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 120ms, color 120ms, border-color 120ms;
}
.cr-grid-toolbar-iconbtn:hover:not(:disabled) {
    background: #f5f3fa;
    color: #2E1956;
    border-color: #e2e8f0;
}
.cr-grid-toolbar-iconbtn:disabled {
    color: #d4d2e0;
    cursor: not-allowed;
}

/* ── Popover de configurar colunas ─────────────────────────────────── */
.cr-col-config-panel {
    position: fixed;
    width: 320px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    z-index: 9999;
    font-family: 'Ubuntu', sans-serif;
    font-size: 12px;
}
.cr-col-config-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 600;
    color: #1e293b;
}
.cr-col-config-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px;
    display: inline-flex;
    border-radius: 3px;
}
.cr-col-config-close:hover { background: #f1f5f9; color: #475569; }
.cr-col-config-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 360px;
    overflow-y: auto;
}
.cr-col-config-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    transition: background .15s;
}
.cr-col-config-item:hover { background: #f8fafc; }
.cr-col-config-item.hidden { opacity: 0.55; }
.cr-col-config-item.fixed .cr-col-config-label::after {
    content: ' (fixa)';
    color: #94a3b8;
    font-size: 10px;
}
.cr-col-config-vis {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #475569;
}
.cr-col-config-vis:hover:not(:disabled) { border-color: #2E1956; color: #2E1956; }
.cr-col-config-vis:disabled { cursor: not-allowed; opacity: 0.5; }
.cr-col-config-label {
    flex: 1 1;
    color: #1e293b;
    font-size: 12px;
}
.cr-col-config-arrows {
    display: inline-flex;
    gap: 2px;
}
.cr-col-config-arrows button {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
}
.cr-col-config-arrows button:hover:not(:disabled) { border-color: #2E1956; color: #2E1956; }
.cr-col-config-arrows button:disabled { cursor: not-allowed; opacity: 0.3; }
.cr-col-config-footer {
    padding: 8px 12px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
}
.cr-col-config-reset {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 11px;
    color: #475569;
    cursor: pointer;
    font-family: 'Ubuntu', sans-serif;
}
.cr-col-config-reset:hover { border-color: #2E1956; color: #2E1956; }

/* Botao Limpar - estilo secundario */
.cr-grid-wrapper revogr-filter-panel button:last-of-type,
revo-grid revogr-filter-panel button:last-of-type,
.cr-grid-wrapper revogr-filter-panel button[type="reset"],
revo-grid revogr-filter-panel button[type="reset"] {
    background: #fff !important;
    color: #6B6F7D !important;
    border: 1px solid #E2E6F3 !important;
}

.cr-grid-wrapper revogr-filter-panel button:last-of-type:hover,
revo-grid revogr-filter-panel button:last-of-type:hover,
.cr-grid-wrapper revogr-filter-panel button[type="reset"]:hover,
revo-grid revogr-filter-panel button[type="reset"]:hover {
    background: #F5F6FA !important;
    border-color: #C5C9D6 !important;
    color: #2E1956 !important;
}

/* Caso so tenha um botao, aplicar estilo primario */
.cr-grid-wrapper revogr-filter-panel button:only-of-type,
revo-grid revogr-filter-panel button:only-of-type {
    background: #2E1956 !important;
    color: #fff !important;
    border: 1px solid #2E1956 !important;
}

.cr-grid-wrapper revogr-filter-panel button:only-of-type:hover,
revo-grid revogr-filter-panel button:only-of-type:hover {
    background: #471FCC !important;
    border-color: #471FCC !important;
}




.anomaly-grid-toolbar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 4px 12px;
    flex: 0 0 auto;
}

.anomaly-toolbar-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.anomaly-results-layout {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
}

.anomaly-toolbar-explanation {
    flex: 1 1 420px;
    font-size: 12px;
    line-height: 1.4;
    color: #555;
}

.anomaly-help-subtitle {
    margin: 4px 0 0;
    font-size: 14px;
    color: #333;
}

.anomaly-toolbar-group {
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: center;
}

.anomaly-toolbar-group label {
    font-size: 11px;
    font-weight: 600;
    color: #6b6b6b;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.anomaly-toolbar-group select {
    height: 30px;
    border: 1px solid #d6d6d6;
    border-radius: 6px;
    padding: 0 8px;
    background: #fff;
    font-size: 13px;
    color: #333;
}

/* ── Agrupar por / Configurar colunas ─────────────────────────────── */
.anomaly-groupby-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #475569;
}
.anomaly-groupby-label { font-weight: 500; }
.anomaly-groupby-select {
    height: 26px;
    padding: 0 8px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #fff;
    font-size: 11px;
    color: #1e293b;
    cursor: pointer;
    outline: none;
}
.anomaly-groupby-select:focus { border-color: #2E1956; }

.anomaly-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 26px;
    padding: 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #fff;
    color: #475569;
    font-size: 11px;
    cursor: pointer;
    transition: all .15s ease;
}
.anomaly-toolbar-btn:hover { border-color: #cbd5e1; color: #1e293b; }
.anomaly-toolbar-btn.active { border-color: #2E1956; background: #f5f3fa; color: #2E1956; }

.anomaly-toolbar-iconbtn {
    width: 22px;
    height: 22px;
    margin-left: 2px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: #8a86a6;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 120ms, color 120ms, border-color 120ms;
}
.anomaly-toolbar-iconbtn:hover:not(:disabled) {
    background: #f5f3fa;
    color: #2E1956;
    border-color: #e2e8f0;
}
.anomaly-toolbar-iconbtn:disabled {
    color: #d4d2e0;
    cursor: not-allowed;
}

/* ── Popover de configurar colunas ─────────────────────────────────── */
.anomaly-col-config-panel {
    position: fixed;
    width: 320px;
    height: 380px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    z-index: 9999;
    font-size: 12px;
}
.anomaly-col-config-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 600;
    color: #1e293b;
}
.anomaly-col-config-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px;
    display: inline-flex;
    border-radius: 3px;
}
.anomaly-col-config-close:hover { background: #f1f5f9; color: #475569; }
.anomaly-col-config-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    overflow-y: auto;
}
.anomaly-col-config-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    transition: background .15s;
}
.anomaly-col-config-item:hover { background: #f8fafc; }
.anomaly-col-config-item.anomaly-col-hidden { opacity: 0.55 !important; display: flex !important; }
.anomaly-col-config-item.fixed .anomaly-col-config-label::after {
    content: ' (fixa)';
    color: #94a3b8;
    font-size: 10px;
}
.anomaly-col-config-vis {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #475569;
}
.anomaly-col-config-vis:hover:not(:disabled) { border-color: #2E1956; color: #2E1956; }
.anomaly-col-config-vis:disabled { cursor: not-allowed; opacity: 0.5; }
.anomaly-col-config-label {
    flex: 1 1;
    color: #1e293b;
    font-size: 12px;
}
.anomaly-col-config-arrows {
    display: inline-flex;
    gap: 2px;
}
.anomaly-col-config-arrows button {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
}
.anomaly-col-config-arrows button:hover:not(:disabled) { border-color: #2E1956; color: #2E1956; }
.anomaly-col-config-arrows button:disabled { cursor: not-allowed; opacity: 0.3; }
.anomaly-col-config-footer {
    padding: 8px 12px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
}
.anomaly-col-config-reset {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 11px;
    color: #475569;
    cursor: pointer;
}
.anomaly-col-config-reset:hover { border-color: #2E1956; color: #2E1956; }

.anomaly-refresh-btn {
    height: 30px;
    padding: 0 14px;
    border: none;
    border-radius: 6px;
    background: #8C40E3;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.anomaly-refresh-btn:hover {
    background: #7a33cc;
}

.anomaly-detect-btn {
    height: 30px;
    padding: 0 14px;
    border: none;
    border-radius: 6px;
    background: #2E7D32;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.anomaly-detect-btn:hover {
    background: #276b2a;
}

.anomaly-detect-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* Neutraliza centralizacao/limites de altura do LCDashboard para o card da listagem,
   garantindo que o RevoGrid receba uma altura real (senao o corpo virtualizado nao pinta). */
.lcdashboard .card-frame.anomaly-list-shell {
    height: 100%;
    min-height: 0;
}

.lcdashboard .card-frame.anomaly-list-shell .card-content-body {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: stretch !important;
    align-items: stretch !important;
    overflow: hidden;
}

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

.anomaly-grid-wrapper {
    flex: 1 1 auto;
    min-height: 320px;
    height: auto;
}

.anomaly-grid-wrapper revo-grid {
    height: 100%;
}

/* Alinhamento a direita para colunas numericas (numeros comparaveis por ordem de grandeza). */
.anomaly-grid-wrapper revo-grid .revo-cell--right,
.anomaly-grid-wrapper revo-grid .revo-cell--right .rgCell {
    text-align: right;
    justify-content: flex-end;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.anomaly-severity-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    white-space: nowrap;
}

.anomaly-detail {
    padding: 4px 2px;
}

.anomaly-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.anomaly-detail-provider {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #444;
}

.anomaly-detail h4 {
    margin: 4px 0 14px;
    font-size: 15px;
    color: #222;
    word-break: break-all;
}

.anomaly-detail-chart {
    margin:16px 0;
    padding: 16px 18px 10px;
    background: #fff;
    border: 1px solid #e1e4ec;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(58, 79, 135, 0.08);
}

.anomaly-detail-chart.expanded {
    margin: 0;
}

.anomaly-detail-identity-card {
    padding: 14px 18px 12px;
    border: 1px solid #e1e4ec;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(58, 79, 135, 0.08);
}

.anomaly-chart-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: #555;
}

.anomaly-chart-impact {
    font-size: 13px;
    font-weight: 700;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.anomaly-chart-caption {
    margin: 4px 0 0;
    font-size: 11px;
    color: #777;
    line-height: 1.35;
}

.anomaly-chart-caption strong {
    color: #E64646;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.anomaly-chart-points {
    margin: 2px 0 0;
    font-size: 10px;
    color: #999;
}

/* Fullscreen do SideModal de detalhe: dados à esquerda, gráfico à direita */
.anomaly-detail.expanded {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    grid-template-areas:
        "identity identity"
        "understanding understanding"
        "facts chart"
        "reason reason";
    grid-column-gap: 28px;
    column-gap: 28px;
    grid-row-gap: 16px;
    row-gap: 16px;
    align-items: start;
}

.anomaly-detail.expanded .anomaly-detail-identity-card { grid-area: identity; }
.anomaly-detail.expanded .anomaly-detail-chart { grid-area: chart; }
.anomaly-detail.expanded .anomaly-detail-facts-card { grid-area: facts; }
.anomaly-detail.expanded .anomaly-understanding-card { grid-area: understanding; }
.anomaly-detail.expanded .anomaly-detail-reason { grid-area: reason; }

@media (max-width: 900px) {
    .anomaly-detail.expanded {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "identity"
            "understanding"
            "chart"
            "facts"
            "reason";
    }
}

.anomaly-detail-list {
    display: grid;
    grid-template-columns: minmax(150px, 0.8fr) minmax(0, 1.2fr);
    grid-row-gap: 7px;
    row-gap: 7px;
    grid-column-gap: 16px;
    column-gap: 16px;
    margin: 0;
}

.anomaly-detail-facts-card {
    padding: 16px 18px;
    border: 1px solid #e1e4ec;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(58, 79, 135, 0.08);
}

.anomaly-detail-facts-card h5 {
    margin: 0 0 14px;
    color: #1f356d;
    font-size: 16px;
    font-weight: 600;
}

.anomaly-detail-list dt {
    font-size: 12px;
    font-weight: 600;
    color: #777;
    padding-bottom: 2px;
}

.anomaly-detail-list dd {
    margin: 0;
    font-size: 13px;
    color: #222;
    min-width: 0;
    overflow-wrap: break-word;
    padding-bottom: 2px;
}

.anomaly-detail-list dd.anomaly-num {
    text-align: left;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.anomaly-detail-reason {
    margin-top: 14px;
    padding: 10px 12px;
    background: #f6f2fc;
    border-left: 3px solid #8C40E3;
    border-radius: 4px;
    font-size: 13px;
    color: #444;
}

.anomaly-settings-btn {
    height: 30px;
    padding: 0 14px;
    border: 1px solid #8C40E3;
    border-radius: 6px;
    background: #fff;
    color: #8C40E3;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.anomaly-settings-btn:hover {
    background: #f6f2fc;
}

.anomaly-settings {
    padding: 4px 2px 80px;
}

.anomaly-settings-section {
    margin-bottom: 20px;
}

.anomaly-settings-section h5 {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.anomaly-settings-hint {
    margin: 0 0 10px;
    font-size: 12px;
    color: #888;
    line-height: 1.4;
}

.anomaly-sensitivity-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.anomaly-sensitivity-chip {
    flex: 1 1;
    min-width: 70px;
    padding: 8px 10px;
    border: 1px solid #d6d6d6;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    transition: all .15s ease;
}

.anomaly-sensitivity-chip small {
    display: block;
    font-size: 10px;
    font-weight: 500;
    color: #999;
    margin-top: 2px;
}

.anomaly-sensitivity-chip.active {
    border-color: #8C40E3;
    background: #f6f2fc;
    color: #8C40E3;
}

.anomaly-sensitivity-chip.active small {
    color: #8C40E3;
}

.anomaly-toggle-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 8px;
    gap: 8px;
}

.anomaly-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    font-size: 13px;
    color: #444;
    cursor: pointer;
}

.anomaly-toggle input {
    accent-color: #8C40E3;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.anomaly-field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
}

.anomaly-field-row label {
    font-size: 13px;
    color: #444;
    flex: 1 1;
}

.anomaly-field-row .anomaly-level-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.anomaly-field-row input[type="number"] {
    width: 90px;
    height: 30px;
    border: 1px solid #d6d6d6;
    border-radius: 6px;
    padding: 0 8px;
    font-size: 13px;
    text-align: right;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.anomaly-settings-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    gap: 10px;
    padding: 12px 18px;
    background: #fff;
    border-top: 1px solid #eee;
}

.anomaly-settings-footer button {
    height: 36px;
    flex: 1 1;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.anomaly-btn-save {
    background: #8C40E3;
    color: #fff;
}

.anomaly-btn-save:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.anomaly-btn-cancel {
    background: #f0f0f0;
    color: #555;
}

.anomaly-notify-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.anomaly-notify-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    cursor: pointer;
    transition: all .15s ease;
}

.anomaly-notify-option.active {
    border-color: #8C40E3;
    background: #f6f2fc;
}

.anomaly-notify-option input {
    accent-color: #8C40E3;
    margin-top: 2px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.anomaly-notify-option span {
    font-size: 13px;
    font-weight: 600;
    color: #444;
}

.anomaly-notify-option span small {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #999;
    margin-top: 2px;
}

.anomaly-recipients {
    margin-top: 12px;
}

.anomaly-recipient-input {
    display: flex;
    gap: 8px;
}

.anomaly-recipient-input input {
    flex: 1 1;
    height: 32px;
    border: 1px solid #d6d6d6;
    border-radius: 6px;
    padding: 0 10px;
    font-size: 13px;
}

.anomaly-recipient-input button {
    height: 32px;
    padding: 0 14px;
    border: none;
    border-radius: 6px;
    background: #8C40E3;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.anomaly-recipient-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.anomaly-recipient-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: #f5f5f7;
    border-radius: 6px;
    font-size: 13px;
    color: #333;
}

.anomaly-recipient-list li button {
    border: none;
    background: transparent;
    color: #E64646;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.anomaly-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.anomaly-preview-recipients-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #d0d0d8;
    background: #fff;
    color: #2e6df6;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.anomaly-preview-recipients-btn:hover {
    background: #f0f5ff;
    border-color: #2e6df6;
}

.anomaly-recipients-preview {
    padding: 4px 0;
}

.anomaly-recipients-preview-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.anomaly-recipients-preview-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    background: #f5f5f7;
    border-radius: 8px;
}

.anomaly-recipient-identity {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.anomaly-recipient-name {
    font-size: 13px;
    font-weight: 600;
    color: #2a2a2a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.anomaly-recipient-email {
    font-size: 12px;
    color: #777;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.anomaly-recipient-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
}

.anomaly-recipient-source {
    font-size: 11px;
    color: #2e6df6;
    background: #e8f0ff;
    border-radius: 10px;
    padding: 2px 8px;
    white-space: nowrap;
}

/* === Requisitos de coleta por provedor === */
.anomaly-requirements {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.anomaly-req-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 8px 10px;
    background: #f6f6f9;
    border-radius: 8px;
}

.anomaly-req-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #555;
}

.anomaly-req-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.anomaly-req-provider {
    border: 1px solid #ececf1;
    border-radius: 10px;
    padding: 14px 16px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.anomaly-req-provider-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.anomaly-req-provider-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #2b2b2b;
}

.anomaly-req-granularity {
    font-size: 11px;
    font-weight: 600;
    color: #6b6b6b;
    background: #f1f1f4;
    border-radius: 10px;
    padding: 3px 10px;
    white-space: nowrap;
}

.anomaly-req-metrics {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.anomaly-req-metric {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.anomaly-req-tier {
    flex: 0 0 auto;
    min-width: 76px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    border-radius: 6px;
    padding: 3px 8px;
    margin-top: 2px;
}

.anomaly-req-metric-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.anomaly-req-metric-name {
    font-size: 13px;
    font-weight: 700;
    color: #333;
}

.anomaly-req-metric-detail {
    font-size: 12px;
    color: #555;
}

.anomaly-req-metric-need {
    font-size: 12px;
    color: #b06a00;
}

.anomaly-req-metric-fallback {
    font-size: 12px;
    color: #777;
    font-style: italic;
}

.anomaly-req-block h6 {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: #6b6b6b;
}

.anomaly-req-block ul {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.anomaly-req-block li {
    font-size: 12px;
    color: #555;
}

.anomaly-req-note {
    margin: 0;
    font-size: 12px;
    color: #777;
    background: #f6f6f9;
    border-left: 3px solid #d6d6dd;
    border-radius: 0 6px 6px 0;
    padding: 8px 10px;
}

.anomaly-understanding-card {
    margin: 10px 0 14px;
    padding: 12px 14px;
    border: 1px solid #dbe7ff;
    border-left: 4px solid #2e6df6;
    border-radius: 8px;
    background: #f6f9ff;
    color: #333;
}

.anomaly-understanding-card strong {
    font-size: 13px;
    color: #1f4fa8;
}

.anomaly-understanding-card p {
    margin: 4px 0 10px;
    font-size: 13px;
    line-height: 1.45;
}

.anomaly-understanding-card p:last-child {
    margin-bottom: 0;
}


