/* ==========================================
   SISTEMA ALMEIDA ISP CONT v2 - CLOUD SYNC
   ========================================== */

:root {
    --primary: #2E2EF9;
    --primary-dark: #1F1FC9;
    --primary-light: #EEEEFF;
    --secondary: #111111;
    --gray-50: #F7F7F7;
    --gray-100: #EEEEEE;
    --gray-200: #DDDDDD;
    --gray-400: #999999;
    --gray-600: #555555;
    --gray-800: #222222;
    --success: #16A34A;
    --success-light: #DCFCE7;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --danger: #DC2626;
    --danger-light: #FEE2E2;
    --info: #0EA5E9;
    --info-light: #E0F2FE;
    --shadow: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(46,46,249,0.15);
    --radius: 12px;
    --radius-sm: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--gray-50);
    color: var(--secondary);
    line-height: 1.5;
}

.hidden { display: none !important; }

/* ============= LOGIN ============= */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    width: 100%;
    max-width: 460px;
    text-align: center;
}

.login-logo { margin-bottom: 20px; }

.logo-icon {
    width: 72px;
    height: 72px;
    background: var(--primary);
    border-radius: 16px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
}

.logo-a {
    color: white;
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
}

.login-logo h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -1px;
}

.logo-bar {
    background: var(--primary);
    color: white;
    padding: 3px 14px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    display: inline-block;
    margin-top: 6px;
}

.login-card h2 {
    font-size: 17px;
    margin: 18px 0 4px;
    color: var(--gray-800);
}

.login-subtitle {
    color: var(--gray-400);
    margin-bottom: 24px;
    font-size: 13px;
}

.login-tabs {
    display: flex;
    border-bottom: 2px solid var(--gray-100);
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-400);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    font-family: inherit;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content { display: none; text-align: left; }
.tab-content.active { display: block; }

.link-secundario {
    display: block;
    text-align: center;
    margin-top: 14px;
    color: var(--primary);
    font-size: 13px;
    text-decoration: none;
}

.link-secundario:hover { text-decoration: underline; }

.config-alert {
    margin-top: 20px;
    padding: 12px;
    background: var(--warning-light);
    border-left: 4px solid var(--warning);
    border-radius: var(--radius-sm);
    font-size: 12px;
    text-align: left;
    color: #92400E;
}

.config-alert code {
    background: rgba(0,0,0,0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

/* ============= LAYOUT PRINCIPAL ============= */
.main-system { display: flex; min-height: 100vh; }

.sidebar {
    width: 260px;
    background: var(--secondary);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    overflow-y: auto;
}

.sidebar-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo-mini {
    width: 44px;
    height: 44px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-a-mini { color: white; font-size: 22px; font-weight: 800; }
.sidebar-header h2 { font-size: 16px; font-weight: 700; }
.sidebar-header small {
    color: var(--primary);
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nav-item {
    background: transparent;
    color: rgba(255,255,255,0.7);
    border: none;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
}

.nav-item:hover { background: rgba(255,255,255,0.05); color: white; }
.nav-item.active { background: var(--primary); color: white; }
.nav-item i { width: 18px; font-size: 14px; }

.sidebar-footer {
    padding: 14px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    margin-bottom: 8px;
    color: rgba(255,255,255,0.85);
    font-size: 13px;
}

.user-info i { font-size: 22px; }
.user-info > div { flex: 1; display: flex; flex-direction: column; }

.user-badge {
    background: var(--primary);
    color: white;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    width: fit-content;
    margin-top: 2px;
    font-weight: 600;
}

.online-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    margin-bottom: 8px;
    font-size: 11px;
    color: var(--success);
}

.online-indicator .dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(22,163,74,0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(22,163,74,0.7); }
    70% { box-shadow: 0 0 0 8px rgba(22,163,74,0); }
    100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); }
}

.btn-logout {
    width: 100%;
    background: transparent;
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-logout:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

.content {
    margin-left: 260px;
    flex: 1;
    padding: 32px;
    width: calc(100% - 260px);
}

.view { display: none; }
.view.active { display: block; }

.view-header { margin-bottom: 24px; }
.view-header h1 {
    font-size: 26px;
    color: var(--secondary);
    font-weight: 700;
    margin-bottom: 4px;
}
.view-header h1 i { color: var(--primary); margin-right: 8px; }
.view-header p { color: var(--gray-400); font-size: 14px; }

/* ============= KPIs ============= */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: white;
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 14px;
    border-left: 4px solid var(--primary);
}

.kpi-blue { border-left-color: var(--primary); }
.kpi-green { border-left-color: var(--success); }
.kpi-orange { border-left-color: var(--warning); }
.kpi-purple { border-left-color: #8B5CF6; }

.kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary);
}

.kpi-green .kpi-icon { background: var(--success-light); color: var(--success); }
.kpi-orange .kpi-icon { background: var(--warning-light); color: var(--warning); }
.kpi-purple .kpi-icon { background: #EDE9FE; color: #8B5CF6; }

.kpi-content { flex: 1; min-width: 0; }
.kpi-label {
    display: block;
    color: var(--gray-400);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}
.kpi-content strong {
    font-size: 22px;
    color: var(--secondary);
    font-weight: 700;
}

/* ============= CARDS ============= */
.card {
    background: white;
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    margin-bottom: 18px;
}

.card h2 { font-size: 18px; margin-bottom: 14px; color: var(--secondary); }
.card h3 { font-size: 15px; margin-bottom: 14px; color: var(--secondary); font-weight: 600; }

.alerta-info {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--info-light);
    border-left: 4px solid var(--info);
}
.alerta-info i { font-size: 22px; color: var(--info); margin-top: 4px; }
.alerta-info p { color: var(--gray-600); font-size: 13px; margin-top: 4px; }

.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.chart-card {
    background: white;
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
}

.chart-card canvas { max-height: 280px; }

/* ============= TABELAS ============= */
.table-container { overflow-x: auto; margin-top: 10px; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th {
    background: var(--gray-50);
    padding: 10px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-800);
    border-bottom: 2px solid var(--gray-200);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 10px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-800);
}

tr:hover td { background: var(--gray-50); }

.td-numero { text-align: right; font-variant-numeric: tabular-nums; }
.td-positivo { color: var(--success); font-weight: 600; }
.td-negativo { color: var(--danger); font-weight: 600; }
.td-destaque { font-weight: 700; background: var(--primary-light); }

.empty { text-align: center; padding: 40px; color: var(--gray-400); font-size: 14px; }

/* ============= FORMS ============= */
.form-group { margin-bottom: 14px; }

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 5px;
}

.form-group label i { color: var(--primary); margin-right: 4px; }

input[type=text], input[type=password], input[type=number],
input[type=email], input[type=tel], select, textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    transition: all 0.2s;
    background: white;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46,46,249,0.1);
}

.form-row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.flex-1 { flex: 1; min-width: 180px; }
.flex-2 { flex: 2; min-width: 240px; }

/* ============= BOTÕES ============= */
.btn-primary, .btn-secondary {
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: inherit;
    white-space: nowrap;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-lg); }

.btn-secondary { background: white; color: var(--secondary); border: 1px solid var(--gray-200); }
.btn-secondary:hover { background: var(--gray-50); border-color: var(--primary); color: var(--primary); }

.btn-full { width: 100%; justify-content: center; }
.btn-lg { padding: 12px 24px; font-size: 14px; }
.btn-sm { padding: 5px 11px; font-size: 11px; }

.btn-group { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-group-end { justify-content: flex-end; margin-top: 18px; }

/* ============= ACTIONS BAR ============= */
.actions-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input { flex: 1; max-width: 400px; min-width: 200px; }

/* ============= CARDS GRID ============= */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}

.cliente-card {
    background: white;
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
    transition: all 0.2s;
}

.cliente-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.cliente-card h4 { font-size: 15px; margin-bottom: 4px; color: var(--secondary); }
.cliente-card .cliente-cnpj { font-size: 12px; color: var(--gray-400); margin-bottom: 10px; font-family: monospace; }
.cliente-card .cliente-info { font-size: 12px; color: var(--gray-600); margin-bottom: 3px; }

.cliente-card .card-actions {
    display: flex;
    gap: 5px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--gray-100);
}

.btn-icon {
    background: transparent;
    border: 1px solid var(--gray-200);
    padding: 5px 9px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--gray-600);
    font-size: 11px;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-icon:hover { border-color: var(--primary); color: var(--primary); }
.btn-icon.btn-danger:hover { border-color: var(--danger); color: var(--danger); }

/* ============= STEPS ============= */
.step-card { border-left: 4px solid var(--primary); }

.step-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.step-header h3 { flex: 1; margin-bottom: 0 !important; }

.step-number {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

/* ============= EMPRESA BOX ============= */
.empresa-box {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 14px;
    border: 1px solid var(--gray-200);
}

.empresa-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.empresa-header h4 { flex: 1; color: var(--primary); font-size: 15px; }

.btn-remove-empresa {
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 4px 9px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-remove-empresa:hover { background: var(--danger); color: white; }

/* ============= MODAL ============= */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 22px;
}

.modal-content.modal-lg { max-width: 800px; }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--gray-100);
}

.modal-header h2 { color: var(--secondary); font-size: 18px; }
.modal-header h2 i { color: var(--primary); margin-right: 8px; }

.modal-close {
    background: transparent;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: var(--gray-400);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover { background: var(--gray-100); color: var(--danger); }

/* ============= TABS (telas) ============= */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--gray-100);
}

.tabs .tab-btn {
    background: transparent;
    border: none;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-400);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tabs .tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

.aba-tabela { display: none; }
.aba-tabela.active, .aba-tabela:not(.hidden) { display: block; }

/* ============= TOAST ============= */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--success);
    color: white;
    padding: 12px 22px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    animation: slideIn 0.3s ease;
    max-width: 400px;
    font-size: 13px;
}

.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ============= RESULTADO REFORMA ============= */
.regime-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 18px 0;
}

.regime-card {
    background: white;
    border-radius: var(--radius);
    padding: 18px;
    border: 2px solid var(--gray-200);
    text-align: center;
}

.regime-card.melhor {
    border-color: var(--success);
    background: var(--success-light);
    box-shadow: var(--shadow-lg);
}

.regime-card h4 { font-size: 14px; color: var(--gray-800); margin-bottom: 10px; }
.regime-card .valor-grande { font-size: 22px; font-weight: 700; color: var(--secondary); }
.regime-card .badge { font-size: 10px; padding: 3px 8px; border-radius: 4px; display: inline-block; margin-top: 6px; }
.regime-card.melhor .badge { background: var(--success); color: white; }

/* ============= PARÂMETROS ============= */
.param-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}

.param-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
}

.param-item label { font-size: 11px; color: var(--gray-600); font-weight: 500; }
.param-item input { padding: 7px; font-size: 13px; text-align: right; }
.param-item .base-legal { font-size: 10px; color: var(--gray-400); font-style: italic; }

