/* ───────────────────────────────────────────────────────────────────────────
   Aba "Reserva, Compromisso e Automação" (decisão de otimização) — prefixo rcd-
   Apresentação read-only da CommitmentDecision + AgentDecisionTrace (spec 03/07).
   Reusa as variáveis de tema do portal; números financeiros alinhados à direita.
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Barra de abas do modal ───────────────────────────────────────────────── */
.rcd-tabbar {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid #E2E6F3;
    border-bottom: 1px solid var(--line-default, #E2E6F3);
    margin-bottom: 10px;
    flex-shrink: 0;
}

.rcd-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #888;
    color: var(--text-secondary, #888);
    border-bottom: 2px solid transparent;
    transition: color .15s ease, border-color .15s ease;
    white-space: nowrap;
}

.rcd-tab:hover {
    color: #471FCC;
    color: var(--color-primary-blue, #471FCC);
}

.rcd-tab--active {
    color: #471FCC;
    color: var(--color-primary-blue, #471FCC);
    border-bottom-color: #471FCC;
    border-bottom-color: var(--color-primary-blue, #471FCC);
}

.rcd-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #471FCC;
    background: var(--color-primary-blue, #471FCC);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

/* ── Container ─────────────────────────────────────────────────────────────── */
.rcd-root {
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: auto;
    padding: 2px 2px 16px;
}

.rcd-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 8px;
}

/* ── Banner de estado (bloqueado / rightsizing antes) ─────────────────────── */
.rcd-banner {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 12.5px;
    line-height: 1.45;
}

.rcd-banner-icon {
    flex-shrink: 0;
    margin-top: 1px;
}

.rcd-banner-title {
    font-weight: 700;
    margin-bottom: 2px;
}

.rcd-banner-content {
    flex: 1 1;
    min-width: 0;
}

.rcd-banner-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 9px;
}

.rcd-banner-btn {
    padding: 6px 10px;
    font-size: 11.5px;
}

.rcd-banner--blocked {
    background: #ffebee;
    border-color: #ffcdd2;
    color: #b71c1c;
}

.rcd-banner--warn {
    background: #fff3e0;
    border-color: #ffe0b2;
    color: #b35400;
}

/* ── Seções ───────────────────────────────────────────────────────────────── */
.rcd-section {
    background: #fff;
    border: 1px solid #E2E6F3;
    border: 1px solid var(--line-default, #E2E6F3);
    border-radius: 10px;
    padding: 14px 16px;
}

.rcd-section-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    color: #2E1956;
    color: var(--text-default, #2E1956);
    margin: 0 0 12px;
}

.rcd-section-subtitle {
    font-size: 11px;
    font-weight: 400;
    color: #888;
    color: var(--text-secondary, #888);
    margin-left: auto;
}

/* ── Card de decisão final (7.1) ──────────────────────────────────────────── */
.rcd-final-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.rcd-final-decision {
    font-size: 15px;
    font-weight: 800;
    color: #2E1956;
    color: var(--text-default, #2E1956);
}

.rcd-final-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-gap: 10px 18px;
    gap: 10px 18px;
}

.rcd-savings-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-gap: 10px 18px;
    gap: 10px 18px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #E2E6F3;
    border-top: 1px dashed var(--line-default, #E2E6F3);
}

.rcd-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.rcd-field-label {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #888;
    color: var(--text-secondary, #888);
}

.rcd-field-value {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    color: var(--text-primary, #333);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rcd-field--savings .rcd-field-value {
    font-size: 15px;
    font-weight: 800;
    color: #2e7d32;
}

/* ── Números financeiros: alinhados à direita, separador decimal alinhado ──── */
.rcd-num {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    text-align: right;
    white-space: nowrap;
}

td.rcd-num,
th.rcd-num {
    text-align: right;
}

/* ── Badges (reuso do padrão de confiança/risco) ──────────────────────────── */
.rcd-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
}

.rcd-badge--green { color: #2e7d32; background: #e8f5e9; }
.rcd-badge--amber { color: #b35400; background: #fff3e0; }
.rcd-badge--red   { color: #c62828; background: #ffebee; }
.rcd-badge--grey  { color: #546e7a; background: #eceff1; }
.rcd-badge--blue  { color: #471FCC; background: #efeaff; }

/* ── Tabela (comparativo de custos / fatores) ─────────────────────────────── */
.rcd-table-wrap {
    overflow-x: auto;
}

.rcd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.rcd-table th,
.rcd-table td {
    padding: 7px 10px;
    border-bottom: 1px solid #E2E6F3;
    border-bottom: 1px solid var(--line-default, #E2E6F3);
    text-align: left;
    vertical-align: middle;
}

.rcd-table th {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .02em;
    color: #888;
    color: var(--text-secondary, #888);
    font-weight: 700;
    background: #f7f8fc;
    background: var(--background-secondary, #f7f8fc);
    position: sticky;
    top: 0;
}

.rcd-table tbody tr:hover {
    background: rgba(71, 31, 204, 0.03);
}

.rcd-row-label {
    font-weight: 600;
    color: #333;
    color: var(--text-primary, #333);
}

.rcd-row--chosen {
    background: #efeaff !important;
}

.rcd-row--chosen .rcd-row-label {
    color: #471FCC;
    color: var(--color-primary-blue, #471FCC);
    font-weight: 800;
}

.rcd-chosen-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 8px;
    background: #471FCC;
    background: var(--color-primary-blue, #471FCC);
    color: #fff;
    font-size: 9.5px;
    font-weight: 700;
    vertical-align: middle;
}

.rcd-pos { color: #2e7d32; font-weight: 700; }
.rcd-muted { color: #aaa; color: var(--text-secondary, #aaa); }

/* ── Timeline dos agentes (7.3) ───────────────────────────────────────────── */
.rcd-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.rcd-step {
    display: grid;
    grid-template-columns: 22px 1fr;
    grid-gap: 10px;
    gap: 10px;
    position: relative;
}

.rcd-step:not(:last-child) .rcd-step-rail::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 18px;
    bottom: -6px;
    width: 2px;
    transform: translateX(-50%);
    background: #E2E6F3;
    background: var(--line-default, #E2E6F3);
}

.rcd-step-rail {
    position: relative;
    display: flex;
    justify-content: center;
    padding-top: 2px;
}

.rcd-step-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    z-index: 1;
    flex-shrink: 0;
}

.rcd-step-dot--green { background: #2e7d32; }
.rcd-step-dot--amber { background: #ef8e2a; }
.rcd-step-dot--red   { background: #c62828; }
.rcd-step-dot--grey  { background: #b0bec5; }

.rcd-step-body {
    padding-bottom: 14px;
    min-width: 0;
}

.rcd-step-name {
    font-size: 12.5px;
    font-weight: 700;
    color: #333;
    color: var(--text-primary, #333);
    display: flex;
    align-items: center;
    gap: 8px;
}

.rcd-step-msg {
    font-size: 11.5px;
    color: #777;
    color: var(--text-secondary, #777);
    line-height: 1.4;
    margin-top: 2px;
    word-break: break-word;
}

/* ── Dois blocos: decisão inicial vs revisão (7.5) ────────────────────────── */
.rcd-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-gap: 12px;
    gap: 12px;
}

.rcd-vs-block {
    border: 1px solid #E2E6F3;
    border: 1px solid var(--line-default, #E2E6F3);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rcd-vs-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #2E1956;
    color: var(--text-default, #2E1956);
}

.rcd-vs-msg {
    font-size: 11.5px;
    color: #777;
    color: var(--text-secondary, #777);
    line-height: 1.45;
}

/* ── Opções alternativas (7.6) ────────────────────────────────────────────── */
.rcd-alt-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #E2E6F3;
    border-bottom: 1px solid var(--line-default, #E2E6F3);
    font-size: 12px;
}

.rcd-alt-item:last-child { border-bottom: none; }

.rcd-alt-name { font-weight: 600; color: #333; color: var(--text-primary, #333); }
.rcd-alt-why { font-size: 11px; color: #888; color: var(--text-secondary, #888); }

/* ── Ações ────────────────────────────────────────────────────────────────── */
.rcd-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 4px;
}

.rcd-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background .15s ease, border-color .15s ease, opacity .15s ease;
}

.rcd-btn--primary {
    background: #471FCC;
    background: var(--color-primary-blue, #471FCC);
    color: #fff;
}

.rcd-btn--primary:hover:not(:disabled) { background: #3a18a8; }

.rcd-btn--ghost {
    background: #fff;
    color: #471FCC;
    color: var(--color-primary-blue, #471FCC);
    border-color: #471FCC;
    border-color: var(--color-primary-blue, #471FCC);
}

.rcd-btn--ghost:hover:not(:disabled) { background: #efeaff; }

.rcd-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.rcd-action-hint {
    font-size: 11px;
    color: #888;
    color: var(--text-secondary, #888);
}

/* ── Spinner das ações ────────────────────────────────────────────────────── */
.rcd-root .lc-spin {
    animation: rcd-spin 0.85s linear infinite;
}

@keyframes rcd-spin {
    to { transform: rotate(360deg); }
}

/* ── Responsivo (modal estreito) ──────────────────────────────────────────── */
@media (max-width: 720px) {
    .rcd-final-grid,
    .rcd-savings-row,
    .rcd-two-col {
        grid-template-columns: 1fr;
    }
}

/* ── Explicação por IA (spec 11.1) ────────────────────────────────────────── */
.rcd-explain .rcd-explain-btn {
    margin-left: auto;
    padding: 4px 10px;
    font-size: 11px;
}

.rcd-explain-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rcd-explain-text {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.55;
    color: #2E1956;
    color: var(--text-default, #2E1956);
    white-space: pre-wrap;
}

.rcd-explain-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.rcd-explain-chip {
    font-size: 10.5px;
    font-weight: 600;
    color: #471FCC;
    color: var(--color-primary-blue, #471FCC);
    background: #efeaff;
    border-radius: 6px;
    padding: 2px 8px;
}

.rcd-explain-disclaimer {
    font-size: 10.5px;
    font-style: italic;
    color: #888;
    color: var(--text-secondary, #888);
}

.rcd-explain-hint {
    margin: 0;
    font-size: 11.5px;
    color: #888;
    color: var(--text-secondary, #888);
}


.resource-metrics-page {
    width: 100%;
    height: 100%;
}

.metrics-summary-card {
    padding: 12px 16px;
    background: #f5f5f5;
    background: var(--background-secondary, #f5f5f5);
    border-radius: 8px;
    min-width: 0;
}

.metrics-summary-card h3 {
    margin: 0 0 8px 0;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    color: var(--text-primary, #333);
}

/* ── Cabeçalho da card de resumo com seletor de semana ── */
.metrics-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 8px;
}

.metrics-header-row h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    color: var(--text-primary, #333);
}

.detail-week-select {
    font-size: 11px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px 6px;
    background: #fff;
    color: #444;
    cursor: pointer;
    max-width: 160px;
}
.detail-week-select:focus { outline: none; border-color: #8C40E3; }

/* ── Campo de centro de custo no painel de automações ── */
.ha-cc-field {
    padding: 6px 14px 8px;
    border-bottom: 1px solid #f0f0f0;
}

.ha-cc-label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 4px;
}

.ha-cc-input {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 12px;
    color: #333;
    background: #fafafa;
    box-sizing: border-box;
}
.ha-cc-input:focus { outline: none; border-color: #8C40E3; background: #fff; }

/* ── Status de resolução automática do CC ── */
.ha-cc-status {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 500;
    padding: 1px 5px;
    border-radius: 10px;
    text-transform: none;
    letter-spacing: 0;
}

.ha-cc-status--resolved {
    color: #2e7d32;
    background: #e8f5e9;
}

.ha-cc-status--loading {
    color: #777;
    background: #f5f5f5;
}

.ha-cc-status--notfound {
    color: #e65100;
    background: #fff3e0;
}

@keyframes ha-spin {
    to { transform: rotate(360deg); }
}
.ha-cc-spinner {
    animation: ha-spin 0.8s linear infinite;
}

.ha-cc-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: none;
    border: none;
    cursor: pointer;
    color: #8C40E3;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 4px;
    margin-left: 4px;
}
.ha-cc-edit-btn:hover { background: #f3e8fd; }

.ha-cc-resolved-value {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #333;
    background: #f8f8f8;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    padding: 5px 8px;
    min-height: 30px;
}

/* ── Hierarquia de centros de custo ── */
.ha-cc-hierarchy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.ha-cc-level {
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 8px 10px;
    background: #fafafa;
    position: relative;
}

.ha-cc-level--direct {
    border-color: #8C40E3;
    background: #faf5ff;
}

/* Linha conectora entre níveis */
.ha-cc-level + .ha-cc-level::before {
    content: '';
    display: block;
    width: 2px;
    height: 6px;
    background: #ddd;
    position: absolute;
    top: -7px;
    left: 14px;
}

.ha-cc-level-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}

.ha-cc-level-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    flex-shrink: 0;
}

.ha-cc-level-badge--direct {
    background: #ede0fb;
    color: #6b21a8;
}

.ha-cc-level-badge--ancestor {
    background: #e0f2fe;
    color: #0369a1;
}

.ha-cc-level-name {
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

.ha-cc-level-emails {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.ha-cc-email-chip {
    font-size: 11px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px 6px;
    color: #444;
}

.ha-cc-level-no-users {
    font-size: 11px;
    color: #aaa;
    font-style: italic;
}

/* ── Modal de aprovação ── */
.ha-approval-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1200;
}

.ha-approval-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 560px;
    max-width: 95vw;
    max-height: 90vh;
    background: #fff;
    border-radius: 10px;
    z-index: 1201;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 40px rgba(0,0,0,0.22);
}

.ha-approval-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    font-weight: 700;
    background: #fafafa;
    border-radius: 10px 10px 0 0;
}

.ha-approval-body {
    flex: 1 1;
    overflow-y: auto;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ha-approval-desc {
    font-size: 12px;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

.ha-approval-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ha-approval-field label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.5px;
}

.ha-approval-input {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 13px;
    color: #333;
}
.ha-approval-input:focus { outline: none; border-color: #8C40E3; }

.ha-approval-summary {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid #e8e8ef;
    border-radius: 8px;
    overflow: hidden;
}

.ha-approval-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f8f8fc;
    border-bottom: 1px solid #e8e8ef;
}

.ha-approval-summary-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.5px;
}

.ha-approval-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 11px;
    cursor: pointer;
    background: none;
    color: #555;
}
.ha-approval-copy-btn:hover { background: #f5f5f5; }

.ha-approval-summary-body {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ha-summary-section {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f5;
}
.ha-summary-section:last-child { border-bottom: none; }

.ha-summary-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8C40E3;
    margin-bottom: 6px;
}

.ha-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 0;
    font-size: 12px;
    color: #444;
}
.ha-summary-row > span:first-child {
    color: #888;
    font-size: 11px;
}
.ha-summary-row > strong {
    font-weight: 600;
    color: #333;
}

.ha-summary-schedule {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px 0 2px;
    font-size: 11px;
    color: #888;
}

.ha-summary-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.ha-summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #f0edf8;
    color: #6b45a6;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
}

/* ─── Par automático (stop + start) ─────────────────────────────────────── */

.ha-summary-section--paired {
    background: #f0faf4;
    border-left: 3px solid #2e7d32;
    margin: 4px 0;
    border-radius: 4px;
}

.ha-paired-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 9px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    margin-left: 8px;
}

.ha-paired-note {
    font-size: 11px;
    color: #555;
    line-height: 1.4;
    margin-top: 6px;
    padding: 6px 8px;
    background: #e8f5e9;
    border-radius: 4px;
    border-left: 2px solid #66bb6a;
}

/* ─── Agrupamento de par stop+start na lista de sugestões ───────────────── */

.ha-suggestion-pair {
    border: 1px solid #e0e7ee;
    border-radius: 8px;
    padding: 8px;
    background: linear-gradient(135deg, #fafbfc 0%, #f5f7fa 100%);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ha-pair-label {
    font-size: 11px;
    font-weight: 700;
    color: #555;
    padding: 2px 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ha-pair-hint {
    font-size: 10px;
    color: #777;
    line-height: 1.4;
    padding: 4px 6px;
    background: #eef6ff;
    border-radius: 4px;
    border-left: 2px solid #90caf9;
    margin: 0;
}

.ha-approval-footer {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 18px;
    border-top: 1px solid #eee;
    background: #fafafa;
    border-radius: 0 0 10px 10px;
}

.ha-approval-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid transparent;
}

.ha-approval-btn--confirm {
    background: #8C40E3;
    color: #fff;
    border: none;
}

.ha-approval-btn--pending {
    background: transparent;
    color: #e65100;
    border-color: #e65100;
}

.ha-approval-btn--cancel {
    background: transparent;
    color: #666;
    border-color: #ccc;
}

/* ── Layout grid do painel de detalhes ── */
.side-modal:has(.resource-details) > .body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.side-modal.visible.expanded:has(.resource-details) > .body {
    overflow-y: hidden;
}

.resource-details {
    height: 100%;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.resource-details > .rcd-root {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
}

.resource-details-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.resource-details-grid.expanded {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
    grid-gap: 8px;
    gap: 8px;
    width: 100%;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    height: auto;
    overflow: hidden;
}

/* Quando o painel de automação está aberto no modo expanded → 3 colunas */
.resource-details-grid.expanded.automation-open {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 280px);
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
}

/* Coluna esquerda: KPIs + Tendência */
.resource-details-grid.expanded .col-left {
    display: contents;
}

/* Coluna direita: CPU + Memória */
.resource-details-grid.expanded .col-right {
    display: contents;
}

.resource-details-grid.expanded .col-left .area-kpis {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    min-height: 0;
    overflow: auto;
}

.resource-details-grid.expanded .col-left .area-trend {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.resource-details-grid.expanded .col-right .heatmap-container:first-child,
.resource-details-grid.expanded .col-right .area-cpu {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.resource-details-grid.expanded .col-right .heatmap-container:last-child,
.resource-details-grid.expanded .col-right .area-mem {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.resource-details-grid .area-kpis   { grid-area: kpis; }
.resource-details-grid .area-trend  { grid-area: trend; }
.resource-details-grid .area-cpu    { grid-area: cpu; }
.resource-details-grid .area-mem    { grid-area: mem; }

/* No expanded, as grid-areas genéricas não devem interferir */
.resource-details-grid.expanded .area-kpis,
.resource-details-grid.expanded .area-trend,
.resource-details-grid.expanded .area-cpu,
.resource-details-grid.expanded .area-mem {
    grid-area: unset;
}

/* Coluna de automação: ocupa as 2 linhas da 3ª coluna */
.resource-details-grid.expanded.automation-open .col-automation {
    grid-column: 3;
    grid-row: 1 / span 2;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border-left: 1px solid #eee;
    padding-left: 8px;
}

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

.metrics-section-label {
    font-size: clamp(10px, 0.75vw, 12px);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    color: var(--text-secondary, #888);
    margin: 8px 0 4px 0;
}

.metrics-section-label:first-of-type {
    margin-top: 0;
}

.metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    background: transparent;
    border-radius: 4px;
    min-width: 0;
}

.metric-label {
    font-size: clamp(11px, 0.85vw, 14px);
    font-weight: 400;
    color: #666;
    color: var(--text-secondary, #666);
    margin-bottom: 2px;
    white-space: nowrap;
    text-align: center;
    text-transform: none;
}

.metric-value {
    font-size: clamp(13px, 1.1vw, 18px);
    font-weight: 500;
    color: #333;
    color: var(--text-primary, #333);
}

.metric-value.cpu {
    color: #3498db;
    color: var(--color-cpu, #3498db);
}

.metric-value.memory {
    color: #9b59b6;
    color: var(--color-memory, #9b59b6);
}

.metric-value.p95 {
    color: #e74c3c;
    color: var(--color-p95, #e74c3c);
}

.metrics-summary-card h3 {
    font-size: clamp(12px, 0.9vw, 15px);
}

.metric-info-value {
    font-size: clamp(12px, 0.85vw, 14px);
    font-weight: 400;
    color: #333;
    color: var(--text-primary, #333);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.heatmap-title {
    font-size: clamp(13px, 1vw, 16px);
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
    color: var(--text-primary, #333);
}

.heatmap-container {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.resource-details .heatmap-container {
    overflow: hidden;
}

.rm-chart-host {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
    flex: 0 0 auto;
}

.rm-chart-host--compact {
    height: 180px;
}

.rm-chart-host--expanded {
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
}

.rm-chart-host > .echarts-for-react,
.rm-chart-host > .echarts-for-react > div {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
}

/* No modo expandido, gráficos preenchem a célula do grid */
.resource-details-grid.expanded .heatmap-container {
    display: flex;
    flex-direction: column;
}

.resource-details-grid.expanded .heatmap-container > div:last-child {
    flex: 1 1;
    min-height: 0;
}

.metrics-info-rows {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 16px;
    border-top: 1px solid #eee;
    border-top: 1px solid var(--border-color, #eee);
    padding-top: 10px;
    margin-top: 1rem;
}

.metrics-info-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: calc(50% - 8px);
}

.metrics-info-row .metric-label {
    margin-bottom: 0;
    white-space: nowrap;
    text-align: left;
}

.provider-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.provider-badge.aws {
    background: #ff9900;
    color: #232f3e;
}

.provider-badge.azure {
    background: #0078d4;
    color: #fff;
}

.provider-badge.oci {
    background: #c74634;
    color: #fff;
}

.resource-details {
    padding: 16px;
    background: #f8f9fa;
}

.resource-details .metrics-summary-card {
    background: #fff;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.resource-details .metrics-summary-card h3 {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.resource-details .heatmap-container {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 0;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.resource-details .heatmap-title {
    font-size: 13px;
    font-weight: 500;
    color: #495057;
    margin-bottom: 12px;
}

/* Badges de Eficiência */
.efficiency-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    min-width: 90px;
}

.efficiency-badge.status-underutilized {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
}

.efficiency-badge.status-low {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}

.efficiency-badge.status-normal {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.efficiency-badge.status-high {
    background: #fce4ec;
    color: #c2185b;
    border: 1px solid #f48fb1;
}

.efficiency-badge.status-overutilized {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.efficiency-badge.status-neutral {
    background: #f1f3f5;
    color: #5f6b76;
    border: 1px solid #d6dbe1;
}

/* KPIs Row */
.kpi-row {
    display: flex;
    gap: 16px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    height: 100%;
    align-items: center;
    justify-content: space-around;
}

.kpi-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    min-width: 140px;
}

.kpi-value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.kpi-value.cpu {
    color: #3498db;
}

.kpi-value.memory {
    color: #9b59b6;
}

.kpi-value.warning {
    color: #e65100;
}

.kpi-value.danger {
    color: #c62828;
}

.kpi-label {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Provider Badges */
.provider-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

.provider-badge.aws {
    background: #ff9900;
    color: #232f3e;
}

.provider-badge.azure {
    background: #0078d4;
    color: white;
}

.provider-badge.oci {
    background: #f80000;
    color: white;
}

/* Mock Mode Badge */
.mock-mode-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 600;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0 0 8px 8px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Professional Table Styles */
.resource-metrics-page .lc-infinite-table {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.resource-metrics-page .lc-infinite-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.resource-metrics-page .lc-infinite-table td {
    vertical-align: middle;
}

.resource-metrics-page .lc-infinite-table tr:hover {
    background: #f1f3f5;
    cursor: pointer;
}

/* Responsive KPIs */
@media (max-width: 1200px) {
    .kpi-row {
        flex-wrap: wrap;
    }
    .kpi-card {
        min-width: 120px;
        flex: 1 1 auto;
    }
}

/* Card Active/Fade States */
.card-active {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.card-fade {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.card-fade:hover {
    opacity: 0.8;
}

/* ═══════════════════════════════════════════════════════════════════
   Heatmap Automation — Painel embutido (inline) dentro do SideModal
═══════════════════════════════════════════════════════════════════ */

/* Container do painel inline */
.ha-inline-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background: #fff;
    border-radius: 8px;
}

/* Header compacto do painel inline */
.ha-inline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.ha-inline-header .ha-panel-title {
    font-size: 12px;
}

/* Body do painel inline: ocupa todo o espaço restante com scroll */
.ha-inline-body {
    flex: 1 1;
    min-height: 0;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* No modo collapsed, o painel inline aparece como bloco abaixo dos outros */
.resource-details-grid:not(.expanded) .ha-inline-panel {
    border: 1.5px solid #e0d0f7;
    border-radius: 8px;
    max-height: 480px;
    margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════════════
   Heatmap Automation — Botão trigger no header do SideModal
═══════════════════════════════════════════════════════════════════ */

.ha-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 16px;
    border: 1.5px solid #8C40E3;
    background: transparent;
    color: #8C40E3;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.18s, color 0.18s;
    flex-shrink: 0;
}

.ha-trigger-btn:hover {
    background: #8C40E3;
    color: #fff;
}

/* Estado ativo — painel aberto */
.ha-trigger-btn--active {
    background: #8C40E3;
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════
   Heatmap Automation — Overlay e Painel lateral
═══════════════════════════════════════════════════════════════════ */

.ha-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.32);
    z-index: 2000;
    animation: haFadeIn 0.18s ease;
}

.ha-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 95vw;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.14);
    z-index: 2001;
    display: flex;
    flex-direction: column;
    animation: haSlideIn 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes haFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes haSlideIn {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

/* ─── Header ─────────────────────────────────────────────────────── */

.ha-panel-header {
    padding: 14px 16px 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.ha-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #333;
}

.ha-panel-resource {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #555;
    overflow: hidden;
}

.ha-panel-resource-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1 1;
}

.ha-panel-resource-type {
    background: #f0f0f0;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 10px;
    color: #666;
    flex-shrink: 0;
}

.ha-close-btn {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #888;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
}
.ha-close-btn:hover { background: #f0f0f0; color: #333; }

/* ─── Body ───────────────────────────────────────────────────────── */

.ha-panel-body {
    flex: 1 1;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ─── Resumo da análise ──────────────────────────────────────────── */

.ha-analysis-summary {
    background: #f5f0fc;
    border: 1px solid #d6b8f7;
    border-radius: 8px;
    padding: 10px 12px;
}

.ha-analysis-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #333;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.ha-analysis-text {
    font-size: 12px;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

.ha-pattern-label {
    font-size: 12px;
    font-weight: 600;
}

/* ─── Lista de sugestões ─────────────────────────────────────────── */

.ha-suggestions-title {
    font-size: 12px;
    color: #555;
    margin-bottom: 4px;
}

.ha-suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ─── Card de sugestão ───────────────────────────────────────────── */

.ha-suggestion-card {
    border: 1.5px solid #e8e8e8;
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: #fff;
}

.ha-suggestion-card:hover {
    border-color: #b39ddb;
    box-shadow: 0 2px 10px rgba(140, 64, 227, 0.1);
}

.ha-suggestion-card--selected {
    border-color: #8C40E3 !important;
    box-shadow: 0 0 0 2px rgba(140, 64, 227, 0.18) !important;
}

.ha-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.ha-card-type-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ha-card-type-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.ha-confidence-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 10px;
}

.ha-card-idle-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    color: #888;
    margin-left: auto;
}

.ha-card-title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 5px;
    font-size: 13px;
    color: #222;
}

.ha-card-description {
    font-size: 11.5px;
    color: #666;
    line-height: 1.5;
    margin: 0 0 8px 0;
}

.ha-card-schedule {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    font-size: 11px;
    color: #777;
    margin-bottom: 10px;
}

.ha-day-chip {
    background: #f0f0f0;
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 10.5px;
    color: #444;
}

.ha-apply-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 16px;
    border: 1.5px solid currentColor;
    background: transparent;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    margin-top: 2px;
}

.ha-apply-btn:hover {
    filter: brightness(0.9);
    background: rgba(0,0,0,0.05);
}

/* ─── Ações do card + botão "Criar demanda" (governança FinOps) ──── */
.ha-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.ha-demand-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 16px;
    border: 1.5px solid #8C40E3;
    background: #8C40E3;
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.ha-demand-btn:hover:not(:disabled) { background: #7034c0; border-color: #7034c0; }
.ha-demand-btn:disabled { cursor: default; }
.ha-demand-btn--created {
    background: #e8f5e9;
    border-color: #c6f0cd;
    color: #2e7d32;
}
.ha-demand-btn--error {
    background: #fff;
    border-color: #e0a800;
    color: #b26a00;
}
.ha-demand-spin { animation: haDemandSpin 1s linear infinite; }
@keyframes haDemandSpin { to { transform: rotate(360deg); } }

/* ─── Feedback de criação de Demanda ─────────────────────────────── */
.ha-demand-feedback {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f3fbf4;
    border: 1px solid #c6f0cd;
    font-size: 12px;
    color: #276749;
}
.ha-demand-feedback--err {
    background: #fff7ed;
    border-color: #f3d3a3;
    color: #9a5b00;
}
.ha-demand-feedback-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ha-demand-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 0;
    color: #8C40E3;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.ha-demand-link:hover { text-decoration: underline; }

/* ─── Preview de dias da semana ──────────────────────────────────── */

.ha-weekdays-preview {
    background: #f9f6ff;
    border: 1px solid #d6b8f7;
    border-radius: 8px;
    padding: 10px 12px;
}

.ha-weekdays-title {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #8C40E3;
    margin-bottom: 8px;
}

.ha-weekdays-grid {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.ha-weekday-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 28px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    background: #e8e8e8;
    color: #888;
    border: 1.5px solid transparent;
}

.ha-weekday-cell--active {
    background: #8C40E3;
    color: #fff;
    border-color: #7034c0;
}

.ha-weekdays-actions {
    display: flex;
    justify-content: flex-end;
}

.ha-create-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 16px;
    border-radius: 18px;
    border: none;
    background: #8C40E3;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.ha-create-btn:hover { background: #7034c0; }

/* ─── Estados vazios ─────────────────────────────────────────────── */

.ha-no-suggestions,
.ha-no-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px 16px;
    text-align: center;
    color: #666;
    font-size: 12.5px;
    line-height: 1.6;
}

/* ─── Footer ─────────────────────────────────────────────────────── */

.ha-panel-footer {
    padding: 10px 16px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fafafa;
}

.ha-footer-note {
    flex: 1 1;
    font-size: 10.5px;
    color: #999;
    line-height: 1.4;
}

.ha-footer-close {
    flex-shrink: 0;
    padding: 5px 14px;
    border-radius: 14px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 11.5px;
    cursor: pointer;
    color: #555;
}

.ha-footer-close:hover { background: #f0f0f0; }

/* ─────────────────────────────────────────────────────────────────
   RevoGrid (lista de recursos): toolbar de agrupamento + colunas
   ───────────────────────────────────────────────────────────────── */
.rm-grid-wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

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

/* Centraliza verticalmente o conteúdo das células (badges, ícones, números) */
.rm-grid-wrapper revo-grid .rgCell {
    display: flex;
    align-items: center;
    padding: 0 8px;
    line-height: 1;
    overflow: hidden;
}

/* Badge de status compacto para caber em rowSize=32 sem estourar a linha */
.rm-grid-wrapper revo-grid .rgCell .efficiency-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    min-width: 80px;
    line-height: 1.2;
    white-space: nowrap;
}

.rm-grid-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 4px 8px 4px;
    flex-shrink: 0;
}

.rm-grid-toolbar-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #2E1956;
    color: var(--text-default, #2E1956);
}

.rm-grid-toolbar-label {
    font-weight: 600;
    color: #2E1956;
    color: var(--text-default, #2E1956);
}

.rm-grid-toolbar-select {
    height: 26px;
    padding: 0 24px 0 8px;
    border: 1px solid #E2E6F3;
    border: 1px solid var(--line-default, #E2E6F3);
    border-radius: 6px;
    background: #fff;
    font-size: 12px;
    color: #2E1956;
    color: var(--text-default, #2E1956);
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns=%27http://www.w3.org/2000/svg%27 width=%2710%27 height=%276%27 viewBox=%270 0 10 6%27><path d=%27M1 1l4 4 4-4%27 stroke=%27%23471FCC%27 stroke-width=%271.5%27 fill=%27none%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.rm-grid-toolbar-select:hover { border-color: #471FCC; border-color: var(--color-primary-blue, #471FCC); }
.rm-grid-toolbar-select:focus { border-color: #471FCC; border-color: var(--color-primary-blue, #471FCC); box-shadow: 0 0 0 2px rgba(71, 31, 204, 0.12); }

.rm-grid-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 26px;
    padding: 0 10px;
    border: 1px solid #E2E6F3;
    border: 1px solid var(--line-default, #E2E6F3);
    border-radius: 6px;
    background: #fff;
    font-size: 12px;
    color: #2E1956;
    color: var(--text-default, #2E1956);
    cursor: pointer;
    transition: background-color 120ms, border-color 120ms;
}

.rm-grid-toolbar-btn:hover {
    background: #f7f5ff;
    border-color: #471FCC;
    border-color: var(--color-primary-blue, #471FCC);
}

.rm-grid-toolbar-btn[aria-expanded="true"] {
    background: #f7f5ff;
    border-color: #471FCC;
    border-color: var(--color-primary-blue, #471FCC);
    color: #471FCC;
    color: var(--color-primary-blue, #471FCC);
}

/* Botões discretos de expandir/recolher todos os grupos */
.rm-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;
}

.rm-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);
}

.rm-grid-toolbar-iconbtn:disabled {
    color: #d4d2e0;
    cursor: not-allowed;
}

/* Alinhamento de células — utilitárias */
revo-grid .revo-cell--right {
    text-align: right;
    justify-content: flex-end;
}
revo-grid .revo-cell--center {
    text-align: center;
    justify-content: center;
}

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

.rm-nd {
    color: #bbb;
    font-size: 11px;
}

/* ─── Célula com 4 barras horizontais (Média/P95/P99/Máx.) — CSS puro, sem ECharts ─── */
.rm-bars {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 4px 0;
    box-sizing: border-box;
}
.rm-bars__row {
    width: 100%;
    height: 5px;
    flex: 0 0 auto;
}
.rm-bars__track {
    position: relative;
    width: 100%;
    height: 5px;
    background: #f1f1f4;
    border-radius: 2px;
    overflow: hidden;
}
.rm-bars__fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 5px;
    border-radius: 2px;
    min-width: 2px;
}

/* ─── Painel de configuração de colunas (portal) ─── */
.rm-col-config-panel {
    position: fixed;
    z-index: 2000;
    width: 280px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #E2E6F3;
    border: 1px solid var(--line-default, #E2E6F3);
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(20, 12, 60, 0.18);
    overflow: hidden;
}

.rm-col-config-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-bottom: 1px solid #E2E6F3;
    border-bottom: 1px solid var(--line-default, #E2E6F3);
    font-size: 12px;
    font-weight: 700;
    color: #2E1956;
    color: var(--text-default, #2E1956);
    background: #faf9ff;
}

.rm-col-config-close {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #2E1956;
    color: var(--text-default, #2E1956);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rm-col-config-close:hover { background: #efebff; }

.rm-col-config-list {
    flex: 1 1;
    overflow-y: auto;
    padding: 4px 0;
    max-height: 300px;
}

.rm-col-config-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 12px;
    color: #2E1956;
    color: var(--text-default, #2E1956);
}

.rm-col-config-item:hover { background: #f7f5ff; }

.rm-col-config-vis {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: none;
    background: transparent;
    color: #471FCC;
    color: var(--color-primary-blue, #471FCC);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rm-col-config-vis:hover:not(:disabled) { background: #efebff; }
.rm-col-config-vis:disabled { color: #bbb; cursor: not-allowed; }
.rm-col-config-vis[aria-pressed="false"] { color: #bbb; }

.rm-col-config-label {
    flex: 1 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rm-col-config-arrows {
    display: inline-flex;
    gap: 2px;
}

.rm-col-config-arrows button {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid transparent;
    background: transparent;
    color: #2E1956;
    color: var(--text-default, #2E1956);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rm-col-config-arrows button:hover:not(:disabled) {
    background: #efebff;
    border-color: #E2E6F3;
    border-color: var(--line-default, #E2E6F3);
}

.rm-col-config-arrows button:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.rm-col-config-footer {
    padding: 6px 10px;
    border-top: 1px solid #E2E6F3;
    border-top: 1px solid var(--line-default, #E2E6F3);
    background: #fafafa;
    display: flex;
    justify-content: flex-end;
}

.rm-col-config-reset {
    padding: 4px 10px;
    height: 24px;
    border: 1px solid #E2E6F3;
    border: 1px solid var(--line-default, #E2E6F3);
    border-radius: 4px;
    background: #fff;
    font-size: 11.5px;
    color: #471FCC;
    color: var(--color-primary-blue, #471FCC);
    cursor: pointer;
}

.rm-col-config-reset:hover {
    background: #f7f5ff;
    border-color: #471FCC;
    border-color: var(--color-primary-blue, #471FCC);
}


/* ============================================================
   CostCenterDetailSideModal — estilos
   ============================================================ */

.cc-side-modal {
    font-family: "Ubuntu", sans-serif;
    color: #2E1956;
    padding: 0.5rem 1rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;
    min-height: 0;
}

/* Compactar o header do SideModal quando usado neste contexto */
.side-modal:has(.cc-side-modal) > .header {
    height: auto;
    min-height: 40px;
    padding: 0.6rem 1.25rem;
    font-size: 14px;
}
.side-modal:has(.cc-side-modal) > .body {
    height: calc(100vh - 100px);
    padding: 0 1.25rem 1rem 1.25rem;
    display: flex;
    flex-direction: column;
}

.cc-side-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
}

.cc-side-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cc-side-title {
    font-weight: 500;
    font-size: 0.95rem;
    color: #2E1956;
    flex: 1 1;
}

.cc-side-pager {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 8px;
}
.cc-side-pager-count {
    font-size: 11px;
    color: #6B7280;
    margin-right: 4px;
    -webkit-user-select: none;
    user-select: none;
}
.cc-side-pager-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 16px;
    line-height: 1;
    color: #2E1956;
    cursor: pointer;
    transition: background 120ms ease, opacity 120ms ease;
}
.cc-side-pager-btn:hover:not(:disabled) {
    background: #F0F2F8;
}
.cc-side-pager-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Sub-header — layout horizontal compacto */
.cc-sub-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #F0F2F8;
}

.cc-name-block {
    display: flex;
    flex-direction: column;
    flex: 1 1;
    min-width: 0;
    gap: 0;
}

.cc-name {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2E1956;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cc-meta {
    font-size: 0.65rem;
    color: #8B90A3;
    font-weight: 400;
    line-height: 1.2;
}

.cc-rank-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 20px;
    padding: 0 0.4rem;
    background: #F0F2F8;
    color: #6B6F7D;
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 4px;
    border: 1px solid #E2E6F3;
    flex-shrink: 0;
}

.cc-rank-pill.top {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #FFFFFF;
    border-color: #FFA500;
}

/* Mini-cards 2x2 */
.cc-mini-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 0.5rem;
    gap: 0.5rem;
}

.cc-mini-card {
    background: #FAFBFF;
    border: 1px solid #E2E6F3;
    border-radius: 6px;
    padding: 0.5rem 0.625rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-height: 70px;
}

.cc-mini-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.65rem;
    color: #6B6F7D;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 400;
}

.cc-mini-value-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
}

.cc-mini-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: #2E1956;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.cc-edit-icon {
    cursor: pointer;
    color: #471FCC;
    transition: color 0.15s ease;
}
.cc-edit-icon:hover { color: #6B3FE8; }

.cc-mini-delta {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.7rem;
    font-weight: 500;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}
.cc-mini-delta.up { color: #DC291E; }
.cc-mini-delta.down { color: #2e7d32; }

.cc-mini-progress {
    height: 4px;
    background: #F0F2F8;
    border-radius: 2px;
    overflow: hidden;
}
.cc-mini-progress-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}
.cc-mini-progress-bar.good    { background: linear-gradient(90deg, #2e7d32, #66BB6A); }
.cc-mini-progress-bar.normal  { background: linear-gradient(90deg, #471FCC, #6B3FE8); }
.cc-mini-progress-bar.warning { background: linear-gradient(90deg, #E07817, #FFB347); }
.cc-mini-progress-bar.over    { background: linear-gradient(90deg, #DC291E, #FF5C5C); }

.cc-mini-sub {
    font-size: 0.7rem;
    color: #6B6F7D;
}
.cc-mini-sub.over { color: #DC291E; font-weight: 500; }

/* ===== Summary cards (2 cards agrupados) ===== */
.cc-summary-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 0.5rem;
    gap: 0.5rem;
}

.cc-summary-card {
    background: #FFFFFF;
    border: 1px solid #E2E6F3;
    border-radius: 8px;
    padding: 0.625rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    box-shadow: 0 1px 3px rgba(46, 25, 86, 0.04);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.cc-summary-card:hover {
    border-color: #C5CAE0;
    box-shadow: 0 2px 8px rgba(46, 25, 86, 0.08);
}

.cc-summary-header {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.65rem;
    color: #6B6F7D;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 500;
}
.cc-summary-header svg { color: #471FCC; }

.cc-summary-badge {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.1rem 0.4rem;
    background: #F0EBFF;
    color: #471FCC;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.cc-summary-badge svg { color: #471FCC; }

.cc-summary-main {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cc-summary-value {
    font-size: 1.15rem;
    font-weight: 600;
    color: #2E1956;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.cc-summary-compare {
    font-size: 0.7rem;
    color: #6B6F7D;
    font-weight: 400;
    line-height: 1.3;
    margin-top: -0.15rem;
}
.cc-summary-compare strong {
    color: #2E1956;
    font-weight: 500;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.cc-summary-divider {
    height: 1px;
    background: #F0F2F8;
    margin: 0.1rem 0;
}

.cc-summary-sub-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.cc-summary-sub-label {
    font-size: 0.7rem;
    color: #6B6F7D;
    font-weight: 400;
}

.cc-summary-sub-value {
    font-size: 0.85rem;
    font-weight: 500;
    color: #2E1956;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}
.cc-summary-sub-value.good    { color: #2e7d32; }
.cc-summary-sub-value.normal  { color: #471FCC; }
.cc-summary-sub-value.warning { color: #E07817; }
.cc-summary-sub-value.over    { color: #DC291E; }

/* Resources & trend */
.cc-resources-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 0.5rem;
    gap: 0.5rem;
    padding: 0.625rem;
    background: #FFFFFF;
    border: 1px solid #F0F2F8;
    border-radius: 6px;
}

.cc-resources-block {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cc-resources-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F0F2F8;
    color: #471FCC;
    border-radius: 6px;
}

.cc-resources-label {
    font-size: 0.65rem;
    color: #6B6F7D;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cc-resources-value {
    font-size: 1rem;
    font-weight: 500;
    color: #2E1956;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.cc-trend-block {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.cc-trend-label {
    font-size: 0.65rem;
    color: #6B6F7D;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cc-trend-pct {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.85rem;
    font-weight: 500;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}
.cc-trend-pct.up { color: #DC291E; }
.cc-trend-pct.down { color: #2e7d32; }
.cc-trend-pct.neutral { color: #8B90A3; }

.cc-mini-sparkline {
    width: 100%;
    height: 30px;
}
.cc-mini-sparkline.loading,
.cc-mini-sparkline.empty {
    font-size: 0.7rem;
    color: #8B90A3;
    display: flex;
    align-items: center;
}

/* Charts */
.cc-charts-row {
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: 0.5rem;
    gap: 0.5rem;
    flex: 1 1;
    min-height: 0;
}

/* Body grid: em expanded vira 2 colunas (esquerda = KPIs+charts, direita = insight full-height) */
.cc-body-grid {
    display: flex;
    flex-direction: column;
    flex: 1 1;
    min-height: 0;
    gap: 0.75rem;
}
.cc-body-grid.expanded {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.5fr);
    grid-gap: 0.75rem;
    gap: 0.75rem;
    align-items: stretch;
}
.cc-body-main {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
    min-height: 0;
    flex: 1 1;
}
.cc-insight-aside {
    margin-top: 0 !important;
    align-self: stretch;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.cc-insight-aside .cc-insight-body {
    flex: 1 1;
}
@media (max-width: 1199px) {
    .cc-body-grid.expanded {
        grid-template-columns: 1fr;
    }
}

/* Em fullscreen / sidepanel expandido, charts lado a lado */
.cc-side-modal-expanded .cc-charts-row,
.cc-charts-row.expanded {
    grid-template-columns: 1fr 1fr;
}
@media (min-width: 1100px) {
    .cc-charts-row { grid-template-columns: 1fr 1fr; }
}

.cc-chart-block {
    background: #FFFFFF;
    border: 1px solid #F0F2F8;
    border-radius: 6px;
    padding: 0.625rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}
.cc-chart-block .react-loading,
.cc-chart-block > div[class*="loading"] {
    flex: 1 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.cc-chart-block .echarts-for-react {
    flex: 1 1;
    min-height: 0 !important;
    height: 100% !important;
}

.cc-chart-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.cc-chart-title {
    font-size: 0.75rem;
    font-weight: 500;
    color: #2E1956;
}

.cc-chart-subtitle {
    font-size: 0.7rem;
    color: #6B6F7D;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.cc-window-select {
    border: 1px solid #E2E6F3;
    border-radius: 4px;
    padding: 0.125rem 0.375rem;
    font-size: 0.7rem;
    color: #2E1956;
    background: #FFFFFF;
    cursor: pointer;
}

.cc-empty {
    padding: 1rem 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: #8B90A3;
}

.cc-link {
    background: none;
    border: none;
    color: #471FCC;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    text-align: left;
    align-self: flex-start;
}
.cc-link:hover:not(:disabled) { text-decoration: underline; }
.cc-link:disabled { color: #C5CAE0; cursor: not-allowed; }

.cc-legend {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}
.cc-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    color: #6B6F7D;
}
.cc-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.cc-legend-dot.consumo { background: #9FA3FF; }
.cc-legend-dot.anterior { background: #255A4B; }
.cc-legend-dot.budget { background: #E07817; }

/* Insight */
.cc-insight {
    background: linear-gradient(135deg, #F8F9FD 0%, #FFFFFF 100%);
    border: 1px solid #E2E6F3;
    border-left: 3px solid #471FCC;
    border-radius: 6px;
    padding: 0.625rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.cc-insight-header {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #471FCC;
}

.cc-insight-badge {
    margin-left: auto;
    font-size: 0.65rem;
    font-weight: 600;
    color: #FFFFFF;
    background: linear-gradient(90deg, #471FCC, #6B3FE8);
    padding: 0.15rem 0.45rem;
    border-radius: 8px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.cc-insight-body {
    font-size: 0.875rem;
    color: #2E1956;
    line-height: 1.55;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.cc-insight-footer {
    font-size: 0.7rem;
    color: #8B90A3;
    text-align: right;
}

/* Footer actions */
.cc-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #F0F2F8;
    flex-wrap: wrap;
}

.cc-action {
    flex: 1 1;
    min-width: 100px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-family: "Ubuntu", sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid #E2E6F3;
}

.cc-action.secondary {
    background: #FFFFFF;
    color: #2E1956;
}
.cc-action.secondary:hover { background: #F0F2F8; border-color: #471FCC; color: #471FCC; }

.cc-action.primary {
    background: linear-gradient(135deg, #471FCC 0%, #6B3FE8 100%);
    color: #FFFFFF;
    border-color: #471FCC;
}
.cc-action.primary:hover { box-shadow: 0 2px 8px rgba(71, 31, 204, 0.35); transform: translateY(-1px); }


/* ===== Variantes de tamanho (size=normal | wide | full) =====
   - normal : layout 1 coluna (sem aside)
   - wide   : 2 colunas (main + insight aside) com aside ~28%
   - full   : 2 colunas mais espa\u00e7osas e mini-cards 4 col fixas */
.cc-body-grid.size-wide {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    grid-gap: 0.75rem;
    gap: 0.75rem;
    align-items: stretch;
}
.cc-body-grid.size-full {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    grid-gap: 1rem;
    gap: 1rem;
    align-items: stretch;
}
.cc-body-main.size-full .cc-mini-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.cc-body-main.size-wide .cc-mini-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.cc-charts-row.size-full,
.cc-charts-row.size-wide {
    grid-template-columns: 1fr 1fr;
}
.cc-insight-aside.size-full {
    background: linear-gradient(180deg, #F7F5FF 0%, #FFFFFF 100%);
    border-left: 3px solid #471FCC;
    padding: 1rem;
}
.cc-insight-aside.size-wide {
    padding: 0.75rem;
}
@media (max-width: 1199px) {
    .cc-body-grid.size-wide,
    .cc-body-grid.size-full {
        grid-template-columns: 1fr;
    }
}

/* ===== Compactação para telas pequenas (≤ 1366×768) ===== */
@media (max-width: 1366px) {
    .cc-side-modal {
        padding: 0.35rem 0.75rem 0.75rem 0.75rem;
        gap: 0.5rem;
        font-size: 0.82rem;
    }
    .cc-name { font-size: 0.8rem; }
    .cc-meta { font-size: 0.6rem; }
    .cc-sub-header { padding-bottom: 0.35rem; gap: 0.35rem; }

    /* Mini-cards */
    .cc-mini-cards { gap: 0.35rem; }
    .cc-mini-card {
        padding: 0.35rem 0.5rem;
        gap: 0.15rem;
        min-height: 56px;
    }
    .cc-mini-label { font-size: 0.58rem; }
    .cc-mini-value { font-size: 0.82rem; }
    .cc-mini-delta { font-size: 0.62rem; }
    .cc-mini-sub { font-size: 0.62rem; }

    /* Summary cards */
    .cc-summary-cards { gap: 0.4rem; }
    .cc-summary-card { padding: 0.45rem 0.55rem; gap: 0.25rem; }
    .cc-summary-header { font-size: 0.58rem; }
    .cc-summary-value { font-size: 0.95rem; }
    .cc-summary-sub-label { font-size: 0.62rem; }
    .cc-summary-sub-value { font-size: 0.75rem; }
    .cc-summary-compare { font-size: 0.6rem; }

    /* Resources & trend */
    .cc-resources-row {
        padding: 0.4rem 0.5rem;
        gap: 0.35rem;
    }
    .cc-resources-icon { width: 26px; height: 26px; }
    .cc-resources-label { font-size: 0.58rem; }
    .cc-resources-value { font-size: 0.85rem; }
    .cc-trend-label { font-size: 0.58rem; }
    .cc-trend-pct { font-size: 0.75rem; }

    /* Charts */
    .cc-charts-row { gap: 0.35rem; }
    .cc-chart-block {
        padding: 0.4rem 0.5rem;
        gap: 0.25rem;
    }
    .cc-chart-title { font-size: 0.68rem; }
    .cc-chart-subtitle { font-size: 0.62rem; }
    .cc-legend-item { font-size: 0.62rem; }
    .cc-legend-dot { width: 6px; height: 6px; }

    /* Insight */
    .cc-insight-title { font-size: 0.82rem; }
    .cc-insight-body { font-size: 0.82rem; line-height: 1.5; }
    .cc-link { font-size: 0.68rem; }

    /* Body grid gap */
    .cc-body-main { gap: 0.5rem; }
    .cc-body-grid.expanded { gap: 0.5rem; }
}

@media (max-height: 768px) {
    .side-modal:has(.cc-side-modal) > .header {
        min-height: 32px;
        padding: 0.4rem 1rem;
        font-size: 13px;
    }
    .side-modal:has(.cc-side-modal) > .body {
        height: calc(100vh - 80px);
        padding: 0 1rem 0.5rem 1rem;
    }
    .cc-side-modal {
        padding: 0.25rem 0.5rem 0.5rem 0.5rem;
        gap: 0.4rem;
    }
    .cc-mini-card { min-height: 48px; padding: 0.25rem 0.4rem; }
    .cc-chart-block { padding: 0.3rem 0.4rem; }
    .cc-resources-row { padding: 0.3rem 0.4rem; }
    .cc-mini-sparkline { height: 22px; }
}

/* Container principal do drill-down */
.budget-drilldown-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #F8F9FD 0%, #FAFBFF 100%);
    font-family: "Ubuntu", sans-serif;
    font-weight: 300;
}

/* Header com estatísticas */
.drilldown-header {
    padding: 0.25rem 0.5rem;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8F9FD 100%);
    border-bottom: 1px solid #E2E6F3;
    box-shadow: 0 1px 3px rgba(46, 25, 86, 0.03);
}

.innerLCGrid {
    display: contents;
}
.header-stats {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.25rem;
    align-items: stretch;
}

.stat-card {
    background: #FFFFFF;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #E2E6F3;
    box-shadow: 0 1px 3px rgba(46, 25, 86, 0.05);
    transition: all 0.2s ease;
    min-height: 32px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.3rem;
    justify-content: space-between;
    flex: 1 1;
    min-width: 0;
    white-space: nowrap;
}

.stat-card:hover {
    box-shadow: 0 1px 4px rgba(46, 25, 86, 0.08);
    border-color: #471FCC;
}

.stat-card.alert {
    background: linear-gradient(90deg, #FFF5F5 0%, #FFFFFF 100%);
    border-color: #FFE0E0;
}

.stat-card.alert:hover {
    border-color: #DC291E;
}

.stat-card.growth {
    background: linear-gradient(90deg, #F0FFF4 0%, #FFFFFF 100%);
    border-color: #D4F4DD;
}

.stat-card.growth:hover {
    border-color: #38A169;
}

.stat-card.highlight {
    background: linear-gradient(90deg, #F0F4FF 0%, #FFFFFF 100%);
    border-color: #D4E0FF;
}

.stat-card.highlight:hover {
    border-color: #471FCC;
}

.stat-label {
    font-size: 0.55rem;
    font-weight: 300;
    color: #6B6F7D;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.stat-value {
    font-size: 0.85rem;
    font-weight: 300;
    color: #2E1956;
    line-height: 1.1;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    margin-left: auto;
}

.stat-value-small {
    font-size: 0.7rem;
    font-weight: 300;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

.stat-count {
    font-size: 0.65rem;
    font-weight: 300;
    color: #471FCC;
}

.stat-card.alert .stat-value {
    color: #DC291E;
}

.stat-card.growth .stat-value {
    color: #38A169;
}

.stat-card.highlight .stat-value {
    color: #471FCC;
}

/* Barra de ferramentas */
.drilldown-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    gap: 1rem;
    background: #FFFFFF;
    border-bottom: 1px solid #E2E6F3;
}

/* Campo de busca */
.search-box {
    position: relative;
    flex: 1 1;
    max-width: 350px;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    color: #8B90A3;
    pointer-events: none;
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 0.625rem 2.5rem 0.625rem 2.75rem;
    border: 2px solid #E2E6F3;
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: "Ubuntu", sans-serif;
    transition: all 0.3s ease;
    background: #FAFBFF;
    color: #2E1956;
    font-weight: 300;
}

.search-input:hover {
    border-color: #C5CAE0;
    background: #FFFFFF;
}

.search-input:focus {
    outline: none;
    border-color: #471FCC;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(71, 31, 204, 0.1);
}

.search-input::placeholder {
    color: #8B90A3;
    font-weight: 400;
}

.clear-search {
    position: absolute;
    right: 8px;
    background: #E2E6F3;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #6B6F7D;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.clear-search:hover {
    background: #471FCC;
    color: #FFFFFF;
    transform: scale(1.05);
}

/* Info da toolbar */
.toolbar-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.results-count {
    font-size: 0.875rem;
    color: #2E1956;
    white-space: nowrap;
    font-weight: 300;
    padding: 0.5rem 1rem;
    background: #F0F2F8;
    border-radius: 6px;
    border: 1px solid #E2E6F3;
}



/* Wrapper da tabela */
.budget-detail-table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    flex: 1 1;
    margin: 0 1.25rem 1.25rem 1.25rem;
    border-radius: 10px;
    background: #FFFFFF;
    border: 1px solid #E2E6F3;
    box-shadow: 0 2px 8px rgba(46, 25, 86, 0.06);
}

/* Tabela */
.budget-detail-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    font-size: 0.875rem;
    font-family: "Ubuntu", sans-serif;
    table-layout: fixed;
}

/* Larguras específicas das colunas */
.budget-detail-table thead th:nth-child(1) {
    width: 25%;
    min-width: 200px;
}

.budget-detail-table thead th:nth-child(2) {
    width: 10%;
    min-width: 100px;
}

.budget-detail-table thead th:nth-child(3) {
    width: 12%;
    min-width: 110px;
}

.budget-detail-table thead th:nth-child(4) {
    width: 13%;
    min-width: 120px;
}

.budget-detail-table thead th:nth-child(5) {
    width: 15%;
    min-width: 130px;
}

.budget-detail-table thead th:nth-child(6) {
    width: 15%;
    min-width: 130px;
}

.budget-detail-table thead th:nth-child(7) {
    width: 10%;
    min-width: 100px;
}

/* Cabeçalho da tabela */
.budget-detail-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(135deg, #F8F9FD 0%, #FFFFFF 100%);
}

.budget-detail-table thead th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 300;
    font-size: 0.6875rem;
    color: #2E1956;
    border-bottom: 2px solid #E2E6F3;
    white-space: nowrap;
    font-family: "Ubuntu", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: linear-gradient(135deg, #F8F9FD 0%, #FFFFFF 100%);
    overflow: hidden;
    text-overflow: ellipsis;
}

.budget-detail-table thead th.sortable {
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    transition: all 0.2s ease;
    position: relative;
}

.budget-detail-table thead th.sortable:hover {
    background: linear-gradient(135deg, #E8EAFF 0%, #F0F2F8 100%);
    color: #471FCC;
}

.budget-detail-table thead th.sortable:active {
    transform: scale(0.98);
}

.budget-detail-table thead th.text-center {
    text-align: center;
}

.budget-detail-table thead th.text-right {
    text-align: right;
}

/* Corpo da tabela */
.budget-detail-table tbody tr {
    border-bottom: 1px solid #F0F2F8;
    transition: all 0.2s ease;
}

.budget-detail-table tbody tr.even-row {
    background: #FAFBFF;
}

.budget-detail-table tbody tr.odd-row {
    background: #FFFFFF;
}

.budget-detail-table tbody tr:hover {
    background: linear-gradient(90deg, #F0F2F8 0%, #F8F9FD 100%);
    transform: scale(1.002);
    box-shadow: 0 2px 8px rgba(46, 25, 86, 0.08);
}

.budget-detail-table tbody tr.over-budget {
    background: linear-gradient(90deg, rgba(220, 41, 30, 0.04) 0%, rgba(220, 41, 30, 0.02) 100%);
    border-left: 3px solid #DC291E;
}

.budget-detail-table tbody tr.over-budget:hover {
    background: linear-gradient(90deg, rgba(220, 41, 30, 0.08) 0%, rgba(220, 41, 30, 0.04) 100%);
}

.budget-detail-table tbody td {
    padding: 0.875rem 1rem;
    color: #2E1956;
    font-size: 0.8125rem;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    text-overflow: ellipsis;
}

.budget-detail-table tbody td.text-center {
    text-align: center;
}

.budget-detail-table tbody td.text-right {
    text-align: right;
}

/* Célula de nome com ranking */
.cell-name {
    font-family: "Ubuntu", sans-serif;
    font-weight: 400;
    font-size: 0.8125rem;
    color: #2E1956;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    overflow: hidden;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 22px;
    padding: 0 0.4rem;
    background: linear-gradient(135deg, #F0F2F8 0%, #E2E6F3 100%);
    color: #6B6F7D;
    font-family: "Ubuntu", sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 5px;
    border: 1px solid #E2E6F3;
    flex-shrink: 0;
}

.rank-badge.rank-top {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #FFFFFF;
    border-color: #FFA500;
    box-shadow: 0 2px 6px rgba(255, 165, 0, 0.3);
}

.name-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: "Ubuntu", sans-serif;
    font-weight: 400;
    font-size: 0.8125rem;
    color: #2E1956;
    flex: 1 1;
    min-width: 0;
}

/* Badge de novos recursos */
.resource-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: "Ubuntu", sans-serif;
    font-size: 0.8125rem;
    font-weight: 400;
}

.new-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 24px;
    padding: 0 0.5rem;
    background: linear-gradient(135deg, #471FCC 0%, #6B3FE8 100%);
    color: #FFFFFF;
    font-family: "Ubuntu", sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(71, 31, 204, 0.3);
}

/* Indicador de tendência - Design Profissional */
.trend-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.3rem 0.625rem;
    border-radius: 5px;
    font-family: "Ubuntu", sans-serif;
    font-weight: 500;
    font-size: 0.8125rem;
    transition: all 0.2s ease;
    min-width: 70px;
}

.trend-indicator.growth {
    background: linear-gradient(135deg, rgba(220, 41, 30, 0.1) 0%, rgba(220, 41, 30, 0.05) 100%);
    color: #DC291E;
    border: 1px solid rgba(220, 41, 30, 0.2);
}

.trend-indicator.growth .trend-icon {
    color: #DC291E;
}

.trend-indicator.decline {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.1) 0%, rgba(46, 125, 50, 0.05) 100%);
    color: #2e7d32;
    border: 1px solid rgba(46, 125, 50, 0.2);
}

.trend-indicator.decline .trend-icon {
    color: #2e7d32;
}

.trend-indicator.neutral {
    background: #F0F2F8;
    color: #6B6F7D;
    border: 1px solid #E2E6F3;
}

.trend-percent {
    font-family: "Ubuntu", sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

/* Valores de variação */
.variation-value {
    font-family: "Ubuntu", sans-serif;
    font-weight: 500;
    font-size: 0.8125rem;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.variation-value.negative {
    color: #DC291E;
}

.variation-value.positive {
    color: #2e7d32;
}

/* Valores de custo e orçamento */
.cost-value {
    font-family: "Ubuntu", sans-serif;
    font-weight: 400;
    color: #2E1956;
    font-size: 0.8125rem;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.budget-value {
    font-family: "Ubuntu", sans-serif;
    color: #6B6F7D;
    font-weight: 400;
    font-size: 0.8125rem;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.text-muted {
    font-family: "Ubuntu", sans-serif;
    color: #8B90A3;
    font-weight: 400;
    font-size: 0.8125rem;
}

/* Indicador de uso de orçamento - Design Profissional */
.budget-usage-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.3rem 0.625rem;
    border-radius: 5px;
    font-family: "Ubuntu", sans-serif;
    font-weight: 500;
    font-size: 0.8125rem;
    transition: all 0.2s ease;
    min-width: 70px;
}

.budget-usage-indicator.good {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.1) 0%, rgba(46, 125, 50, 0.05) 100%);
    color: #2e7d32;
    border: 1px solid rgba(46, 125, 50, 0.2);
}

.budget-usage-indicator.good .status-icon {
    color: #2e7d32;
}

.budget-usage-indicator.normal {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 193, 7, 0.05) 100%);
    color: #F57C00;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.budget-usage-indicator.normal .status-icon {
    color: #F57C00;
}

.budget-usage-indicator.warning {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1) 0%, rgba(255, 152, 0, 0.05) 100%);
    color: #E65100;
    border: 1px solid rgba(255, 152, 0, 0.2);
}

.budget-usage-indicator.warning .status-icon {
    color: #E65100;
}

.budget-usage-indicator.over-budget {
    background: linear-gradient(135deg, rgba(220, 41, 30, 0.15) 0%, rgba(220, 41, 30, 0.08) 100%);
    color: #DC291E;
    border: 1px solid rgba(220, 41, 30, 0.3);
    animation: pulse-alert 2s ease-in-out infinite;
}

.budget-usage-indicator.over-budget .status-icon {
    color: #DC291E;
}

@keyframes pulse-alert {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 41, 30, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(220, 41, 30, 0);
    }
}

.usage-percent {
    font-family: "Ubuntu", sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

/* Responsividade */
@media (max-width: 1400px) {
    .header-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .budget-detail-table {
        font-size: 0.8125rem;
        table-layout: auto;
    }

    .budget-detail-table thead th,
    .budget-detail-table tbody td {
        padding: 0.75rem 0.875rem;
    }

    .budget-detail-table thead th:nth-child(1) {
        min-width: 180px;
    }
}

@media (max-width: 768px) {
    .drilldown-header {
        padding: 1rem;
    }

    .header-stats {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    .stat-card {
        padding: 0.875rem 1rem;
        min-height: 75px;
    }

    .stat-label {
        font-size: 0.625rem;
        font-weight: 300;
    }

    .stat-value {
        font-size: 1.5rem;
        font-weight: 300;
    }

    .drilldown-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.875rem;
        padding: 1rem;
    }

    .search-box {
        max-width: 100%;
    }

    .toolbar-info {
        justify-content: center;
    }

    .results-count {
        text-align: center;
        width: 100%;
        font-weight: 300;
    }

    .budget-detail-table-wrapper {
        margin: 0 1rem 1rem 1rem;
    }

    .budget-detail-table {
        font-size: 0.75rem;
        table-layout: auto;
    }

    .budget-detail-table thead th,
    .budget-detail-table tbody td {
        padding: 0.625rem 0.5rem;
    }

    .budget-detail-table thead th {
        font-size: 0.625rem;
        font-weight: 300;
    }

    .rank-badge {
        min-width: 26px;
        height: 20px;
        font-size: 0.625rem;
        padding: 0 0.3rem;
        font-weight: 300;
    }

    .trend-indicator,
    .budget-usage-indicator {
        font-size: 0.6875rem;
        padding: 0.25rem 0.5rem;
        min-width: 60px;
        font-weight: 300;
    }

    .cost-value,
    .budget-value,
    .variation-value {
        font-size: 0.75rem;
        font-weight: 300;
    }
}

/* Scrollbar customizada */
.budget-detail-table-wrapper::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.budget-detail-table-wrapper::-webkit-scrollbar-track {
    background: #F0F2F8;
    border-radius: 6px;
}

.budget-detail-table-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #C5CAE0 0%, #8B90A3 100%);
    border-radius: 6px;
    border: 2px solid #F0F2F8;
}

.budget-detail-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #471FCC 0%, #6B3FE8 100%);
}

/* ===== NAVEGAÇÃO E BOTÕES ===== */
.header-navigation {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #FFFFFF;
    border: 1px solid #E2E6F3;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 300;
    color: #495057;
    transition: all 0.2s ease;
}

.back-button:hover {
    background: #F8F9FD;
    border-color: #471FCC;
    transform: translateX(-2px);
}

.detail-title {
    font-size: 1.25rem;
    font-weight: 300;
    color: #2E1956;
    margin: 0;
}

/* ===== TOOLBAR ACTIONS ===== */
.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.results-count {
    font-size: 0.875rem;
    color: #6B6F7D;
    font-weight: 300;
}

/* ===== FILTROS ===== */
.filters-panel {
    padding: 1rem 1.25rem;
    background: #F8F9FD;
    border-bottom: 1px solid #E2E6F3;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 300;
    color: #2E1956;
    white-space: nowrap;
}

.filter-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-button {
    padding: 0.5rem 1rem;
    background: #FFFFFF;
    border: 1px solid #E2E6F3;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 300;
    color: #495057;
    transition: all 0.2s ease;
}

.filter-button:hover {
    background: #F8F9FD;
    border-color: #471FCC;
}

.filter-button.active {
    background: #471FCC;
    border-color: #471FCC;
    color: #FFFFFF;
}

/* ===== SELETOR DE COLUNAS ===== */
.column-selector-panel {
    padding: 1rem 1.25rem;
    background: #F8F9FD;
    border-bottom: 1px solid #E2E6F3;
}

.column-selector-title {
    font-size: 0.875rem;
    font-weight: 300;
    color: #2E1956;
    margin-bottom: 0.75rem;
}

.column-selector-options {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* ===== COLUNA DE AÇÕES ===== */
.actions-column {
    width: 120px;
    min-width: 120px;
}

.actions-cell {
    padding: 0.5rem !important;
}

.details-button {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #471FCC 0%, #6B3FE8 100%);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 300;
    color: #FFFFFF;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.details-button:hover {
    background: linear-gradient(135deg, #3A18A8 0%, #5632C4 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(71, 31, 204, 0.3);
}

/* ===== DETALHES DO CENTRO DE CUSTO ===== */
.cost-center-details {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.details-summary {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.375rem;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.summary-card {
    background: #FFFFFF;
    padding: 0.375rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #E2E6F3;
    box-shadow: 0 1px 2px rgba(46, 25, 86, 0.04);
    flex: 1 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.summary-label {
    font-size: 0.45rem;
    font-weight: 300;
    color: #6B6F7D;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    margin-bottom: 0.15rem;
    white-space: nowrap;
}

.summary-value {
    font-size: 0.75rem;
    font-weight: 300;
    color: #2E1956;
    white-space: nowrap;
}

.details-info {
    background: #F8F9FD;
    padding: 0.375rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.375rem;
    flex-shrink: 0;
}

.details-info p {
    margin: 0.15rem 0;
    font-size: 0.65rem;
    color: #495057;
}

.status-over {
    color: #DC291E;
    font-weight: 300;
}

.status-ok {
    color: #28A745;
    font-weight: 300;
}

.details-note {
    padding: 1rem;
    background: #FFF9E6;
    border-left: 4px solid #FFC107;
    border-radius: 6px;
}

.details-note p {
    margin: 0;
    font-size: 0.875rem;
    color: #856404;
    font-style: italic;
}

/* ===== SEÇÃO DE RECURSOS ===== */
.resources-section {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.resources-title {
    font-size: 0.75rem;
    font-weight: 300;
    color: #2E1956;
    margin-bottom: 0.375rem;
    padding-bottom: 0.375rem;
    border-bottom: 2px solid #E2E6F3;
    flex-shrink: 0;
}

.resources-table-wrapper {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: auto;
    border-radius: 4px;
    border: 1px solid #E2E6F3;
    background: #FFFFFF;
    max-height: calc(100vh - 280px);
    position: relative;
}

.resources-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.resources-table thead {
    background: linear-gradient(135deg, #F8F9FD 0%, #FFFFFF 100%);
    border-bottom: 2px solid #E2E6F3;
    position: sticky;
    top: 0;
    z-index: 10;
}

.resources-table th {
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 300;
    color: #2E1956;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: linear-gradient(135deg, #F8F9FD 0%, #FFFFFF 100%);
}

.resources-table tbody tr {
    border-bottom: 1px solid #F0F2F8;
    transition: background-color 0.2s ease;
}

.resources-table tbody tr:hover {
    background: linear-gradient(135deg, #F8F9FD 0%, #FAFBFF 100%);
}

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

.resources-table td {
    padding: 0.5rem 0.75rem;
    color: #495057;
    font-size: 0.75rem;
}

.resource-name {
    font-weight: 300;
    color: #2E1956;
    display: block;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resource-cost {
    font-weight: 300;
    color: #471FCC;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.no-resources {
    padding: 2rem;
    text-align: center;
    background: #F8F9FD;
    border-radius: 10px;
    border: 1px dashed #E2E6F3;
}

.no-resources p {
    margin: 0;
    color: #6B6F7D;
    font-size: 0.9375rem;
}



/* ===== CARDS CLICAVEIS COM FILTRO ===== */
.card-filter-clickable {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 4px;
    margin: -4px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-filter-clickable:hover {
    transform: scale(1.02);
}

/* ===== ESTILOS DE SELEÇÃO DE CARDS - Padrão card-fade/card-active ===== */

/* Card selecionado/ativo - destaque total */
.budget-drilldown-card-active {
    opacity: 1;
    transform: scale(1.02);
    box-shadow: 4px 4px 18px 0px rgba(58, 79, 135, 0.25);
    transition: all 0.3s ease;
}

.budget-drilldown-card-active .card-filter-clickable {
    background: rgba(46, 25, 86, 0.08);
}

/* Indicador visual "balão" para card ativo */
.budget-drilldown-card-active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background-color: #fff;
    box-shadow: 2px 2px 4px rgba(58, 79, 135, 0.15);
    z-index: 1;
}

/* Cards não selecionados - fade/dim */
.budget-drilldown-card-fade {
    opacity: 0.35;
    transition: all 0.3s ease;
}

.budget-drilldown-card-fade:hover {
    opacity: 0.6;
}

/* Estado neutro - nenhum filtro ativo */
.budget-drilldown-card-neutral {
    opacity: 1;
    transition: all 0.3s ease;
}

.budget-drilldown-card-neutral:hover {
    box-shadow: 4px 4px 18px 0px rgba(58, 79, 135, 0.15);
}
/* ============================================================
   v2 — Filter bar, KPI row, status pills, sparkline, progress
   ============================================================ */
.bd-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.375rem 0;
}
.bd-filter-group {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
}
.bd-filter-actions {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.bd-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid #E2E6F3;
    border-radius: 16px;
    background: #FFFFFF;
    font-size: 0.7rem;
    color: #2E1956;
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
    font-family: "Ubuntu", sans-serif;
}
.bd-chip.readonly { cursor: default; background: #FAFBFF; }
.bd-chip.select select {
    position: absolute; inset: 0; opacity: 0; cursor: pointer; appearance: none;
}
.bd-chip:hover:not(.readonly) { border-color: #471FCC; }
.bd-chip-label { color: #6B6F7D; font-weight: 400; }
.bd-chip-value { color: #2E1956; font-weight: 500; }
.bd-link-btn {
    background: none;
    border: none;
    color: #471FCC;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.375rem;
    border-radius: 4px;
    font-family: "Ubuntu", sans-serif;
}
.bd-link-btn:hover { background: #F0F2F8; }
.bd-icon-btn {
    background: #FFFFFF;
    border: 1px solid #E2E6F3;
    color: #2E1956;
    font-size: 0.7rem;
    font-weight: 400;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    transition: all 0.15s ease;
    font-family: "Ubuntu", sans-serif;
}
.bd-icon-btn:hover:not(:disabled) { border-color: #471FCC; color: #471FCC; }
.bd-icon-btn:disabled { color: #C5CAE0; cursor: not-allowed; }

/* KPI row (legacy - mantido caso seja reutilizado) */
.bd-kpi-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-gap: 0.5rem;
    gap: 0.5rem;
}
@media (max-width: 1100px) {
    .bd-kpi-row { grid-template-columns: repeat(2, 1fr); }
}

/* KpiCard renderiza o conteúdo direto dentro do card-frame da LCDashboard
   (sem wrapper extra) — modificadores de tom/click vão no cssClass do Card. */
.bd-kpi-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
    height: 100%;
    font-family: "Ubuntu", sans-serif;
}
.bd-card-kpi.clickable,
.bd-card-kpi.clickable .card-frame { cursor: pointer; transition: box-shadow 0.15s ease, border-color 0.15s ease; }
.bd-card-kpi.clickable:hover .bd-kpi-value { color: #471FCC; }
.bd-card-kpi.tone-alert .bd-kpi-value { color: #DC291E; }
.bd-card-kpi.tone-growth .bd-kpi-value { color: #E07817; }
.bd-card-kpi.tone-alert .card-frame { border-left: 3px solid #DC291E; }
.bd-card-kpi.tone-growth .card-frame { border-left: 3px solid #E07817; }

/* Cards LCDashboard usados nesta página: remove padding/centralização padrão
   para que filterbar, searchbar e tabela ocupem todo o card-frame. */
.bd-card-flush .card-content-body,
.bd-card-flush .card-content-body-content {
    padding: 0 !important;
    width: 100%;
    height: 100%;
}
.bd-card-flush .card-content-body.centered { justify-content: stretch; }
.bd-card-kpi .card-content-body,
.bd-card-kpi .card-content-body-content {
    padding: 0.5rem 0.625rem !important;
    width: 100%;
    height: 100%;
}
.bd-kpi-title {
    font-size: 0.65rem;
    color: #6B6F7D;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 400;
}
.bd-kpi-value {
    font-size: 1rem;
    font-weight: 500;
    color: #2E1956;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}
.bd-kpi-progress {
    height: 4px;
    background: #F0F2F8;
    border-radius: 2px;
    overflow: hidden;
}
.bd-kpi-progress-bar {
    height: 100%;
    transition: width 0.3s ease;
}
.bd-kpi-progress-bar.normal { background: linear-gradient(90deg, #471FCC, #6B3FE8); }
.bd-kpi-progress-bar.warning { background: linear-gradient(90deg, #E07817, #FFB347); }
.bd-kpi-progress-bar.over { background: linear-gradient(90deg, #DC291E, #FF5C5C); }
.bd-kpi-sub {
    font-size: 0.65rem;
    color: #6B6F7D;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}
.bd-kpi-delta {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    font-weight: 500;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}
.bd-kpi-delta.up { color: #DC291E; }
.bd-kpi-delta.down { color: #2e7d32; }

/* Search bar */
.bd-searchbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: space-between;
    padding: 0.25rem 0;
}
.bd-search-input-wrap {
    position: relative;
    flex: 1 1;
    max-width: 320px;
}
.bd-search-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #8B90A3;
    pointer-events: none;
}
.bd-search-input {
    width: 100%;
    padding: 0.4rem 0.5rem 0.4rem 1.875rem;
    border: 1px solid #E2E6F3;
    border-radius: 16px;
    font-size: 0.75rem;
    background: #FAFBFF;
    color: #2E1956;
    font-family: "Ubuntu", sans-serif;
    transition: all 0.15s ease;
}
.bd-search-input:focus {
    outline: none;
    border-color: #471FCC;
    background: #FFFFFF;
    box-shadow: 0 0 0 2px rgba(71, 31, 204, 0.1);
}
.bd-search-count {
    font-size: 0.7rem;
    color: #6B6F7D;
}

/* Table cells v2 */
.bd-rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 20px;
    padding: 0 0.35rem;
    background: #F0F2F8;
    color: #6B6F7D;
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 4px;
    border: 1px solid #E2E6F3;
}
.bd-rank-badge.top {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #FFFFFF;
    border-color: #FFA500;
}
.bd-name-text {
    font-size: 12px;
    color: #2E1956;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}
.bd-cost-value, .bd-budget-value, .bd-variation-value {
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    font-size: 12px;
}
.bd-cost-value { color: #2E1956; font-weight: 500; }
.bd-budget-value { color: #6B6F7D; font-weight: 400; }
.bd-text-muted { color: #C5CAE0; }
.bd-variation-value.negative { color: #DC291E; font-weight: 500; }
.bd-variation-value.positive { color: #2e7d32; font-weight: 500; }
.bd-variation-value.neutral { color: #8B90A3; }

.bd-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    font-family: 'Ubuntu', sans-serif;
}
.bd-status-pill.within {
    background: rgba(46, 125, 50, 0.1);
    color: #2e7d32;
    border: 1px solid rgba(46, 125, 50, 0.2);
}
.bd-status-pill.over {
    background: rgba(220, 41, 30, 0.1);
    color: #DC291E;
    border: 1px solid rgba(220, 41, 30, 0.25);
}

.bd-progress-cell {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.bd-progress-track {
    flex: 1 1;
    height: 6px;
    background: #F0F2F8;
    border-radius: 3px;
    overflow: hidden;
    min-width: 60px;
}
.bd-progress-fill {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 3px;
}
.bd-progress-fill.good { background: linear-gradient(90deg, #2e7d32, #66BB6A); }
.bd-progress-fill.normal { background: linear-gradient(90deg, #471FCC, #6B3FE8); }
.bd-progress-fill.warning { background: linear-gradient(90deg, #E07817, #FFB347); }
.bd-progress-fill.over { background: linear-gradient(90deg, #DC291E, #FF5C5C); }
.bd-progress-percent {
    font-size: 11px;
    font-weight: 500;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    min-width: 38px;
    text-align: right;
}
.bd-progress-percent.good { color: #2e7d32; }
.bd-progress-percent.normal { color: #471FCC; }
.bd-progress-percent.warning { color: #E07817; }
.bd-progress-percent.over { color: #DC291E; }

.bd-sparkline {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    justify-content: center;
}
.bd-sparkline-percent {
    font-size: 11px;
    font-weight: 500;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}


/* ============================================================
   RevoGrid override (mant\u00e9m visual da tabela legada)
   ============================================================ */
.bd-revogrid {
    font-family: 'Ubuntu', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #2E1956;
    cursor: pointer;
}
.bd-revogrid revogr-header {
    font-family: 'Ubuntu', sans-serif;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #6B7280;
    background: #FAFBFD;
}
.bd-revogrid .rgRow:hover {
    background: #F5F7FB !important;
}
.bd-revogrid .rgRow.bd-row-over .rgCell:first-child {
    box-shadow: inset 3px 0 0 0 #E53935;
}
.bd-revogrid .rgCell.bd-cell {
    display: flex;
    align-items: center;
    padding: 0 8px;
}
.bd-revogrid .rgCell.bd-cell-right {
    justify-content: flex-end;
}
.bd-revogrid .rgCell.bd-cell-center {
    justify-content: center;
}


/* Status pill mais compacto dentro do RevoGrid */
.bd-revogrid .bd-status-pill {
    padding: 1px 8px;
    font-size: 11px;
    line-height: 16px;
    border-radius: 10px;
    border-width: 0;
    gap: 4px;
    white-space: nowrap;
}
.bd-revogrid .bd-status-pill svg {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
}
.bd-revogrid .rgRow {
    line-height: 1;
}


/* Wrapper da tabela: ocupa 100% da altura do card e mede largura para colunas flex */
.bd-revogrid-wrap {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.bd-revogrid-wrap > revo-grid,
.bd-revogrid-wrap > .bd-revogrid {
    flex: 1 1 auto;
    min-height: 0;
}


/* Garante que LcLoading e wrapper preencham o card sem extrapolar —
   overflow hidden apenas no card da tabela (que contém .bd-revogrid-wrap),
   não no card do filter bar. */
.bd-card-flush .card-content-body,
.bd-card-flush .card-content-body-content {
    min-height: 0;
}
.bd-card-flush:has(.bd-revogrid-wrap) .card-content-body,
.bd-card-flush:has(.bd-revogrid-wrap) .card-content-body-content {
    overflow: hidden;
}
.bd-card-flush .lc-loading,
.bd-card-flush .lc-loading-container {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.bd-revogrid-wrap revo-grid {
    display: block;
    width: 100%;
    height: 100% !important;
    min-height: 0;
}


/* KPI cards precisam de altura minima para nao cortar conteudo.
   Override do grid-template-rows do LCDashboard para esta pagina:
   row 1 = filter bar (auto), rows 2-3 = KPIs (auto), rows 4-12 = tabela (1fr). */
.budget-drilldown .lcdashboard-cards-panel-body {
    grid-template-rows: auto auto auto 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr !important;
}
.bd-card-kpi .card-frame {
    min-height: 80px;
    overflow: visible;
}
.bd-card-kpi .card-content-body,
.bd-card-kpi .card-content-body-content {
    overflow: visible !important;
}

.budget-drilldown {
    width: 100%;
    height: 100%;
}


/* ===== Column Config Panel (popover) ===== */
.bd-col-config-panel {
    position: fixed;
    z-index: 1200;
    width: 320px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(46, 25, 86, 0.18), 0 2px 8px rgba(0,0,0,0.08);
    font-family: "Ubuntu", sans-serif;
    overflow: hidden;
}
.bd-col-config-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #2E1956;
    border-bottom: 1px solid #F0F2F8;
}
.bd-col-config-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #8B90A3;
    padding: 2px;
    border-radius: 4px;
}
.bd-col-config-close:hover { color: #2E1956; background: #F0F2F8; }
.bd-col-config-list {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    max-height: 360px;
    overflow-y: auto;
}
.bd-col-config-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1rem;
    font-size: 0.78rem;
    color: #2E1956;
    transition: background 0.1s;
}
.bd-col-config-item:hover { background: #F5F7FB; }
.bd-col-config-item.hidden { color: #C5CAE0; }
.bd-col-config-item.fixed { opacity: 0.5; }
.bd-col-config-vis {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    padding: 2px;
    border-radius: 3px;
    display: flex;
    align-items: center;
}
.bd-col-config-vis:disabled { cursor: default; }
.bd-col-config-vis:hover:not(:disabled) { background: #EDE8FF; }
.bd-col-config-label {
    flex: 1 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bd-col-config-arrows {
    display: flex;
    gap: 2px;
}
.bd-col-config-arrows button {
    background: none;
    border: none;
    cursor: pointer;
    color: #8B90A3;
    padding: 2px;
    border-radius: 3px;
    display: flex;
    align-items: center;
}
.bd-col-config-arrows button:hover:not(:disabled) { background: #EDE8FF; color: #471FCC; }
.bd-col-config-arrows button:disabled { color: #E0E2EE; cursor: default; }
.bd-col-config-footer {
    border-top: 1px solid #F0F2F8;
    padding: 0.5rem 1rem;
    text-align: center;
}
.bd-col-config-reset {
    background: none;
    border: 1px solid #E0E2EE;
    border-radius: 6px;
    padding: 0.3rem 1rem;
    font-size: 0.72rem;
    color: #471FCC;
    cursor: pointer;
    font-family: inherit;
}
.bd-col-config-reset:hover { background: #F5F0FF; border-color: #471FCC; }

