:root {
            --bg-main: #0B0F19;
            --bg-card: #111827;
            --bg-hover: #1F2937;
            --border-color: rgba(255, 255, 255, 0.08);
            --text-main: #F9FAFB;
            --text-muted: #9CA3AF;
            --accent-primary: #3B82F6;
            --accent-success: #10B981;
            --accent-danger: #EF4444;
            --font-family: 'Inter', sans-serif;
        }

        body {
            font-family: var(--font-family);
            background-color: var(--bg-main);
            color: var(--text-main);
            margin: 0;
            padding: 0 0 30px 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            min-height: 100vh;
            -webkit-font-smoothing: antialiased;
            overflow-y: scroll;
        }

        @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
        .fade-in { animation: fadeIn 0.5s ease forwards; }

        .top-bar {
            width: 100%;
            height: 72px;
            background-color: var(--bg-card);
            border-bottom: 1px solid var(--border-color);
            padding: 0 32px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-sizing: border-box;
            position: sticky;
            top: 0;
            z-index: 100;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        }
        
        .brand { display: flex; align-items: center; gap: 12px; }
        .brand h2 { margin: 0; font-size: 18px; font-weight: 700; color: var(--text-main); }
        .brand-badge { background: rgba(59,130,246,0.15); color: var(--accent-primary); font-size: 11px; padding: 2px 8px; border-radius: 12px; font-weight: 600; }
        
        #status { font-size: 13px; color: var(--text-muted); font-weight: 500; }

        .actions-bar { display: flex; gap: 12px; align-items: center; }
        .btn {
            display: inline-flex; align-items: center; gap: 8px;
            padding: 8px 16px; border-radius: 8px; font-weight: 500; font-size: 13px;
            cursor: pointer; border: none; transition: all 0.2s; font-family: var(--font-family);
        }
        .btn-primary { background-color: var(--accent-primary); color: white; }
        .btn-primary:hover { background-color: #2563EB; }
        .btn-secondary { background-color: var(--bg-hover); color: var(--text-main); border: 1px solid var(--border-color); }
        .btn-secondary:hover { background-color: #374151; }
        .btn-danger { background-color: transparent; border: 1px solid var(--accent-danger); color: var(--accent-danger); }
        .btn-danger:hover { background-color: rgba(239, 68, 68, 0.1); }

        .main-container {
            width: 100%; max-width: 1550px; margin-top: 24px; padding: 0 24px; box-sizing: border-box; display: none; 
            animation: fadeIn 0.4s ease forwards;
        }

        .drag-overlay {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(11, 15, 25, 0.85); backdrop-filter: blur(4px);
            z-index: 999; display: flex; flex-direction: column; justify-content: center; align-items: center;
            border: 4px dashed var(--accent-primary); box-sizing: border-box; opacity: 0; pointer-events: none; transition: opacity 0.2s;
        }
        .drag-overlay.active { opacity: 1; pointer-events: all; }
        .drag-overlay svg { width: 64px; height: 64px; color: var(--accent-primary); margin-bottom: 16px; }

        .kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
        .kpi-card { background-color: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
        .kpi-title { color: var(--text-muted); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
        .kpi-value { color: var(--text-main); font-size: 24px; font-weight: 700; line-height: 1; margin: 4px 0;}
        .kpi-badge { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; width: fit-content; }
        .badge-success { background: rgba(16, 185, 129, 0.1); color: var(--accent-success); }
        .badge-danger { background: rgba(239, 68, 68, 0.1); color: var(--accent-danger); }
        .badge-info { background: rgba(59, 130, 246, 0.1); color: var(--accent-primary); }
        .badge-warning { background: rgba(245, 158, 11, 0.1); color: #F59E0B; }

        .panel { background-color: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; width: 100%; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); overflow: hidden; display: flex; flex-direction: column; margin-bottom: 24px; }
        .panel-header { padding: 20px 24px; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 16px; font-weight: 600; background-color: var(--bg-card); z-index: 20; flex-wrap: wrap;}
        .period-filter { display:flex; align-items:flex-end; gap:10px; flex-wrap:wrap; }
        .period-field { display:flex; flex-direction:column; gap:5px; }
        .period-field label { font-size:11px; color:var(--text-muted); text-transform:uppercase; letter-spacing:.04em; }
        .period-field input { background:var(--bg-hover); color:var(--text-main); border:1px solid var(--border-color); border-radius:8px; padding:8px 10px; font-family:var(--font-family); color-scheme:dark; }

        .analysis-controls {
            background: linear-gradient(135deg, rgba(59,130,246,.14), rgba(16,185,129,.08));
            border: 1px solid rgba(59,130,246,.45);
            border-radius: 14px;
            padding: 18px 20px;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 18px;
            flex-wrap: wrap;
            box-shadow: 0 8px 24px rgba(0,0,0,.18);
        }
        .analysis-controls-title { display:flex; flex-direction:column; gap:5px; }
        .analysis-controls-title strong { font-size:15px; color:var(--text-main); }
        .analysis-controls-title span { font-size:12px; color:var(--text-muted); }
        .analysis-controls .period-filter { margin-left:auto; }
        .kpi-highlight { border-color: rgba(16,185,129,.4); background: linear-gradient(145deg, var(--bg-card), rgba(16,185,129,.08)); }
        .tempo-cell { color:#A7F3D0; font-weight:700; white-space:nowrap; }

        .tab-navigation {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 0;
            padding: 6px;
            border: 1px solid var(--border-color);
            border-radius: 12px;
            background: rgba(17, 24, 39, .72);
            width: fit-content;
            max-width: 100%;
            overflow-x: auto;
        }
        .tab-button {
            border: 0;
            background: transparent;
            color: var(--text-muted);
            padding: 10px 15px;
            border-radius: 8px;
            font-family: var(--font-family);
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            white-space: nowrap;
            transition: .2s ease;
        }
        .tab-button:hover { color: var(--text-main); background: rgba(255,255,255,.05); }
        .tab-button.active { color: #fff; background: var(--accent-primary); box-shadow: 0 5px 16px rgba(59,130,246,.24); }
        .panel-header .tab-navigation { display: none !important; }
        .panel-header-with-tabs { align-items: center; }

        .report-workspace-header {
            position: sticky;
            top: 72px;
            z-index: 90;
            margin: 0 0 20px 0;
            padding: 10px 0;
            background: linear-gradient(to bottom, var(--bg-main) 72%, rgba(11,15,25,.92));
        }
        .report-workspace-card {
            min-height: 72px;
            box-sizing: border-box;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 20px;
            padding: 12px 16px 12px 20px;
            border: 1px solid var(--border-color);
            border-radius: 14px;
            background: rgba(17,24,39,.96);
            box-shadow: 0 8px 26px rgba(0,0,0,.22);
            backdrop-filter: blur(10px);
        }
        .report-workspace-title {
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 280px;
            font-size: 16px;
            font-weight: 700;
            color: var(--text-main);
        }
        .report-workspace-title small {
            display: block;
            margin-top: 3px;
            font-size: 11px;
            line-height: 1.3;
            font-weight: 500;
            color: var(--text-muted);
        }
        .report-workspace-header .tab-navigation {
            margin-left: auto;
            flex-shrink: 0;
        }

        .analysis-mode-area {
            display: flex;
            align-items: center;
            gap: 9px;
            min-width: 310px;
            flex: 1 1 420px;
            justify-content: center;
            flex-wrap: wrap;
        }
        .analysis-mode-label {
            color: var(--text-muted);
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .06em;
        }
        .analysis-mode-switch {
            display: inline-flex;
            padding: 4px;
            border: 1px solid var(--border-color);
            border-radius: 10px;
            background: rgba(11,15,25,.72);
        }
        .mode-button {
            border: 0;
            padding: 8px 13px;
            border-radius: 7px;
            background: transparent;
            color: var(--text-muted);
            font-family: var(--font-family);
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            transition: .2s ease;
            white-space: nowrap;
        }
        .mode-button:hover { color: var(--text-main); background: rgba(255,255,255,.05); }
        .mode-button.active { color: #fff; background: var(--accent-success); box-shadow: 0 5px 14px rgba(16,185,129,.22); }
        .matricula-match-status {
            width: 100%;
            color: var(--text-muted);
            font-size: 10px;
            text-align: center;
            line-height: 1.35;
        }
        .matricula-match-status.ready { color: #A7F3D0; }
        .comparison-status-area {
            display:flex; align-items:center; justify-content:center; flex:1 1 420px;
            min-width:310px; padding:7px 12px; border:1px solid var(--border-color);
            border-radius:10px; background:rgba(11,15,25,.45);
        }
        .comparison-status-area .matricula-match-status { text-align:center; }
        .local-mode-control { display:flex; align-items:flex-end; gap:7px; flex-wrap:wrap; }
        .local-mode-control .analysis-mode-label { display:block; margin-bottom:4px; }
        .local-mode-control .analysis-mode-switch { padding:3px; }
        .local-mode-control .mode-button { padding:7px 10px; font-size:11px; }
        #tab-overview .metric-line { opacity:1 !important; box-shadow:none !important; }
        #tab-overview .metric-line.negocio { color:#93C5FD; }
        #tab-overview .metric-line.matricula { color:#6EE7B7; }
        .metric-value-stack { display:flex; flex-direction:column; align-items:flex-end; line-height:1.08; }
        .metric-value-stack small { color:var(--text-muted); font-size:8px; font-weight:700; margin-top:2px; }
        .combo-pill .combo-value { display:flex; flex-direction:column; align-items:flex-end; line-height:1.05; }
        .combo-pill .combo-value small { color:var(--text-muted); font-size:8px; margin-top:2px; }
        .matricula-only { display: flex; }
        .kpi-card.matricula-only { border-color: rgba(16,185,129,.28); }
        .mode-note {
            color: var(--text-muted);
            font-size: 11px;
            line-height: 1.45;
            margin-top: 6px;
        }
        @media (max-width: 1150px) {
            .analysis-mode-area { justify-content: flex-start; min-width: 100%; order: 3; }
            .matricula-match-status { text-align: left; }
        }

        @media (max-width: 900px) {
            .report-workspace-card { align-items: flex-start; flex-direction: column; }
            .report-workspace-header .tab-navigation { margin-left: 0; width: 100%; }
        }
        .panel-header-main { min-width: 260px; flex: 1 1 420px; }
        .panel-header-actions { display:flex; align-items:flex-end; gap:12px; flex-wrap:wrap; margin-left:auto; }
        .tab-content { display: none; animation: fadeIn .3s ease forwards; }
        .tab-content.active { display: block; }
        .chart-controls { display:flex; align-items:flex-end; gap:12px; flex-wrap:wrap; }
        .chart-controls label { display:flex; flex-direction:column; gap:5px; font-size:11px; color:var(--text-muted); text-transform:uppercase; letter-spacing:.04em; }
        .chart-controls select {
            min-width: 280px;
            max-width: 520px;
            background: var(--bg-hover);
            color: var(--text-main);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 9px 11px;
            font-family: var(--font-family);
        }
        .mini-kpi-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:14px; margin-bottom:20px; }
        .mini-kpi { background:var(--bg-card); border:1px solid var(--border-color); border-radius:12px; padding:15px 16px; }
        .mini-kpi-label { color:var(--text-muted); font-size:11px; text-transform:uppercase; letter-spacing:.05em; margin-bottom:7px; }
        .mini-kpi-value { color:var(--text-main); font-size:21px; font-weight:700; }
        .chart-stage { height:360px; padding:22px 24px 12px; position:relative; }
        .daily-table-wrap { overflow:auto; max-height:390px; border-top:1px solid var(--border-color); }
        .daily-table { width:100%; border-collapse:collapse; min-width:720px; }
        .daily-table th, .daily-table td { padding:12px 16px; border-bottom:1px solid var(--border-color); font-size:12px; text-align:right; }
        .daily-table th { position:sticky; top:0; background:var(--bg-card); z-index:2; color:var(--text-muted); text-transform:uppercase; letter-spacing:.04em; }
        .daily-table th:first-child, .daily-table td:first-child { text-align:left; }
        .cohort-explanation { color:var(--text-muted); font-size:12px; line-height:1.55; font-weight:400; max-width:850px; }
        .cohort-wrap { overflow:auto; width:100%; }
        .cohort-table { width:100%; border-collapse:separate; border-spacing:0; min-width:980px; }
        .cohort-table th, .cohort-table td { padding:13px 12px; border-right:1px solid var(--border-color); border-bottom:1px solid var(--border-color); text-align:center; font-size:12px; }
        .cohort-table th { position:sticky; top:0; background:var(--bg-card); color:var(--text-muted); z-index:3; text-transform:uppercase; letter-spacing:.04em; }
        .cohort-table th:first-child, .cohort-table td:first-child { position:sticky; left:0; z-index:2; text-align:left; background:#0E1522; min-width:150px; font-weight:700; }
        .cohort-table th:first-child { z-index:4; background:var(--bg-card); }
        .cohort-cell { font-weight:700; min-width:88px; }
        .cohort-cell.pending { color:#6B7280; background:rgba(255,255,255,.015); font-weight:500; }
        .cohort-metric { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; line-height:1.05; }
        .cohort-quantity { font-size:14px; font-weight:800; letter-spacing:-0.01em; }
        .cohort-percentage { font-size:11px; font-weight:700; opacity:.88; }
        .cohort-total-metric { display:flex; align-items:baseline; justify-content:center; gap:6px; white-space:nowrap; }
        .cohort-total-quantity { color:var(--accent-success); font-size:14px; font-weight:800; }
        .cohort-total-percentage { color:#A7F3D0; font-size:11px; font-weight:700; }
        .cohort-forecast { padding:18px 24px 20px; border-bottom:1px solid var(--border-color); background:rgba(255,255,255,.012); }
        .cohort-forecast-header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:14px; flex-wrap:wrap; }
        .cohort-forecast-title { color:var(--text-main); font-size:14px; font-weight:700; }
        .cohort-forecast-description { color:var(--text-muted); font-size:11px; line-height:1.5; max-width:850px; margin-top:4px; }
        .cohort-forecast-grid { display:grid; grid-template-columns:repeat(8,minmax(125px,1fr)); gap:10px; overflow-x:auto; padding-bottom:2px; }
        .cohort-forecast-card { min-width:125px; background:#0D1523; border:1px solid var(--border-color); border-radius:10px; padding:12px 13px; box-shadow:inset 0 3px 0 var(--forecast-accent, var(--accent-primary)); }
        .cohort-forecast-label { color:var(--text-muted); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; }
        .cohort-forecast-value { color:var(--text-main); font-size:21px; line-height:1; font-weight:800; margin:8px 0 6px; }
        .cohort-forecast-detail { color:#D1D5DB; font-size:10px; line-height:1.35; }
        .cohort-forecast-base { color:var(--text-muted); font-size:9px; margin-top:4px; }
        .cohort-forecast-empty { color:var(--text-muted); padding:12px 0; font-size:12px; }
        .cohort-legend { display:flex; align-items:center; gap:8px; padding:14px 24px 20px; color:var(--text-muted); font-size:11px; flex-wrap:wrap; }
        .legend-box { width:24px; height:12px; border-radius:3px; border:1px solid rgba(255,255,255,.06); }
        .empty-state { padding:48px 24px; text-align:center; color:var(--text-muted); }
        .control-daily-wrap { overflow:auto; width:100%; max-height:72vh; }
        .control-daily-table { width:max-content; min-width:100%; border-collapse:separate; border-spacing:0; }
        .control-daily-table th, .control-daily-table td { padding:11px 13px; border-right:1px solid var(--border-color); border-bottom:1px solid var(--border-color); text-align:center; font-size:12px; white-space:nowrap; }
        .control-daily-table thead th { position:sticky; top:0; z-index:5; background:#111827; color:#D1D5DB; text-transform:uppercase; letter-spacing:.04em; }
        .control-date-header { display:flex; flex-direction:column; align-items:center; gap:2px; line-height:1.05; }
        .control-date-header .control-date-main { color:#F9FAFB; font-size:12px; font-weight:800; }
        .control-date-header .control-date-weekday { color:#60A5FA; font-size:9px; font-weight:700; letter-spacing:.06em; }
        .control-daily-table th:first-child, .control-daily-table td:first-child { position:sticky; left:0; z-index:3; min-width:265px; max-width:330px; text-align:left; white-space:normal; background:#0E1522; font-weight:700; }
        .control-daily-table th:nth-child(2), .control-daily-table td:nth-child(2) { position:sticky; left:265px; z-index:3; min-width:105px; background:#0E1522; color:var(--text-muted); font-size:11px; }
        .control-daily-table thead th:first-child, .control-daily-table thead th:nth-child(2) { z-index:7; background:#111827; }
        .control-daily-table .control-group-row td { position:sticky; left:0; z-index:4; text-align:left; padding:9px 14px; background:#070B12; color:#fff; font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; border-bottom:1px solid rgba(255,255,255,.14); }
        .control-daily-table td.control-currency { color:#F3F4F6; font-weight:700; }
        .control-daily-table td.control-integer { color:#E5E7EB; font-weight:700; }
        .control-daily-table td.control-percent { color:#A7F3D0; font-weight:700; }
        .control-daily-table td.control-zero { color:#6B7280; }
        .control-daily-table td.control-weekend { color:#FCD34D; font-size:10px; font-weight:700; }
        .control-daily-note { color:var(--text-muted); font-size:11px; line-height:1.5; max-width:900px; margin-top:5px; }
        .control-daily-note strong { color:#D1FAE5; }
        .control-export-btn { white-space:nowrap; }

        @media (max-width: 900px) {
            .analysis-controls { align-items:flex-start; }
            .analysis-controls .period-filter { width:100%; margin-left:0; }
        }
        .header-title-group { display: flex; align-items: center; gap: 8px; }

        .table-container { overflow: auto; max-height: 70vh; width: 100%; position: relative; }
        .data-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; min-width: 1280px; }
        .compact-number-stack { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; line-height:1.05; }
        .compact-number-stack strong { font-size:14px; color:var(--text-main); }
        .compact-number-stack small { font-size:9px; color:var(--text-muted); font-weight:700; }
        .compact-number-stack.won strong { color:#93C5FD; }
        .compact-number-stack.matricula strong { color:#6EE7B7; }
        .overview-details-row td { padding:0 !important; background:#0B1220; }
        .overview-details-panel { display:grid; grid-template-columns:1.05fr 1fr 1fr 1.65fr; gap:12px; padding:14px 18px 16px 42px; border-bottom:1px solid var(--border-color); }
        .overview-detail-card { background:rgba(255,255,255,.025); border:1px solid var(--border-color); border-radius:10px; padding:12px 13px; min-width:0; }
        .overview-detail-title { color:var(--text-muted); font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.055em; margin-bottom:9px; }
        .overview-detail-line { display:flex; align-items:center; justify-content:space-between; gap:12px; color:#D1D5DB; font-size:11px; padding:3px 0; }
        .overview-detail-line strong { color:var(--text-main); font-size:12px; text-align:right; }
        .overview-detail-card .combo-summary { margin-top:2px; }
        .overview-detail-card .metric-sub { padding:0; margin-top:7px; }
        @media (max-width: 1250px) { .overview-details-panel { grid-template-columns:repeat(2,minmax(240px,1fr)); } }
        @media (max-width: 760px) { .overview-details-panel { grid-template-columns:1fr; padding-left:18px; } }
        
        .data-table th, .data-table td { padding: 16px 12px; vertical-align: middle; }
        .data-table th:first-child, .data-table td:first-child { text-align: left; }
        .data-table th { color: var(--text-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; text-align: center; cursor: pointer; user-select: none; transition: color 0.2s; position: sticky; top: 0; background-color: var(--bg-card); z-index: 20; box-shadow: 0 1px 0 var(--border-color); white-space: nowrap;}
        .data-table td { font-size: 13px; color: var(--text-main); text-align: center; border-bottom: 1px solid var(--border-color); }
        .data-table td:first-child { white-space: normal; word-break: break-word; }
        .data-table th:last-child, .data-table td:last-child { text-align: right; width: 40px; }
        .data-table .comparison-cell { padding-top: 9px; padding-bottom: 9px; }
        .dual-metric { display:grid; gap:5px; min-width:0; }
        .metric-line { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:4px 7px; border-radius:6px; transition:.18s ease; white-space:nowrap; }
        .metric-line .metric-label { color:var(--text-muted); font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.045em; }
        .metric-line .metric-value { color:var(--text-main); font-size:12px; font-weight:800; }
        .metric-line.negocio { background:rgba(59,130,246,.07); }
        .metric-line.matricula { background:rgba(16,185,129,.07); }
        body[data-analysis-mode="negocios"] .metric-line.negocio,
        body[data-analysis-mode="matriculas"] .metric-line.matricula { box-shadow:inset 0 0 0 1px currentColor; }
        body[data-analysis-mode="negocios"] .metric-line.matricula,
        body[data-analysis-mode="matriculas"] .metric-line.negocio { opacity:.64; }
        body[data-analysis-mode="negocios"] .metric-line.negocio { color:#93C5FD; }
        body[data-analysis-mode="matriculas"] .metric-line.matricula { color:#6EE7B7; }
        .metric-sub { color:var(--text-muted); font-size:9px; line-height:1.3; text-align:left; padding:0 7px; white-space:normal; }
        .combo-summary { display:flex; flex-wrap:wrap; gap:5px; align-items:center; justify-content:flex-start; }
        .combo-pill { display:inline-flex; align-items:center; gap:4px; border:1px solid var(--border-color); background:rgba(255,255,255,.035); border-radius:999px; padding:4px 7px; white-space:nowrap; }
        .combo-pill .combo-label { color:var(--text-muted); font-size:9px; font-weight:700; }
        .combo-pill .combo-value { color:var(--text-main); font-size:11px; font-weight:800; }
        .combo-pill.combo-multiple { border-color:rgba(16,185,129,.28); background:rgba(16,185,129,.075); }
        .combo-empty { color:var(--text-muted); font-size:10px; text-align:left; line-height:1.35; }
        .comparative-head { line-height:1.2; }
        .comparative-head small { display:block; margin-top:3px; color:#64748B; font-size:8px; font-weight:700; letter-spacing:.03em; }
        
        .data-table th:hover { color: var(--text-main); }
        .sort-icon { display: inline-block; margin-left: 4px; width: 12px; height: 12px; opacity: 0.3; transition: opacity 0.2s; }
        .data-table th.active-sort { color: var(--accent-primary); }
        .data-table th.active-sort .sort-icon { opacity: 1; color: var(--accent-primary); }
        
        .data-table tfoot th, .data-table tfoot td {
            position: sticky; bottom: 0; background-color: #080B13; z-index: 30;
            box-shadow: 0 -1px 0 var(--border-color), 0 1px 0 var(--border-color); font-weight: 700; color: #FFFFFF;
        }
        
        .parent-row, .conjunto-row, .anuncio-row { transition: background-color 0.2s; }
        .parent-row { cursor: pointer; }
        .conjunto-row { cursor: pointer; background-color: rgba(0,0,0,0.15); }
        .anuncio-row { background-color: rgba(0,0,0,0.25); }
        
        .parent-row:hover { background-color: var(--bg-hover); }
        .conjunto-row:hover { background-color: rgba(255,255,255,0.04) !important; }
        .anuncio-row:hover { background-color: rgba(255,255,255,0.06) !important; }
        
        .parent-row td:first-child, .conjunto-row td:first-child { font-weight: 600; }
        .chevron { transition: transform 0.3s ease; display: inline-block; }
        .parent-row.expanded .chevron, .conjunto-row.expanded .chevron { transform: rotate(180deg); }
        .parent-row.expanded { background-color: rgba(255,255,255,0.02); }
        .conjunto-row.expanded { background-color: rgba(255,255,255,0.04) !important; }

        .text-green { color: var(--accent-success); font-weight: 600;}
        .text-blue { color: var(--accent-primary); font-weight: 600;}
        .text-spend { color: #F3F4F6; font-weight: 600;}
        .text-danger { color: var(--accent-danger); font-weight: 600;}
        .text-warning { color: #FCD34D; font-weight: 600;}

        .info-icon {
            display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px;
            border-radius: 50%; background-color: rgba(255,255,255,0.1); color: var(--text-muted);
            font-size: 10px; font-weight: bold; margin-left: 6px; cursor: help; vertical-align: middle;
        }
        .info-icon:hover { background-color: var(--accent-primary); color: white; }
        
        ::-webkit-scrollbar { width: 8px; height: 8px; }
        ::-webkit-scrollbar-track { background: var(--bg-main); border-radius: 4px;}
        ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }
        ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }
        
        .modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(11, 15, 25, 0.85); backdrop-filter: blur(4px); justify-content: center; align-items: center; }
        .modal-content { background-color: var(--bg-card); margin: auto; padding: 24px; border: 1px solid var(--border-color); width: 80%; max-width: 400px; border-radius: 16px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); text-align: center; }
        .modal-content h3 { margin-top: 0; color: var(--text-main); font-weight: 600; }
        .modal-content p { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }
        .modal-buttons { display: flex; justify-content: center; gap: 12px; }


        /* V19 — layout estável e auditoria de vínculos */
        .report-workspace-card {
            display: grid;
            grid-template-columns: minmax(250px, 1fr) minmax(390px, 1.15fr) auto;
            align-items: center;
            min-height: 94px;
        }
        .analysis-mode-area {
            display: grid;
            grid-template-columns: auto auto;
            grid-template-rows: auto 30px;
            justify-content: center;
            align-items: center;
            align-content: center;
            column-gap: 10px;
            row-gap: 5px;
            min-height: 66px;
        }
        .matricula-match-status {
            grid-column: 1 / -1;
            min-height: 28px;
            display: flex;
            align-items: flex-start;
            justify-content: center;
            overflow: hidden;
        }
        .matricula-only { display: flex !important; }
        .kpi-grid {
            grid-template-columns: repeat(4, minmax(0, 1fr));
            align-items: stretch;
        }
        .kpi-card { min-height: 112px; box-sizing: border-box; }
        .tab-content { min-height: 650px; }
        .panel-header-main { min-height: 58px; }
        .panel-header-actions { min-height: 58px; align-items: center; }
        .audit-toolbar { display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; }
        .audit-toolbar label { display:flex; flex-direction:column; gap:5px; color:var(--text-muted); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; }
        .audit-toolbar select, .audit-toolbar input {
            min-width:210px; background:var(--bg-hover); color:var(--text-main); border:1px solid var(--border-color);
            border-radius:8px; padding:9px 10px; font-family:var(--font-family); box-sizing:border-box;
        }
        .audit-toolbar input { min-width:260px; }
        .audit-table-wrap { overflow:auto; max-height:66vh; border-top:1px solid var(--border-color); }
        .audit-table { width:100%; min-width:1450px; border-collapse:separate; border-spacing:0; }
        .audit-table th, .audit-table td { padding:11px 12px; border-right:1px solid var(--border-color); border-bottom:1px solid var(--border-color); font-size:11px; vertical-align:middle; }
        .audit-table th { position:sticky; top:0; z-index:3; background:var(--bg-card); color:var(--text-muted); text-transform:uppercase; letter-spacing:.04em; text-align:left; }
        .audit-table td { color:var(--text-main); }
        .audit-table td.audit-reason { color:#FCD34D; font-weight:600; }
        .audit-table td.audit-date { white-space:nowrap; }
        .audit-table td.audit-id { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; color:#93C5FD; }
        .audit-summary-note { color:var(--text-muted); font-size:11px; line-height:1.5; max-width:900px; margin-top:5px; }
        .audit-empty { padding:54px 24px; text-align:center; color:var(--text-muted); }
        .kpi-audit-alert { border-color:rgba(245,158,11,.34); }
        .kpi-audit-ok { border-color:rgba(16,185,129,.34); }
        @media (max-width: 1250px) {
            .report-workspace-card { grid-template-columns: 1fr; }
            .analysis-mode-area { justify-content:start; }
            .matricula-match-status { justify-content:flex-start; text-align:left; }
            .report-workspace-header .tab-navigation { margin-left:0; width:100%; }
            .kpi-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
        }
        @media (max-width: 850px) {
            .kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
            .audit-toolbar select, .audit-toolbar input { min-width:100%; width:100%; }
        }

        /* Estilos Otimizados para Impressão (PDF) */
        @media print {
            @page { size: landscape; margin: 10mm; }
            body { 
                background-color: var(--bg-main) !important; 
                -webkit-print-color-adjust: exact !important; 
                print-color-adjust: exact !important; 
                overflow: visible !important;
            }
            .top-bar, .actions-bar, .drag-overlay, #clearModal, .tab-navigation, .report-workspace-header { display: none !important; }
            .tab-content { display: none !important; }
            #tab-overview { display: block !important; }
            .chart-row-print-hide { display: none !important; height: 0 !important; overflow: hidden !important; }
            .main-container { padding: 0 !important; margin-top: 0 !important; max-width: 100% !important; }
            .table-container { overflow: visible !important; max-height: none !important; }
            .data-table th, .data-table tfoot th, .data-table tfoot td { position: static !important; }
            tr { page-break-inside: avoid !important; }
            .panel { box-shadow: none !important; border: 1px solid var(--border-color) !important; }
            .kpi-card, .data-table th, .expanded-content, .anuncio-row, .conjunto-row { 
                -webkit-print-color-adjust: exact !important; 
                print-color-adjust: exact !important; 
            }
        }
    

        /* Perfil do público */
        .profile-filter-panel { padding:10px 14px; border-bottom:1px solid var(--border-color); background:rgba(15,23,42,.32); }
        .profile-filter-grid { display:grid; grid-template-columns:repeat(6,minmax(120px,1fr)); gap:8px; align-items:end; }
        .profile-filter-grid label { display:flex; flex-direction:column; gap:4px; color:var(--text-muted); font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; }
        .profile-filter-grid select { width:100%; min-height:34px; border-radius:7px; border:1px solid var(--border-color); background:var(--bg-hover); color:var(--text-main); padding:6px 8px; font-family:var(--font-family); font-size:11px; }
        .profile-scope-note { margin-top:6px; color:var(--text-muted); font-size:10px; line-height:1.35; }
        .profile-subnav { display:flex; gap:6px; padding:8px 14px; border-bottom:1px solid var(--border-color); background:rgba(2,6,23,.22); flex-wrap:wrap; }
        .profile-subnav-button { border:1px solid var(--border-color); background:transparent; color:var(--text-muted); border-radius:7px; padding:7px 10px; font-family:var(--font-family); font-size:11px; font-weight:700; cursor:pointer; transition:.2s; }
        .profile-subnav-button:hover { color:var(--text-main); background:rgba(255,255,255,.04); }
        .profile-subnav-button.active { color:#fff; background:var(--accent-primary); border-color:var(--accent-primary); }
        #tab-public-profile .profile-kpi-grid { grid-template-columns:repeat(6,minmax(0,1fr)); gap:8px; margin-bottom:10px; }
        #tab-public-profile .profile-kpi-grid .mini-kpi { padding:10px 12px; min-height:68px; }
        #tab-public-profile .profile-kpi-grid .mini-kpi-value { font-size:18px; margin-top:3px; }
        #tab-public-profile .profile-kpi-grid .mini-kpi-label { font-size:9px; }
        #tab-public-profile .panel-header { padding:12px 16px; }
        #tab-public-profile .audit-summary-note { font-size:10px; line-height:1.35; max-width:1100px; }
        .profile-view { display:none; padding:10px 12px 12px; }
        .profile-view.active { display:block; }
        .profile-chart-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
        .profile-chart-card { min-height:225px; background:rgba(15,23,42,.44); border:1px solid var(--border-color); border-radius:10px; padding:10px; display:flex; flex-direction:column; overflow:hidden; }
        .profile-chart-card.profile-chart-wide { grid-column:1/-1; min-height:220px; }
        .profile-chart-title { color:var(--text-main); font-size:12px; font-weight:700; margin-bottom:2px; }
        .profile-chart-description { color:var(--text-muted); font-size:9px; line-height:1.3; margin-bottom:5px; min-height:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
        .profile-chart-canvas { position:relative; flex:1; min-height:165px; }
        .profile-chart-card.profile-chart-wide .profile-chart-canvas { min-height:170px; }
        .profile-chart-canvas canvas { width:100% !important; height:100% !important; }
        .profile-table-wrap { overflow:auto; max-height:270px; border:1px solid var(--border-color); border-radius:8px; }
        .profile-table { width:100%; border-collapse:separate; border-spacing:0; min-width:720px; }
        .profile-table th,.profile-table td { padding:8px 10px; border-bottom:1px solid var(--border-color); font-size:10px; text-align:right; }
        .profile-table th { position:sticky; top:0; z-index:2; background:#111827; color:var(--text-muted); text-transform:uppercase; letter-spacing:.04em; }
        .profile-table th:first-child,.profile-table td:first-child { text-align:left; }
        .profile-table td { color:var(--text-main); }
        .profile-table tbody tr:hover { background:rgba(255,255,255,.025); }
        .profile-empty { padding:44px 20px; text-align:center; color:var(--text-muted); font-size:13px; }
        .profile-kpi-sub { color:var(--text-muted); font-size:10px; margin-top:5px; line-height:1.3; }
        .profile-kpi-main { white-space:normal; line-height:1.1; }

        /* V33 — alinhamento à esquerda e mês de análise */
        .profile-filter-sidebar,
        .profile-filter-sidebar * {
            text-align:left;
        }
        .profile-sidebar-heading {
            flex-direction:column;
            align-items:flex-start;
            justify-content:flex-start;
        }
        .profile-sidebar-clear {
            align-self:flex-start;
            padding:2px 0 0;
        }
        .profile-filter-sidebar .profile-scope-summary,
        .profile-filter-sidebar .profile-scope-note {
            text-align:left;
        }
        .profile-filter-sidebar .profile-filter-grid label,
        .profile-filter-sidebar .profile-filter-grid-v29 label {
            width:100%;
            align-items:flex-start;
        }
        .profile-filter-sidebar select,
        .profile-filter-sidebar input,
        .profile-filter-sidebar button {
            box-sizing:border-box;
        }
        .profile-filter-sidebar select {
            width:100%;
            text-align:left;
            text-align-last:left;
        }
        .profile-month-panel {
            padding:10px 12px;
            border-bottom:1px solid var(--border-color);
            background:rgba(59,130,246,.045);
        }
        .profile-month-panel > label {
            display:block;
            margin-bottom:6px;
            color:#BFDBFE;
            font-size:8px;
            font-weight:800;
            letter-spacing:.05em;
            text-transform:uppercase;
        }
        .profile-month-row {
            display:grid;
            grid-template-columns:minmax(0,1fr) auto;
            gap:6px;
            align-items:center;
        }
        .profile-month-row input[type="month"] {
            width:100%;
            min-height:36px;
            padding:7px 8px;
            border:1px solid var(--border-color);
            border-radius:8px;
            background:var(--bg-hover);
            color:var(--text-main);
            color-scheme:dark;
            font:600 10px var(--font-family);
        }
        .profile-month-clear {
            min-height:36px;
            padding:7px 9px;
            border:1px solid var(--border-color);
            border-radius:8px;
            background:rgba(255,255,255,.04);
            color:var(--text-muted);
            cursor:pointer;
            font:700 9px var(--font-family);
        }
        .profile-month-clear:hover { color:#fff; border-color:#60A5FA; }
        .profile-month-help {
            display:block;
            margin-top:6px;
            color:var(--text-muted);
            font-size:8px;
            line-height:1.35;
        }

        @media (max-width:1180px) {
            #tab-public-profile .profile-kpi-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
            .profile-filter-grid { grid-template-columns:repeat(3,minmax(130px,1fr)); }
            .profile-chart-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
        }
        @media (max-width:760px) {
            #tab-public-profile .profile-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
            .profile-filter-grid { grid-template-columns:1fr; }
            .profile-chart-grid { grid-template-columns:1fr; }
            .profile-chart-card.profile-chart-wide { grid-column:auto; }
            .profile-view { padding:8px; }
        }


        /* V29 — navegação sem rolagem e BI de matrículas */
        .report-workspace-card {
            grid-template-columns:minmax(250px,.8fr) minmax(280px,1.2fr);
            gap:8px 16px;
            min-height:118px;
        }
        .report-workspace-header .tab-navigation {
            grid-column:1/-1;
            width:100%;
            margin:0;
            display:grid;
            grid-template-columns:repeat(6,minmax(0,1fr));
            gap:4px;
            overflow:visible;
            box-sizing:border-box;
        }
        .report-workspace-header .tab-button {
            min-width:0;
            padding:9px 6px;
            font-size:12px;
            overflow:hidden;
            text-overflow:ellipsis;
        }
        .profile-main-header { gap:12px; }
        .profile-scope-switch { display:flex; gap:5px; padding:4px; border:1px solid var(--border-color); border-radius:9px; background:rgba(2,6,23,.35); }
        .profile-scope-button { border:0; border-radius:7px; background:transparent; color:var(--text-muted); padding:8px 11px; font:700 11px var(--font-family); cursor:pointer; white-space:nowrap; }
        .profile-scope-button.active { background:var(--accent-primary); color:#fff; }
        .profile-scope-summary { padding:8px 14px; border-bottom:1px solid var(--border-color); background:rgba(16,185,129,.055); color:#A7F3D0; font-size:10px; font-weight:600; }
        .profile-filter-grid-v29 { grid-template-columns:repeat(7,minmax(105px,1fr)); }
        .profile-filter-grid select:disabled { opacity:.55; cursor:not-allowed; }
        .profile-consultant-selection { margin:0 0 8px; padding:7px 10px; border:1px solid rgba(59,130,246,.32); background:rgba(59,130,246,.08); border-radius:8px; display:flex; align-items:center; justify-content:space-between; color:#BFDBFE; font-size:11px; font-weight:700; }
        .profile-consultant-selection[hidden] { display:none; }
        .profile-consultant-selection button { border:0; background:transparent; color:#93C5FD; cursor:pointer; font:700 10px var(--font-family); }
        .clickable-chart { cursor:pointer; }
        .profile-table tr.consultant-row { cursor:pointer; }
        .profile-table tr.consultant-row.active { background:rgba(59,130,246,.13); box-shadow:inset 3px 0 0 var(--accent-primary); }
        @media (max-width:1180px) {
            .profile-filter-grid-v29 { grid-template-columns:repeat(4,minmax(120px,1fr)); }
            .report-workspace-card { grid-template-columns:1fr; }
            .report-workspace-header .tab-navigation { grid-template-columns:repeat(3,minmax(0,1fr)); }
        }
        @media (max-width:720px) {
            .profile-filter-grid-v29 { grid-template-columns:1fr; }
            .report-workspace-header .tab-navigation { grid-template-columns:repeat(2,minmax(0,1fr)); }
        }


        /* V30 — experiência simplificada */
        :root {
            --bg-main:#09101B;
            --bg-card:#111A2A;
            --bg-soft:#0D1625;
            --border-color:rgba(148,163,184,.16);
            --text-muted:#A7B0C0;
            --accent-primary:#3B82F6;
        }
        body { background:radial-gradient(circle at 50% -180px, rgba(59,130,246,.10), transparent 420px), var(--bg-main); }
        .top-bar { height:64px; padding:0 20px; }
        .brand { min-width:0; gap:9px; }
        .brand h2 { font-size:17px; white-space:nowrap; }
        .brand-badge { font-size:9px; padding:4px 7px; border-radius:7px; white-space:nowrap; }
        #status { max-width:250px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:11px; }
        .actions-bar { gap:8px; }
        .actions-bar .btn { min-height:38px; padding:8px 12px; font-size:12px; }
        #extended-actions { gap:8px !important; padding-left:8px !important; margin-left:2px !important; }
        .main-container { max-width:1600px; margin-top:14px; padding:0 18px; }

        .analysis-controls { padding:12px 14px; margin-bottom:12px; border-radius:12px; background:rgba(17,26,42,.88); border-color:rgba(59,130,246,.32); box-shadow:none; }
        .analysis-controls-title strong { font-size:13px; }
        .analysis-controls-title span { font-size:10px; }
        .period-field label { font-size:9px; }
        .period-field input { min-height:36px; padding:6px 9px; }
        .analysis-controls .btn { min-height:36px; padding:7px 11px; }

        .report-workspace-header { top:64px; margin-bottom:14px; padding:6px 0 8px; }
        .report-workspace-card { min-height:68px; display:grid; grid-template-columns:minmax(220px,270px) minmax(185px,240px) minmax(0,1fr); align-items:center; gap:12px; padding:10px 12px 10px 16px; border-radius:13px; }
        .report-workspace-title { min-width:0; font-size:14px; gap:9px; }
        .report-workspace-title > div { min-width:0; }
        .report-workspace-title small { font-size:9px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
        .help-button { flex:0 0 26px; width:26px; height:26px; border:1px solid rgba(96,165,250,.35); background:rgba(59,130,246,.10); color:#93C5FD; border-radius:50%; font:800 12px var(--font-family); cursor:pointer; }
        .help-button:hover { background:rgba(59,130,246,.22); color:#fff; }
        .comparison-status-area { min-width:0; width:100%; padding:7px 10px; }
        .matricula-match-status { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:9px; }
        .report-workspace-header .tab-navigation { width:100%; max-width:none; display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); overflow:visible; gap:3px; padding:4px; }
        .report-workspace-header .tab-button { min-width:0; padding:9px 5px; font-size:10.5px; overflow:hidden; text-overflow:ellipsis; }

        .kpi-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:11px; margin-bottom:16px; }
        .kpi-card { min-height:94px; padding:13px 14px; border-radius:11px; gap:3px; box-shadow:none; }
        .kpi-card:hover { border-color:rgba(96,165,250,.38); transform:translateY(-1px); transition:.18s ease; }
        .kpi-title { font-size:10px; letter-spacing:.04em; }
        .kpi-value { font-size:21px; margin:4px 0; }
        .kpi-badge { font-size:9px; padding:3px 7px; }
        .mini-kpi-grid { gap:10px; margin-bottom:14px; }
        .mini-kpi { padding:12px 13px; border-radius:10px; }
        .mini-kpi-label { font-size:9px; margin-bottom:5px; }
        .mini-kpi-value { font-size:19px; }

        .panel { margin-bottom:16px; border-radius:13px; box-shadow:none; }
        .panel-header { padding:13px 16px; gap:12px; }
        .header-title-group { font-size:14px; }
        .panel-header-actions { gap:8px; }
        .chart-controls { gap:8px; }
        .chart-controls label { font-size:9px; gap:4px; }
        .chart-controls select { min-width:220px; max-width:360px; min-height:36px; padding:7px 9px; font-size:11px; }
        .local-mode-control .analysis-mode-label { font-size:8px; }
        .analysis-mode-switch { gap:2px; }
        .mode-button { padding:6px 9px !important; }
        .mode-button span { display:flex; flex-direction:column; align-items:center; line-height:1.05; }
        .mode-button small { display:block; margin-top:2px; font-size:7px; font-weight:600; opacity:.72; }

        .data-table th { font-size:9px; padding:11px 9px; }
        .data-table td { padding:13px 9px; font-size:11px; }
        .data-table tbody tr:nth-child(even):not(.overview-details-row) { background:rgba(255,255,255,.012); }
        .data-table tbody tr:hover:not(.overview-details-row) { background:rgba(59,130,246,.055); }
        .table-container { max-height:68vh; }
        .overview-details-panel { padding:12px 14px 14px 30px; gap:9px; }
        .overview-detail-card { padding:10px 11px; }

        .chart-stage { height:300px; padding:14px 18px 8px; }
        .daily-table th,.daily-table td { padding:10px 12px; }
        .cohort-explanation,.control-daily-note,.audit-summary-note { font-size:10px; line-height:1.4; max-width:760px; }
        .cohort-forecast { padding:13px 16px 15px; }
        .cohort-forecast-grid { gap:7px; }
        .cohort-forecast-card { padding:10px; }
        .cohort-forecast-value { font-size:18px; }
        .help-details { margin-top:7px; max-width:820px; font-size:10px; color:var(--text-muted); font-weight:500; }
        .help-details summary { display:inline-flex; align-items:center; gap:5px; color:#93C5FD; cursor:pointer; font-weight:700; user-select:none; }
        .help-details summary::before { content:'ⓘ'; font-size:11px; }
        .help-details p { margin:7px 0 0; padding:9px 11px; border:1px solid var(--border-color); border-radius:8px; background:rgba(2,6,23,.28); line-height:1.5; }

        .profile-main-header { padding:12px 14px; }
        .profile-scope-button { padding:7px 10px; font-size:10px; }
        .profile-scope-summary { padding:6px 12px; font-size:9px; }
        .profile-filter-panel { padding:9px 12px; }
        .profile-filter-grid-v29 { grid-template-columns:repeat(4,minmax(135px,1fr)); gap:7px; }
        .profile-filter-grid label { font-size:8px; }
        .profile-subnav { padding:7px 12px; }
        .profile-subnav-button { flex:1; text-align:center; min-width:130px; }
        .profile-chart-card { min-height:210px; padding:9px; }
        .profile-chart-canvas { min-height:150px; }
        .profile-chart-title { font-size:11px; }
        .profile-chart-description { font-size:8px; }

        .help-modal-content { width:min(680px,calc(100vw - 32px)); max-width:680px; text-align:left; }
        .help-modal-header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:16px; }
        .help-modal-header h3 { margin:0 0 4px; }
        .help-modal-header p { margin:0; color:var(--text-muted); font-size:12px; }
        .icon-close { width:30px; height:30px; border:1px solid var(--border-color); border-radius:8px; background:transparent; color:var(--text-muted); font-size:20px; cursor:pointer; }
        .help-glossary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-bottom:18px; }
        .help-glossary > div { display:flex; flex-direction:column; gap:3px; padding:10px 11px; border:1px solid var(--border-color); background:rgba(2,6,23,.24); border-radius:9px; }
        .help-glossary strong { color:#DBEAFE; font-size:11px; }
        .help-glossary span { color:var(--text-muted); font-size:10px; line-height:1.4; }

        @media (max-width:1250px) {
            .report-workspace-card { grid-template-columns:minmax(220px,260px) minmax(170px,220px) minmax(0,1fr); }
            .report-workspace-header .tab-button { font-size:9.5px; padding:8px 3px; }
            .kpi-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
        }
        @media (max-width:1050px) {
            .top-bar { height:auto; min-height:64px; padding:8px 14px; flex-wrap:wrap; gap:8px; }
            .brand { flex:1 1 100%; }
            #status { margin-left:auto !important; }
            .actions-bar { width:100%; justify-content:flex-end; }
            .report-workspace-header { top:112px; }
            .report-workspace-card { grid-template-columns:1fr; gap:8px; }
            .report-workspace-header .tab-navigation { grid-template-columns:repeat(3,minmax(0,1fr)); }
            .matricula-match-status { text-align:left; }
            .kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
            .profile-filter-grid-v29 { grid-template-columns:repeat(2,minmax(150px,1fr)); }
        }
        @media (max-width:680px) {
            .main-container { padding:0 10px; }
            .analysis-controls { align-items:stretch; }
            .period-filter { display:grid; grid-template-columns:1fr 1fr; width:100%; }
            .period-filter .btn { width:100%; justify-content:center; }
            .kpi-grid { grid-template-columns:1fr; }
            .help-glossary { grid-template-columns:1fr; }
            .profile-filter-grid-v29 { grid-template-columns:1fr; }
            .report-workspace-header .tab-navigation { grid-template-columns:repeat(2,minmax(0,1fr)); }
        }

    
        /* V33 — filtros laterais e seleção rápida de mês */
        .analysis-controls { display:none !important; }
        .report-workspace-header { top:72px; padding-top:8px; }
        .report-workspace-card {
            display:grid;
            grid-template-columns:minmax(220px, .8fr) minmax(240px, 1fr) auto;
            align-items:center;
            gap:10px 16px;
            min-height:0;
            padding:10px 14px;
        }
        .report-workspace-title { min-width:0; font-size:14px; }
        .report-workspace-title small { font-size:9px; }
        .comparison-status-area { min-width:0; }
        .matricula-match-status { display:block; max-width:none; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
        .report-period-area { display:flex; flex-direction:column; align-items:flex-end; gap:3px; min-width:430px; }
        .report-period-area .period-filter { flex-wrap:nowrap; gap:6px; }
        .report-period-area .period-field { gap:2px; }
        .report-period-area .period-field label { font-size:8px; }
        .report-period-area .period-field input { width:120px; padding:6px 7px; font-size:10px; }
        .report-period-area .btn { padding:7px 9px; font-size:10px; }
        .report-period-area small { color:var(--text-muted); font-size:8px; text-align:right; white-space:nowrap; }
        .report-workspace-header .tab-navigation {
            grid-column:1/-1;
            width:100%;
            display:grid;
            grid-template-columns:repeat(6,minmax(0,1fr));
            gap:5px;
            overflow:visible;
            box-sizing:border-box;
        }
        .report-workspace-header .tab-button { min-width:0; padding:8px 5px; font-size:10px; overflow:hidden; text-overflow:ellipsis; }
        .profile-subnav { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); }
        .profile-subnav-button { min-width:0 !important; }
        .profile-bi-selection { margin:0 0 8px; padding:7px 10px; border:1px solid rgba(59,130,246,.36); background:rgba(59,130,246,.08); border-radius:8px; display:flex; align-items:center; justify-content:space-between; color:#BFDBFE; font-size:10px; font-weight:700; }
        .profile-bi-selection[hidden] { display:none; }
        .profile-bi-selection button { border:0; background:transparent; color:#93C5FD; cursor:pointer; font:700 10px var(--font-family); }
        .profile-chart-daily { min-height:245px !important; }
        .profile-filter-row { cursor:pointer; }
        .profile-filter-row:hover { background:rgba(59,130,246,.08) !important; }
        .profile-filter-row.active { background:rgba(59,130,246,.14) !important; box-shadow:inset 3px 0 0 var(--accent-primary); }
        .profile-daily-table { min-width:900px; }
        @media (max-width:1180px) {
            .report-workspace-card { grid-template-columns:1fr auto; }
            .comparison-status-area { display:none; }
            .report-period-area { min-width:0; }
            .report-workspace-header .tab-navigation { grid-template-columns:repeat(3,minmax(0,1fr)); }
        }
        @media (max-width:760px) {
            .report-workspace-card { grid-template-columns:1fr; }
            .report-period-area { align-items:stretch; }
            .report-period-area .period-filter { display:grid; grid-template-columns:1fr 1fr; }
            .report-period-area .period-field input { width:100%; box-sizing:border-box; }
            .report-period-area small { white-space:normal; text-align:left; }
            .report-workspace-header .tab-navigation { grid-template-columns:repeat(2,minmax(0,1fr)); }
            .profile-subnav { grid-template-columns:repeat(2,minmax(0,1fr)); }
        }


        /* V33 — filtros laterais alinhados à esquerda */
        #tab-public-profile .panel { overflow: visible; }
        .profile-layout-shell {
            display:grid;
            grid-template-columns:248px minmax(0,1fr);
            align-items:start;
            min-width:0;
        }
        .profile-filter-sidebar {
            position:sticky;
            top:218px;
            z-index:20;
            align-self:start;
            max-height:calc(100vh - 236px);
            overflow:auto;
            border-right:1px solid var(--border-color);
            border-bottom:1px solid var(--border-color);
            background:linear-gradient(180deg,rgba(17,24,39,.98),rgba(11,18,32,.97));
            scrollbar-width:thin;
        }
        .profile-sidebar-heading {
            position:sticky;
            top:0;
            z-index:3;
            display:flex;
            align-items:center;
            justify-content:space-between;
            gap:8px;
            padding:11px 12px 9px;
            background:#111827;
            border-bottom:1px solid var(--border-color);
        }
        .profile-sidebar-heading strong {
            color:var(--text-main);
            font-size:11px;
            letter-spacing:.02em;
        }
        .profile-sidebar-clear {
            border:0;
            background:transparent;
            color:#93C5FD;
            cursor:pointer;
            font:700 9px var(--font-family);
            padding:4px 2px;
        }
        .profile-sidebar-clear:hover { color:#fff; }
        .profile-filter-sidebar .profile-scope-summary {
            border-bottom:1px solid var(--border-color);
            padding:9px 12px;
            line-height:1.4;
            background:rgba(16,185,129,.045);
        }
        .profile-filter-sidebar .profile-filter-panel {
            padding:10px 12px 12px;
            border-bottom:0;
            background:transparent;
        }
        .profile-filter-sidebar .profile-filter-grid,
        .profile-filter-sidebar .profile-filter-grid-v29 {
            display:flex;
            flex-direction:column;
            gap:9px;
        }
        .profile-filter-sidebar .profile-filter-grid label {
            font-size:8px;
            gap:4px;
        }
        .profile-filter-sidebar .profile-filter-grid select {
            min-height:36px;
            font-size:10px;
            padding:7px 8px;
        }
        .profile-filter-sidebar .profile-scope-note {
            margin-top:10px;
            padding-top:9px;
            border-top:1px solid var(--border-color);
            font-size:9px;
            line-height:1.45;
        }
        .profile-content-area { min-width:0; }
        .profile-content-area .profile-subnav {
            position:sticky;
            top:218px;
            z-index:19;
            background:#111827;
        }
        @media (max-width:1180px) {
            .profile-layout-shell { grid-template-columns:220px minmax(0,1fr); }
            .profile-filter-sidebar { top:260px; max-height:calc(100vh - 278px); }
            .profile-content-area .profile-subnav { top:260px; }
        }
        @media (max-width:900px) {
            .profile-layout-shell { display:block; }
            .profile-filter-sidebar {
                position:static;
                max-height:none;
                overflow:visible;
                border-right:0;
            }
            .profile-filter-sidebar .profile-filter-grid,
            .profile-filter-sidebar .profile-filter-grid-v29 {
                display:grid;
                grid-template-columns:repeat(2,minmax(0,1fr));
            }
            .profile-content-area .profile-subnav { position:static; }
        }
        @media (max-width:560px) {
            .profile-filter-sidebar .profile-filter-grid,
            .profile-filter-sidebar .profile-filter-grid-v29 { grid-template-columns:1fr; }
        }


        /* V35 — Central de importação redesenhada */
        .import-center-content {
            width:min(1180px,calc(100vw - 40px)) !important;
            max-width:1180px !important;
            max-height:calc(100vh - 40px);
            padding:0 !important;
            overflow:hidden !important;
            text-align:left !important;
            display:flex;
            flex-direction:column;
            border-radius:20px;
            box-shadow:0 28px 80px rgba(0,0,0,.55);
        }
        .import-center-header {
            flex:none;
            display:flex;
            align-items:center;
            justify-content:space-between;
            gap:20px;
            padding:20px 24px;
            background:linear-gradient(135deg,#121D30 0%,#101827 100%);
            border-bottom:1px solid var(--border-color);
        }
        .import-center-header-copy { display:flex; align-items:center; gap:14px; min-width:0; }
        .import-center-logo {
            width:42px; height:42px; flex:none; border-radius:12px;
            display:grid; place-items:center;
            color:#DBEAFE; background:rgba(59,130,246,.16);
            border:1px solid rgba(96,165,250,.28);
        }
        .import-center-logo svg { width:22px; height:22px; }
        .import-center-header h3 { margin:0 0 3px; font-size:19px; line-height:1.2; }
        .import-center-header p { margin:0; color:var(--text-muted); font-size:11px; line-height:1.45; }
        .icon-close {
            width:36px; height:36px; flex:none; border-radius:10px;
            border:1px solid var(--border-color); background:#172132;
            color:var(--text-muted); font-size:21px; cursor:pointer;
        }
        .icon-close:hover { color:#fff; border-color:#64748B; background:#1E293B; }
        .import-center-body {
            flex:1; min-height:0; overflow-y:auto; overflow-x:hidden;
            padding:18px 22px 22px;
            scrollbar-gutter:stable;
        }
        .import-daily-hint {
            display:flex; align-items:center; gap:10px; margin-bottom:14px;
            padding:10px 13px; border-radius:11px;
            background:rgba(59,130,246,.08); border:1px solid rgba(96,165,250,.18);
            color:#BFDBFE; font-size:10px; line-height:1.4;
        }
        .import-daily-hint b { color:#fff; }
        .hint-dot { width:8px; height:8px; flex:none; border-radius:999px; background:#3B82F6; box-shadow:0 0 0 5px rgba(59,130,246,.12); }
        .import-guidance { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; align-items:stretch; }
        .import-source-card {
            --source:#3B82F6;
            position:relative; min-width:0; display:flex; flex-direction:column;
            padding:17px; border:1px solid var(--border-color); border-radius:16px;
            background:linear-gradient(180deg,rgba(30,41,59,.82),rgba(15,23,42,.78));
            overflow:hidden;
        }
        .import-source-card::before {
            content:""; position:absolute; inset:0 auto auto 0; width:100%; height:3px; background:var(--source);
        }
        .import-source-card.source-meta { --source:#3B82F6; }
        .import-source-card.source-moskit { --source:#10B981; }
        .import-source-card.source-system { --source:#F59E0B; }
        .source-card-header { display:flex; align-items:center; gap:10px; margin-bottom:9px; }
        .source-icon {
            width:36px; height:36px; flex:none; border-radius:10px; display:grid; place-items:center;
            color:var(--source); background:color-mix(in srgb,var(--source) 13%,transparent);
            border:1px solid color-mix(in srgb,var(--source) 25%,transparent);
        }
        .source-icon svg { width:19px; height:19px; }
        .source-title-wrap { min-width:0; }
        .import-source-card h4 { margin:0; font-size:14px; line-height:1.2; }
        .source-cadence {
            display:inline-flex; margin-top:4px; color:var(--source); font-size:9px; font-weight:800;
            text-transform:uppercase; letter-spacing:.055em;
        }
        .import-source-card > p { margin:0 0 12px; color:var(--text-muted); font-size:10px; line-height:1.48; min-height:43px; }
        .import-actions { display:grid; gap:8px; }
        .import-action {
            display:grid; grid-template-columns:34px minmax(0,1fr) auto; align-items:center; gap:10px;
            width:100%; min-height:58px; padding:9px 10px;
            border:1px solid var(--border-color); border-radius:11px;
            background:#172132; color:inherit; cursor:pointer; text-align:left;
            transition:.16s ease;
        }
        .import-action:hover { transform:translateY(-1px); border-color:color-mix(in srgb,var(--source) 50%,#475569); background:#1B283B; }
        .import-action.primary-action { border-color:color-mix(in srgb,var(--source) 42%,#334155); background:color-mix(in srgb,var(--source) 9%,#172132); }
        .action-symbol {
            width:32px; height:32px; border-radius:9px; display:grid; place-items:center;
            background:color-mix(in srgb,var(--source) 14%,transparent); color:var(--source);
        }
        .action-symbol svg { width:17px; height:17px; }
        .import-action-copy { min-width:0; }
        .import-action strong { display:block; color:var(--text-main); font-size:10.5px; line-height:1.25; }
        .import-action small { display:block; margin-top:3px; color:var(--text-muted); font-size:8.5px; line-height:1.35; }
        .action-cta {
            flex:none; padding:7px 9px; border-radius:8px; font-size:9px; font-weight:800;
            color:#fff; background:var(--source); white-space:nowrap;
        }
        .secondary-action .action-cta { background:#263449; color:#D7E2F0; border:1px solid #3A4A61; }
        .source-coverage {
            margin-top:auto; padding-top:11px; border-top:1px solid var(--border-color);
            color:#A7F3D0; font-size:9px; line-height:1.4; min-height:37px;
        }
        .import-footer-grid { display:grid; grid-template-columns:1.25fr .75fr; gap:14px; margin-top:14px; }
        .import-tutorial,.import-backup-card {
            border:1px solid var(--border-color); border-radius:14px;
            background:rgba(15,23,42,.46); padding:14px;
        }
        .import-tutorial h4,.import-backup-card h4 { margin:0 0 10px; font-size:12px; }
        .routine-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
        .routine-step {
            display:flex; gap:8px; align-items:flex-start; padding:8px 9px;
            border:1px solid var(--border-color); border-radius:10px; background:#141E2E;
        }
        .routine-number {
            width:21px; height:21px; flex:none; border-radius:7px; display:grid; place-items:center;
            font-size:9px; font-weight:900; color:#BFDBFE; background:rgba(59,130,246,.14);
        }
        .routine-step strong { display:block; font-size:9.5px; line-height:1.25; }
        .routine-step span { display:block; margin-top:2px; color:var(--text-muted); font-size:8px; line-height:1.35; }
        .import-backup-card p { font-size:9px !important; line-height:1.4 !important; margin:0 0 10px !important; }
        .backup-actions { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
        .backup-actions .btn { width:100%; min-width:0; padding:8px 7px; font-size:9px; }
        .backup-actions .btn:last-child { grid-column:1/-1; }
        .import-summary { margin-top:12px; border:1px solid rgba(16,185,129,.25); background:rgba(16,185,129,.07); border-radius:11px; padding:10px 12px; display:none; }
        .import-summary.visible { display:block; }
        .import-summary strong { display:block; color:#A7F3D0; font-size:10px; margin-bottom:4px; }
        .import-summary span { color:var(--text-muted); font-size:9px; line-height:1.45; }
        .import-history { margin-top:12px; }
        .import-history summary { cursor:pointer; font-size:10px; font-weight:800; color:#BFDBFE; }
        .import-history-list { margin-top:7px; display:grid; gap:5px; }
        .import-history-row { display:grid; grid-template-columns:120px 1fr auto; gap:9px; align-items:center; padding:7px 9px; border:1px solid var(--border-color); border-radius:8px; font-size:8.5px; color:var(--text-muted); }
        .import-history-row b { color:var(--text-main); font-size:9px; }
        .top-import-button { min-width:126px; }
        @supports not (background:color-mix(in srgb,red,blue)) {
            .source-icon,.action-symbol { background:rgba(59,130,246,.12); }
            .import-action.primary-action { background:#17253A; }
        }
        @media (max-width:980px) {
            .import-center-content { width:calc(100vw - 24px) !important; max-height:calc(100vh - 24px); }
            .import-guidance { grid-template-columns:1fr; }
            .import-source-card > p { min-height:0; }
            .import-footer-grid { grid-template-columns:1fr; }
        }
        @media (max-width:650px) {
            .import-center-header { padding:16px; }
            .import-center-body { padding:13px; }
            .routine-grid { grid-template-columns:1fr; }
            .import-action { grid-template-columns:32px minmax(0,1fr); }
            .action-cta { grid-column:1/-1; text-align:center; }
            .backup-actions { grid-template-columns:1fr; }
            .backup-actions .btn:last-child { grid-column:auto; }
        }


        /* V36 — visual mais leve, período compacto e BI de origens */
        .top-bar { height:56px !important; padding:0 18px !important; }
        .brand h2 { font-size:16px !important; }
        .main-container { margin-top:12px !important; }
        .report-workspace-header {
            position:relative !important;
            top:auto !important;
            z-index:40 !important;
            margin:0 0 12px !important;
            padding:0 !important;
            background:transparent !important;
        }
        .report-workspace-card {
            display:grid !important;
            grid-template-columns:minmax(190px,245px) minmax(0,1fr) auto !important;
            gap:10px !important;
            min-height:56px !important;
            padding:8px 10px 8px 14px !important;
            border-radius:12px !important;
            box-shadow:0 4px 16px rgba(0,0,0,.14) !important;
        }
        .report-workspace-title { font-size:13px !important; align-items:flex-start !important; }
        .report-workspace-title svg { width:18px; height:18px; margin-top:2px; }
        .report-workspace-title small { font-size:8.5px !important; line-height:1.25; }
        .workspace-status {
            display:block;
            margin-top:4px;
            color:#86EFAC;
            font-size:8px;
            font-weight:650;
            line-height:1.25;
            white-space:nowrap;
            overflow:hidden;
            text-overflow:ellipsis;
            max-width:235px;
            width:auto !important;
            text-align:left !important;
        }
        .comparison-status-area, .report-period-area { display:none !important; }
        .report-workspace-header .tab-navigation {
            grid-column:auto !important;
            display:grid !important;
            grid-template-columns:repeat(6,minmax(0,1fr)) !important;
            width:100% !important;
            padding:3px !important;
            gap:3px !important;
            overflow:visible !important;
        }
        .report-workspace-header .tab-button { padding:8px 5px !important; font-size:9.5px !important; }
        .period-compact-button {
            min-width:150px;
            min-height:42px;
            display:flex;
            align-items:center;
            gap:9px;
            padding:7px 10px;
            border:1px solid rgba(96,165,250,.28);
            border-radius:10px;
            background:linear-gradient(145deg,rgba(59,130,246,.10),rgba(15,23,42,.72));
            color:var(--text-main);
            cursor:pointer;
            text-align:left;
            font-family:var(--font-family);
        }
        .period-compact-button:hover { border-color:rgba(96,165,250,.6); background:rgba(59,130,246,.14); }
        .period-compact-icon { width:25px; height:25px; display:grid; place-items:center; border-radius:7px; background:rgba(59,130,246,.18); color:#93C5FD; flex:0 0 25px; }
        .period-compact-copy { min-width:0; display:flex; flex-direction:column; gap:1px; }
        .period-compact-copy span { color:var(--text-muted); font-size:8px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; }
        .period-compact-copy strong { font-size:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

        .period-modal-content { width:min(560px,calc(100vw - 28px)) !important; max-width:560px !important; padding:0 !important; overflow:hidden; text-align:left !important; }
        .period-modal-header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:18px 20px 14px; border-bottom:1px solid var(--border-color); }
        .period-modal-header h3 { margin:0 0 4px; font-size:17px; }
        .period-modal-header p { margin:0; font-size:10px; line-height:1.4; }
        .period-modal-body { padding:16px 20px; }
        .period-preset-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; margin-bottom:14px; }
        .period-preset { border:1px solid var(--border-color); border-radius:9px; background:rgba(15,23,42,.72); color:#CBD5E1; padding:9px 6px; font:700 9px var(--font-family); cursor:pointer; }
        .period-preset:hover { border-color:rgba(96,165,250,.48); color:#fff; background:rgba(59,130,246,.10); }
        .period-month-block { display:grid; grid-template-columns:1fr auto; gap:8px; align-items:end; padding:11px; margin-bottom:13px; border:1px solid var(--border-color); border-radius:10px; background:rgba(2,6,23,.24); }
        .period-month-block label, .period-date-field label { display:flex; flex-direction:column; gap:5px; color:var(--text-muted); font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
        .period-month-block input, .period-date-field input { width:100%; box-sizing:border-box; min-height:39px; padding:7px 9px; border:1px solid var(--border-color); border-radius:8px; background:var(--bg-hover); color:var(--text-main); font:600 11px var(--font-family); color-scheme:dark; }
        .period-date-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
        .period-modal-note { margin:11px 0 0; color:var(--text-muted); font-size:9px; line-height:1.45; }
        .period-modal-actions { display:flex; justify-content:space-between; gap:8px; padding:13px 20px 17px; border-top:1px solid var(--border-color); }
        .period-modal-actions > div { display:flex; gap:8px; }

        .profile-filter-sidebar { top:66px !important; max-height:calc(100vh - 80px) !important; }
        .profile-content-area .profile-subnav { top:56px !important; }
        .profile-chart-card { transition:border-color .18s ease, transform .18s ease; }
        .profile-chart-card:hover { border-color:rgba(96,165,250,.30); }
        .profile-chart-canvas canvas { cursor:default; }
        .clickable-chart canvas { cursor:pointer; }
        .profile-origin-summary { min-width:230px; max-width:320px; }
        .profile-origin-summary strong, .profile-origin-summary span { display:block; }
        .profile-origin-summary strong { color:#DBEAFE; font-size:9px; line-height:1.25; }
        .profile-origin-summary span { color:var(--text-muted); font-size:8px; line-height:1.3; margin-top:2px; }
        .profile-origin-summary em { display:block; color:#A7F3D0; font-size:8px; font-style:normal; margin-top:4px; }
        .profile-course-origin-charts { grid-column:1/-1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
        .profile-chart-description b { color:#DBEAFE; }
        .profile-table td { vertical-align:middle; }
        .institution-note { color:#94A3B8; font-size:8px; margin-top:2px; }

        @media (max-width:1180px) {
            .report-workspace-card { grid-template-columns:1fr auto !important; }
            .report-workspace-title { grid-column:1; }
            .period-compact-button { grid-column:2; grid-row:1; }
            .report-workspace-header .tab-navigation { grid-column:1/-1 !important; grid-template-columns:repeat(3,minmax(0,1fr)) !important; }
        }
        @media (max-width:760px) {
            .top-bar { height:auto !important; min-height:56px; }
            .report-workspace-card { grid-template-columns:1fr !important; }
            .period-compact-button { grid-column:1; grid-row:auto; width:100%; }
            .report-workspace-header .tab-navigation { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
            .period-preset-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
            .period-date-grid, .profile-course-origin-charts { grid-template-columns:1fr; }
            .profile-filter-sidebar { position:static !important; max-height:none !important; }
            .profile-content-area .profile-subnav { position:static !important; }
        }

    

        /* V38 — escopo claro, melhor leitura e gráficos do controle diário */
        .main-container {
            width:100%;
            max-width:none;
            padding-left:16px;
            padding-right:16px;
        }
        #tab-public-profile .profile-kpi-grid {
            grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
            gap:12px;
        }
        #tab-public-profile .profile-kpi-grid .mini-kpi {
            min-height:88px;
            padding:14px 16px;
            justify-content:center;
        }
        #tab-public-profile .profile-kpi-grid .mini-kpi-label { font-size:10px; }
        #tab-public-profile .profile-kpi-grid .mini-kpi-value { font-size:22px; line-height:1.1; }
        #tab-public-profile .profile-kpi-sub { font-size:9px; margin-top:5px; }
        #tab-public-profile .profile-chart-grid {
            grid-template-columns:repeat(auto-fit,minmax(315px,1fr));
            gap:14px;
        }
        #tab-public-profile .profile-chart-card {
            min-height:255px;
            padding:14px;
            border-radius:12px;
        }
        #tab-public-profile .profile-chart-title { font-size:13px; }
        #tab-public-profile .profile-chart-description { font-size:10px; margin-bottom:8px; }
        #tab-public-profile .profile-chart-canvas { min-height:190px; }
        #tab-public-profile .profile-chart-card.profile-chart-wide { min-height:250px; }
        #tab-public-profile .profile-chart-card.profile-chart-wide .profile-chart-canvas { min-height:195px; }

        .profile-scope-indicator {
            display:flex;
            align-items:center;
            justify-content:space-between;
            gap:14px;
            margin:0;
            padding:12px 15px;
            border-bottom:1px solid var(--border-color);
            background:rgba(59,130,246,.08);
            box-shadow:inset 4px 0 0 #3B82F6;
        }
        .profile-scope-indicator.system {
            background:rgba(16,185,129,.075);
            box-shadow:inset 4px 0 0 #10B981;
        }
        .profile-scope-copy { display:flex; flex-direction:column; gap:3px; min-width:0; }
        .profile-scope-eyebrow { font-size:8px; font-weight:800; letter-spacing:.10em; text-transform:uppercase; color:#93C5FD; }
        .profile-scope-indicator.system .profile-scope-eyebrow { color:#6EE7B7; }
        .profile-scope-title { color:#F8FAFC; font-size:13px; font-weight:800; }
        .profile-scope-detail { color:#CBD5E1; font-size:10px; line-height:1.35; }
        .profile-scope-counts { color:#DBEAFE; font-size:10px; font-weight:700; text-align:right; white-space:nowrap; }
        .profile-scope-indicator.system .profile-scope-counts { color:#A7F3D0; }

        .control-visual-section {
            padding:14px 16px 4px;
            border-bottom:1px solid var(--border-color);
            background:rgba(2,6,23,.16);
        }
        .control-visual-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin-bottom:10px; }
        .control-visual-heading strong { font-size:13px; color:#F8FAFC; }
        .control-visual-heading span { font-size:9px; color:var(--text-muted); }
        .control-visual-grid {
            display:grid;
            grid-template-columns:repeat(3,minmax(0,1fr));
            gap:12px;
        }
        .control-chart-card {
            min-height:270px;
            padding:12px;
            border:1px solid var(--border-color);
            border-radius:12px;
            background:rgba(15,23,42,.55);
            display:flex;
            flex-direction:column;
            min-width:0;
        }
        .control-chart-title { color:#F8FAFC; font-size:12px; font-weight:800; }
        .control-chart-description { color:var(--text-muted); font-size:9px; line-height:1.35; margin:3px 0 8px; }
        .control-chart-canvas { position:relative; flex:1; min-height:205px; }
        .control-chart-canvas canvas { width:100% !important; height:100% !important; }

        @media (max-width:1180px) {
            .control-visual-grid { grid-template-columns:1fr 1fr; }
            .control-chart-card:last-child { grid-column:1/-1; }
        }
        @media (max-width:760px) {
            .main-container { padding-left:8px; padding-right:8px; }
            .profile-scope-indicator { align-items:flex-start; flex-direction:column; }
            .profile-scope-counts { text-align:left; white-space:normal; }
            .control-visual-grid { grid-template-columns:1fr; }
            .control-chart-card:last-child { grid-column:auto; }
        }


        /* V38 — gráficos amplos e período simplificado */
        .control-visual-section {
            padding:22px 18px 24px;
            border-top:1px solid var(--border-color);
            border-bottom:0;
            background:rgba(2,6,23,.12);
        }
        .control-visual-heading {
            align-items:center;
            margin-bottom:16px;
        }
        .control-visual-heading strong { font-size:15px; }
        .control-visual-heading span { font-size:10px; }
        .control-visual-grid {
            grid-template-columns:1fr;
            gap:18px;
        }
        .control-chart-card,
        .control-chart-card:last-child {
            grid-column:auto;
            min-height:455px;
            padding:18px 20px 20px;
            border-radius:14px;
        }
        .control-chart-title { font-size:14px; }
        .control-chart-description { font-size:10px; margin:4px 0 12px; }
        .control-chart-canvas { min-height:370px; }
        .control-daily-wrap { border-bottom:1px solid var(--border-color); }

        .period-modal-content {
            width:min(650px,calc(100vw - 24px)) !important;
            max-width:650px !important;
        }
        .period-modal-header { padding:20px 22px 15px; }
        .period-modal-header h3 { font-size:18px; }
        .period-modal-header p { font-size:11px; }
        .period-modal-body { padding:18px 22px 20px; }
        .period-quick-title,
        .period-custom-title {
            display:block;
            margin:0 0 9px;
            color:#E5E7EB;
            font-size:10px;
            font-weight:800;
            text-transform:uppercase;
            letter-spacing:.055em;
        }
        .period-preset-grid {
            grid-template-columns:repeat(3,minmax(0,1fr));
            gap:9px;
            margin-bottom:18px;
        }
        .period-preset {
            min-height:52px;
            padding:10px 10px;
            border-radius:10px;
            font-size:10px;
            line-height:1.25;
            display:flex;
            flex-direction:column;
            justify-content:center;
            align-items:flex-start;
            gap:3px;
            text-align:left;
        }
        .period-preset small {
            color:#7F8EA3;
            font-size:8px;
            font-weight:600;
        }
        .period-preset:hover small { color:#BFDBFE; }
        .period-month-select-row {
            display:grid;
            grid-template-columns:1.25fr .8fr auto;
            gap:8px;
            padding:11px;
            margin-bottom:17px;
            border:1px solid var(--border-color);
            border-radius:11px;
            background:rgba(15,23,42,.42);
        }
        .period-month-select-row select {
            width:100%; min-height:39px; padding:8px 10px;
            border:1px solid var(--border-color); border-radius:8px;
            background:#1E293B; color:#F8FAFC; font:700 10px var(--font-family);
        }
        .period-month-select-row .btn { min-height:39px; }
        .period-date-grid { gap:10px; }
        .period-date-field input { min-height:42px; font-size:11px; }
        .period-modal-actions { padding:14px 22px 18px; }
        .period-modal-note { font-size:9px; }

        @media (max-width:760px) {
            .control-chart-card { min-height:390px; padding:14px; }
            .control-chart-canvas { min-height:305px; }
            .period-preset-grid { grid-template-columns:1fr 1fr; }
            .period-month-select-row { grid-template-columns:1fr 1fr; }
            .period-month-select-row .btn { grid-column:1/-1; }
        }


        /* V39: gráficos de consultoras em largura total e período sempre visível */
        #tab-public-profile .profile-consultant-chart-large {
            grid-column:1/-1;
            min-height:390px;
        }
        #tab-public-profile .profile-consultant-chart-large .profile-chart-canvas {
            min-height:320px;
        }
        #tab-public-profile .profile-consultant-chart-large .profile-chart-title { font-size:15px; }
        #tab-public-profile .profile-consultant-chart-large .profile-chart-description { font-size:11px; }
        .floating-period-indicator {
            position:fixed;
            right:18px;
            bottom:18px;
            z-index:950;
            display:flex;
            align-items:center;
            gap:9px;
            max-width:min(360px,calc(100vw - 28px));
            padding:9px 12px;
            border:1px solid rgba(96,165,250,.42);
            border-radius:12px;
            background:rgba(15,23,42,.94);
            color:var(--text-main);
            box-shadow:0 12px 32px rgba(0,0,0,.32);
            backdrop-filter:blur(12px);
            cursor:pointer;
            font-family:var(--font-family);
        }
        .floating-period-indicator:hover { background:rgba(30,41,59,.98); border-color:rgba(96,165,250,.70); }
        .floating-period-icon {
            width:30px; height:30px; flex:0 0 30px; display:grid; place-items:center;
            border-radius:9px; background:rgba(59,130,246,.18); color:#93C5FD; font-size:15px;
        }
        .floating-period-copy { min-width:0; display:flex; flex-direction:column; align-items:flex-start; gap:1px; }
        .floating-period-copy small { color:var(--text-muted); font-size:8px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
        .floating-period-copy strong { max-width:280px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; }
        @media(max-width:700px) {
            #tab-public-profile .profile-consultant-chart-large { min-height:330px; }
            #tab-public-profile .profile-consultant-chart-large .profile-chart-canvas { min-height:265px; }
            .floating-period-indicator { left:12px; right:12px; bottom:12px; max-width:none; }
            .floating-period-copy strong { max-width:calc(100vw - 105px); }
        }
    

        /* V40 — previsão operacional diária e mensal */
        .report-workspace-header .tab-navigation {
            grid-template-columns:repeat(7,minmax(0,1fr)) !important;
        }
        .forecast-scope-banner {
            display:flex;
            align-items:center;
            justify-content:space-between;
            gap:16px;
            margin-bottom:12px;
            padding:12px 16px;
            border:1px solid rgba(96,165,250,.25);
            border-radius:12px;
            background:linear-gradient(135deg,rgba(59,130,246,.10),rgba(15,23,42,.78));
            box-shadow:inset 4px 0 0 #3B82F6;
        }
        .forecast-scope-banner strong { display:block; font-size:13px; color:#F8FAFC; }
        .forecast-scope-banner span { display:block; margin-top:3px; color:#CBD5E1; font-size:10px; line-height:1.4; }
        .forecast-badge {
            flex:0 0 auto;
            padding:7px 10px;
            border-radius:999px;
            background:rgba(245,158,11,.13);
            color:#FCD34D;
            border:1px solid rgba(245,158,11,.25);
            font-size:9px;
            font-weight:800;
            text-transform:uppercase;
            letter-spacing:.06em;
        }
        .forecast-toolbar {
            display:grid;
            grid-template-columns:1.15fr 1fr 1fr 1fr .8fr auto;
            gap:10px;
            align-items:end;
            padding:15px 16px;
        }
        .forecast-field { display:flex; flex-direction:column; gap:5px; min-width:0; }
        .forecast-field label { color:var(--text-muted); font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
        .forecast-field select,
        .forecast-field input {
            width:100%;
            box-sizing:border-box;
            min-height:39px;
            border:1px solid var(--border-color);
            border-radius:9px;
            padding:8px 10px;
            background:var(--bg-hover);
            color:var(--text-main);
            font:600 11px var(--font-family);
            color-scheme:dark;
        }
        .forecast-toolbar-actions { display:flex; gap:8px; align-items:center; }
        .forecast-kpi-grid {
            display:grid;
            grid-template-columns:repeat(6,minmax(155px,1fr));
            gap:12px;
            margin:0 0 12px;
        }
        .forecast-kpi {
            min-height:96px;
            display:flex;
            flex-direction:column;
            justify-content:center;
            padding:14px 16px;
            border:1px solid var(--border-color);
            border-radius:12px;
            background:var(--bg-card);
        }
        .forecast-kpi-label { color:var(--text-muted); font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
        .forecast-kpi-value { margin-top:7px; color:#F8FAFC; font-size:24px; line-height:1; font-weight:800; }
        .forecast-kpi-value.green { color:#34D399; }
        .forecast-kpi-value.blue { color:#60A5FA; }
        .forecast-kpi-value.yellow { color:#FBBF24; }
        .forecast-kpi-sub { margin-top:7px; color:#94A3B8; font-size:9px; line-height:1.35; }
        .forecast-chart-panel { margin-bottom:12px; }
        .forecast-chart-header {
            display:flex;
            align-items:flex-start;
            justify-content:space-between;
            gap:16px;
            padding:15px 18px 10px;
        }
        .forecast-chart-title { color:#F8FAFC; font-size:14px; font-weight:800; }
        .forecast-chart-description { margin-top:4px; color:var(--text-muted); font-size:10px; line-height:1.45; }
        .forecast-chart-wrap { height:390px; padding:0 14px 16px; }
        .forecast-chart-wrap.small { height:315px; }
        .forecast-grid-two { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:12px; }
        .forecast-quality-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; padding:0 16px 16px; }
        .forecast-quality-item { padding:11px 12px; border:1px solid var(--border-color); border-radius:9px; background:rgba(2,6,23,.25); }
        .forecast-quality-item span { display:block; color:var(--text-muted); font-size:8px; text-transform:uppercase; font-weight:800; letter-spacing:.05em; }
        .forecast-quality-item strong { display:block; margin-top:6px; color:#E5E7EB; font-size:16px; }
        .forecast-table-wrap { max-height:430px; overflow:auto; border-top:1px solid var(--border-color); }
        .forecast-table { width:100%; border-collapse:separate; border-spacing:0; min-width:860px; }
        .forecast-table th,
        .forecast-table td { padding:10px 12px; border-right:1px solid var(--border-color); border-bottom:1px solid var(--border-color); text-align:right; font-size:10px; }
        .forecast-table th { position:sticky; top:0; z-index:2; background:#111827; color:#93C5FD; text-transform:uppercase; letter-spacing:.04em; }
        .forecast-table th:first-child,
        .forecast-table td:first-child { text-align:left; }
        .forecast-table tr:hover td { background:rgba(59,130,246,.045); }
        .forecast-positive { color:#34D399; font-weight:700; }
        .forecast-negative { color:#F87171; font-weight:700; }
        .forecast-muted { color:#6B7280; }
        .forecast-snapshot-select { min-width:230px; min-height:34px; border:1px solid var(--border-color); border-radius:8px; background:var(--bg-hover); color:var(--text-main); padding:6px 8px; font:600 10px var(--font-family); }
        .forecast-model-note { padding:0 18px 15px; color:#94A3B8; font-size:9px; line-height:1.5; }
        .forecast-model-note b { color:#CBD5E1; }
        @media (max-width:1200px) {
            .forecast-toolbar { grid-template-columns:repeat(3,minmax(0,1fr)); }
            .forecast-kpi-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
            .report-workspace-header .tab-navigation { grid-template-columns:repeat(4,minmax(0,1fr)) !important; }
        }
        @media (max-width:820px) {
            .forecast-toolbar { grid-template-columns:1fr 1fr; }
            .forecast-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
            .forecast-grid-two { grid-template-columns:1fr; }
            .forecast-quality-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
            .forecast-chart-wrap { height:320px; }
            .report-workspace-header .tab-navigation { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
        }


        /* V41 — calendário de trabalho, previsão sazonal e faturamento */
        .forecast-metric-toggle {
            display:inline-grid; grid-template-columns:1fr 1fr; gap:3px;
            padding:3px; border:1px solid var(--border-color); border-radius:10px;
            background:rgba(2,6,23,.42); min-height:39px; box-sizing:border-box;
        }
        .forecast-metric-button {
            border:0; border-radius:7px; padding:7px 13px; background:transparent;
            color:#94A3B8; font:800 10px var(--font-family); cursor:pointer; white-space:nowrap;
        }
        .forecast-metric-button.active { background:#2563EB; color:#fff; box-shadow:0 3px 10px rgba(37,99,235,.28); }
        .forecast-calendar-card { margin:0 0 12px; padding:14px 16px; }
        .forecast-calendar-head { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; margin-bottom:10px; }
        .forecast-calendar-title { color:#F8FAFC; font-size:12px; font-weight:800; }
        .forecast-calendar-copy { margin-top:3px; color:#94A3B8; font-size:9px; line-height:1.45; }
        .forecast-saturday-list { display:flex; flex-wrap:wrap; gap:8px; }
        .forecast-saturday-chip {
            display:flex; align-items:center; gap:7px; border:1px solid var(--border-color);
            border-radius:9px; padding:8px 10px; background:rgba(15,23,42,.68); color:#CBD5E1;
            font:700 10px var(--font-family); cursor:pointer;
        }
        .forecast-saturday-chip:hover { border-color:rgba(96,165,250,.55); }
        .forecast-saturday-chip.worked { background:rgba(16,185,129,.13); border-color:rgba(16,185,129,.42); color:#A7F3D0; }
        .forecast-saturday-chip.past { opacity:.72; cursor:default; }
        .forecast-saturday-state { font-size:8px; text-transform:uppercase; letter-spacing:.05em; color:#94A3B8; }
        .forecast-saturday-chip.worked .forecast-saturday-state { color:#34D399; }
        .forecast-schedule-summary { color:#93C5FD; font-size:9px; font-weight:700; }
        .forecast-quality-help { margin:0 16px 16px; border:1px solid var(--border-color); border-radius:9px; background:rgba(2,6,23,.23); }
        .forecast-quality-help summary { cursor:pointer; padding:10px 12px; color:#BFDBFE; font-size:10px; font-weight:800; }
        .forecast-quality-help-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:0 12px 12px; }
        .forecast-quality-help-item { padding:9px 10px; border-radius:8px; background:rgba(15,23,42,.72); color:#94A3B8; font-size:9px; line-height:1.45; }
        .forecast-quality-help-item b { display:block; margin-bottom:3px; color:#E2E8F0; font-size:10px; }
        .overview-forecast-card { border-color:rgba(96,165,250,.30); background:linear-gradient(145deg,var(--bg-card),rgba(37,99,235,.06)); }
        .overview-forecast-card .kpi-badge { max-width:100%; white-space:normal; line-height:1.3; }
        .forecast-zero-day { color:#64748B; }
        @media(max-width:1000px){
            .forecast-quality-help-grid{grid-template-columns:1fr;}
            .forecast-calendar-head{flex-direction:column;}
        }

    

        /* V42 — Navegação lateral e área comercial */
        :root { --app-sidebar-width: 276px; --app-sidebar-collapsed: 76px; }
        .report-workspace-header { display:none !important; }
        .main-container { max-width:none !important; padding-left:calc(var(--app-sidebar-width) + 22px) !important; padding-right:22px !important; transition:padding-left .24s ease; }
        body.sidebar-collapsed .main-container { padding-left:calc(var(--app-sidebar-collapsed) + 22px) !important; }
        .sidebar-toggle-top { width:38px; height:38px; padding:0; justify-content:center; flex:0 0 auto; }
        .app-sidebar {
            position:fixed; left:0; top:72px; bottom:0; width:var(--app-sidebar-width); z-index:90;
            background:linear-gradient(180deg,rgba(17,24,39,.99),rgba(8,13,23,.99));
            border-right:1px solid var(--border-color); box-shadow:12px 0 35px rgba(0,0,0,.18);
            display:flex; flex-direction:column; transition:width .24s ease, transform .24s ease; overflow:hidden;
        }
        body.sidebar-collapsed .app-sidebar { width:var(--app-sidebar-collapsed); }
        .sidebar-brand-row { min-height:68px; display:flex; align-items:center; gap:12px; padding:12px 14px; border-bottom:1px solid var(--border-color); }
        .sidebar-logo { width:42px; height:42px; flex:0 0 auto; display:grid; place-items:center; border-radius:13px; background:linear-gradient(135deg,#2563EB,#3B82F6); color:#fff; font-weight:900; font-size:18px; box-shadow:0 8px 22px rgba(37,99,235,.26); }
        .sidebar-brand-copy { min-width:0; display:flex; flex-direction:column; gap:2px; white-space:nowrap; }
        .sidebar-brand-copy strong { color:#F8FAFC; font-size:14px; }
        .sidebar-brand-copy span { color:var(--text-muted); font-size:9px; }
        .sidebar-collapse-button { margin-left:auto; width:30px; height:30px; display:grid; place-items:center; border:1px solid var(--border-color); border-radius:9px; background:rgba(255,255,255,.03); color:#CBD5E1; cursor:pointer; transition:all .18s ease; }
        .sidebar-collapse-button:hover { background:rgba(59,130,246,.16); border-color:rgba(96,165,250,.35); color:#fff; }
        body.sidebar-collapsed .sidebar-brand-copy { display:none; }
        body.sidebar-collapsed .sidebar-brand-row { justify-content:center; padding:12px 8px; }
        body.sidebar-collapsed .sidebar-logo { display:none; }
        body.sidebar-collapsed .sidebar-collapse-button {
            display:grid; margin:0; width:44px; height:44px; border-radius:13px;
            background:linear-gradient(135deg,rgba(37,99,235,.28),rgba(59,130,246,.12));
            border-color:rgba(96,165,250,.36); color:#fff; font-size:24px;
            box-shadow:0 8px 22px rgba(37,99,235,.18);
        }
        .sidebar-reopen-fab {
            position:fixed; top:82px; left:88px; z-index:175; display:none; align-items:center; gap:8px;
            min-height:40px; padding:8px 13px; border:1px solid rgba(96,165,250,.38); border-radius:12px;
            background:linear-gradient(135deg,#2563EB,#3B82F6); color:#fff; font:800 11px var(--font-family);
            cursor:pointer; box-shadow:0 10px 28px rgba(37,99,235,.30); transition:transform .18s ease, box-shadow .18s ease;
        }
        .sidebar-reopen-fab:hover { transform:translateY(-1px); box-shadow:0 13px 32px rgba(37,99,235,.38); }
        .sidebar-reopen-fab .sidebar-reopen-icon { font-size:17px; line-height:1; }
        body.sidebar-collapsed .sidebar-reopen-fab { display:flex; }
        .sidebar-scroll { flex:1; overflow:auto; padding:12px 10px 18px; }
        .sidebar-group { margin-bottom:18px; }
        .sidebar-group-title { padding:0 10px 7px; color:#64748B; font-size:9px; font-weight:900; letter-spacing:.12em; text-transform:uppercase; white-space:nowrap; }
        body.sidebar-collapsed .sidebar-group-title { height:1px; padding:0; margin:8px 12px; background:var(--border-color); color:transparent; overflow:hidden; }
        .sidebar-nav { display:flex; flex-direction:column; gap:5px; }
        .sidebar-nav-button {
            width:100%; min-height:48px; display:flex; align-items:center; gap:11px; padding:8px 10px;
            border:1px solid transparent; border-radius:12px; background:transparent; color:#94A3B8;
            cursor:pointer; text-align:left; font-family:var(--font-family); transition:all .18s ease;
        }
        .sidebar-nav-button:hover { background:rgba(255,255,255,.045); color:#F8FAFC; border-color:rgba(255,255,255,.05); }
        .sidebar-nav-button.active { background:linear-gradient(135deg,rgba(37,99,235,.22),rgba(59,130,246,.10)); color:#fff; border-color:rgba(96,165,250,.34); box-shadow:0 8px 24px rgba(15,23,42,.30); }
        .sidebar-nav-icon { width:32px; height:32px; flex:0 0 auto; display:grid; place-items:center; border-radius:10px; background:rgba(255,255,255,.055); font-size:16px; }
        .sidebar-nav-button.active .sidebar-nav-icon { background:#2563EB; box-shadow:0 6px 16px rgba(37,99,235,.28); }
        .sidebar-nav-copy { min-width:0; display:flex; flex-direction:column; gap:2px; white-space:nowrap; }
        .sidebar-nav-copy strong { font-size:11px; color:inherit; overflow:hidden; text-overflow:ellipsis; }
        .sidebar-nav-copy span { font-size:8.5px; color:#64748B; overflow:hidden; text-overflow:ellipsis; }
        .sidebar-nav-button.active .sidebar-nav-copy span { color:#BFDBFE; }
        body.sidebar-collapsed .sidebar-nav-button { justify-content:center; padding:7px; }
        body.sidebar-collapsed .sidebar-nav-copy { display:none; }
        .sidebar-footer { padding:10px; border-top:1px solid var(--border-color); }
        .sidebar-period-button { width:100%; display:flex; align-items:center; gap:10px; padding:10px; border:1px solid rgba(96,165,250,.20); border-radius:12px; background:rgba(37,99,235,.07); color:#E2E8F0; cursor:pointer; text-align:left; }
        .sidebar-period-button .sidebar-nav-icon { background:rgba(37,99,235,.18); }
        .sidebar-period-copy { min-width:0; display:flex; flex-direction:column; gap:2px; }
        .sidebar-period-copy small { color:#93C5FD; font-size:8px; font-weight:800; text-transform:uppercase; }
        .sidebar-period-copy strong { max-width:190px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:10px; }
        body.sidebar-collapsed .sidebar-period-copy { display:none; }
        body.sidebar-collapsed .sidebar-period-button { justify-content:center; padding:8px; }

        .scope-banner { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 17px; margin-bottom:16px; border:1px solid var(--border-color); border-radius:14px; background:linear-gradient(135deg,rgba(15,23,42,.92),rgba(17,24,39,.88)); }
        .scope-banner-marketing { border-left:4px solid #3B82F6; }
        .scope-banner-commercial { border-left:4px solid #10B981; }
        .scope-banner-copy { display:flex; flex-direction:column; gap:3px; }
        .scope-banner-copy strong { font-size:14px; color:#F8FAFC; }
        .scope-banner-copy span { font-size:10px; color:var(--text-muted); }
        .scope-badge { flex:0 0 auto; padding:7px 10px; border-radius:999px; font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
        .scope-banner-marketing .scope-badge { color:#BFDBFE; background:rgba(59,130,246,.14); }
        .scope-banner-commercial .scope-badge { color:#A7F3D0; background:rgba(16,185,129,.13); }

        .commercial-kpi-grid { display:grid; grid-template-columns:repeat(5,minmax(150px,1fr)); gap:12px; margin-bottom:16px; }
        .commercial-kpi { min-height:108px; padding:15px; border:1px solid var(--border-color); border-radius:14px; background:var(--bg-card); display:flex; flex-direction:column; justify-content:space-between; }
        .commercial-kpi-label { color:var(--text-muted); font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
        .commercial-kpi-value { color:#F8FAFC; font-size:23px; font-weight:800; line-height:1.1; }
        .commercial-kpi-note { color:#64748B; font-size:9px; }
        .commercial-grid { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr); gap:16px; margin-bottom:16px; }
        .commercial-chart-card, .consultant-card { background:var(--bg-card); border:1px solid var(--border-color); border-radius:15px; overflow:hidden; }
        .commercial-card-header { padding:15px 17px 10px; display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
        .commercial-card-header strong { display:block; color:#F8FAFC; font-size:13px; }
        .commercial-card-header span { display:block; margin-top:3px; color:var(--text-muted); font-size:9px; }
        .commercial-chart-stage { height:360px; padding:4px 16px 16px; }
        .commercial-chart-stage canvas { width:100% !important; height:100% !important; }
        .commercial-table-wrap { overflow:auto; max-height:520px; }
        .commercial-table { width:100%; border-collapse:collapse; min-width:920px; }
        .commercial-table th, .commercial-table td { padding:11px 10px; border-bottom:1px solid var(--border-color); text-align:center; font-size:10px; }
        .commercial-table th { position:sticky; top:0; z-index:2; background:#111827; color:#94A3B8; font-size:8px; text-transform:uppercase; letter-spacing:.04em; }
        .commercial-table th:first-child, .commercial-table td:first-child { text-align:left; min-width:180px; }
        .commercial-table tbody tr { cursor:pointer; transition:background .15s; }
        .commercial-table tbody tr:hover, .commercial-table tbody tr.active { background:rgba(59,130,246,.07); }
        .consultant-toolbar { display:flex; align-items:end; gap:10px; flex-wrap:wrap; padding:14px 16px; border-bottom:1px solid var(--border-color); }
        .consultant-toolbar label { display:flex; flex-direction:column; gap:5px; color:var(--text-muted); font-size:9px; font-weight:700; }
        .consultant-toolbar select { min-width:220px; padding:9px 10px; border:1px solid var(--border-color); border-radius:9px; background:#0B1220; color:#F8FAFC; font:500 10px var(--font-family); }
        .consultant-detail-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:16px; }
        .consultant-detail-card { min-height:390px; }
        .consultant-detail-card .commercial-chart-stage { height:330px; }
        .consultant-insight { padding:12px 16px; color:#CBD5E1; font-size:10px; border-top:1px solid var(--border-color); background:rgba(15,23,42,.45); }
        .floating-period-indicator { z-index:95; }

        @media (max-width:1280px) {
            .commercial-kpi-grid { grid-template-columns:repeat(3,minmax(150px,1fr)); }
            .commercial-grid { grid-template-columns:1fr; }
        }
        @media (max-width:900px) {
            .main-container, body.sidebar-collapsed .main-container { padding-left:16px !important; padding-right:16px !important; }
            .app-sidebar { transform:translateX(-105%); width:min(310px,86vw); z-index:160; }
            body.sidebar-mobile-open .app-sidebar { transform:translateX(0); }
            body.sidebar-collapsed .app-sidebar { width:min(310px,86vw); }
            body.sidebar-collapsed .sidebar-brand-copy, body.sidebar-collapsed .sidebar-collapse-button, body.sidebar-collapsed .sidebar-nav-copy, body.sidebar-collapsed .sidebar-period-copy { display:flex; }
            body.sidebar-collapsed .sidebar-logo { display:grid; }
            body.sidebar-collapsed .sidebar-brand-row { justify-content:flex-start; padding:12px 14px; }
            body.sidebar-collapsed .sidebar-collapse-button { margin-left:auto; width:30px; height:30px; border-radius:9px; font-size:16px; box-shadow:none; background:rgba(255,255,255,.03); }
            body.sidebar-collapsed .sidebar-nav-button, body.sidebar-collapsed .sidebar-period-button { justify-content:flex-start; padding:8px 10px; }
            .sidebar-reopen-fab { display:flex; top:74px; left:12px; z-index:150; }
            body.sidebar-mobile-open .sidebar-reopen-fab { display:none !important; }
            .commercial-kpi-grid { grid-template-columns:repeat(2,minmax(140px,1fr)); }
            .consultant-detail-grid { grid-template-columns:1fr; }
        }
        @media (max-width:560px) {
            .commercial-kpi-grid { grid-template-columns:1fr 1fr; gap:9px; }
            .commercial-kpi { min-height:96px; padding:12px; }
            .commercial-kpi-value { font-size:19px; }
            .scope-banner { align-items:flex-start; flex-direction:column; }
        }



        /* V44 — Canal de atendimento via IA (Umbler) e leitura comercial corrigida */
        .scope-banner-commercial { border-left-color:#10B981; }
        .scope-banner-commercial .scope-badge { white-space:nowrap; }
        .commercial-data-rule {
            margin:-4px 0 16px; padding:12px 15px; border:1px solid rgba(16,185,129,.22);
            border-radius:13px; background:rgba(16,185,129,.055); color:#A7F3D0;
            font-size:10px; line-height:1.55;
        }
        .commercial-data-rule strong { color:#D1FAE5; }
        .commercial-data-rule .muted { color:#94A3B8; }
        .commercial-reconciliation-grid {
            display:grid; grid-template-columns:repeat(4,minmax(150px,1fr)); gap:10px;
            padding:14px 16px; border-bottom:1px solid var(--border-color); background:rgba(15,23,42,.38);
        }
        .commercial-reconciliation-item {
            min-height:74px; padding:11px 12px; border:1px solid var(--border-color); border-radius:11px;
            background:rgba(17,24,39,.76); display:flex; flex-direction:column; justify-content:space-between; gap:5px;
        }
        .commercial-reconciliation-item span { color:#64748B; font-size:8px; font-weight:800; text-transform:uppercase; letter-spacing:.045em; }
        .commercial-reconciliation-item strong { color:#F8FAFC; font-size:18px; }
        .commercial-reconciliation-item small { color:#94A3B8; font-size:8px; line-height:1.35; }
        .commercial-reconciliation-item.excluded strong { color:#94A3B8; }
        .commercial-reconciliation-item.linked strong { color:#60A5FA; }
        .commercial-table tbody tr.abc-a { background:rgba(16,185,129,.055); }
        .commercial-table tbody tr.abc-b { background:rgba(245,158,11,.045); }
        .commercial-table tbody tr.abc-c { background:rgba(100,116,139,.035); }
        .abc-pill { display:inline-flex; min-width:25px; justify-content:center; padding:4px 7px; border-radius:999px; font-size:8px; font-weight:900; }
        .abc-pill.a { color:#A7F3D0; background:rgba(16,185,129,.15); }
        .abc-pill.b { color:#FDE68A; background:rgba(245,158,11,.15); }
        .abc-pill.c { color:#CBD5E1; background:rgba(100,116,139,.18); }
        .management-insight-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; padding:0 16px 16px; }
        .management-insight-card { padding:13px; border:1px solid var(--border-color); border-radius:12px; background:rgba(15,23,42,.55); }
        .management-insight-card b { display:block; color:#F8FAFC; font-size:11px; margin-bottom:5px; }
        .management-insight-card span { color:#94A3B8; font-size:9px; line-height:1.45; }
        .management-insight-card.alert { border-color:rgba(245,158,11,.28); background:rgba(245,158,11,.045); }
        .management-insight-card.good { border-color:rgba(16,185,129,.25); background:rgba(16,185,129,.04); }
        .consultant-open-age-wide { grid-column:1 / -1; min-height:400px; }
        .consultant-open-age-wide .commercial-chart-stage { height:330px; }
        @media(max-width:1100px){
            .commercial-reconciliation-grid{grid-template-columns:repeat(2,minmax(150px,1fr));}
            .management-insight-grid{grid-template-columns:1fr;}
        }
        @media(max-width:620px){
            .commercial-reconciliation-grid{grid-template-columns:1fr;}
        }


        /* V47 — separação entre conversão do atendimento via IA (Umbler) e desempenho geral */
        .consultant-analysis-switch {
            display:grid; grid-template-columns:repeat(2,minmax(240px,1fr)); gap:10px;
            margin:0 0 14px; padding:8px; border:1px solid var(--border-color);
            border-radius:16px; background:rgba(15,23,42,.68);
        }
        .consultant-analysis-option {
            appearance:none; border:1px solid transparent; border-radius:13px; padding:14px 16px;
            background:transparent; color:#94A3B8; text-align:left; cursor:pointer; transition:.18s ease;
            display:flex; align-items:center; gap:12px; min-height:72px;
        }
        .consultant-analysis-option:hover { background:rgba(255,255,255,.035); color:#E2E8F0; }
        .consultant-analysis-option.active { background:rgba(59,130,246,.12); border-color:rgba(96,165,250,.34); color:#F8FAFC; box-shadow:0 10px 30px rgba(0,0,0,.12); }
        .consultant-analysis-option[data-mode="general"].active { background:rgba(139,92,246,.11); border-color:rgba(167,139,250,.34); }
        .consultant-analysis-icon { width:38px; height:38px; border-radius:11px; display:grid; place-items:center; flex:0 0 auto; font-size:18px; background:rgba(59,130,246,.14); color:#93C5FD; }
        .consultant-analysis-option[data-mode="general"] .consultant-analysis-icon { background:rgba(139,92,246,.14); color:#C4B5FD; }
        .consultant-analysis-option strong { display:block; font-size:12px; margin-bottom:4px; }
        .consultant-analysis-option span { display:block; font-size:9px; line-height:1.45; color:#94A3B8; }
        .consultant-analysis-panel { display:none; }
        .consultant-analysis-panel.active { display:block; }
        .scope-banner-general { border-left-color:#8B5CF6; background:linear-gradient(90deg,rgba(139,92,246,.10),rgba(15,23,42,.48)); }
        .scope-banner-general .scope-badge { color:#DDD6FE; background:rgba(139,92,246,.15); border-color:rgba(167,139,250,.25); }
        .commercial-data-rule.general { border-color:rgba(139,92,246,.23); background:rgba(139,92,246,.055); color:#DDD6FE; }
        .commercial-data-rule.general strong { color:#EDE9FE; }
        .consultant-separation-note { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-bottom:14px; }
        .consultant-separation-note > div { padding:12px 14px; border:1px solid var(--border-color); border-radius:12px; background:rgba(15,23,42,.48); }
        .consultant-separation-note b { display:block; color:#F8FAFC; font-size:10px; margin-bottom:4px; }
        .consultant-separation-note span { color:#94A3B8; font-size:9px; line-height:1.45; }
        .consultant-wide-chart { grid-column:1 / -1; min-height:420px; }
        .consultant-wide-chart .commercial-chart-stage { height:350px; }
        @media(max-width:760px){
            .consultant-analysis-switch,.consultant-separation-note{grid-template-columns:1fr;}
            .consultant-analysis-option{min-height:64px;}
        }


/* ===== V46 · Análise financeira contratual ===== */
.financial-scope-banner{
    display:flex;align-items:center;justify-content:space-between;gap:18px;
    padding:16px 18px;margin-bottom:14px;border:1px solid rgba(16,185,129,.22);
    border-radius:16px;background:linear-gradient(135deg,rgba(16,185,129,.10),rgba(15,23,42,.72));
}
.financial-scope-banner strong{display:block;font-size:15px;color:#F8FAFC;margin-bottom:4px}
.financial-scope-banner span{font-size:10px;color:#A7F3D0;line-height:1.55}
.financial-scope-pill{flex:0 0 auto;padding:7px 11px;border-radius:999px;background:rgba(16,185,129,.14);
    border:1px solid rgba(52,211,153,.28);color:#6EE7B7!important;font-weight:900;text-transform:uppercase;letter-spacing:.06em}
.financial-toolbar{
    display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;padding:14px;
    border:1px solid var(--border-color);border-radius:15px;background:var(--panel-bg);margin-bottom:14px
}
.financial-toolbar label{display:flex;flex-direction:column;gap:6px;min-width:210px;color:var(--text-muted);
    font-size:8px;font-weight:900;text-transform:uppercase;letter-spacing:.05em}
.financial-toolbar select,.financial-toolbar input{
    height:38px;border:1px solid var(--border-color);background:#172235;color:#F8FAFC;border-radius:9px;padding:0 11px;
    font-size:11px;font-weight:700;outline:none
}
.financial-toolbar input{width:135px}
.financial-toolbar .financial-rule-fields{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap}
.financial-rule-note{flex:1;min-width:260px;color:#94A3B8;font-size:9px;line-height:1.55;padding-bottom:3px}
.financial-warning{
    display:flex;gap:11px;align-items:flex-start;padding:13px 15px;border-radius:13px;margin-bottom:14px;
    background:rgba(245,158,11,.08);border:1px solid rgba(245,158,11,.22);color:#FDE68A;font-size:10px;line-height:1.55
}
.financial-warning strong{color:#FBBF24}
.financial-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}
.financial-kpi{
    min-height:118px;padding:15px;border:1px solid var(--border-color);border-radius:15px;background:var(--panel-bg);
    display:flex;flex-direction:column;justify-content:space-between
}
.financial-kpi-label{font-size:8px;color:#94A3B8;text-transform:uppercase;font-weight:900;letter-spacing:.055em}
.financial-kpi-value{font-size:23px;line-height:1.05;color:#F8FAFC;font-weight:900;letter-spacing:-.035em;margin:12px 0 7px}
.financial-kpi-value.green{color:#34D399}.financial-kpi-value.blue{color:#60A5FA}.financial-kpi-value.amber{color:#FBBF24}.financial-kpi-value.purple{color:#A78BFA}
.financial-kpi-note{font-size:9px;color:#64748B;line-height:1.4}
.financial-chart-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:14px}
.financial-chart-card{border:1px solid var(--border-color);border-radius:16px;background:var(--panel-bg);padding:15px;min-width:0}
.financial-chart-card.wide{grid-column:1/-1}
.financial-chart-header strong{display:block;color:#F8FAFC;font-size:12px;margin-bottom:4px}
.financial-chart-header span{display:block;color:#94A3B8;font-size:9px;line-height:1.45}
.financial-chart-stage{height:330px;margin-top:12px;position:relative}
.financial-chart-card.wide .financial-chart-stage{height:380px}
.financial-table-card{border:1px solid var(--border-color);border-radius:16px;background:var(--panel-bg);overflow:hidden}
.financial-table-header{padding:15px 16px;border-bottom:1px solid var(--border-color)}
.financial-table-header strong{display:block;color:#F8FAFC;font-size:12px;margin-bottom:4px}
.financial-table-header span{color:#94A3B8;font-size:9px;line-height:1.45}
.financial-table-wrap{overflow:auto;max-height:520px}
.financial-table{width:100%;border-collapse:collapse;font-size:9px;white-space:nowrap}
.financial-table th{position:sticky;top:0;z-index:1;background:#111B2C;color:#93C5FD;padding:10px 9px;text-align:right;
    text-transform:uppercase;font-size:7px;letter-spacing:.045em;border-bottom:1px solid var(--border-color)}
.financial-table th:first-child,.financial-table td:first-child{text-align:left}
.financial-table td{padding:10px 9px;text-align:right;border-bottom:1px solid rgba(148,163,184,.10);color:#CBD5E1}
.financial-table tbody tr:hover{background:rgba(59,130,246,.05)}
.financial-table .positive{color:#34D399;font-weight:800}.financial-table .obligation{color:#FBBF24;font-weight:800}
.financial-methodology{
    margin-top:14px;padding:14px 16px;border-radius:14px;border:1px solid var(--border-color);background:rgba(15,23,42,.55);
    color:#94A3B8;font-size:9px;line-height:1.6
}
.financial-methodology summary{cursor:pointer;color:#BFDBFE;font-weight:900;font-size:10px}
.financial-methodology b{color:#E2E8F0}
@media(max-width:1180px){.financial-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){
    .financial-scope-banner{align-items:flex-start;flex-direction:column}
    .financial-kpi-grid,.financial-chart-grid{grid-template-columns:1fr}
    .financial-chart-card.wide{grid-column:auto}
    .financial-chart-stage,.financial-chart-card.wide .financial-chart-stage{height:320px}
    .financial-toolbar label,.financial-rule-note{min-width:100%}
}


/* ===== V47 · UI agrupada e mês atual ===== */
.sidebar-reopen-fab{
    left:8px !important; top:96px !important; width:46px !important; min-width:46px !important; height:46px !important;
    padding:0 !important; border-radius:14px !important; justify-content:center !important; gap:0 !important;
    box-shadow:0 14px 34px rgba(15,23,42,.34) !important; background:linear-gradient(135deg,#1D4ED8,#2563EB) !important;
}
.sidebar-reopen-fab span:last-child{ display:none !important; }
body.sidebar-collapsed .sidebar-reopen-fab{ display:grid !important; }
.top-bar .brand h2{ font-size:28px; letter-spacing:-.03em; }
.top-bar .brand #status{
    color:#8FB3D9 !important; font-size:12px !important; margin-left:14px !important;
    max-width:360px; line-height:1.35;
}
.top-bar .brand .brand-badge{
    font-size:10px !important; padding:7px 10px !important; border-radius:999px !important;
}
#date-range-display{
    font-weight:800 !important; color:#A7F3D0 !important; background:rgba(16,185,129,.10) !important;
    border:1px solid rgba(16,185,129,.22) !important;
}
.floating-period-indicator{
    top:86px !important; bottom:auto !important; right:18px !important;
    border-radius:14px !important; min-width:230px !important;
    background:rgba(15,23,42,.95) !important; border:1px solid rgba(96,165,250,.25) !important;
    box-shadow:0 16px 34px rgba(2,6,23,.36) !important;
}
.floating-period-copy small{ font-size:9px !important; }
.floating-period-copy strong{ font-size:12px !important; max-width:320px !important; }

#tab-overview > .scope-banner{
    margin-bottom:18px !important;
    background:linear-gradient(135deg,rgba(15,23,42,.94),rgba(11,18,32,.92)) !important;
    border:1px solid rgba(96,165,250,.15) !important;
}
#tab-overview > .scope-banner .scope-badge{
    background:rgba(59,130,246,.12) !important;
    border:1px solid rgba(59,130,246,.25) !important;
}

.overview-kpi-sections{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:18px;
    margin-bottom:24px;
}
.overview-kpi-section{
    min-width:0;
    padding:16px;
    border-radius:20px;
    border:1px solid rgba(96,165,250,.10);
    background:linear-gradient(180deg,rgba(12,19,33,.96),rgba(9,15,27,.98));
    box-shadow:0 12px 28px rgba(2,6,23,.22);
}
.overview-kpi-section-head{
    display:flex; align-items:flex-start; gap:12px; margin-bottom:14px;
}
.overview-kpi-section-icon{
    width:42px; height:42px; flex:0 0 42px; display:grid; place-items:center;
    border-radius:14px; font-size:19px; color:#fff; font-weight:900;
    background:linear-gradient(135deg,rgba(59,130,246,.95),rgba(37,99,235,.78));
    box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}
.overview-kpi-section[data-tone="funil"] .overview-kpi-section-icon{ background:linear-gradient(135deg,rgba(16,185,129,.95),rgba(5,150,105,.78)); }
.overview-kpi-section[data-tone="forecast"] .overview-kpi-section-icon{ background:linear-gradient(135deg,rgba(168,85,247,.95),rgba(124,58,237,.78)); }
.overview-kpi-section-head strong{
    display:block; color:#F8FAFC; font-size:14px; letter-spacing:-.02em; margin-bottom:3px;
}
.overview-kpi-section-head span{
    display:block; color:#8CA3C2; font-size:10px; line-height:1.45;
}
.overview-kpi-grid{
    display:grid; grid-template-columns:1fr 1fr; gap:12px;
}
.overview-kpi-grid .kpi-card{
    min-height:126px;
    padding:14px 14px 13px !important;
    border-radius:16px !important;
    position:relative;
    overflow:hidden;
    border:1px solid rgba(148,163,184,.14) !important;
    background:linear-gradient(180deg,rgba(15,23,42,.92),rgba(10,15,27,.96)) !important;
    box-shadow:none !important;
}
.overview-kpi-grid .kpi-card::after{
    content:""; position:absolute; inset:auto 0 0 0; height:3px; background:rgba(59,130,246,.26);
}
.overview-kpi-grid .kpi-card.tone-revenue::after{ background:rgba(16,185,129,.32); }
.overview-kpi-grid .kpi-card.tone-forecast::after{ background:rgba(168,85,247,.35); }
.overview-kpi-grid .kpi-card .kpi-title{ font-size:11px !important; color:#8CA3C2 !important; }
.overview-kpi-grid .kpi-card .kpi-value{ font-size:20px !important; margin:6px 0 !important; }
.overview-kpi-grid .kpi-card .kpi-badge{ font-size:10px !important; }
.kpi-card-icon{
    width:34px; height:34px; display:grid; place-items:center; border-radius:11px;
    margin-bottom:10px; font-size:16px; font-weight:900; color:#E5F0FF;
    background:rgba(59,130,246,.14); border:1px solid rgba(59,130,246,.18);
}
.kpi-card.tone-revenue .kpi-card-icon{ background:rgba(16,185,129,.14); border-color:rgba(16,185,129,.20); color:#D1FAE5; }
.kpi-card.tone-forecast .kpi-card-icon{ background:rgba(168,85,247,.14); border-color:rgba(168,85,247,.20); color:#F3E8FF; }
.overview-compact-note{
    margin:-6px 0 18px;
    color:#94A3B8;
    font-size:11px;
    line-height:1.5;
}
.overview-compact-note strong{ color:#E2E8F0; }
.overview-metric-helper{
    display:inline-flex; align-items:center; gap:6px; margin-top:4px;
    font-size:10px; color:#64748B;
}
.panel.compact-panel{
    border-radius:20px !important;
}
#tab-overview .panel-header-main .header-title-group svg{ opacity:.88; }
@media (max-width:1280px){
    .overview-kpi-sections{ grid-template-columns:1fr; }
}
@media (max-width:760px){
    .overview-kpi-grid{ grid-template-columns:1fr; }
    .floating-period-indicator{ left:14px !important; right:14px !important; min-width:0 !important; }
}


/* ===== V48 · Interface profissional e progressiva ===== */
.executive-view-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    margin:0 0 16px;
    padding:18px 20px;
    border:1px solid rgba(148,163,184,.12);
    border-radius:18px;
    background:linear-gradient(135deg,rgba(17,24,39,.96),rgba(10,17,30,.98));
}
.executive-view-copy{min-width:0}
.executive-view-eyebrow{
    display:block;
    margin-bottom:5px;
    color:#60A5FA;
    font-size:9px;
    font-weight:800;
    letter-spacing:.11em;
    text-transform:uppercase;
}
.executive-view-copy h3{
    margin:0;
    color:#F8FAFC;
    font-size:19px;
    line-height:1.2;
    letter-spacing:-.025em;
}
.executive-view-copy p{
    margin:6px 0 0;
    max-width:720px;
    color:#94A3B8;
    font-size:10px;
    line-height:1.55;
}
.executive-mode-switch{
    display:inline-flex;
    flex:0 0 auto;
    padding:4px;
    border:1px solid rgba(148,163,184,.16);
    border-radius:12px;
    background:rgba(2,6,23,.42);
}
.executive-mode-button{
    min-height:34px;
    padding:7px 13px;
    border:0;
    border-radius:9px;
    background:transparent;
    color:#94A3B8;
    font:800 10px var(--font-family);
    cursor:pointer;
    transition:all .18s ease;
}
.executive-mode-button:hover{color:#E2E8F0}
.executive-mode-button.active{
    color:#fff;
    background:#2563EB;
    box-shadow:0 7px 18px rgba(37,99,235,.24);
}
.executive-guide{
    display:flex;
    align-items:center;
    gap:9px;
    margin:-2px 0 16px;
    padding:10px 13px;
    border-radius:12px;
    background:rgba(59,130,246,.055);
    border:1px solid rgba(59,130,246,.10);
    color:#94A3B8;
    font-size:10px;
    line-height:1.45;
}
.executive-guide svg{width:16px;height:16px;flex:0 0 16px;color:#60A5FA}
.executive-guide b{color:#DCEAFE}
.overview-kpi-section-icon,
.kpi-card-icon{
    font-size:0 !important;
}
.overview-kpi-section-icon svg{
    width:20px;
    height:20px;
    stroke:currentColor;
}
.kpi-card-icon svg{
    width:17px;
    height:17px;
    stroke:currentColor;
}
.overview-kpi-section{
    position:relative;
}
.overview-kpi-section::before{
    content:"";
    position:absolute;
    left:16px;
    right:16px;
    top:0;
    height:1px;
    background:linear-gradient(90deg,transparent,rgba(148,163,184,.12),transparent);
}
.overview-kpi-section-head strong{font-size:13px !important}
.overview-kpi-section-head span{font-size:9px !important}
.overview-kpi-grid .kpi-card{
    transition:transform .16s ease,border-color .16s ease,background .16s ease;
}
.overview-kpi-grid .kpi-card:hover{
    transform:translateY(-2px);
    border-color:rgba(96,165,250,.22) !important;
    background:linear-gradient(180deg,rgba(19,29,49,.96),rgba(11,18,31,.98)) !important;
}
.overview-kpi-sections[data-ui-mode="executive"] .kpi-card[data-ui-essential="0"]{
    display:none !important;
}
.overview-kpi-sections[data-ui-mode="executive"] .overview-kpi-section[data-ui-empty="1"]{
    display:none !important;
}
.overview-kpi-sections[data-ui-mode="executive"]{
    grid-template-columns:repeat(3,minmax(0,1fr));
}
.overview-kpi-sections[data-ui-mode="executive"] .overview-kpi-grid{
    grid-template-columns:1fr;
}
.overview-kpi-sections[data-ui-mode="executive"] .overview-kpi-grid .kpi-card{
    min-height:116px;
}
.overview-kpi-sections[data-ui-mode="complete"]{
    grid-template-columns:repeat(3,minmax(0,1fr));
}
.overview-kpi-sections[data-ui-mode="complete"] .overview-kpi-grid{
    grid-template-columns:1fr 1fr;
}
.overview-detail-hint{
    display:none;
    margin:-8px 0 18px;
    color:#64748B;
    font-size:9px;
}
body.ui-executive-mode .overview-detail-hint{display:block}
.sidebar-nav-icon{
    font-size:0 !important;
}
.sidebar-nav-icon svg{
    width:17px;
    height:17px;
    stroke:currentColor;
}
.sidebar-logo{
    font-size:0 !important;
}
.sidebar-logo::after{
    content:"AP";
    font-size:12px;
    font-weight:900;
    letter-spacing:-.04em;
}
.sidebar-reopen-icon{
    font-size:0 !important;
}
.sidebar-reopen-icon svg{
    width:18px;
    height:18px;
    stroke:currentColor;
}
@media(max-width:1320px){
    .overview-kpi-sections[data-ui-mode="executive"],
    .overview-kpi-sections[data-ui-mode="complete"]{
        grid-template-columns:1fr;
    }
    .overview-kpi-sections[data-ui-mode="executive"] .overview-kpi-grid{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }
}
@media(max-width:860px){
    .executive-view-header{align-items:flex-start;flex-direction:column}
    .executive-mode-switch{width:100%}
    .executive-mode-button{flex:1}
    .overview-kpi-sections[data-ui-mode="executive"] .overview-kpi-grid,
    .overview-kpi-sections[data-ui-mode="complete"] .overview-kpi-grid{
        grid-template-columns:1fr;
    }
}


/* ===== V49 · Histórico diário e comparação anual ===== */
.yoy-scope-banner{
    display:flex;align-items:center;justify-content:space-between;gap:18px;
    margin-bottom:14px;padding:18px 20px;border:1px solid rgba(96,165,250,.16);
    border-radius:18px;background:linear-gradient(135deg,rgba(17,24,39,.97),rgba(10,17,30,.98));
}
.yoy-eyebrow{display:block;margin-bottom:5px;color:#60A5FA;font-size:9px;font-weight:900;letter-spacing:.1em;text-transform:uppercase}
.yoy-scope-banner strong{display:block;color:#F8FAFC;font-size:18px;letter-spacing:-.025em}
.yoy-scope-banner p{margin:6px 0 0;color:#94A3B8;font-size:10px;line-height:1.5}
.yoy-coverage-pill{flex:0 0 auto;padding:8px 11px;border-radius:999px;border:1px solid rgba(16,185,129,.22);background:rgba(16,185,129,.09);color:#6EE7B7;font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.05em}
.yoy-toolbar{
    display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin-bottom:14px;padding:14px;
    border:1px solid var(--border-color);border-radius:16px;background:var(--bg-card)
}
.yoy-toolbar label{display:flex;flex-direction:column;gap:6px;min-width:170px;color:#94A3B8;font-size:8px;font-weight:900;text-transform:uppercase;letter-spacing:.055em}
.yoy-toolbar select{height:39px;padding:0 11px;border:1px solid var(--border-color);border-radius:9px;background:#172235;color:#F8FAFC;font:700 11px var(--font-family);outline:none}
.yoy-toolbar-note{flex:1;min-width:280px;padding-bottom:3px;color:#94A3B8;font-size:9px;line-height:1.55}
.yoy-toolbar-note b{color:#E2E8F0}
.yoy-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}
.yoy-kpi{
    min-height:112px;padding:15px;border:1px solid var(--border-color);border-radius:16px;
    background:linear-gradient(180deg,rgba(17,24,39,.96),rgba(10,17,29,.98));display:flex;flex-direction:column;justify-content:space-between
}
.yoy-kpi span{color:#94A3B8;font-size:8px;font-weight:900;text-transform:uppercase;letter-spacing:.055em}
.yoy-kpi strong{margin:10px 0 6px;color:#F8FAFC;font-size:25px;letter-spacing:-.04em}
.yoy-kpi small{color:#64748B;font-size:9px;line-height:1.4}
.yoy-kpi-highlight{border-color:rgba(59,130,246,.28);background:linear-gradient(145deg,rgba(17,24,39,.98),rgba(37,99,235,.08))}
.yoy-positive{color:#34D399!important}.yoy-negative{color:#F87171!important}.yoy-neutral{color:#CBD5E1!important}
.yoy-chart-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:14px}
.yoy-chart-card{min-width:0;margin-bottom:14px;padding:16px;border:1px solid var(--border-color);border-radius:18px;background:var(--bg-card)}
.yoy-chart-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.yoy-chart-header strong{display:block;color:#F8FAFC;font-size:13px;margin-bottom:4px}
.yoy-chart-header span{display:block;color:#94A3B8;font-size:9px;line-height:1.45}
.yoy-chart-stage{height:380px;margin-top:12px;position:relative}
.yoy-chart-stage-small{height:310px}
.yoy-table-card{overflow:hidden;border:1px solid var(--border-color);border-radius:18px;background:var(--bg-card)}
.yoy-table-header{padding:15px 16px;border-bottom:1px solid var(--border-color)}
.yoy-table-header strong{display:block;color:#F8FAFC;font-size:12px;margin-bottom:4px}
.yoy-table-header span{color:#94A3B8;font-size:9px}
.yoy-table-wrap{overflow:auto;max-height:520px}
.yoy-table{width:100%;border-collapse:collapse;font-size:10px;white-space:nowrap}
.yoy-table th{position:sticky;top:0;z-index:1;padding:10px;background:#111B2C;color:#93C5FD;text-align:right;text-transform:uppercase;font-size:7px;letter-spacing:.05em;border-bottom:1px solid var(--border-color)}
.yoy-table td{padding:10px;text-align:right;color:#CBD5E1;border-bottom:1px solid rgba(148,163,184,.10)}
.yoy-table th:first-child,.yoy-table td:first-child{text-align:left}
.yoy-table tbody tr:hover{background:rgba(59,130,246,.05)}
.yoy-methodology{margin-top:14px;padding:14px 16px;border:1px solid var(--border-color);border-radius:14px;background:rgba(15,23,42,.55);color:#94A3B8;font-size:9px;line-height:1.6}
.yoy-methodology summary{cursor:pointer;color:#BFDBFE;font-size:10px;font-weight:900}
.yoy-methodology b{color:#E2E8F0}
.forecast-history-banner{
    display:flex;align-items:center;gap:10px;margin:0 0 13px;padding:11px 13px;border:1px solid rgba(16,185,129,.18);
    border-radius:12px;background:rgba(16,185,129,.055);color:#A7F3D0;font-size:9px;line-height:1.5
}
.forecast-history-banner svg{width:17px;height:17px;flex:0 0 17px;stroke:#34D399}
.forecast-history-banner.is-limited{border-color:rgba(148,163,184,.14);background:rgba(148,163,184,.045);color:#94A3B8}
.historical-import-card{
    margin-top:14px;padding:14px 16px;border:1px solid rgba(96,165,250,.18);border-radius:15px;
    background:linear-gradient(135deg,rgba(59,130,246,.065),rgba(15,23,42,.5))
}
.historical-import-card-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:8px}
.historical-import-card strong{display:block;color:#F8FAFC;font-size:12px}
.historical-import-card span{display:block;color:#94A3B8;font-size:9px;line-height:1.5}
.historical-import-card label{cursor:pointer}
@media(max-width:1100px){.yoy-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.yoy-chart-grid{grid-template-columns:1fr}}
@media(max-width:720px){.yoy-scope-banner{align-items:flex-start;flex-direction:column}.yoy-kpi-grid{grid-template-columns:1fr}.yoy-toolbar label,.yoy-toolbar-note{min-width:100%}.yoy-chart-stage{height:320px}}


/* ===== V50 · Previsão histórica, cenários e memória permanente ===== */
.forecast-scenarios-panel{
    margin-bottom:16px;
    padding:17px;
    border:1px solid rgba(96,165,250,.17);
    border-radius:18px;
    background:linear-gradient(145deg,rgba(17,24,39,.97),rgba(9,16,29,.99));
}
.forecast-scenarios-header{
    display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px
}
.forecast-scenarios-eyebrow{
    display:block;margin-bottom:5px;color:#60A5FA;font-size:8px;font-weight:900;letter-spacing:.1em;text-transform:uppercase
}
.forecast-scenarios-header strong{display:block;color:#F8FAFC;font-size:14px;margin-bottom:4px}
.forecast-scenarios-header p{margin:0;max-width:760px;color:#94A3B8;font-size:9px;line-height:1.5}
.forecast-scenarios-badge{
    flex:0 0 auto;padding:7px 10px;border:1px solid rgba(96,165,250,.20);border-radius:999px;
    background:rgba(59,130,246,.08);color:#BFDBFE;font-size:8px;font-weight:900;text-transform:uppercase;letter-spacing:.05em
}
.forecast-scenarios-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px}
.forecast-scenario-card{
    min-height:112px;padding:14px;border:1px solid rgba(148,163,184,.13);border-radius:14px;
    background:rgba(15,23,42,.74);display:flex;flex-direction:column;justify-content:space-between
}
.forecast-scenario-card.primary{
    border-color:rgba(59,130,246,.30);background:linear-gradient(145deg,rgba(37,99,235,.13),rgba(15,23,42,.82))
}
.forecast-scenario-card span{color:#94A3B8;font-size:8px;font-weight:900;text-transform:uppercase;letter-spacing:.045em}
.forecast-scenario-card strong{margin:10px 0 7px;color:#F8FAFC;font-size:23px;letter-spacing:-.035em}
.forecast-scenario-card.primary strong{color:#60A5FA}
.forecast-scenario-card small{color:#64748B;font-size:8.5px;line-height:1.45}
.forecast-scenario-chart-stage{height:285px;margin-top:14px;position:relative}
.forecast-scenario-footnote{
    margin-top:9px;color:#64748B;font-size:8.5px;line-height:1.5
}
.forecast-history-proof{
    display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:9px
}
.forecast-history-proof span{
    padding:7px 9px;border-radius:9px;background:rgba(2,6,23,.26);color:#94A3B8;font-size:8px
}
.forecast-history-proof b{display:block;color:#E2E8F0;font-size:10px;margin-top:2px}
.forecast-snapshot-select option[value="__LEDGER__"]{font-weight:800}
.forecast-ledger-note{
    display:inline-flex;align-items:center;gap:7px;color:#93C5FD;font-size:8.5px;margin-top:6px
}
.yoy-all-years-note{
    margin:0 0 12px;padding:10px 12px;border:1px solid rgba(59,130,246,.12);border-radius:11px;
    background:rgba(59,130,246,.045);color:#94A3B8;font-size:9px;line-height:1.5
}
.yoy-table thead th{min-width:88px}
@media(max-width:1120px){.forecast-scenarios-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.forecast-scenarios-header{flex-direction:column}.forecast-scenarios-grid{grid-template-columns:1fr}.forecast-history-proof{grid-template-columns:1fr}}


/* ===== V51 · tema executivo roxo gradiente ===== */
:root{
    --bg-main:#090611;
    --bg-card:#120D22;
    --bg-card-2:#17112b;
    --bg-hover:#21163b;
    --border-color:rgba(184,167,255,.14);
    --text-main:#F8FAFF;
    --text-muted:#A6AAC9;
    --accent-primary:#8B5CF6;
    --accent-secondary:#22D3EE;
    --accent-success:#34D399;
    --accent-danger:#FB7185;
}
body{
    background:
        radial-gradient(1200px 560px at -8% -10%, rgba(236,72,153,.18), transparent 60%),
        radial-gradient(900px 540px at 110% 0%, rgba(59,130,246,.14), transparent 58%),
        linear-gradient(180deg,#0b0716 0%, #090611 100%);
    color:var(--text-main);
}
body::before{
    content:'';position:fixed;inset:0;pointer-events:none;opacity:.45;
    background:linear-gradient(135deg, rgba(139,92,246,.06), transparent 24%, rgba(34,211,238,.05) 60%, transparent 100%);
}
.top-bar{
    position:sticky;top:0;z-index:50;
    height:auto;padding:14px 22px;
    background:linear-gradient(180deg, rgba(9,6,17,.94), rgba(9,6,17,.88));
    backdrop-filter: blur(14px);
    border-bottom:1px solid rgba(184,167,255,.10);
    box-shadow:0 12px 28px rgba(2,6,23,.22);
}
.brand h2{font-size:24px;letter-spacing:-.03em}
.brand-badge{
    border:1px solid rgba(167,139,250,.18)!important;
    background:rgba(139,92,246,.12)!important;
    color:#DDD6FE!important;
}
#status{color:#C4B5FD!important;font-weight:600}
.btn{
    border-radius:14px;border:1px solid rgba(184,167,255,.14);
    box-shadow:none;
}
.btn-primary{
    background:linear-gradient(135deg,#8B5CF6,#7C3AED)!important;
    border-color:rgba(167,139,250,.22)!important;
}
.btn-secondary{background:rgba(255,255,255,.03)!important}
#main-container{gap:16px;max-width:1600px;width:calc(100% - 28px);margin:16px auto 0}
.app-sidebar{
    border-radius:26px;overflow:hidden;
    background:linear-gradient(180deg, rgba(22,17,43,.96), rgba(10,8,21,.98));
    border:1px solid rgba(184,167,255,.12);
    box-shadow:0 20px 50px rgba(2,6,23,.32);
}
.sidebar-brand-row{padding:18px 18px 14px;border-bottom:1px solid rgba(184,167,255,.10)}
.sidebar-logo{
    background:linear-gradient(135deg,#A855F7,#22D3EE)!important;
    color:#fff;box-shadow:0 10px 24px rgba(168,85,247,.30)
}
.sidebar-brand-copy span,.sidebar-group-title{color:#9DA3C6!important}
.sidebar-nav-button{
    border-radius:18px;
    border:1px solid transparent;
    background:rgba(255,255,255,.02);
    transition:all .2s ease;
}
.sidebar-nav-button:hover{background:rgba(139,92,246,.10);border-color:rgba(167,139,250,.14);transform:translateY(-1px)}
.sidebar-nav-button.active{
    background:linear-gradient(135deg, rgba(139,92,246,.16), rgba(34,211,238,.08));
    border-color:rgba(167,139,250,.18);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
}
.sidebar-nav-icon{
    width:34px;height:34px;border-radius:12px;display:grid;place-items:center;
    background:linear-gradient(135deg, rgba(139,92,246,.18), rgba(34,211,238,.10));
    color:#E9D5FF;font-weight:800;font-size:14px;
}
.sidebar-period-button{border-radius:18px;background:rgba(255,255,255,.03);border:1px solid rgba(184,167,255,.12)}
.sidebar-reopen-fab{
    left:14px;top:84px;transform:none;border-radius:16px;padding:10px 12px;
    background:linear-gradient(135deg, rgba(139,92,246,.95), rgba(124,58,237,.95));
    box-shadow:0 14px 30px rgba(76,29,149,.35);
}
.report-workspace-header{gap:14px}
.report-workspace-card, .scope-banner, .forecast-scenarios-panel, .yoy-chart-card, .yoy-table-card,
.overview-kpi-section, .financial-panel, .consultant-panel, .profile-panel, .period-modal-content,
.import-center-content, .modal-content, .commercial-panel, .forecast-panel, .yoy-kpi, .kpi-card, .chart-card, .table-wrap{
    background:linear-gradient(180deg, rgba(18,13,34,.96), rgba(12,9,24,.98))!important;
    border:1px solid rgba(184,167,255,.10)!important;
    box-shadow:0 16px 36px rgba(2,6,23,.20);
}
.floating-period-indicator{display:none!important}
#tab-overview .kpi-card, .mini-kpi-card, .forecast-scenario-card, .yoy-kpi{
    background:linear-gradient(180deg, rgba(27,20,49,.90), rgba(17,13,33,.96))!important;
}
.table-card table, table{border-color:rgba(184,167,255,.10)!important}
th{color:#C4B5FD!important}
.tab-content{padding-bottom:24px}
.report-workspace-title strong,.scope-banner strong,.overview-kpi-section-head strong{font-size:18px}
.report-workspace-title p,.scope-banner p{color:#9DA3C6}
#report-workspace-header .report-workspace-card{min-height:unset}
.report-workspace-card{padding:16px 18px;border-radius:24px}
.report-workspace-status{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.report-workspace-status .status-pill{
    padding:7px 10px;border-radius:999px;font-size:11px;font-weight:700;
    background:rgba(139,92,246,.12);border:1px solid rgba(167,139,250,.14);color:#E9D5FF;
}
.sim-lab-hero{
    display:grid;grid-template-columns:1.2fr .8fr;gap:16px;margin-bottom:18px;
}
.sim-lab-head{
    padding:22px;border-radius:26px;background:linear-gradient(135deg, rgba(91,33,182,.26), rgba(17,13,33,.96) 54%, rgba(8,145,178,.18));
    border:1px solid rgba(184,167,255,.14);box-shadow:0 18px 36px rgba(2,6,23,.22)
}
.sim-lab-head h2{margin:0 0 8px;font-size:26px;letter-spacing:-.03em}
.sim-lab-head p{margin:0;color:#C7CBE6;line-height:1.6}
.sim-lab-highlights{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:14px}
.sim-chip{
    padding:12px 14px;border-radius:18px;background:rgba(10,8,21,.52);
    border:1px solid rgba(184,167,255,.12)
}
.sim-chip span{display:block;color:#9DA3C6;font-size:11px;text-transform:uppercase;letter-spacing:.08em;font-weight:700}
.sim-chip strong{display:block;margin-top:6px;font-size:22px;letter-spacing:-.03em}
.sim-lab-kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.sim-kpi{
    padding:16px;border-radius:22px;background:linear-gradient(180deg, rgba(18,13,34,.97), rgba(11,9,23,.98));
    border:1px solid rgba(184,167,255,.12)
}
.sim-kpi span{display:block;color:#9DA3C6;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.08em}
.sim-kpi strong{display:block;margin-top:10px;font-size:28px;letter-spacing:-.04em}
.sim-kpi small{display:block;margin-top:6px;color:#B7BDE0;line-height:1.45}
.sim-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.sim-grid.sim-grid-full{grid-template-columns:1.1fr .9fr}
.sim-card{
    padding:18px;border-radius:24px;background:linear-gradient(180deg, rgba(18,13,34,.96), rgba(10,8,21,.99));
    border:1px solid rgba(184,167,255,.10);box-shadow:0 14px 32px rgba(2,6,23,.22)
}
.sim-card h3{margin:0 0 8px;font-size:18px;letter-spacing:-.02em}
.sim-card p{margin:0 0 16px;color:#AEB4D2;line-height:1.55}
.sim-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.sim-field{display:flex;flex-direction:column;gap:7px}
.sim-field label{font-size:11px;color:#C4B5FD;text-transform:uppercase;letter-spacing:.08em;font-weight:700}
.sim-field select,.sim-field input{
    height:44px;border-radius:14px;border:1px solid rgba(184,167,255,.12);
    background:rgba(255,255,255,.03);color:#F8FAFF;padding:0 12px;font:inherit
}
.sim-output-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:14px}
.sim-output{
    padding:14px;border-radius:18px;background:rgba(255,255,255,.03);border:1px solid rgba(184,167,255,.10)
}
.sim-output span{display:block;color:#9DA3C6;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.08em}
.sim-output strong{display:block;margin-top:8px;font-size:22px;letter-spacing:-.03em}
.sim-output small{display:block;margin-top:5px;color:#B9C0E1;line-height:1.45}
.sim-note{margin-top:14px;padding:12px 14px;border-radius:16px;background:rgba(91,33,182,.10);border:1px solid rgba(167,139,250,.14);color:#D7D9EE;line-height:1.55}
.sim-table{width:100%;border-collapse:collapse;margin-top:14px}
.sim-table th,.sim-table td{padding:10px 8px;border-bottom:1px solid rgba(184,167,255,.09);font-size:13px;text-align:left}
.sim-table th{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#C4B5FD}
.sim-tag{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;background:rgba(34,211,238,.10);border:1px solid rgba(34,211,238,.16);color:#B8F4FF;font-size:11px;font-weight:700}
.sim-success{color:#6EE7B7}.sim-primary{color:#C4B5FD}.sim-danger{color:#FDA4AF}
.region-map-wrap{display:grid;grid-template-columns:1fr .72fr;gap:16px;align-items:center}
.region-map-stage{padding:8px;border-radius:18px;background:rgba(255,255,255,.03);border:1px solid rgba(184,167,255,.10)}
.region-map-stage svg{width:100%;height:auto;display:block}
.region-shape{stroke:rgba(255,255,255,.18);stroke-width:2;transition:all .2s ease}
.region-label{font-size:13px;fill:#E9D5FF;font-weight:700}
.region-value{font-size:11px;fill:#C7D2FE}
.region-rank{display:flex;flex-direction:column;gap:8px}
.region-rank-item{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-radius:14px;background:rgba(255,255,255,.03);border:1px solid rgba(184,167,255,.09)}
.region-rank-item strong{font-size:13px}.region-rank-item span{color:#B8BDE0;font-size:12px}
.profile-chart-card.profile-region-map{grid-column:span 2}
.profile-chart-card.profile-region-map .profile-chart-canvas{height:auto;min-height:320px}
@media(max-width:1200px){
    .sim-lab-hero,.sim-grid,.sim-grid.sim-grid-full,.region-map-wrap{grid-template-columns:1fr}
    .sim-lab-highlights,.sim-lab-kpis,.sim-output-grid,.sim-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
    #main-container{width:calc(100% - 12px);margin-top:10px}
    .sim-lab-highlights,.sim-lab-kpis,.sim-output-grid,.sim-form-grid{grid-template-columns:1fr}
    .profile-chart-card.profile-region-map{grid-column:span 1}
}


/* ===== V52 · plano de metas por origem ===== */
.origin-plan-card{
    margin:18px 0;
    padding:20px;
    border-radius:26px;
    background:
        radial-gradient(700px 260px at 100% 0%,rgba(34,211,238,.08),transparent 60%),
        linear-gradient(180deg,rgba(18,13,34,.97),rgba(9,7,20,.99));
    border:1px solid rgba(184,167,255,.12);
    box-shadow:0 18px 40px rgba(2,6,23,.24);
}
.origin-plan-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
    margin-bottom:16px
}
.origin-plan-header h3{
    margin:6px 0 7px;
    font-size:21px;
    letter-spacing:-.025em
}
.origin-plan-header p{
    margin:0;
    max-width:850px;
    color:#AEB4D2;
    line-height:1.55
}
.origin-plan-badge{
    flex:0 0 auto;
    padding:8px 11px;
    border-radius:999px;
    background:rgba(34,211,238,.08);
    border:1px solid rgba(34,211,238,.15);
    color:#B8F4FF;
    font-size:10px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.07em
}
.origin-plan-form{
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:11px;
    padding:14px;
    border-radius:20px;
    background:rgba(255,255,255,.025);
    border:1px solid rgba(184,167,255,.09)
}
.origin-plan-field{
    display:flex;
    flex-direction:column;
    gap:7px;
    min-width:0
}
.origin-plan-field label{
    color:#C4B5FD;
    font-size:10px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.075em
}
.origin-plan-field select,
.origin-plan-field input{
    height:43px;
    width:100%;
    box-sizing:border-box;
    border-radius:13px;
    border:1px solid rgba(184,167,255,.12);
    background:rgba(255,255,255,.035);
    color:#F8FAFF;
    padding:0 11px;
    font:inherit;
    outline:none
}
.origin-plan-field input:focus,
.origin-plan-field select:focus{
    border-color:rgba(167,139,250,.42);
    box-shadow:0 0 0 3px rgba(139,92,246,.10)
}
.origin-plan-field small{
    color:#858CAF;
    font-size:9px;
    line-height:1.4
}
.origin-plan-summary{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:11px;
    margin:14px 0
}
.origin-summary-kpi{
    min-height:105px;
    padding:14px;
    border-radius:19px;
    background:linear-gradient(180deg,rgba(27,20,49,.85),rgba(14,10,27,.96));
    border:1px solid rgba(184,167,255,.10)
}
.origin-summary-kpi span{
    display:block;
    color:#989FC3;
    font-size:9px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.07em
}
.origin-summary-kpi strong{
    display:block;
    margin-top:11px;
    font-size:23px;
    letter-spacing:-.035em
}
.origin-summary-kpi small{
    display:block;
    margin-top:6px;
    color:#ABB2D2;
    line-height:1.4
}
.origin-plan-sentence{
    padding:14px 16px;
    margin-bottom:14px;
    border-radius:18px;
    background:linear-gradient(135deg,rgba(139,92,246,.12),rgba(34,211,238,.06));
    border:1px solid rgba(167,139,250,.15);
    color:#E6E3F5;
    font-size:14px;
    line-height:1.6
}
.origin-plan-sentence b{color:#F8FAFF}
.origin-plan-layout{
    display:grid;
    grid-template-columns:1.15fr .85fr;
    gap:14px
}
.origin-plan-panel{
    padding:15px;
    border-radius:21px;
    background:rgba(255,255,255,.025);
    border:1px solid rgba(184,167,255,.09);
    min-width:0
}
.origin-plan-panel h4{
    margin:0 0 4px;
    font-size:15px
}
.origin-plan-panel > p{
    margin:0 0 12px;
    color:#9299BD;
    font-size:11px;
    line-height:1.5
}
.origin-plan-chart{
    height:330px;
    position:relative
}
.origin-plan-table-wrap{
    max-height:420px;
    overflow:auto;
    border-radius:15px;
    border:1px solid rgba(184,167,255,.08)
}
.origin-plan-table{
    width:100%;
    border-collapse:collapse;
    min-width:760px
}
.origin-plan-table th{
    position:sticky;
    top:0;
    z-index:1;
    background:#17112B;
    color:#C4B5FD;
    padding:10px 9px;
    text-align:right;
    font-size:9px;
    text-transform:uppercase;
    letter-spacing:.065em
}
.origin-plan-table td{
    padding:10px 9px;
    text-align:right;
    border-bottom:1px solid rgba(184,167,255,.08);
    color:#D8DBED;
    font-size:12px
}
.origin-plan-table th:first-child,
.origin-plan-table td:first-child{text-align:left}
.origin-plan-table tbody tr:hover{background:rgba(139,92,246,.055)}
.origin-plan-source{
    display:flex;
    align-items:center;
    gap:9px;
    font-weight:700
}
.origin-plan-dot{
    width:10px;
    height:10px;
    flex:0 0 10px;
    border-radius:50%
}
.origin-plan-cost{
    color:#6EE7B7!important;
    font-weight:800
}
.origin-plan-no-cost{
    color:#8D94B8!important
}
.origin-plan-pressure{
    display:inline-flex;
    padding:5px 8px;
    border-radius:999px;
    font-size:10px;
    font-weight:800
}
.origin-plan-pressure.ok{
    color:#A7F3D0;
    background:rgba(16,185,129,.09);
    border:1px solid rgba(16,185,129,.14)
}
.origin-plan-pressure.medium{
    color:#FDE68A;
    background:rgba(245,158,11,.09);
    border:1px solid rgba(245,158,11,.14)
}
.origin-plan-pressure.high{
    color:#FDA4AF;
    background:rgba(244,63,94,.09);
    border:1px solid rgba(244,63,94,.14)
}
.origin-campaign-allocation{
    margin-top:14px
}
.origin-data-warning{
    margin-top:13px;
    padding:12px 14px;
    border-radius:16px;
    background:rgba(245,158,11,.055);
    border:1px solid rgba(245,158,11,.12);
    color:#D8D2BA;
    font-size:10px;
    line-height:1.55
}
.origin-data-warning b{color:#FDE68A}
.origin-confidence{
    display:inline-flex;
    align-items:center;
    gap:7px
}
.origin-confidence::before{
    content:"";
    width:8px;
    height:8px;
    border-radius:50%;
    background:#94A3B8
}
.origin-confidence.high::before{background:#34D399}
.origin-confidence.medium::before{background:#FBBF24}
.origin-confidence.low::before{background:#FB7185}
@media(max-width:1350px){
    .origin-plan-form{grid-template-columns:repeat(3,minmax(0,1fr))}
    .origin-plan-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:1000px){
    .origin-plan-layout{grid-template-columns:1fr}
}
@media(max-width:720px){
    .origin-plan-header{flex-direction:column}
    .origin-plan-form{grid-template-columns:1fr}
    .origin-plan-summary{grid-template-columns:1fr}
}


/* ===== V53 · encaixe da navegação, storytelling e performance ===== */
.main-container{
    align-items:flex-start!important;
    overflow:visible!important;
}
.app-sidebar{
    position:sticky!important;
    top:84px!important;
    height:calc(100vh - 102px)!important;
    min-height:560px!important;
    align-self:flex-start!important;
    overflow:hidden!important;
}
.sidebar-scroll{
    height:calc(100% - 142px)!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
    scrollbar-width:thin;
}
.sidebar-footer{margin-top:auto!important}
.sidebar-reopen-fab{
    display:none!important;
    position:fixed!important;
    left:0!important;
    top:112px!important;
    bottom:auto!important;
    min-width:44px!important;
    width:44px!important;
    height:48px!important;
    padding:0!important;
    border-radius:0 15px 15px 0!important;
    justify-content:center!important;
    z-index:1200!important;
}
.sidebar-reopen-fab span:last-child{display:none!important}
body.sidebar-collapsed .sidebar-reopen-fab{display:flex!important}
.floating-period-indicator{
    display:flex!important;
    position:fixed!important;
    right:18px!important;
    bottom:18px!important;
    top:auto!important;
    left:auto!important;
    z-index:1250!important;
    min-width:236px!important;
    max-width:calc(100vw - 36px)!important;
    border-radius:16px!important;
    background:linear-gradient(135deg,rgba(27,20,49,.97),rgba(13,10,26,.98))!important;
    border:1px solid rgba(167,139,250,.24)!important;
    box-shadow:0 18px 40px rgba(2,6,23,.38)!important;
}
.floating-period-indicator:hover{transform:translateY(-2px)}
.floating-period-icon{
    background:linear-gradient(135deg,rgba(139,92,246,.25),rgba(34,211,238,.14))!important;
    color:#E9D5FF!important;
}
.report-workspace-header{position:relative!important;top:auto!important}

/* Consultoras: navegação interna */
.consultant-analysis-switch{
    position:sticky;
    top:82px;
    z-index:20;
    padding:8px!important;
    border-radius:18px!important;
    background:rgba(9,6,17,.93)!important;
    backdrop-filter:blur(14px);
    box-shadow:0 10px 28px rgba(2,6,23,.24);
}
.consultant-analysis-option{
    min-height:66px!important;
    border-radius:14px!important;
}
.consultant-analysis-option[data-mode="mix"] .consultant-analysis-icon{
    background:linear-gradient(135deg,rgba(34,211,238,.17),rgba(139,92,246,.16));
}
.consultant-mix-panel{display:none}
.consultant-mix-panel.active{display:block;animation:fadeIn .22s ease}
.consultant-mix-hero{
    display:flex;align-items:flex-start;justify-content:space-between;gap:18px;
    padding:19px 20px;margin:14px 0;border-radius:22px;
    background:linear-gradient(135deg,rgba(34,211,238,.08),rgba(139,92,246,.10),rgba(17,13,33,.98));
    border:1px solid rgba(167,139,250,.13)
}
.consultant-mix-hero h3{margin:0 0 6px;font-size:19px}
.consultant-mix-hero p{margin:0;color:#AEB4D2;line-height:1.55}
.consultant-mix-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:11px;margin-bottom:14px}
.consultant-mix-kpi{
    min-height:108px;padding:14px;border-radius:18px;
    background:linear-gradient(180deg,rgba(27,20,49,.88),rgba(13,10,26,.98));
    border:1px solid rgba(184,167,255,.10)
}
.consultant-mix-kpi span{display:block;color:#979EC2;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.065em}
.consultant-mix-kpi strong{display:block;margin-top:11px;font-size:24px;letter-spacing:-.035em}
.consultant-mix-kpi small{display:block;margin-top:6px;color:#AEB4D2;line-height:1.4}
.consultant-mix-grid{display:grid;grid-template-columns:1.25fr .75fr;gap:14px;margin-bottom:14px}
.consultant-mix-card{
    padding:16px;border-radius:21px;background:linear-gradient(180deg,rgba(18,13,34,.96),rgba(10,8,21,.99));
    border:1px solid rgba(184,167,255,.10)
}
.consultant-mix-card h4{margin:0 0 4px;font-size:15px}
.consultant-mix-card p{margin:0 0 12px;color:#9299BD;font-size:10px;line-height:1.45}
.consultant-mix-chart{height:350px;position:relative}
.consultant-mix-table-wrap{overflow:auto;max-height:520px;border-radius:16px;border:1px solid rgba(184,167,255,.08)}
.consultant-mix-table{width:100%;border-collapse:collapse;min-width:980px}
.consultant-mix-table th{position:sticky;top:0;z-index:2;background:#17112B;color:#C4B5FD;padding:10px 9px;text-align:right;font-size:8px;text-transform:uppercase;letter-spacing:.055em}
.consultant-mix-table td{padding:10px 9px;border-bottom:1px solid rgba(184,167,255,.08);text-align:right;font-size:11px;color:#D8DBED}
.consultant-mix-table th:first-child,.consultant-mix-table td:first-child{text-align:left}
.consultant-mix-table tbody tr:hover{background:rgba(139,92,246,.055)}

/* Simulações: uma pergunta por vez */
.decision-center-head{
    display:flex;align-items:flex-start;justify-content:space-between;gap:18px;
    padding:22px;margin-bottom:14px;border-radius:25px;
    background:radial-gradient(650px 250px at 100% 0%,rgba(34,211,238,.10),transparent 58%),linear-gradient(135deg,rgba(91,33,182,.25),rgba(17,13,33,.98));
    border:1px solid rgba(167,139,250,.15)
}
.decision-center-head h2{margin:7px 0 7px;font-size:25px;letter-spacing:-.03em}
.decision-center-head p{margin:0;max-width:820px;color:#C4C8DE;line-height:1.6}
.decision-center-status{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.decision-status-pill{padding:7px 10px;border-radius:999px;background:rgba(255,255,255,.035);border:1px solid rgba(184,167,255,.10);color:#D9D4EE;font-size:10px;font-weight:700}
.decision-nav{
    display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;
    padding:8px;margin-bottom:14px;border-radius:20px;background:rgba(9,6,17,.72);border:1px solid rgba(184,167,255,.09)
}
.decision-nav-button{
    min-height:76px;padding:13px 14px;border:1px solid transparent;border-radius:15px;
    background:rgba(255,255,255,.025);color:#CDD0E6;text-align:left;cursor:pointer;font:inherit
}
.decision-nav-button b{display:block;margin-bottom:4px;color:#F8FAFF;font-size:13px}
.decision-nav-button span{display:block;color:#9299BD;font-size:10px;line-height:1.4}
.decision-nav-button.active{
    background:linear-gradient(135deg,rgba(139,92,246,.18),rgba(34,211,238,.08));
    border-color:rgba(167,139,250,.18);box-shadow:0 10px 24px rgba(2,6,23,.18)
}
.decision-view{display:none}
.decision-view.active{display:block;animation:fadeIn .22s ease}
.decision-story{
    display:grid;grid-template-columns:.78fr 1.22fr;gap:14px
}
.decision-input-card,.decision-answer-card,.decision-detail-card{
    padding:18px;border-radius:22px;background:linear-gradient(180deg,rgba(18,13,34,.97),rgba(10,8,21,.99));
    border:1px solid rgba(184,167,255,.10)
}
.decision-step{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.decision-step-number{width:31px;height:31px;border-radius:10px;display:grid;place-items:center;background:linear-gradient(135deg,#8B5CF6,#6D28D9);color:#fff;font-weight:900}
.decision-step b{display:block;font-size:14px}.decision-step span{display:block;color:#9299BD;font-size:10px;margin-top:2px}
.decision-form{display:grid;grid-template-columns:1fr;gap:11px}
.decision-field{display:flex;flex-direction:column;gap:7px}
.decision-field label{color:#C4B5FD;font-size:9px;text-transform:uppercase;letter-spacing:.075em;font-weight:800}
.decision-field input,.decision-field select{height:44px;border-radius:13px;border:1px solid rgba(184,167,255,.12);background:rgba(255,255,255,.035);color:#F8FAFF;padding:0 11px;font:inherit}
.decision-answer-lead{
    padding:16px 17px;margin-bottom:12px;border-radius:18px;
    background:linear-gradient(135deg,rgba(139,92,246,.12),rgba(34,211,238,.055));
    border:1px solid rgba(167,139,250,.14);color:#E7E5F4;line-height:1.55
}
.decision-answer-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.decision-answer{
    min-height:106px;padding:14px;border-radius:17px;background:rgba(255,255,255,.028);border:1px solid rgba(184,167,255,.08)
}
.decision-answer span{display:block;color:#969DC0;font-size:9px;text-transform:uppercase;letter-spacing:.07em;font-weight:800}
.decision-answer strong{display:block;margin-top:10px;font-size:23px;letter-spacing:-.035em}
.decision-answer small{display:block;margin-top:5px;color:#AEB4D2;line-height:1.4}
.decision-chart-stage{height:290px;margin-top:13px;position:relative}
.decision-disclosure{margin-top:14px;border-radius:18px;border:1px solid rgba(184,167,255,.09);background:rgba(255,255,255,.02);overflow:hidden}
.decision-disclosure summary{cursor:pointer;padding:13px 15px;color:#DAD7EA;font-weight:800}
.decision-disclosure > div{padding:0 15px 15px}
#tab-simulation-lab .origin-plan-card{margin:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
#tab-simulation-lab .origin-plan-header{display:none!important}
#tab-simulation-lab .origin-plan-form{grid-template-columns:repeat(4,minmax(0,1fr));background:transparent!important;padding:0!important;border:0!important}
#tab-simulation-lab .origin-plan-summary{grid-template-columns:repeat(5,minmax(0,1fr))}
#tab-simulation-lab .origin-plan-layout{grid-template-columns:1.15fr .85fr}

/* Financeiro: sequência de leitura */
.financial-story-head{
    padding:20px;margin-bottom:14px;border-radius:23px;
    background:linear-gradient(135deg,rgba(16,185,129,.08),rgba(139,92,246,.10),rgba(17,13,33,.98));
    border:1px solid rgba(167,139,250,.12)
}
.financial-story-head h2{margin:7px 0 7px;font-size:22px;letter-spacing:-.025em}
.financial-story-head p{margin:0;max-width:900px;color:#B6BBD5;line-height:1.55}
.financial-story-sentence{
    margin-top:14px;padding:13px 15px;border-radius:16px;background:rgba(255,255,255,.03);border:1px solid rgba(184,167,255,.09);color:#E5E3F1;line-height:1.55
}
.financial-story-flow{display:grid;gap:13px;margin:14px 0}
.financial-story-step{
    display:grid;grid-template-columns:160px 1fr;gap:14px;padding:15px;border-radius:21px;
    background:linear-gradient(180deg,rgba(18,13,34,.96),rgba(10,8,21,.99));border:1px solid rgba(184,167,255,.10)
}
.financial-step-label{padding:8px 5px}
.financial-step-label span{display:grid;place-items:center;width:32px;height:32px;margin-bottom:10px;border-radius:10px;background:linear-gradient(135deg,#8B5CF6,#6D28D9);font-weight:900}
.financial-step-label b{display:block;font-size:14px;margin-bottom:5px}.financial-step-label small{color:#959CBE;line-height:1.45}
.financial-step-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.financial-step-cards .financial-kpi{min-height:112px!important}
.financial-story-chart-card{
    padding:16px;margin-bottom:14px;border-radius:21px;background:linear-gradient(180deg,rgba(18,13,34,.96),rgba(10,8,21,.99));border:1px solid rgba(184,167,255,.10)
}
.financial-story-chart-card h3{margin:0 0 4px;font-size:15px}.financial-story-chart-card p{margin:0;color:#959CBE;font-size:10px}
.financial-story-chart-stage{height:330px;position:relative;margin-top:12px}
.financial-advanced-toggle{margin-bottom:14px;border-radius:18px;border:1px solid rgba(184,167,255,.09);background:rgba(255,255,255,.02);overflow:hidden}
.financial-advanced-toggle summary{cursor:pointer;padding:13px 15px;color:#DAD7EA;font-weight:800}
.financial-advanced-toggle .financial-chart-grid{padding:0 14px 14px}

/* Performance */
html{scroll-behavior:auto!important}
*{animation-duration:.18s!important}
body.performance-mode *, body.performance-mode *::before, body.performance-mode *::after{transition-duration:.12s!important}
body.performance-mode canvas{image-rendering:auto}
@media(max-width:1200px){
    .consultant-mix-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
    .consultant-mix-grid,.decision-story,.financial-story-step{grid-template-columns:1fr}
    .financial-step-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
    #tab-simulation-lab .origin-plan-form{grid-template-columns:repeat(2,minmax(0,1fr))}
    #tab-simulation-lab .origin-plan-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
    #tab-simulation-lab .origin-plan-layout{grid-template-columns:1fr}
}
@media(max-width:760px){
    .consultant-analysis-switch{position:relative;top:auto}
    .consultant-mix-kpis,.decision-answer-grid,.financial-step-cards,#tab-simulation-lab .origin-plan-form,#tab-simulation-lab .origin-plan-summary{grid-template-columns:1fr}
    .consultant-mix-grid,.decision-nav{grid-template-columns:1fr}
    .floating-period-indicator{right:10px!important;bottom:10px!important;left:10px!important;min-width:0!important}
}


/* ===== V54 · layout estável, mapa estadual e perfil visual ===== */
.main-container.v54-grid-layout{
    width:100%!important;
    max-width:1680px!important;
    margin:16px auto 0!important;
    padding:0 18px 34px!important;
    box-sizing:border-box!important;
    display:grid!important;
    grid-template-columns:276px minmax(0,1fr)!important;
    column-gap:18px!important;
    align-items:start!important;
    overflow:visible!important;
}
.main-container.v54-grid-layout > .app-sidebar{
    grid-column:1!important;
    grid-row:1 / span 999!important;
    position:sticky!important;
    left:auto!important;
    top:82px!important;
    bottom:auto!important;
    width:276px!important;
    height:calc(100vh - 100px)!important;
    min-height:520px!important;
    align-self:start!important;
    z-index:45!important;
    border-radius:24px!important;
    border:1px solid rgba(184,167,255,.13)!important;
    box-shadow:0 18px 42px rgba(2,6,23,.30)!important;
}
.main-container.v54-grid-layout > :not(.app-sidebar){
    grid-column:2!important;
    min-width:0!important;
    width:100%!important;
    box-sizing:border-box!important;
}
body.sidebar-collapsed .main-container.v54-grid-layout{
    grid-template-columns:76px minmax(0,1fr)!important;
}
body.sidebar-collapsed .main-container.v54-grid-layout > .app-sidebar{
    width:76px!important;
}
.sidebar-footer{display:none!important}
.sidebar-scroll{
    height:auto!important;
    flex:1!important;
    min-height:0!important;
    overflow-y:auto!important;
    padding-bottom:18px!important;
}
.sidebar-reopen-fab{
    top:90px!important;
    left:0!important;
    width:46px!important;
    height:48px!important;
    border-radius:0 15px 15px 0!important;
    z-index:1100!important;
}
.floating-period-indicator{
    display:flex!important;
    position:fixed!important;
    right:18px!important;
    bottom:18px!important;
    top:auto!important;
    left:auto!important;
    z-index:1200!important;
    min-width:235px!important;
    max-width:calc(100vw - 36px)!important;
}
.report-workspace-header{position:relative!important;top:auto!important;z-index:10!important}
.profile-chart-description{
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    line-height:1.45!important;
    min-height:auto!important;
}
#profile-demographic .profile-chart-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:14px!important;
}
#profile-demographic .profile-chart-card{
    min-height:300px!important;
    padding:16px!important;
    border-radius:20px!important;
    overflow:hidden!important;
}
#profile-demographic .profile-chart-card.profile-chart-wide{
    grid-column:1/-1!important;
}
.profile-gender-card{min-height:330px!important}
.profile-gender-summary{
    display:flex;
    flex-direction:column;
    gap:11px;
    margin-top:13px;
    flex:1;
}
.profile-gender-total-v54{
    display:flex;
    align-items:end;
    justify-content:space-between;
    gap:14px;
    padding:12px 14px;
    border-radius:16px;
    background:linear-gradient(135deg,rgba(139,92,246,.12),rgba(34,211,238,.06));
    border:1px solid rgba(167,139,250,.14)
}
.profile-gender-total-v54 span{color:#AAB0D0;font-size:10px;text-transform:uppercase;letter-spacing:.08em;font-weight:800}
.profile-gender-total-v54 strong{font-size:25px;letter-spacing:-.04em}
.profile-gender-row-v54{
    display:grid;
    grid-template-columns:48px minmax(0,1fr) auto;
    gap:12px;
    align-items:center;
    padding:12px 13px;
    border-radius:17px;
    background:rgba(255,255,255,.028);
    border:1px solid rgba(184,167,255,.09)
}
.profile-gender-icon-v54{
    width:46px;height:46px;border-radius:15px;display:grid;place-items:center;
    color:#F8FAFF;background:linear-gradient(135deg,rgba(139,92,246,.25),rgba(34,211,238,.13));
    border:1px solid rgba(184,167,255,.12)
}
.profile-gender-icon-v54 svg{width:25px;height:25px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.profile-gender-copy-v54{min-width:0}
.profile-gender-copy-v54 strong{display:block;font-size:13px;color:#F8FAFF;margin-bottom:7px}
.profile-gender-bar-v54{height:7px;border-radius:999px;background:rgba(148,163,184,.11);overflow:hidden}
.profile-gender-bar-v54 i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#8B5CF6,#22D3EE)}
.profile-gender-row-v54[data-kind="female"] .profile-gender-bar-v54 i{background:linear-gradient(90deg,#D946EF,#FB7185)}
.profile-gender-row-v54[data-kind="unknown"] .profile-gender-bar-v54 i{background:linear-gradient(90deg,#475569,#94A3B8)}
.profile-gender-value-v54{text-align:right}
.profile-gender-value-v54 strong{display:block;font-size:20px;letter-spacing:-.035em}
.profile-gender-value-v54 span{display:block;margin-top:3px;color:#9CA3C1;font-size:10px}
.profile-brazil-state-map-card{min-height:570px!important}
.profile-brazil-map-layout{
    display:grid;
    grid-template-columns:minmax(0,1fr) 300px;
    gap:18px;
    align-items:stretch;
    margin-top:12px;
    min-height:485px
}
.profile-brazil-map-v54{
    width:100%;
    min-height:485px;
    border-radius:18px;
    background:
       radial-gradient(600px 280px at 55% 50%,rgba(139,92,246,.08),transparent 65%),
       rgba(255,255,255,.018);
    border:1px solid rgba(184,167,255,.08);
    overflow:hidden
}
.profile-state-ranking-v54{
    padding:14px;
    border-radius:18px;
    background:rgba(255,255,255,.025);
    border:1px solid rgba(184,167,255,.09);
    min-width:0
}
.profile-state-ranking-head strong{display:block;color:#F8FAFF;font-size:13px}
.profile-state-ranking-head span{display:block;margin-top:4px;color:#9399BD;font-size:10px}
.profile-state-ranking-list-v54{display:flex;flex-direction:column;gap:7px;margin-top:13px}
.profile-state-ranking-item-v54{
    display:grid;
    grid-template-columns:28px minmax(0,1fr) auto;
    gap:9px;
    align-items:center;
    padding:9px 10px;
    border-radius:13px;
    background:rgba(255,255,255,.028);
    border:1px solid rgba(184,167,255,.075)
}
.profile-state-ranking-position-v54{
    width:26px;height:26px;display:grid;place-items:center;border-radius:9px;
    background:rgba(139,92,246,.12);color:#D8B4FE;font-size:10px;font-weight:900
}
.profile-state-ranking-name-v54{min-width:0}
.profile-state-ranking-name-v54 strong{display:block;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.profile-state-ranking-name-v54 i{display:block;height:5px;margin-top:6px;border-radius:999px;background:rgba(148,163,184,.10);overflow:hidden}
.profile-state-ranking-name-v54 i::after{content:"";display:block;width:var(--w);height:100%;background:linear-gradient(90deg,#8B5CF6,#22D3EE);border-radius:999px}
.profile-state-ranking-item-v54 > strong{font-size:12px;color:#DDE2F6}
.profile-map-legend-v54{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px;margin-top:13px;color:#858CAF;font-size:9px}
.profile-map-legend-v54 i{height:7px;border-radius:999px;background:linear-gradient(90deg,#211733,#6D28D9,#D946EF,#22D3EE)}
.highcharts-background{fill:transparent!important}
.highcharts-credits{fill:#6B7280!important;font-size:8px!important}
.highcharts-legend-item text{fill:#BCC2DE!important}
.highcharts-data-label text{fill:#F8FAFF!important;text-shadow:0 1px 3px rgba(0,0,0,.55)!important;font-weight:800!important}
.highcharts-coloraxis-labels text{fill:#9CA3C1!important}
@media(max-width:1050px){
    .main-container.v54-grid-layout{grid-template-columns:1fr!important;padding:0 12px 30px!important}
    .main-container.v54-grid-layout > :not(.app-sidebar){grid-column:1!important}
    .main-container.v54-grid-layout > .app-sidebar{
        position:fixed!important;left:0!important;top:70px!important;bottom:0!important;height:auto!important;width:min(310px,88vw)!important;
        transform:translateX(-105%);z-index:1450!important;border-radius:0 22px 22px 0!important
    }
    body.sidebar-mobile-open .main-container.v54-grid-layout > .app-sidebar{transform:translateX(0)!important}
    .profile-brazil-map-layout{grid-template-columns:1fr}
    .profile-brazil-map-v54{min-height:440px}
}
@media(max-width:720px){
    #profile-demographic .profile-chart-grid{grid-template-columns:1fr!important}
    .profile-brazil-state-map-card{min-height:auto!important}
    .profile-brazil-map-v54{min-height:390px}
}



        /* V55 — otimização de renderização sem alterar conteúdo ou cálculos */
        body.performance-v55 .tab-content.active,
        body.performance-v55 .profile-view.active,
        body.performance-v55 .main-container { animation: none !important; }
        body.performance-v55 .tab-content,
        body.performance-v55 .profile-view,
        body.performance-v55 .panel,
        body.performance-v55 .profile-chart-card { contain: layout style paint; }
        body.performance-v55 .table-container,
        body.performance-v55 .profile-table-wrap,
        body.performance-v55 .control-daily-wrap { overscroll-behavior: contain; }
        body.performance-v55.is-calculating-v55 { cursor: progress; }
        body.performance-v55.is-calculating-v55 .tab-content.active { pointer-events: none; }