/* ============= RESPONSIVO ============= */
@media (max-width: 768px) {
    .sidebar { width: 70px; }
    .sidebar-header h2, .sidebar-header small,
    .nav-item span, .user-info > div,
    .online-indicator, .btn-logout { display: none; }
    .nav-item { justify-content: center; padding: 12px; }
    .nav-item i { margin: 0; }
    .content { margin-left: 70px; width: calc(100% - 70px); padding: 16px; }
    .form-row { flex-direction: column; }
    .kpi-grid { grid-template-columns: 1fr 1fr; }
    .chart-grid { grid-template-columns: 1fr; }
}

/* ============= DETALHAMENTO EXPANSÍVEL ============= */
.btn-expand {
    background: transparent;
    border: 1px solid var(--gray-200);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--primary);
    font-size: 11px;
    transition: all 0.2s;
    padding: 0;
}

.btn-expand:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.detalhe-row {
    background: var(--gray-50);
}

.detalhe-row td {
    padding: 16px !important;
}

.detalhe-box {
    background: white;
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

.detalhe-box h4 {
    font-size: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gray-100);
}

.resumo-empresa {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    padding: 12px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 12px;
}

.resumo-empresa > div {
    padding: 4px 8px;
}

.grupo-tributo {
    margin-bottom: 18px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.grupo-tributo h5 {
    background: var(--primary);
    color: white;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    margin: 0;
}

.tabela-detalhe {
    width: 100%;
    font-size: 12px;
}

.tabela-detalhe th {
    background: var(--gray-50);
    padding: 8px;
    font-size: 11px;
}

.tabela-detalhe td {
    padding: 8px;
    border-bottom: 1px solid var(--gray-100);
}

.tabela-resumo {
    margin-top: 14px;
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
}

.tabela-resumo td {
    padding: 10px 14px;
    font-size: 13px;
}

.resumo-final {
    margin-top: 16px;
}

.alerta-info {
    background: var(--info-light);
    border-left: 4px solid var(--info);
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.alerta-info i {
    color: var(--info);
    font-size: 18px;
}

details summary::-webkit-details-marker {
    display: none;
}

details summary {
    list-style: none;
}

details[open] summary {
    background: var(--primary) !important;
    color: white !important;
}

/* ============= LOGO OFICIAL ALMEIDA ============= */
.logo-oficial-login {
    max-width: 180px;
    width: 100%;
    height: auto;
    margin: 0 auto 16px;
    display: block;
}

.logo-oficial-sidebar {
    max-width: 140px;
    width: 100%;
    height: auto;
    margin: 8px auto;
    display: block;
    /* Logo já vem na cor correta para sidebar escuro */
    /* Versão branca para fundo escuro */
}

/* Como nosso sidebar é escuro, fazemos a logo aparecer em branco */
.sidebar-header {
    padding: 18px 12px !important;
    justify-content: center !important;
    background: rgba(255,255,255,0.05);
}

/* Tagline abaixo da logo no login */
.login-card h2 {
    margin-top: 18px !important;
}

/* Em telas pequenas (sidebar minimizado), esconde a logo grande */
@media (max-width: 768px) {
    .logo-oficial-sidebar {
        max-width: 40px;
    }
}

/* ============= BENEFÍCIOS FISCAIS ESTADUAIS ============= */
.beneficio-fiscal-box {
    background: linear-gradient(135deg, #FFF8E1 0%, #FFECB3 100%);
    border-left: 4px solid #FFB300;
    padding: 14px;
    margin-top: 14px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(255, 179, 0, 0.15);
}
.beneficio-fiscal-box label {
    color: #E65100;
    font-weight: 600;
}
.beneficio-fiscal-box select {
    border: 1px solid #FFB300;
    background-color: #FFFFFF;
}
.beneficio-fiscal-box small {
    display: inline-block;
    margin-right: 8px;
}

/* ============= SEGREGAÇÃO DE RECEITAS ============= */
.tabela-segregacao {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.tabela-segregacao tr {
    border-bottom: 1px solid #E0E0E0;
}
.tabela-segregacao td {
    padding: 8px 10px;
}
.tabela-segregacao .td-numero {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.tabela-segregacao-detalhe {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 10px;
}
.tabela-segregacao-detalhe th {
    background: #F5F5F5;
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid #DDD;
    font-size: 12px;
    color: #555;
}
.tabela-segregacao-detalhe td {
    padding: 10px;
    border-bottom: 1px solid #EEE;
}
.tabela-segregacao-detalhe .td-numero {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.tabela-segregacao-detalhe tr:hover {
    background: #FAFAFA;
}

.receita-segregada-box {
    transition: all 0.2s;
}
.receita-segregada-box:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

@media (max-width: 768px) {
    .tabela-segregacao, .tabela-segregacao-detalhe {
        font-size: 11px;
    }
    .tabela-segregacao td, .tabela-segregacao-detalhe td {
        padding: 6px 4px;
    }
}

/* ============= TABELA ESTILO PLANILHA HAYP ============= */
.tabela-hayp {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-family: 'Calibri', 'Segoe UI', Arial, sans-serif;
}
.tabela-hayp th, .tabela-hayp td {
    border: 1px solid #B0B0B0;
    padding: 6px 10px;
    vertical-align: middle;
}
.tabela-hayp .td-numero {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Cabeçalho Cenário Anterior - Laranja */
.th-hayp-anterior th {
    background: #C65911;
    color: white;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    padding: 8px;
    border: 1px solid #8B3D08;
}
.th-hayp-anterior-sub th {
    background: #F4B084;
    color: #4A2C0E;
    font-weight: bold;
    text-align: center;
}
.tr-hayp-anterior td {
    background: #FBE5D6;
}
.tr-hayp-vazio td {
    background: #E7E6E6;
    color: #595959;
}
.td-empresa-anterior {
    background: #ED7D31 !important;
    color: white !important;
    text-align: center;
    vertical-align: middle;
    font-size: 13px;
}
.tr-hayp-total-anterior td {
    background: #ED7D31;
    color: white;
    font-weight: bold;
    text-align: right;
}

/* Cabeçalho Cenário Atual - Azul */
.th-hayp-atual th {
    background: #1F4E79;
    color: white;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    padding: 8px;
    border: 1px solid #0F2840;
}
.th-hayp-atual-sub th {
    background: #9DC3E6;
    color: #1F4E79;
    font-weight: bold;
    text-align: center;
}
.th-hayp-atual-sub .th-guia {
    background: white;
    border: none;
}
.tr-hayp-cnpj1 td {
    background: #DDEBF7;
}
.tr-hayp-cnpj2 td {
    background: #BDD7EE;
}
.td-empresa-atual {
    background: #5B9BD5 !important;
    color: white !important;
    text-align: center;
    vertical-align: middle;
    font-weight: bold;
}
.td-cnpj2 {
    background: #2E75B6 !important;
}
.tr-hayp-cnpj2 .tr-apuracao-detalhe td,
.tr-apuracao-detalhe td {
    background: #F8F9FB !important;
    border-left: 3px solid #5B9BD5;
}
.tr-hayp-total-atual td {
    background: #2E75B6;
    color: white;
    font-weight: bold;
}
.td-guia-valor {
    background: white !important;
    border: 2px solid #333 !important;
    text-align: center;
    vertical-align: middle;
    font-size: 14px;
    font-weight: bold;
    padding: 12px !important;
}
.td-guia-label {
    background: white !important;
    border: 2px solid #333 !important;
    text-align: center;
    vertical-align: middle;
    font-size: 13px;
    font-weight: bold;
    text-decoration: underline;
    padding: 12px !important;
}

/* Tabela Economia */
.tabela-hayp-economia {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    font-family: 'Calibri', 'Segoe UI', Arial, sans-serif;
}
.tabela-hayp-economia td {
    background: #92D050;
    color: #1F3F0F;
    border: 1px solid #6BAF38;
    padding: 10px 14px;
    font-weight: bold;
}
.tabela-hayp-economia .td-numero {
    text-align: right;
    font-size: 15px;
}

/* Responsivo */
@media (max-width: 900px) {
    .tabela-hayp, .tabela-hayp-economia { font-size: 11px; }
    .tabela-hayp th, .tabela-hayp td { padding: 4px 6px; }
    .td-guia-valor, .td-guia-label { font-size: 11px; padding: 6px !important; }
}

/* ============= MEMÓRIA DE CÁLCULO (LUCRO PRESUMIDO) - FORMATO PLANILHA ============= */
.memoria-apuracao {
    margin-bottom: 20px;
    border: 1px solid #B0B0B0;
    border-radius: 4px;
    overflow: hidden;
    background: white;
}
.memoria-header {
    background: linear-gradient(135deg, #1F4E79 0%, #2E5A8A 100%);
    color: white;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}
.memoria-header i {
    font-size: 16px;
    background: white;
    padding: 4px 6px;
    border-radius: 4px;
}
.memoria-header .memoria-faturamento {
    margin-left: auto;
    background: rgba(255,255,255,0.18);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
.tabela-memoria {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-family: 'Calibri', 'Segoe UI', Arial, sans-serif;
}
.tabela-memoria thead th {
    background: #1F4E79;
    color: white;
    padding: 8px 12px;
    text-align: right;
    font-weight: bold;
    border: 1px solid #0F2840;
}
.tabela-memoria thead th:first-child {
    text-align: left;
}
.tabela-memoria tbody td {
    padding: 7px 12px;
    border: 1px solid #D0D0D0;
}
.tabela-memoria tbody td.td-numero {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.tabela-memoria tbody td.td-valor {
    background: #E8F5E9;
}
/* Linha de Base de Cálculo - amarelo destacado */
.tabela-memoria tbody tr.tr-base td {
    background: #FFF2CC !important;
    color: #7F6000;
    font-weight: bold;
}
.tabela-memoria tbody tr.tr-base td.td-valor {
    background: #FFF2CC !important;
}
/* Linha TOTAL DE IMPOSTOS - laranja destacado */
.tabela-memoria tbody tr.tr-total td {
    background: #FFC000;
    color: #000;
    font-weight: bold;
    font-size: 14px;
    padding: 10px 12px;
    border-top: 2px solid #B88800;
    border-bottom: 2px solid #B88800;
}
.tabela-memoria tbody tr:hover:not(.tr-base):not(.tr-total) td {
    background: #FAFAFA;
}
.tabela-memoria tbody tr:hover:not(.tr-base):not(.tr-total) td.td-valor {
    background: #DCEDC8;
}

@media (max-width: 768px) {
    .tabela-memoria { font-size: 11px; }
    .tabela-memoria thead th, .tabela-memoria tbody td { padding: 5px 6px; }
    .memoria-header { font-size: 12px; flex-wrap: wrap; }
}


/* ============= FORMAÇÃO DE PREÇO - TABELA REFORMULADA ============= */
.tabela-formacao-preco {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
    font-family: 'Calibri', 'Segoe UI', Arial, sans-serif;
    table-layout: fixed;
    min-width: 1700px;
}
.tabela-formacao-preco thead th {
    background: #1F4E79;
    color: white;
    padding: 8px 4px;
    text-align: center;
    font-weight: bold;
    border: 1px solid #0F2840;
    font-size: 11px;
    white-space: nowrap;
    vertical-align: middle;
}
.tabela-formacao-preco tbody td {
    padding: 4px;
    border: 1px solid #D0D0D0;
    vertical-align: middle;
    text-align: center;
    background: white;
    height: 38px;
    box-sizing: border-box;
}
.tabela-formacao-preco tbody tr:nth-child(even) td {
    background: #FAFAFA;
}
.tabela-formacao-preco tbody tr:hover td {
    background: #FFF9C4;
}
.tabela-formacao-preco .td-numero {
    text-align: right;
    font-variant-numeric: tabular-nums;
    padding-right: 8px;
}
.tabela-formacao-preco .td-readonly {
    background: #F0F4F8 !important;
    color: #1F4E79;
    font-weight: 600;
}
.tabela-formacao-preco .td-isento {
    background: #FFF8E1 !important;
    color: #7F6000;
}
.tabela-formacao-preco .td-assin {
    text-align: center !important;
}
.tabela-formacao-preco .td-pct {
    font-weight: bold;
    text-align: center;
}

/* Inputs gerais da tabela */
.tabela-formacao-preco .input-tab {
    width: 100%;
    border: 1px solid #DDD;
    padding: 5px 6px;
    border-radius: 3px;
    font-size: 12px;
    background: white;
    box-sizing: border-box;
}
.tabela-formacao-preco .input-tab:focus {
    border-color: #2E2EF9;
    outline: none;
    box-shadow: 0 0 0 2px rgba(46,46,249,0.15);
}

/* Coluna de livro: checkbox + input/dash no mesmo bloco */
.tabela-formacao-preco .tdl {
    padding: 4px 6px;
    text-align: center;
}
.tabela-formacao-preco .livro-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
}
.tabela-formacao-preco .chk-livro {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
}
.tabela-formacao-preco .input-livro {
    flex: 1 1 auto;
    width: 100%;
    max-width: 80px;
    border: 1px solid #DDD;
    padding: 4px 6px;
    border-radius: 3px;
    font-size: 11px;
    background: #FFF8E1;
    text-align: right;
    box-sizing: border-box;
}
.tabela-formacao-preco .input-livro:focus {
    border-color: #FF9800;
    outline: none;
    background: white;
}
.tabela-formacao-preco .livro-dash {
    color: #BBB;
    font-size: 14px;
    flex: 1;
}

/* SVA em modo automático (calculado a partir de Preço - SVA real) */
.tabela-formacao-preco .input-tab.sva-auto {
    background: #E3F2FD !important;
    border-color: #2196F3 !important;
    color: #1565C0;
    font-style: italic;
}
.tabela-formacao-preco .input-tab.sva-auto:focus {
    background: white !important;
    font-style: normal;
}

/* Total Footer */
.tabela-formacao-preco tfoot .tr-total-fp td {
    background: #FFC000 !important;
    color: #000;
    font-weight: bold;
    font-size: 13px;
    padding: 10px 6px;
    border-top: 2px solid #B88800;
    border-bottom: 2px solid #B88800;
    text-align: right;
}
.tabela-formacao-preco tfoot .tr-total-fp td:first-child {
    text-align: left;
}

.tabela-formacao-preco .td-acoes {
    width: 40px;
    padding: 2px !important;
}

/* LARGURAS FIXAS DE COLUNAS */
.tabela-formacao-preco col.col-plano    { width: 180px; }
.tabela-formacao-preco col.col-preco    { width: 95px; }
.tabela-formacao-preco col.col-livro    { width: 120px; }
.tabela-formacao-preco col.col-sva      { width: 90px; }
.tabela-formacao-preco col.col-totscm   { width: 95px; }
.tabela-formacao-preco col.col-totsva   { width: 95px; }
.tabela-formacao-preco col.col-pct      { width: 75px; }
.tabela-formacao-preco col.col-assin    { width: 80px; }
.tabela-formacao-preco col.col-fat      { width: 110px; }
.tabela-formacao-preco col.col-fatscm   { width: 105px; }
.tabela-formacao-preco col.col-fatsva   { width: 105px; }
.tabela-formacao-preco col.col-locacao  { width: 95px; }
.tabela-formacao-preco col.col-isento   { width: 105px; }
.tabela-formacao-preco col.col-acoes    { width: 40px; }

/* Alerta de risco SVA */
.alert-risco-sva {
    margin-top: 14px;
    background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
    border-left: 4px solid #C62828;
    padding: 12px 16px;
    border-radius: 6px;
    color: #B71C1C;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-risco-sva i { font-size: 22px; }

/* Cards de categoria (resultado) */
.grid-categorias {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}
.card-categoria {
    background: white;
    border: 2px solid #DDD;
    border-radius: 8px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.2s;
}
.card-categoria:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.icon-cat {
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 20px;
    flex-shrink: 0;
}
.info-cat { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.info-cat small { color: #666; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.info-cat strong { color: #2E2EF9; font-size: 18px; font-weight: 700; margin: 2px 0; }
.info-cat span { color: #888; font-size: 11px; }

@media (max-width: 900px) {
    .tabela-formacao-preco { font-size: 10px; }
    .tabela-formacao-preco thead th { font-size: 9px; padding: 4px 2px; }
    .tabela-formacao-preco .input-livro { max-width: 60px; }
}

/* ============= CONSULTORIA - LINHA DO TEMPO ============= */
.timeline-consultoria {
    position: relative;
    padding: 20px 0;
}

.timeline-consultoria::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #2E2EF9 0%, #00BCD4 25%, #4CAF50 50%, #FF9800 75%, #F44336 100%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-left: 80px;
    margin-bottom: 25px;
    transition: all 0.3s;
}

.timeline-item.etapa-concluida .timeline-numero {
    box-shadow: 0 0 0 4px #C8E6C9, 0 4px 12px rgba(76,175,80,0.4);
}

.timeline-item.etapa-concluida .timeline-content {
    background: linear-gradient(135deg, #F1F8E9 0%, #FFFFFF 100%);
    border-color: #4CAF50;
}

.timeline-item.etapa-concluida .timeline-content::after {
    content: '✓ CONCLUÍDA';
    position: absolute;
    top: 12px;
    right: 12px;
    background: #4CAF50;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.timeline-numero {
    position: absolute;
    left: 12px;
    top: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 2;
    transition: all 0.3s;
}

.timeline-content {
    background: white;
    border: 1px solid #E0E0E0;
    border-radius: 10px;
    padding: 16px 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    position: relative;
    transition: all 0.3s;
}

.timeline-content:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.timeline-header h4 {
    margin: 0;
    color: #2E2EF9;
    font-size: 16px;
}

.timeline-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.timeline-desc {
    color: #555;
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 12px 0;
}

.timeline-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline-checklist li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px dashed #EEE;
    font-size: 13px;
}

.timeline-checklist li:last-child {
    border-bottom: none;
}

.timeline-checklist input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #4CAF50;
}

.timeline-checklist label {
    cursor: pointer;
    flex: 1;
    color: #333;
}

.timeline-checklist input[type="checkbox"]:checked + label {
    color: #4CAF50;
    text-decoration: line-through;
    opacity: 0.7;
}

/* 6 ETAPAS PRINCIPAIS GRID */
.etapas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.etapa-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8F9FA 100%);
    padding: 18px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.06);
    position: relative;
    transition: all 0.3s;
}

.etapa-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.etapa-card .etapa-num {
    position: absolute;
    top: -12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2E2EF9;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.etapa-card h4 {
    margin: 0 0 8px 0;
    color: #2E2EF9;
    font-size: 15px;
    padding-right: 30px;
}

.etapa-card p {
    margin: 0;
    color: #666;
    font-size: 12px;
    line-height: 1.5;
}

/* Responsivo */
@media (max-width: 768px) {
    .timeline-item {
        padding-left: 60px;
    }
    .timeline-consultoria::before {
        left: 20px;
    }
    .timeline-numero {
        left: 2px;
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    .timeline-header h4 {
        font-size: 14px;
    }
}

/* ============= CRM CONSULTORIAS ============= */
.consultoria-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 15px;
    border-bottom: 2px solid #E0E0E0;
    flex-wrap: wrap;
}

.cons-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.cons-tab:hover { color: #2E2EF9; background: #F8F9FF; }

.cons-tab.active {
    color: #2E2EF9;
    border-bottom-color: #2E2EF9;
    background: #F8F9FF;
}

.badge-count {
    background: #E0E0E0;
    color: #333;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

.cons-tab.active .badge-count {
    background: #2E2EF9;
    color: white;
}

/* GRID DE CARDS */
.consultorias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.consultoria-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
    cursor: pointer;
}

.consultoria-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.cons-card-header {
    color: white;
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.cons-card-header h3 {
    margin: 0;
    font-size: 16px;
    color: white;
}

.cons-card-header small {
    color: white;
    opacity: 0.9;
}

.cons-status-badge {
    background: rgba(255,255,255,0.25);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.cons-card-body {
    padding: 16px 18px;
}

.cons-card-progresso {
    margin-bottom: 14px;
}

.cons-progress-bg {
    width: 100%;
    height: 8px;
    background: #E0E0E0;
    border-radius: 4px;
    overflow: hidden;
}

.cons-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #2E2EF9, #4CAF50);
    transition: width 0.5s;
}

.cons-card-info {
    font-size: 12px;
    color: #555;
    line-height: 1.8;
    border-top: 1px dashed #EEE;
    padding-top: 10px;
}

.cons-card-info > div {
    margin-bottom: 3px;
}

.cons-card-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #F0F0F0;
}

/* PERFIL DE UMA CONSULTORIA */
.btn-back {
    background: none;
    border: none;
    color: #2E2EF9;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    padding: 0;
}

.btn-back:hover { text-decoration: underline; }

.perfil-tabs {
    display: flex;
    gap: 2px;
    margin: 15px 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    overflow-x: auto;
    padding: 6px;
}

.perfil-tab {
    padding: 10px 14px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    border-radius: 6px;
    white-space: nowrap;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.perfil-tab:hover { background: #F0F0F0; }
.perfil-tab.active { background: #2E2EF9; color: white; }

.perfil-content { display: none; }
.perfil-content.active { display: block; }

/* MODAL */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 10px;
    max-height: 90vh;
    overflow-y: auto;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: modalIn 0.2s ease-out;
}

@keyframes modalIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.modal-header {
    padding: 16px 22px;
    border-bottom: 1px solid #EEE;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #F8F9FA;
    border-radius: 10px 10px 0 0;
}

.modal-header h3 { margin: 0; color: #2E2EF9; }

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.modal-close:hover { color: #333; }

.modal-body { padding: 22px; }

.modal-footer {
    padding: 14px 22px;
    border-top: 1px solid #EEE;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #F8F9FA;
    border-radius: 0 0 10px 10px;
}

/* REUNIÃO CARD */
.reuniao-card {
    background: white;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 10px;
}

.reuniao-tipo-badge {
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

/* DOCUMENTOS */
.documentos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.documento-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    padding: 12px;
}

.documento-card > div:first-of-type { flex: 1; }

/* PARECER */
.parecer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 14px;
    margin-top: 10px;
}

.parecer-grid .form-group label {
    display: block;
    font-weight: 600;
    color: #2E2EF9;
    margin-bottom: 6px;
    font-size: 13px;
}

.parecer-grid textarea, #parecerLivre {
    width: 100%;
    padding: 10px;
    border: 1px solid #DDD;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
}

/* TRIMESTRAL */
.trimestral-card {
    background: white;
    padding: 14px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 12px;
}

/* HISTÓRICO */
.historico-timeline {
    position: relative;
    padding-left: 30px;
}

.historico-timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: #E0E0E0;
}

.hist-item {
    position: relative;
    padding-left: 20px;
    margin-bottom: 14px;
}

.hist-dot {
    position: absolute;
    left: -23px;
    top: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.hist-content {
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.hist-content strong {
    display: block;
    font-size: 13px;
    color: #333;
    margin-bottom: 3px;
}

.hist-content small {
    font-size: 11px;
}

/* RESUMO KPIs */
.kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.kpi-card {
    background: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 12px;
}

.kpi-card i { font-size: 28px; }
.kpi-card strong {
    display: block;
    font-size: 22px;
    color: #333;
}
.kpi-card small {
    color: #666;
    font-size: 12px;
}

.hidden { display: none !important; }

/* RESPONSIVO */
@media (max-width: 768px) {
    .consultorias-grid { grid-template-columns: 1fr; }
    .parecer-grid { grid-template-columns: 1fr; }
    .perfil-tabs { padding: 4px; }
    .perfil-tab { padding: 8px 10px; font-size: 11px; }
}

/* ============= CONSULTORES ============= */
.consultores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 15px;
}

.consultor-card {
    background: white;
    border-radius: 12px;
    padding: 24px 20px 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: center;
    transition: all 0.3s;
    position: relative;
}

.consultor-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.consultor-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    margin: 0 auto 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    letter-spacing: 1px;
}

.consultor-card h4 {
    margin: 0 0 4px 0;
    color: #2E2EF9;
    font-size: 16px;
}

.consultor-cargo {
    color: #666;
    font-size: 13px;
    margin: 0 0 12px 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.consultor-info {
    font-size: 12px;
    color: #555;
    line-height: 1.8;
    padding: 10px 0;
    border-top: 1px dashed #EEE;
    border-bottom: 1px dashed #EEE;
    margin-bottom: 12px;
    text-align: left;
    min-height: 30px;
}

.consultor-info div {
    margin-bottom: 2px;
}

.consultor-info i {
    color: #2E2EF9;
    width: 18px;
    text-align: center;
    margin-right: 4px;
}

.consultor-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 12px;
}

.consultor-stats > div {
    text-align: center;
}

.consultor-stats strong {
    display: block;
    color: #2E2EF9;
    font-size: 22px;
    line-height: 1;
}

.consultor-stats small {
    color: #888;
    font-size: 11px;
    text-transform: uppercase;
}

.consultor-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
    padding-top: 8px;
    border-top: 1px solid #F0F0F0;
}

/* ============= GRUPO ECONÔMICO ============= */
.cnpj-grupo-box {
    background: white;
    padding: 14px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    margin-bottom: 10px;
}

.cnpj-grupo-box .form-group label {
    font-size: 12px;
    color: #555;
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
}

.cnpj-grupo-box input, .cnpj-grupo-box select {
    width: 100%;
    padding: 7px 9px;
    font-size: 13px;
    border: 1px solid #DDD;
    border-radius: 4px;
}

.grupo-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
}

.grupo-badge i { font-size: 10px; }

/* ============= PARECER - SEÇÕES COLAPSÁVEIS (Estilo Almeida) ============= */
.parecer-secoes {
    margin-top: 15px;
}

.parecer-secao {
    background: white;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: all 0.2s;
}

.parecer-secao:hover {
    border-color: #2E2EF9;
    box-shadow: 0 2px 8px rgba(46,46,249,0.08);
}

.parecer-secao-header {
    background: linear-gradient(135deg, #2E2EF9 0%, #1A1AA8 100%);
    color: white;
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    user-select: none;
}

.parecer-secao-header:hover {
    background: linear-gradient(135deg, #1A1AA8 0%, #0F0F8A 100%);
}

.parecer-secao-header strong {
    margin-right: 6px;
    font-size: 15px;
}

.parecer-secao-header i {
    transition: transform 0.3s;
}

.parecer-secao-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    padding: 0 16px;
}

.parecer-secao-body.aberta {
    max-height: 2000px;
    padding: 16px;
    transition: max-height 0.5s ease-in, padding 0.3s ease-in;
}

.parecer-secao-body textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #DDD;
    border-radius: 6px;
    font-family: 'Calibri', Arial, sans-serif;
    font-size: 13.5px;
    resize: vertical;
    line-height: 1.5;
}

.parecer-secao-body textarea:focus {
    border-color: #2E2EF9;
    outline: none;
    box-shadow: 0 0 0 2px rgba(46,46,249,0.15);
}

.parecer-dica {
    display: block;
    background: #FFF8E1;
    padding: 6px 10px;
    border-radius: 4px;
    border-left: 3px solid #FFA000;
    color: #555;
    font-size: 12px;
    margin-bottom: 8px;
}

/* ============= DIAGNÓSTICO SIMPLES NACIONAL ============= */
.upload-zone {
    border: 3px dashed #BBB;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: #FAFBFC;
    transition: all 0.3s;
    margin-top: 15px;
}

.upload-zone.drag-active {
    border-color: #2E2EF9;
    background: #EFF6FF;
    transform: scale(1.01);
}

.upload-zone h3 {
    color: #2E2EF9;
    margin: 15px 0 8px;
}

.diag-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
}

.diag-file-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    padding: 10px 12px;
}

/* KPIs do Diagnóstico */
.diag-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.diag-kpi-card {
    background: white;
    border-radius: 10px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    border-left: 4px solid #2E2EF9;
}

.diag-kpi-card.kpi-azul { border-left-color: #2E2EF9; }
.diag-kpi-card.kpi-azul > i { color: #2E2EF9; }
.diag-kpi-card.kpi-verde { border-left-color: #10B981; }
.diag-kpi-card.kpi-verde > i { color: #10B981; }
.diag-kpi-card.kpi-laranja { border-left-color: #F59E0B; }
.diag-kpi-card.kpi-laranja > i { color: #F59E0B; }
.diag-kpi-card.kpi-roxo { border-left-color: #8B5CF6; }
.diag-kpi-card.kpi-roxo > i { color: #8B5CF6; }
.diag-kpi-card.kpi-vermelho { border-left-color: #DC2626; }
.diag-kpi-card.kpi-vermelho > i { color: #DC2626; }

.diag-kpi-card > i {
    font-size: 32px;
}

.diag-kpi-label {
    color: #666;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.diag-kpi-valor {
    color: #1F2937;
    font-size: 22px;
    font-weight: 700;
    margin-top: 2px;
}

/* Velocímetros */
.diag-velocimetros {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.diag-tributos-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

@media (max-width: 768px) {
    .diag-tributos-row { grid-template-columns: 1fr; }
}

/* Tabelas do diagnóstico */
.diag-tabela, .diag-tabela-comparativo {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 13px;
}

.diag-tabela th, .diag-tabela td,
.diag-tabela-comparativo th, .diag-tabela-comparativo td {
    padding: 10px 12px;
    border: 1px solid #E5E7EB;
    text-align: left;
}

.diag-tabela tbody tr:nth-child(even),
.diag-tabela-comparativo tbody tr:nth-child(even) {
    background: #F9FAFB;
}

/* Alertas */
.diag-alerta {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 4px solid;
    font-size: 14px;
}

.diag-alerta.critico {
    background: #FEF2F2;
    border-left-color: #DC2626;
    color: #991B1B;
}

.diag-alerta.aviso {
    background: #FFFBEB;
    border-left-color: #F59E0B;
    color: #92400E;
}

.diag-alerta.oportunidade {
    background: #ECFDF5;
    border-left-color: #10B981;
    color: #065F46;
}

/* Recomendações */
.diag-recomendacao {
    display: flex;
    gap: 14px;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 12px;
    border: 1px solid #E5E7EB;
    background: white;
    transition: all 0.2s;
}

.diag-recomendacao:hover {
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}

.diag-recomendacao.critico { border-left: 5px solid #DC2626; background: linear-gradient(90deg, #FEF2F2 0%, white 30%); }
.diag-recomendacao.aviso { border-left: 5px solid #F59E0B; background: linear-gradient(90deg, #FFFBEB 0%, white 30%); }
.diag-recomendacao.oportunidade { border-left: 5px solid #10B981; background: linear-gradient(90deg, #ECFDF5 0%, white 30%); }
.diag-recomendacao.info { border-left: 5px solid #3B82F6; background: linear-gradient(90deg, #EFF6FF 0%, white 30%); }

.diag-rec-icone {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F3F4F6;
    color: #2E2EF9;
    font-size: 18px;
}

.diag-recomendacao.critico .diag-rec-icone { background: #FEE2E2; color: #DC2626; }
.diag-recomendacao.aviso .diag-rec-icone { background: #FEF3C7; color: #F59E0B; }
.diag-recomendacao.oportunidade .diag-rec-icone { background: #D1FAE5; color: #10B981; }
.diag-recomendacao.info .diag-rec-icone { background: #DBEAFE; color: #3B82F6; }

.diag-rec-conteudo {
    flex: 1;
}

.diag-rec-conteudo strong {
    display: block;
    color: #1F2937;
    font-size: 14px;
    margin-bottom: 5px;
}

.diag-rec-conteudo p {
    margin: 0;
    color: #4B5563;
    font-size: 13px;
    line-height: 1.6;
}

/* Histórico */
.diag-hist-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.diag-hist-card:hover {
    background: #F8F9FA;
    border-color: #2E2EF9;
}

/* ============= ANÁLISE HORIZONTAL ============= */
.diag-ah-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.diag-ah-kpi {
    background: white;
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border-left: 4px solid #2E2EF9;
}

.diag-ah-kpi.azul { border-left-color: #2E2EF9; }
.diag-ah-kpi.azul > i { color: #2E2EF9; }
.diag-ah-kpi.verde { border-left-color: #10B981; }
.diag-ah-kpi.verde > i { color: #10B981; }
.diag-ah-kpi.laranja { border-left-color: #F59E0B; }
.diag-ah-kpi.laranja > i { color: #F59E0B; }
.diag-ah-kpi.roxo { border-left-color: #8B5CF6; }
.diag-ah-kpi.roxo > i { color: #8B5CF6; }
.diag-ah-kpi.vermelho { border-left-color: #DC2626; }
.diag-ah-kpi.vermelho > i { color: #DC2626; }

.diag-ah-kpi > i { font-size: 24px; flex: 0 0 auto; }

.diag-ah-label {
    color: #6B7280;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.diag-ah-valor {
    color: #1F2937;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 2px;
}

.diag-ah-kpi small {
    font-size: 10px;
    display: block;
    margin-top: 2px;
}

/* Tabela horizontal */
.diag-tabela-horizontal {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.diag-tabela-horizontal th, .diag-tabela-horizontal td {
    padding: 8px 10px;
    border-bottom: 1px solid #E5E7EB;
}

.diag-tabela-horizontal th {
    text-align: left;
    font-weight: 700;
    font-size: 12px;
}

.diag-tabela-horizontal tfoot td {
    padding: 10px;
    font-size: 13px;
}

/* ============= ANÁLISE DE OPORTUNIDADES ============= */
.diag-oport-cards-topo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 15px 0;
}

.diag-oport-score-card {
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.diag-oport-resumo-card {
    background: white;
    border-radius: 10px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border-left: 4px solid #ccc;
}

.diag-oport-resumo-card.verde { border-left-color: #10B981; }
.diag-oport-resumo-card.verde > i { color: #10B981; }
.diag-oport-resumo-card.vermelho { border-left-color: #DC2626; }
.diag-oport-resumo-card.vermelho > i { color: #DC2626; }
.diag-oport-resumo-card.amarelo { border-left-color: #F59E0B; }
.diag-oport-resumo-card.amarelo > i { color: #F59E0B; }
.diag-oport-resumo-card.azul { border-left-color: #3B82F6; }
.diag-oport-resumo-card.azul > i { color: #3B82F6; }

.diag-oport-resumo-card > i { font-size: 26px; }

.diag-oport-label {
    color: #6B7280;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.diag-oport-valor {
    color: #1F2937;
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
    margin-top: 2px;
}

.diag-oport-resumo-card small {
    font-size: 10px;
    color: #999;
    display: block;
    margin-top: 2px;
}

/* ECONOMIA TOTAL DESTACADA */
.diag-oport-economia-total {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    border: 2px solid #10B981;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 12px 0 15px;
}

.diag-oport-economia-total > i {
    font-size: 38px;
    color: #10B981;
}

.diag-oport-economia-total strong {
    display: block;
    font-size: 12px;
    color: #065F46;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

.diag-oport-valor-economia {
    font-size: 28px;
    font-weight: 800;
    color: #065F46;
    line-height: 1.1;
    margin: 4px 0;
}

.diag-oport-economia-total small {
    color: #047857;
    font-size: 11px;
}

/* TABS */
.diag-oport-tabs {
    display: flex;
    gap: 4px;
    margin: 15px 0;
    border-bottom: 2px solid #E5E7EB;
    flex-wrap: wrap;
}

.diag-oport-tab {
    padding: 10px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #6B7280;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.diag-oport-tab:hover { background: #F9FAFB; color: #1F2937; }

.diag-oport-tab.active {
    color: #2E2EF9;
    border-bottom-color: #2E2EF9;
    background: #EFF6FF;
}

.badge-oport {
    background: #E5E7EB;
    color: #1F2937;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.diag-oport-tab.active .badge-oport {
    background: #2E2EF9;
    color: white;
}

/* CARDS DE ITENS */
.diag-oport-card {
    background: white;
    border-radius: 10px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    border-left: 4px solid #ccc;
    overflow: hidden;
}

.diag-oport-card.oportunidade { border-left-color: #10B981; }
.diag-oport-card.risco { border-left-color: #DC2626; }
.diag-oport-card.atencao { border-left-color: #F59E0B; }
.diag-oport-card.acao { border-left-color: #3B82F6; }

.diag-oport-card-header {
    padding: 14px 16px;
    background: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
}

.diag-oport-card-header h4 {
    margin: 0;
    font-size: 15px;
}

.diag-oport-icone {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex: 0 0 auto;
}

.diag-oport-priori {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.diag-oport-card-body {
    padding: 14px 16px;
}

.diag-oport-valor-estimado {
    border: 2px solid;
    border-radius: 8px;
    padding: 10px 14px;
    margin: 10px 0;
}

/* Responsivo */
@media (max-width: 768px) {
    .diag-oport-cards-topo { grid-template-columns: 1fr 1fr; }
    .diag-oport-tab { padding: 8px 10px; font-size: 12px; }
}

/* ============= REDESIGN VISUAL ESTILO NUCONT ============= */

/* ====== HEADER DO DIAGNÓSTICO COM IMPACTO ====== */
#diagHeader {
    background: linear-gradient(135deg, #1E3A8A 0%, #2E2EF9 50%, #1A1AA8 100%) !important;
    color: white !important;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(46,46,249,0.3);
    border: none !important;
    padding: 28px !important;
    position: relative;
    overflow: hidden;
}

#diagHeader::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

#diagHeader h2 {
    color: white !important;
    font-size: 28px !important;
    font-weight: 800;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

#diagHeader p {
    color: rgba(255,255,255,0.85) !important;
    position: relative;
    z-index: 1;
}

#diagHeader strong {
    color: #FCD34D;
    font-weight: 700;
}

/* Card alíquota destacada - melhor visual */
.diag-aliquota-destaque {
    background: rgba(255,255,255,0.15) !important;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.4) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    position: relative;
    z-index: 1;
}

#diagHeader .diag-aliquota-destaque div {
    color: white !important;
}

#diagHeader .diag-aliquota-destaque div[style*="font-size:32px"] {
    color: #FEF08A !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ====== KPIs MAIS IMPACTANTES (Estilo NUCONT) ====== */
.diag-kpi-card {
    background: white !important;
    border-radius: 16px !important;
    padding: 24px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
    border-left: none !important;
    border-top: 5px solid #2E2EF9;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.diag-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(46,46,249,0.05) 0%, transparent 100%);
    border-radius: 0 16px 0 80px;
}

.diag-kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15) !important;
}

.diag-kpi-card > i {
    font-size: 40px !important;
    padding: 14px;
    border-radius: 12px;
    background: rgba(46,46,249,0.1);
    flex-shrink: 0;
}

.diag-kpi-card.kpi-azul { border-top-color: #2E2EF9; }
.diag-kpi-card.kpi-azul > i { background: rgba(46,46,249,0.12); color: #2E2EF9; }
.diag-kpi-card.kpi-verde { border-top-color: #10B981; }
.diag-kpi-card.kpi-verde > i { background: rgba(16,185,129,0.12); color: #10B981; }
.diag-kpi-card.kpi-laranja { border-top-color: #F59E0B; }
.diag-kpi-card.kpi-laranja > i { background: rgba(245,158,11,0.12); color: #F59E0B; }
.diag-kpi-card.kpi-roxo { border-top-color: #8B5CF6; }
.diag-kpi-card.kpi-roxo > i { background: rgba(139,92,246,0.12); color: #8B5CF6; }
.diag-kpi-card.kpi-vermelho { border-top-color: #DC2626; }
.diag-kpi-card.kpi-vermelho > i { background: rgba(220,38,38,0.12); color: #DC2626; }

.diag-kpi-label {
    color: #6B7280 !important;
    font-size: 11px !important;
    letter-spacing: 0.8px !important;
    font-weight: 700 !important;
}

.diag-kpi-valor {
    color: #0F172A !important;
    font-size: 28px !important;
    font-weight: 800 !important;
    letter-spacing: -0.5px !important;
    line-height: 1.1;
    margin-top: 5px !important;
}

/* ====== TÍTULOS DE SEÇÃO COM IMPACTO ====== */
.card > h3 {
    font-size: 22px !important;
    font-weight: 800 !important;
    letter-spacing: -0.3px;
    padding-bottom: 14px !important;
    border-bottom: none !important;
    position: relative;
    margin-bottom: 18px !important;
}

.card > h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #2E2EF9 0%, #06B6D4 100%);
    border-radius: 2px;
}

.card > h3 > i {
    margin-right: 10px;
    padding: 8px;
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border-radius: 8px;
    color: #2E2EF9 !important;
    font-size: 18px !important;
}

/* ====== CARDS DE OPORTUNIDADES - VISUAL PREMIUM ====== */
.diag-oport-cards-topo {
    gap: 16px !important;
}

.diag-oport-score-card {
    background: linear-gradient(135deg, var(--cor-base, #10B981) 0%, color-mix(in srgb, var(--cor-base, #10B981) 70%, black) 100%) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.diag-oport-score-card::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.diag-oport-score-card > div:first-child {
    color: rgba(255,255,255,0.9) !important;
}

.diag-oport-score-card > div:nth-child(2) {
    color: white !important;
    font-size: 56px !important;
    text-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.diag-oport-resumo-card {
    border-radius: 16px !important;
    padding: 20px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06) !important;
    border-left: none !important;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.diag-oport-resumo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 5px;
    width: 100%;
}

.diag-oport-resumo-card.verde::before { background: linear-gradient(90deg, #10B981, #34D399); }
.diag-oport-resumo-card.vermelho::before { background: linear-gradient(90deg, #DC2626, #EF4444); }
.diag-oport-resumo-card.amarelo::before { background: linear-gradient(90deg, #F59E0B, #FBBF24); }
.diag-oport-resumo-card.azul::before { background: linear-gradient(90deg, #3B82F6, #60A5FA); }

.diag-oport-resumo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.12) !important;
}

.diag-oport-resumo-card > i {
    font-size: 32px !important;
    padding: 12px;
    border-radius: 12px;
}

.diag-oport-resumo-card.verde > i { background: rgba(16,185,129,0.12); }
.diag-oport-resumo-card.vermelho > i { background: rgba(220,38,38,0.12); }
.diag-oport-resumo-card.amarelo > i { background: rgba(245,158,11,0.12); }
.diag-oport-resumo-card.azul > i { background: rgba(59,130,246,0.12); }

.diag-oport-valor {
    font-size: 36px !important;
    font-weight: 900 !important;
    letter-spacing: -1px !important;
}

/* ====== ECONOMIA TOTAL - GIGANTE E IMPACTANTE ====== */
.diag-oport-economia-total {
    background: linear-gradient(135deg, #10B981 0%, #059669 50%, #047857 100%) !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 28px 32px !important;
    box-shadow: 0 12px 40px rgba(16,185,129,0.4);
    position: relative;
    overflow: hidden;
}

.diag-oport-economia-total::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
    border-radius: 50%;
}

.diag-oport-economia-total::after {
    content: '💰';
    position: absolute;
    bottom: -20px;
    right: 20px;
    font-size: 120px;
    opacity: 0.15;
}

.diag-oport-economia-total > i {
    font-size: 48px !important;
    color: white !important;
    text-shadow: 0 4px 12px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
}

.diag-oport-economia-total strong {
    color: rgba(255,255,255,0.9) !important;
    font-size: 13px !important;
    letter-spacing: 1.5px !important;
}

.diag-oport-valor-economia {
    color: white !important;
    font-size: 42px !important;
    font-weight: 900 !important;
    letter-spacing: -1px !important;
    text-shadow: 0 4px 16px rgba(0,0,0,0.15);
    position: relative;
    z-index: 1;
}

.diag-oport-economia-total small {
    color: rgba(255,255,255,0.85) !important;
    font-size: 12px !important;
    position: relative;
    z-index: 1;
}

/* ====== CARDS DE ITENS - MAIS POLIDOS ====== */
.diag-oport-card {
    border-radius: 14px !important;
    border-left: none !important;
    border-top: 5px solid #ccc;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06) !important;
    transition: all 0.3s;
}

.diag-oport-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1) !important;
}

.diag-oport-card.oportunidade { border-top-color: #10B981; }
.diag-oport-card.risco { border-top-color: #DC2626; }
.diag-oport-card.atencao { border-top-color: #F59E0B; }
.diag-oport-card.acao { border-top-color: #3B82F6; }

.diag-oport-card-header {
    background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%) !important;
    padding: 16px 20px !important;
}

.diag-oport-card-header h4 {
    font-size: 17px !important;
    font-weight: 800 !important;
    color: #0F172A !important;
    letter-spacing: -0.3px;
}

.diag-oport-icone {
    width: 48px !important;
    height: 48px !important;
    font-size: 20px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.diag-oport-priori {
    font-size: 11px !important;
    font-weight: 800 !important;
    padding: 6px 12px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.diag-oport-card-body {
    padding: 20px !important;
}

.diag-oport-valor-estimado {
    border-radius: 12px !important;
    padding: 14px 18px !important;
    border-width: 2px !important;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.diag-oport-valor-estimado div[style*="font-size:24px"] {
    font-size: 30px !important;
    font-weight: 900 !important;
    letter-spacing: -0.5px;
}

/* ====== TABS COM ESTILO PILL (mais moderno) ====== */
.diag-oport-tabs {
    background: white;
    padding: 8px;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border-bottom: none !important;
    margin: 20px 0 !important;
}

.diag-oport-tab {
    border-bottom: none !important;
    border-radius: 10px !important;
    padding: 12px 18px !important;
    font-weight: 700 !important;
}

.diag-oport-tab.active {
    background: linear-gradient(135deg, #2E2EF9 0%, #1A1AA8 100%) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(46,46,249,0.3);
}

.diag-oport-tab.active i {
    color: white !important;
}

.diag-oport-tab.active .badge-oport {
    background: rgba(255,255,255,0.25) !important;
    color: white !important;
}

.badge-oport {
    font-weight: 800 !important;
}

/* ====== TABELAS MAIS ELEGANTES ====== */
.diag-tabela th, .diag-tabela-comparativo th, .diag-tabela-horizontal th {
    background: linear-gradient(135deg, #2E2EF9 0%, #1A1AA8 100%) !important;
    color: white !important;
    font-size: 12px !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 12px 14px !important;
    border: none !important;
}

.diag-tabela td, .diag-tabela-comparativo td, .diag-tabela-horizontal td {
    padding: 10px 14px !important;
    border-bottom: 1px solid #F3F4F6 !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
}

.diag-tabela tr:hover, .diag-tabela-comparativo tr:hover, .diag-tabela-horizontal tr:hover {
    background: rgba(46,46,249,0.04);
}

/* ====== AH KPIs ====== */
.diag-ah-kpi {
    border-radius: 14px !important;
    padding: 16px !important;
    border-left: none !important;
    border-top: 4px solid #2E2EF9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
}

.diag-ah-kpi.azul { border-top-color: #2E2EF9; }
.diag-ah-kpi.verde { border-top-color: #10B981; }
.diag-ah-kpi.laranja { border-top-color: #F59E0B; }
.diag-ah-kpi.roxo { border-top-color: #8B5CF6; }
.diag-ah-kpi.vermelho { border-top-color: #DC2626; }

.diag-ah-kpi > i {
    padding: 10px;
    border-radius: 10px;
}

.diag-ah-kpi.azul > i { background: rgba(46,46,249,0.1); }
.diag-ah-kpi.verde > i { background: rgba(16,185,129,0.1); }
.diag-ah-kpi.laranja > i { background: rgba(245,158,11,0.1); }
.diag-ah-kpi.roxo > i { background: rgba(139,92,246,0.1); }
.diag-ah-kpi.vermelho > i { background: rgba(220,38,38,0.1); }

.diag-ah-valor {
    font-size: 18px !important;
    font-weight: 800 !important;
    letter-spacing: -0.3px !important;
}

/* ====== UPLOAD ZONE PREMIUM ====== */
.upload-zone {
    background: linear-gradient(135deg, #F0F9FF 0%, #EFF6FF 100%) !important;
    border: 3px dashed #2E2EF9 !important;
    border-radius: 20px !important;
    padding: 50px 30px !important;
}

.upload-zone:hover, .upload-zone.drag-active {
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%) !important;
    border-style: solid !important;
    transform: scale(1.005);
    box-shadow: 0 12px 32px rgba(46,46,249,0.15);
}

.upload-zone > i {
    font-size: 70px !important;
    background: linear-gradient(135deg, #2E2EF9 0%, #06B6D4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.upload-zone h3 {
    font-size: 22px !important;
    margin-top: 18px !important;
    color: #1E3A8A !important;
    font-weight: 800;
}

/* ====== ALERTAS COM IMPACTO ====== */
.diag-alerta {
    border-radius: 12px !important;
    padding: 16px 20px !important;
    border-left: 5px solid !important;
    font-size: 14px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    margin-bottom: 12px !important;
}

.diag-alerta.critico {
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%) !important;
    color: #7F1D1D !important;
}

.diag-alerta.aviso {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%) !important;
    color: #78350F !important;
}

.diag-alerta.oportunidade {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%) !important;
    color: #064E3B !important;
}

/* ====== PAGE HEADER COM ESTILO ====== */
.page-header {
    background: linear-gradient(135deg, #1E3A8A 0%, #2E2EF9 100%);
    color: white;
    padding: 30px 32px !important;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(46,46,249,0.2);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(252,211,77,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.page-header h1 {
    color: white !important;
    font-size: 30px !important;
    font-weight: 800 !important;
    margin: 0 !important;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.page-header h1 > i {
    background: rgba(255,255,255,0.2);
    padding: 12px;
    border-radius: 12px;
    margin-right: 12px;
    font-size: 24px;
}

.page-header p {
    color: rgba(255,255,255,0.9) !important;
    font-size: 15px;
    margin-top: 8px !important;
    position: relative;
    z-index: 1;
}

/* ====== CARDS GERAIS MAIS POLIDOS ====== */
#view-diagnostico .card {
    border-radius: 16px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06) !important;
    border: 1px solid rgba(0,0,0,0.04);
    padding: 24px !important;
    margin-bottom: 16px;
}

/* ====== VELOCÍMETROS - MOLDURA PREMIUM ====== */
.diag-velocimetros .card {
    background: linear-gradient(135deg, #FFFFFF 0%, #F9FAFB 100%);
    text-align: center;
}


/* ============= ANÁLISE DE FORNECEDORES ============= */
.diag-forn-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 15px 0;
}

.diag-forn-kpi {
    background: white;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-top: 4px solid #2E2EF9;
}

.diag-forn-kpi.azul { border-top-color: #2E2EF9; }
.diag-forn-kpi.azul > i { color: #2E2EF9; background: rgba(46,46,249,0.1); }
.diag-forn-kpi.verde { border-top-color: #10B981; }
.diag-forn-kpi.verde > i { color: #10B981; background: rgba(16,185,129,0.1); }
.diag-forn-kpi.laranja { border-top-color: #F59E0B; }
.diag-forn-kpi.laranja > i { color: #F59E0B; background: rgba(245,158,11,0.1); }
.diag-forn-kpi.roxo { border-top-color: #8B5CF6; }
.diag-forn-kpi.roxo > i { color: #8B5CF6; background: rgba(139,92,246,0.1); }
.diag-forn-kpi.vermelho { border-top-color: #DC2626; }
.diag-forn-kpi.vermelho > i { color: #DC2626; background: rgba(220,38,38,0.1); }

.diag-forn-kpi > i {
    font-size: 28px;
    padding: 12px;
    border-radius: 10px;
}

.diag-forn-label {
    color: #6B7280;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.diag-forn-valor {
    color: #0F172A;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
    margin-top: 3px;
}

.diag-forn-kpi small {
    color: #999;
    font-size: 11px;
    display: block;
    margin-top: 3px;
}

/* TOP 5 GRID */
.diag-top5-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin: 12px 0;
}

.diag-top5-card {
    background: white;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s;
}

.diag-top5-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.diag-top5-pos {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #1F2937;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.diag-top5-info {
    flex: 1;
    min-width: 0;
}

.diag-top5-info > strong {
    display: block;
    color: #1F2937;
    font-size: 14px;
    margin-bottom: 4px;
}

.diag-top5-meta {
    font-size: 11px;
    color: #666;
    margin-bottom: 6px;
}

.diag-top5-volume {
    font-size: 18px;
    font-weight: 800;
    color: #2E2EF9;
    margin-top: 6px;
}

/* TABELA */
.diag-forn-tabela {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.diag-forn-tabela th {
    background: linear-gradient(135deg, #2E2EF9 0%, #1A1AA8 100%);
    color: white;
    padding: 12px 10px;
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.diag-forn-tabela td {
    padding: 10px;
    border-bottom: 1px solid #F3F4F6;
    vertical-align: middle;
}

.diag-forn-tabela tbody tr:hover {
    background: rgba(46,46,249,0.04);
}

/* BADGES */
.diag-forn-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.diag-forn-badge.verde { background: #D1FAE5; color: #065F46; }
.diag-forn-badge.vermelho { background: #FEE2E2; color: #991B1B; }
.diag-forn-badge.laranja { background: #FEF3C7; color: #92400E; }
.diag-forn-badge.roxo { background: #EDE9FE; color: #5B21B6; }
.diag-forn-badge.azul { background: #DBEAFE; color: #1E40AF; }
.diag-forn-badge.cinza { background: #F3F4F6; color: #6B7280; }

/* INSIGHTS */
.diag-forn-insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.diag-forn-insight {
    background: white;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 4px solid #2E2EF9;
}

.diag-forn-insight.verde { border-left-color: #10B981; }
.diag-forn-insight.laranja { border-left-color: #F59E0B; }
.diag-forn-insight.azul { border-left-color: #3B82F6; }
.diag-forn-insight.roxo { border-left-color: #8B5CF6; }
.diag-forn-insight.vermelho { border-left-color: #DC2626; }

.diag-forn-insight-icone {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #2E2EF9;
    flex-shrink: 0;
}

.diag-forn-insight.verde .diag-forn-insight-icone { background: #D1FAE5; color: #10B981; }
.diag-forn-insight.laranja .diag-forn-insight-icone { background: #FEF3C7; color: #F59E0B; }
.diag-forn-insight.azul .diag-forn-insight-icone { background: #DBEAFE; color: #3B82F6; }
.diag-forn-insight.roxo .diag-forn-insight-icone { background: #EDE9FE; color: #8B5CF6; }
.diag-forn-insight.vermelho .diag-forn-insight-icone { background: #FEE2E2; color: #DC2626; }

.diag-forn-insight strong {
    display: block;
    color: #1F2937;
    font-size: 13px;
    margin-bottom: 4px;
}

.diag-forn-insight p {
    margin: 0;
    color: #4B5563;
    font-size: 12.5px;
    line-height: 1.6;
}

/* Responsivo */
@media (max-width: 768px) {
    .diag-top5-grid { grid-template-columns: 1fr; }
    .diag-forn-kpis { grid-template-columns: 1fr 1fr; }
}

/* ===== MÓDULO SOCIETÁRIO ===== */
.soc-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.soc-stat-card { background: white; border-radius: 12px; padding: 18px; display: flex; align-items: center; gap: 15px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); border-top: 4px solid #2E2EF9; transition: all 0.2s; }
.soc-stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.soc-stat-card.azul { border-top-color: #2E2EF9; }
.soc-stat-card.laranja { border-top-color: #F59E0B; }
.soc-stat-card.amarelo { border-top-color: #EAB308; }
.soc-stat-card.verde { border-top-color: #10B981; }
.soc-stat-card i { font-size: 32px; color: #2E2EF9; }
.soc-stat-card.laranja i { color: #F59E0B; }
.soc-stat-card.amarelo i { color: #EAB308; }
.soc-stat-card.verde i { color: #10B981; }
.soc-stat-label { font-size: 12px; color: #64748B; text-transform: uppercase; font-weight: 600; }
.soc-stat-valor { font-size: 28px; font-weight: 800; color: #0F172A; }

.soc-kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.soc-kanban-coluna { background: #F8FAFC; border-radius: 12px; padding: 15px; min-height: 400px; }
.soc-col-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; border-radius: 10px; margin-bottom: 15px; color: white; }
.soc-col-header.laranja { background: linear-gradient(135deg, #F59E0B, #D97706); }
.soc-col-header.amarelo { background: linear-gradient(135deg, #EAB308, #CA8A04); }
.soc-col-header.verde { background: linear-gradient(135deg, #10B981, #059669); }
.soc-col-header h3 { font-size: 15px; margin: 0; }
.soc-col-counter { background: rgba(255,255,255,0.3); padding: 4px 12px; border-radius: 20px; font-weight: 700; font-size: 13px; }
.soc-col-body { display: flex; flex-direction: column; gap: 10px; }
.soc-col-vazia { text-align: center; padding: 30px 15px; color: #94A3B8; }
.soc-col-vazia i { font-size: 36px; margin-bottom: 8px; opacity: 0.5; }
.soc-col-vazia p { font-size: 13px; }

.soc-kanban-card { background: white; border-radius: 10px; padding: 15px; cursor: pointer; transition: all 0.2s; border-left: 4px solid #2E2EF9; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.soc-kanban-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.soc-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.soc-tipo-badge { padding: 3px 10px; border-radius: 12px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.soc-tipo-badge.verde { background: #D1FAE5; color: #065F46; }
.soc-tipo-badge.azul { background: #DBEAFE; color: #1E40AF; }
.soc-tipo-badge.vermelho { background: #FEE2E2; color: #991B1B; }
.soc-tipo-badge-grande { display: inline-block; padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 700; text-transform: uppercase; margin-bottom: 10px; background: #D1FAE5; color: #065F46; }
.soc-card-data { font-size: 11px; color: #94A3B8; }
.soc-card-titulo { color: #0F172A; font-size: 15px; margin: 5px 0; }
.soc-card-fantasia { color: #64748B; font-size: 12px; margin: 3px 0; }
.soc-card-meta { display: flex; gap: 12px; margin: 10px 0; font-size: 12px; color: #64748B; }
.soc-card-meta i { color: #2E2EF9; margin-right: 3px; }
.soc-card-progresso { margin-top: 10px; }
.soc-progresso-bar { height: 6px; background: #E2E8F0; border-radius: 3px; overflow: hidden; }
.soc-progresso-fill { height: 100%; transition: width 0.3s; }
.soc-card-progresso small { font-size: 10px; color: #64748B; margin-top: 4px; display: block; }

/* DETALHE */
.soc-detalhe-header { background: white; border-radius: 12px; padding: 25px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.soc-detalhe-header h2 { color: #0F172A; font-size: 22px; margin: 8px 0 5px; }
.soc-fantasia { color: #64748B; font-size: 14px; margin-bottom: 8px; }
.soc-detalhe-acoes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.soc-status-select { padding: 8px 12px; border: 2px solid #2E2EF9; border-radius: 8px; font-weight: 600; cursor: pointer; }
.btn-danger { background: #DC2626; color: white; border: none; padding: 10px 14px; border-radius: 8px; cursor: pointer; }
.btn-danger:hover { background: #991B1B; }

.soc-tabs { display: flex; gap: 5px; background: #F8FAFC; padding: 6px; border-radius: 12px; margin-bottom: 20px; overflow-x: auto; }
.soc-tab { background: transparent; border: none; padding: 10px 18px; border-radius: 8px; cursor: pointer; font-weight: 600; color: #64748B; transition: all 0.2s; white-space: nowrap; font-size: 13px; }
.soc-tab:hover { background: rgba(46,46,249,0.05); color: #2E2EF9; }
.soc-tab.active { background: linear-gradient(135deg, #2E2EF9, #1E3A8A); color: white; box-shadow: 0 4px 10px rgba(46,46,249,0.3); }
.soc-tab i { margin-right: 6px; }
.soc-tab-content { background: white; padding: 25px; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.soc-tab-content.hidden { display: none; }

.soc-info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.soc-info-item { background: #F8FAFC; padding: 12px 15px; border-radius: 8px; border-left: 3px solid #2E2EF9; }
.soc-info-item.full { grid-column: 1 / -1; }
.soc-info-item label { display: block; font-size: 11px; color: #64748B; text-transform: uppercase; font-weight: 700; margin-bottom: 4px; }
.soc-info-item > div { color: #0F172A; font-size: 14px; font-weight: 500; word-break: break-word; }
.soc-regime-badge { display: inline-block; padding: 3px 10px; background: #DBEAFE; color: #1E40AF; border-radius: 12px; font-size: 11px; font-weight: 700; }

.soc-vazio { text-align: center; padding: 40px 20px; color: #94A3B8; }
.soc-vazio i { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.soc-vazio p { font-size: 14px; }

.soc-card-socio { background: #F8FAFC; border-radius: 12px; padding: 20px; margin-bottom: 15px; border-left: 4px solid #2E2EF9; }
.soc-socio-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.soc-socio-header h4 { color: #2E2EF9; font-size: 16px; }
.soc-percent-badge { background: linear-gradient(135deg, #2E2EF9, #1E3A8A); color: white; padding: 6px 14px; border-radius: 20px; font-weight: 700; font-size: 14px; }

.soc-docs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 15px; }
.soc-doc-card { background: #F8FAFC; border-radius: 10px; padding: 15px; display: flex; gap: 12px; align-items: center; border-left: 3px solid #2E2EF9; }
.soc-doc-card i { font-size: 32px; color: #DC2626; }

.soc-andamento-timeline { display: flex; flex-direction: column; gap: 15px; }
.soc-timeline-item { display: flex; gap: 15px; background: #F8FAFC; padding: 18px; border-radius: 12px; border-left: 4px solid #CBD5E1; transition: all 0.2s; }
.soc-timeline-item.concluido { background: linear-gradient(135deg, #ECFDF5, #D1FAE5); border-left-color: #10B981; }
.soc-timeline-icon { width: 48px; height: 48px; background: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.soc-timeline-icon i { font-size: 22px; color: #2E2EF9; }
.soc-timeline-item.concluido .soc-timeline-icon i { color: #10B981; }
.soc-timeline-content { flex: 1; }
.soc-timeline-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.soc-timeline-content h4 { color: #0F172A; font-size: 15px; margin: 0; }
.soc-timeline-content p { color: #64748B; font-size: 13px; margin: 5px 0; }
.soc-data-concluido { color: #10B981; font-weight: 600; font-size: 12px; }
.soc-obs-etapa { width: 100%; margin-top: 8px; padding: 8px 10px; border: 1px solid #E2E8F0; border-radius: 6px; font-family: inherit; font-size: 12px; min-height: 50px; resize: vertical; }

.soc-switch { position: relative; display: inline-block; width: 50px; height: 26px; }
.soc-switch input { opacity: 0; width: 0; height: 0; }
.soc-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #CBD5E1; border-radius: 26px; transition: 0.3s; }
.soc-slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background-color: white; border-radius: 50%; transition: 0.3s; }
.soc-switch input:checked + .soc-slider { background-color: #10B981; }
.soc-switch input:checked + .soc-slider:before { transform: translateX(24px); }

.soc-checklist-container h4 { color: #2E2EF9; margin: 10px 0; font-size: 15px; }
.soc-checklist-grupo { background: #F8FAFC; padding: 15px; border-radius: 10px; }
.soc-checklist-item { display: flex; align-items: center; gap: 10px; padding: 8px; cursor: pointer; transition: background 0.2s; border-radius: 6px; }
.soc-checklist-item:hover { background: white; }
.soc-checklist-item input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: #2E2EF9; }
.soc-checklist-item span { color: #334155; font-size: 13px; }
.soc-checklist-item input:checked + span { color: #10B981; text-decoration: line-through; }

@media (max-width: 768px) {
    .soc-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .soc-kanban { grid-template-columns: 1fr; }
    .soc-info-grid { grid-template-columns: 1fr; }
    .soc-detalhe-header { flex-direction: column; }
}

/* ===== ABAS DO MÓDULO SOCIETÁRIO (Kanban/Dashboard) ===== */
.soc-modulo-tabs { display: flex; gap: 5px; background: #F8FAFC; padding: 6px; border-radius: 12px; margin: 20px 0 15px; flex-wrap: wrap; }
.soc-modulo-tab { background: transparent; border: none; padding: 12px 22px; border-radius: 8px; cursor: pointer; font-weight: 600; color: #64748B; transition: all 0.2s; font-size: 14px; }
.soc-modulo-tab:hover { background: rgba(46,46,249,0.05); color: #2E2EF9; }
.soc-modulo-tab.active { background: linear-gradient(135deg, #2E2EF9, #1E3A8A); color: white; box-shadow: 0 4px 10px rgba(46,46,249,0.3); }
.soc-modulo-tab i { margin-right: 6px; }

/* ===== DASHBOARD SOCIETÁRIO ===== */
.dash-soc-kpis-top { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 20px; }
.dash-soc-kpi { background: white; border-radius: 14px; padding: 20px; display: flex; align-items: center; gap: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.06); border-top: 4px solid #2E2EF9; transition: all 0.2s; }
.dash-soc-kpi:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.dash-soc-kpi.azul { border-top-color: #2E2EF9; }
.dash-soc-kpi.verde { border-top-color: #10B981; }
.dash-soc-kpi.laranja { border-top-color: #F59E0B; }
.dash-soc-kpi.roxo { border-top-color: #8B5CF6; }
.dash-soc-kpi.vermelho { border-top-color: #DC2626; }
.dash-soc-kpi-icone { width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 22px; }
.dash-soc-kpi.azul .dash-soc-kpi-icone { background: #DBEAFE; color: #2E2EF9; }
.dash-soc-kpi.verde .dash-soc-kpi-icone { background: #D1FAE5; color: #10B981; }
.dash-soc-kpi.laranja .dash-soc-kpi-icone { background: #FEF3C7; color: #F59E0B; }
.dash-soc-kpi.roxo .dash-soc-kpi-icone { background: #EDE9FE; color: #8B5CF6; }
.dash-soc-kpi-label { font-size: 11px; color: #64748B; text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px; }
.dash-soc-kpi-valor { font-size: 30px; font-weight: 800; color: #0F172A; line-height: 1.1; margin: 3px 0; }
.dash-soc-kpi small { color: #94A3B8; font-size: 11px; }

.dash-soc-financeiro { background: white; border-radius: 14px; padding: 25px; margin-bottom: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.06); }
.dash-soc-fin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-top: 15px; }
.dash-soc-fin-card { padding: 20px; border-radius: 12px; text-align: center; border-left: 5px solid; }
.dash-soc-fin-card.azul { background: linear-gradient(135deg, #EEF2FF, #DBEAFE); border-left-color: #2E2EF9; }
.dash-soc-fin-card.verde { background: linear-gradient(135deg, #ECFDF5, #D1FAE5); border-left-color: #10B981; }
.dash-soc-fin-card.laranja { background: linear-gradient(135deg, #FEF3C7, #FDE68A); border-left-color: #F59E0B; }
.dash-soc-fin-card small { font-size: 11px; font-weight: 700; color: #64748B; text-transform: uppercase; letter-spacing: 0.5px; }
.dash-soc-fin-card strong { font-size: 28px; display: block; margin: 8px 0; font-weight: 800; }
.dash-soc-fin-card.azul strong { color: #2E2EF9; }
.dash-soc-fin-card.verde strong { color: #065F46; }
.dash-soc-fin-card.laranja strong { color: #92400E; }
.dash-soc-fin-card p { font-size: 12px; color: #64748B; margin: 0; }

.dash-soc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.dash-soc-card { background: white; border-radius: 14px; padding: 25px; margin-bottom: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.06); }
.dash-soc-titulo { color: #2E2EF9; font-size: 16px; margin-bottom: 15px; padding-bottom: 8px; border-bottom: 2px solid #EEF2FF; }
.dash-soc-titulo i { margin-right: 6px; }

.dash-soc-funil { display: flex; flex-direction: column; gap: 15px; }
.dash-soc-funil-item { }
.dash-soc-funil-label { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 13px; }
.dash-soc-funil-label strong { color: #334155; }
.dash-soc-funil-label span { color: #64748B; font-weight: 600; }
.dash-soc-funil-bar { height: 24px; background: #F1F5F9; border-radius: 12px; overflow: hidden; }
.dash-soc-funil-bar > div { height: 100%; border-radius: 12px; transition: width 0.5s; }

.dash-soc-tabela { width: 100%; border-collapse: collapse; font-size: 13px; }
.dash-soc-tabela th { background: #F8FAFC; padding: 10px; text-align: left; color: #64748B; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.dash-soc-tabela td { padding: 10px; border-bottom: 1px solid #F1F5F9; }
.dash-soc-tabela tr:hover { background: #F8FAFC; }
.dash-soc-badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; }
.dash-soc-badge.verde { background: #D1FAE5; color: #065F46; }
.dash-soc-badge.laranja { background: #FEF3C7; color: #92400E; }
.dash-soc-badge.vermelho { background: #FEE2E2; color: #991B1B; }

@media (max-width: 1024px) {
    .dash-soc-kpis-top { grid-template-columns: repeat(2, 1fr); }
    .dash-soc-fin-grid { grid-template-columns: 1fr; }
    .dash-soc-row { grid-template-columns: 1fr; }
}

/* ============================================ */
/* ALMEIDA CONNECT - HUB DE MÓDULOS              */
/* ============================================ */

.almeida-hub {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top, #0F1E3D 0%, #050B1F 50%, #02050F 100%);
    display: flex;
    z-index: 100;
    color: #E0E7FF;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    overflow: hidden;
}

.almeida-hub.hidden { display: none; }

/* Sidebar Hub */
.hub-sidebar {
    width: 70px;
    background: rgba(8, 18, 40, 0.8);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(59, 130, 246, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    flex-shrink: 0;
}
.hub-logo {
    width: 50px;
    height: 60px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(46, 46, 249, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 5px;
}
.hub-logo img { max-width: 100%; max-height: 100%; filter: brightness(1.5); }
.hub-nav { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.hub-nav-item {
    width: 44px;
    height: 44px;
    border: 1px solid transparent;
    background: transparent;
    color: #6B8AC0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hub-nav-item:hover {
    color: #60A5FA;
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}
.hub-nav-item.active {
    color: #60A5FA;
    background: rgba(59, 130, 246, 0.15);
    border-color: #3B82F6;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4), inset 0 0 10px rgba(59, 130, 246, 0.1);
}

/* Main do Hub */
.hub-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 25px 35px;
    overflow-y: auto;
}

/* Topo */
.hub-topo {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 25px;
    align-items: center;
    margin-bottom: 30px;
}
.hub-titulo h1 {
    color: #E0E7FF;
    font-size: 26px;
    font-weight: 300;
    letter-spacing: 6px;
    margin: 0;
    text-shadow: 0 0 20px rgba(96, 165, 250, 0.3);
}
.hub-busca {
    position: relative;
    max-width: 500px;
    width: 100%;
    justify-self: center;
}
.hub-busca i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #6B8AC0;
    font-size: 14px;
}
.hub-busca input {
    width: 100%;
    background: rgba(15, 30, 61, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 30px;
    padding: 12px 20px 12px 45px;
    color: #E0E7FF;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}
.hub-busca input::placeholder { color: #6B8AC0; }
.hub-busca input:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 0 20px rgba(59, 130, 246, 0.2);
}

.hub-user { display: flex; align-items: center; gap: 15px; }
.hub-notif {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(15, 30, 61, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #6B8AC0;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}
.hub-notif:hover { color: #60A5FA; border-color: #3B82F6; }
.hub-notif-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #EF4444;
    border-radius: 50%;
    box-shadow: 0 0 8px #EF4444;
}
.hub-user-info { display: flex; align-items: center; gap: 10px; }
.hub-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3B82F6, #1E40AF);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}
.hub-user-text { display: flex; flex-direction: column; line-height: 1.3; }
.hub-user-text strong { color: #E0E7FF; font-size: 13px; }
.hub-user-text span { color: #6B8AC0; font-size: 11px; }

/* Conteúdo - Grid + Atividades */
.hub-conteudo {
    display: grid;
    grid-template-columns: 1fr 270px;
    gap: 30px;
    flex: 1;
    min-height: 0;
}

/* Grid de Módulos */
.hub-modulos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 1fr;
    gap: 18px;
    align-content: start;
}

.hub-modulo-card {
    background: linear-gradient(135deg, rgba(15, 30, 61, 0.7) 0%, rgba(8, 18, 40, 0.85) 100%);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 14px;
    padding: 25px 20px;
    cursor: pointer;
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    backdrop-filter: blur(10px);
}
.hub-modulo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
    pointer-events: none;
    transition: all 0.3s;
}
.hub-modulo-card:hover {
    border-color: #3B82F6;
    transform: translateY(-4px);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.35), 0 10px 40px rgba(0, 0, 0, 0.5);
}
.hub-modulo-card:hover::before {
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
}

.hub-modulo-card.destaque {
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.25), inset 0 0 30px rgba(59, 130, 246, 0.08);
    animation: pulseGlow 3s ease-in-out infinite;
}
.hub-modulo-card.destaque::before {
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 25px rgba(59, 130, 246, 0.25), inset 0 0 30px rgba(59, 130, 246, 0.08); }
    50% { box-shadow: 0 0 35px rgba(59, 130, 246, 0.45), inset 0 0 35px rgba(59, 130, 246, 0.15); }
}

.hub-modulo-card.em-breve {
    opacity: 0.55;
    cursor: not-allowed;
}
.hub-modulo-card.em-breve:hover {
    transform: none;
    border-color: rgba(59, 130, 246, 0.25);
    box-shadow: none;
}

.hub-modulo-icone {
    width: 64px;
    height: 64px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60A5FA;
    font-size: 32px;
    text-shadow: 0 0 15px rgba(96, 165, 250, 0.5);
    transition: all 0.3s;
}
.hub-modulo-card:hover .hub-modulo-icone {
    color: #93C5FD;
    transform: scale(1.1);
    text-shadow: 0 0 20px rgba(96, 165, 250, 0.8);
}
.hub-modulo-card.destaque .hub-modulo-icone {
    color: #93C5FD;
    text-shadow: 0 0 20px rgba(96, 165, 250, 0.7);
}

.hub-modulo-info h3 {
    color: #E0E7FF;
    font-size: 16px;
    margin: 0 0 4px;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.hub-modulo-info p {
    color: #6B8AC0;
    font-size: 11px;
    margin: 0;
    text-transform: none;
}

.hub-badge-breve, .hub-badge-novo {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(107, 138, 192, 0.2);
    color: #6B8AC0;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(107, 138, 192, 0.3);
}
.hub-badge-novo {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

/* Painel de Atividades */
.hub-atividades {
    background: rgba(15, 30, 61, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 14px;
    padding: 20px;
    backdrop-filter: blur(10px);
    align-self: start;
    max-height: 100%;
    overflow-y: auto;
}
.hub-atividades h3 {
    color: #E0E7FF;
    font-size: 14px;
    margin: 0 0 15px;
    font-weight: 600;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    padding-bottom: 10px;
}

.hub-atividade-item {
    margin-bottom: 14px;
    transition: all 0.2s;
    padding: 6px;
    border-radius: 8px;
}
.hub-atividade-item:hover { background: rgba(59, 130, 246, 0.08); }
.hub-atividade-info { display: flex; flex-direction: column; margin-bottom: 6px; }
.hub-atividade-info strong { color: #E0E7FF; font-size: 12px; font-weight: 600; }
.hub-atividade-info small { color: #6B8AC0; font-size: 10px; margin-top: 2px; }
.hub-atividade-prog { margin-top: 4px; }
.hub-atividade-bar { height: 4px; background: rgba(59, 130, 246, 0.1); border-radius: 2px; overflow: hidden; }
.hub-atividade-bar > div { height: 100%; border-radius: 2px; transition: width 0.5s; box-shadow: 0 0 6px currentColor; }

/* Footer */
.hub-footer {
    margin-top: 25px;
    display: flex;
    justify-content: center;
}
.hub-btn-logout {
    background: rgba(220, 38, 38, 0.1);
    color: #FCA5A5;
    border: 1px solid rgba(220, 38, 38, 0.3);
    padding: 10px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
}
.hub-btn-logout:hover {
    background: rgba(220, 38, 38, 0.2);
    color: #FECACA;
    border-color: #DC2626;
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.3);
}

/* ===== Badge do módulo no sidebar do sistema ===== */
.modulo-atual-badge {
    background: linear-gradient(135deg, #2E2EF9, #1E3A8A);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(46, 46, 249, 0.3);
}

/* Botão "Voltar ao Hub" no menu lateral */
.btn-voltar-hub {
    background: linear-gradient(135deg, rgba(46, 46, 249, 0.15), rgba(30, 58, 138, 0.15)) !important;
    border: 1px solid rgba(46, 46, 249, 0.3) !important;
    color: #2E2EF9 !important;
    font-weight: 700 !important;
    margin-bottom: 10px !important;
}
.btn-voltar-hub:hover {
    background: linear-gradient(135deg, #2E2EF9, #1E3A8A) !important;
    color: white !important;
}

/* Responsivo */
@media (max-width: 1100px) {
    .hub-modulos-grid { grid-template-columns: repeat(3, 1fr); }
    .hub-conteudo { grid-template-columns: 1fr; }
    .hub-atividades { order: -1; max-height: 200px; }
}
@media (max-width: 768px) {
    .hub-modulos-grid { grid-template-columns: repeat(2, 1fr); }
    .hub-topo { grid-template-columns: 1fr; gap: 15px; }
    .hub-titulo h1 { font-size: 20px; letter-spacing: 3px; }
    .hub-main { padding: 15px; }
}

