/* ===== V56 · UX/UI consistente, filtros horizontais, feedback de carregamento e modo offline ===== */
:root{
    --font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
    --v56-surface:#11172A;
    --v56-surface-2:#151C31;
    --v56-surface-3:#0E1425;
    --v56-border:rgba(167,139,250,.15);
    --v56-border-strong:rgba(139,92,246,.34);
    --v56-purple:#8B5CF6;
    --v56-blue:#3B82F6;
    --v56-cyan:#22D3EE;
    --v56-green:#10B981;
    --v56-pink:#EC4899;
    --v56-amber:#F59E0B;
    --v56-radius:16px;
}
html{scrollbar-gutter:stable}
body.ux-v56{
    font-family:var(--font-family)!important;
    background:
      radial-gradient(900px 440px at 72% -170px,rgba(124,58,237,.12),transparent 70%),
      radial-gradient(700px 380px at 22% -210px,rgba(34,211,238,.07),transparent 70%),
      #080D19!important;
}
body.ux-v56 .top-bar{
    background:rgba(8,10,21,.88)!important;
    border-bottom:1px solid rgba(167,139,250,.13)!important;
    box-shadow:0 10px 34px rgba(0,0,0,.22)!important;
    backdrop-filter:blur(18px) saturate(1.2);
}
body.ux-v56 .brand-badge{
    background:linear-gradient(135deg,rgba(139,92,246,.18),rgba(59,130,246,.12))!important;
    border:1px solid rgba(167,139,250,.22)!important;
    color:#DDD6FE!important;
}
body.ux-v56 .offline-status-v56{
    display:inline-flex;align-items:center;gap:6px;padding:6px 9px;border-radius:999px;
    border:1px solid rgba(16,185,129,.24);background:rgba(16,185,129,.08);color:#A7F3D0;
    font-size:9px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap;
}
body.ux-v56 .offline-status-v56::before{content:"";width:7px;height:7px;border-radius:50%;background:#34D399;box-shadow:0 0 0 4px rgba(52,211,153,.10)}
body.ux-v56 :is(button,input,select,summary){font-family:var(--font-family)}
body.ux-v56 :is(button,input,select):focus-visible{outline:2px solid rgba(96,165,250,.9)!important;outline-offset:2px!important}
body.ux-v56 .btn{border-radius:11px!important;min-height:40px;transition:transform .16s ease,border-color .16s ease,background .16s ease,box-shadow .16s ease!important}
body.ux-v56 .btn:hover{transform:translateY(-1px)}
body.ux-v56 .btn-primary{background:linear-gradient(135deg,#8B5CF6,#6D4CEB)!important;box-shadow:0 8px 24px rgba(124,58,237,.22)}
body.ux-v56 .panel,
body.ux-v56 .kpi-card,
body.ux-v56 .mini-kpi,
body.ux-v56 .profile-chart-card,
body.ux-v56 .control-chart-card{
    border-color:var(--v56-border)!important;
    background:linear-gradient(180deg,rgba(20,26,47,.96),rgba(13,18,34,.96))!important;
    box-shadow:0 14px 38px rgba(0,0,0,.16)!important;
}
body.ux-v56 .panel{border-radius:18px!important}
body.ux-v56 .panel-header{background:rgba(16,22,40,.84)!important;border-bottom-color:rgba(167,139,250,.11)!important}
body.ux-v56 .app-sidebar{background:linear-gradient(180deg,rgba(22,16,43,.97),rgba(10,14,28,.98))!important}
body.ux-v56 .sidebar-nav-button{border:1px solid transparent!important;border-radius:14px!important;transition:background .16s ease,border-color .16s ease,transform .16s ease!important}
body.ux-v56 .sidebar-nav-button:hover{transform:translateX(2px);background:rgba(139,92,246,.08)!important;border-color:rgba(167,139,250,.11)!important}
body.ux-v56 .sidebar-nav-button.active{background:linear-gradient(135deg,rgba(59,130,246,.18),rgba(139,92,246,.13))!important;border-color:rgba(147,197,253,.40)!important;box-shadow:inset 3px 0 0 #60A5FA,0 10px 24px rgba(0,0,0,.12)!important}

/* Perfil / Todas as matrículas: sem duas barras laterais concorrendo por espaço. */
body.ux-v56 #tab-public-profile > .panel{overflow:visible!important;background:transparent!important;border:0!important;box-shadow:none!important}
body.ux-v56 #tab-public-profile .profile-main-header{
    border:1px solid var(--v56-border)!important;border-radius:18px!important;margin-bottom:12px!important;
    background:linear-gradient(135deg,rgba(139,92,246,.11),rgba(59,130,246,.05),rgba(16,185,129,.035))!important;
    box-shadow:0 14px 36px rgba(0,0,0,.14)!important;
}
body.ux-v56 #tab-public-profile .profile-layout-shell{display:block!important;min-width:0!important}
body.ux-v56 #tab-public-profile .profile-filter-sidebar{
    position:relative!important;top:auto!important;z-index:24!important;width:100%!important;max-height:none!important;overflow:visible!important;
    border:1px solid var(--v56-border)!important;border-radius:18px!important;margin:0 0 14px!important;
    background:linear-gradient(180deg,rgba(18,24,44,.98),rgba(12,17,32,.98))!important;
    box-shadow:0 16px 38px rgba(0,0,0,.16)!important;
}
body.ux-v56 .profile-sidebar-heading{
    position:relative!important;top:auto!important;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;
    gap:14px!important;padding:13px 15px!important;border-bottom:1px solid rgba(167,139,250,.10)!important;background:rgba(255,255,255,.012)!important;
}
body.ux-v56 .profile-filter-heading-copy-v56{display:flex;align-items:center;gap:11px;min-width:0}
body.ux-v56 .profile-filter-heading-icon-v56{width:36px;height:36px;display:grid;place-items:center;border-radius:11px;color:#C4B5FD;background:rgba(139,92,246,.12);border:1px solid rgba(167,139,250,.16);flex:0 0 36px}
body.ux-v56 .profile-filter-heading-icon-v56 svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
body.ux-v56 .profile-filter-heading-copy-v56 strong{display:block;color:#F8FAFF;font-size:13px}
body.ux-v56 .profile-filter-heading-copy-v56 small{display:block;margin-top:3px;color:#9299B7;font-size:9px;line-height:1.35}
body.ux-v56 .profile-filter-heading-actions-v56{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}
body.ux-v56 .profile-filter-count-v56{padding:6px 9px;border-radius:999px;background:rgba(59,130,246,.10);border:1px solid rgba(96,165,250,.18);color:#BFDBFE;font-size:9px;font-weight:800;white-space:nowrap}
body.ux-v56 .profile-filter-action-v56{min-height:32px;border:1px solid rgba(167,139,250,.15);border-radius:9px;background:rgba(255,255,255,.025);color:#B8BED6;padding:6px 9px;font-size:9px;font-weight:800;cursor:pointer}
body.ux-v56 .profile-filter-action-v56:hover{color:#fff;border-color:rgba(96,165,250,.42);background:rgba(59,130,246,.08)}
body.ux-v56 .profile-filter-body-v56{display:grid;grid-template-columns:minmax(250px,.74fr) minmax(0,2.2fr);gap:12px;padding:13px}
body.ux-v56 .profile-filter-context-v56{display:flex;flex-direction:column;gap:9px;min-width:0}
body.ux-v56 .profile-filter-sidebar.filters-collapsed-v56 .profile-filter-body-v56{display:none}
body.ux-v56 .profile-month-panel{
    padding:11px!important;border:1px solid rgba(96,165,250,.14)!important;border-radius:13px!important;background:linear-gradient(135deg,rgba(59,130,246,.07),rgba(139,92,246,.035))!important;
}
body.ux-v56 .profile-month-panel > label{font-size:9px!important;color:#BFDBFE!important}
body.ux-v56 .profile-month-row input[type="month"],
body.ux-v56 .profile-filter-grid select{
    min-height:42px!important;border:1px solid rgba(148,163,184,.17)!important;border-radius:10px!important;
    background:#1A2037!important;color:#F8FAFC!important;padding:8px 10px!important;font-size:10px!important;
    transition:border-color .15s ease,box-shadow .15s ease,background .15s ease!important;
}
body.ux-v56 .profile-month-row input[type="month"]:hover,
body.ux-v56 .profile-filter-grid select:hover{border-color:rgba(96,165,250,.34)!important;background:#1E2640!important}
body.ux-v56 .profile-filter-grid select:focus{border-color:#60A5FA!important;box-shadow:0 0 0 3px rgba(59,130,246,.12)!important}
body.ux-v56 .profile-month-clear{min-height:42px!important;border-radius:10px!important;padding:8px 10px!important}
body.ux-v56 .profile-scope-summary{
    padding:10px 11px!important;border:1px solid rgba(16,185,129,.15)!important;border-radius:12px!important;background:rgba(16,185,129,.055)!important;
    color:#A7F3D0!important;font-size:9px!important;line-height:1.45!important;
}
body.ux-v56 .profile-filter-panel{padding:0!important;border:0!important;background:transparent!important;min-width:0}
body.ux-v56 .profile-filter-grid,
body.ux-v56 .profile-filter-grid-v29{display:grid!important;grid-template-columns:repeat(4,minmax(145px,1fr))!important;gap:9px!important}
body.ux-v56 .profile-filter-grid label{
    display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:6px!important;padding:9px 10px 10px!important;
    border:1px solid rgba(148,163,184,.10)!important;border-radius:12px!important;background:rgba(255,255,255,.018)!important;
    color:#8F97B6!important;font-size:8px!important;letter-spacing:.07em!important;transition:border-color .16s ease,background .16s ease!important;
}
body.ux-v56 .profile-filter-grid label.has-active-value-v56{border-color:rgba(96,165,250,.34)!important;background:linear-gradient(135deg,rgba(59,130,246,.075),rgba(139,92,246,.035))!important;color:#BFDBFE!important}
body.ux-v56 .profile-scope-note{grid-column:1/-1;margin:9px 2px 0!important;color:#8991AD!important;font-size:9px!important}
body.ux-v56 .profile-content-area{position:relative!important;min-width:0!important;width:100%!important}

/* Escopo, abas e indicadores com hierarquia visual mais clara. */
body.ux-v56 .profile-scope-indicator{border:1px solid rgba(96,165,250,.17)!important;border-radius:15px!important;margin-bottom:10px!important;box-shadow:inset 4px 0 0 #3B82F6,0 10px 28px rgba(0,0,0,.10)!important}
body.ux-v56 .profile-scope-indicator.system{border-color:rgba(16,185,129,.18)!important;box-shadow:inset 4px 0 0 #10B981,0 10px 28px rgba(0,0,0,.10)!important}
body.ux-v56 .profile-subnav{
    position:sticky!important;top:66px!important;z-index:32!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:6px!important;padding:7px!important;margin-bottom:12px!important;border:1px solid var(--v56-border)!important;border-radius:14px!important;
    background:rgba(10,14,28,.90)!important;backdrop-filter:blur(16px)!important;box-shadow:0 10px 30px rgba(0,0,0,.15)!important;
}
body.ux-v56 .profile-subnav-button{display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;min-height:40px!important;border-radius:10px!important;font-size:10px!important}
body.ux-v56 .profile-subnav-button.active{background:linear-gradient(135deg,#8B5CF6,#6D4CEB)!important;border-color:rgba(196,181,253,.36)!important;box-shadow:0 8px 22px rgba(124,58,237,.22)!important}
body.ux-v56 .profile-tab-icon-v56{width:17px;height:17px;display:grid;place-items:center;flex:0 0 17px}
body.ux-v56 .profile-tab-icon-v56 svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* KPIs com ícones e leitura rápida. */
body.ux-v56 #tab-public-profile .profile-kpi-grid{grid-template-columns:repeat(6,minmax(145px,1fr))!important;gap:10px!important}
body.ux-v56 #tab-public-profile .profile-kpi-grid .mini-kpi{
    min-height:105px!important;display:grid!important;grid-template-columns:42px minmax(0,1fr)!important;grid-template-rows:auto auto auto!important;
    column-gap:11px!important;align-content:center!important;padding:13px!important;border-radius:15px!important;position:relative!important;overflow:hidden!important;
}
body.ux-v56 #tab-public-profile .profile-kpi-grid .mini-kpi::after{content:"";position:absolute;right:-20px;bottom:-30px;width:95px;height:95px;border-radius:50%;background:radial-gradient(circle,rgba(139,92,246,.10),transparent 68%);pointer-events:none}
body.ux-v56 .profile-kpi-icon-v56{grid-column:1!important;grid-row:1/4!important;width:40px;height:40px;display:grid;place-items:center;border-radius:12px;color:#C4B5FD;background:rgba(139,92,246,.12);border:1px solid rgba(167,139,250,.16)}
body.ux-v56 .profile-kpi-icon-v56 svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
body.ux-v56 #tab-public-profile .profile-kpi-grid .mini-kpi-label,
body.ux-v56 #tab-public-profile .profile-kpi-grid .mini-kpi-value,
body.ux-v56 #tab-public-profile .profile-kpi-grid .profile-kpi-sub{grid-column:2!important;min-width:0!important}
body.ux-v56 #tab-public-profile .profile-kpi-grid .mini-kpi-label{font-size:8px!important;line-height:1.3!important}
body.ux-v56 #tab-public-profile .profile-kpi-grid .mini-kpi-value{font-size:20px!important;overflow:hidden;text-overflow:ellipsis}
body.ux-v56 #tab-public-profile .profile-kpi-grid .profile-kpi-sub{font-size:8px!important;line-height:1.35!important}

/* Cards de gráficos com ícones SVG e marca d'água contextual. */
body.ux-v56 #tab-public-profile .profile-chart-grid{gap:13px!important}
body.ux-v56 #tab-public-profile .profile-chart-card{position:relative!important;overflow:hidden!important;border-radius:17px!important;padding:15px!important;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease!important}
body.ux-v56 #tab-public-profile .profile-chart-card:hover{transform:translateY(-2px);border-color:rgba(96,165,250,.28)!important;box-shadow:0 18px 44px rgba(0,0,0,.22)!important}
body.ux-v56 .profile-chart-title{display:flex!important;align-items:center!important;gap:9px!important;min-height:32px!important;padding-right:38px!important;font-size:13px!important;position:relative!important;z-index:2!important}
body.ux-v56 .profile-card-icon-v56{width:31px;height:31px;display:grid;place-items:center;border-radius:10px;color:#C4B5FD;background:rgba(139,92,246,.11);border:1px solid rgba(167,139,250,.14);flex:0 0 31px}
body.ux-v56 .profile-card-icon-v56 svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
body.ux-v56 .profile-chart-title-copy-v56{min-width:0;line-height:1.25}
body.ux-v56 .profile-card-watermark-v56{position:absolute;right:9px;top:8px;width:54px;height:54px;color:#8B5CF6;opacity:.075;pointer-events:none;z-index:0}
body.ux-v56 .profile-card-watermark-v56 svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
body.ux-v56 .profile-chart-description{position:relative;z-index:2;color:#969DBA!important;font-size:9px!important;line-height:1.45!important}
body.ux-v56 .profile-chart-canvas,body.ux-v56 .profile-table-wrap,body.ux-v56 .profile-gender-summary,body.ux-v56 .profile-brazil-map-layout{position:relative;z-index:2}
body.ux-v56 .profile-chart-card.accent-v56-1 .profile-card-icon-v56{color:#93C5FD;background:rgba(59,130,246,.10);border-color:rgba(96,165,250,.15)}
body.ux-v56 .profile-chart-card.accent-v56-2 .profile-card-icon-v56{color:#67E8F9;background:rgba(34,211,238,.09);border-color:rgba(34,211,238,.14)}
body.ux-v56 .profile-chart-card.accent-v56-3 .profile-card-icon-v56{color:#A7F3D0;background:rgba(16,185,129,.09);border-color:rgba(16,185,129,.14)}
body.ux-v56 .profile-chart-card.accent-v56-4 .profile-card-icon-v56{color:#F9A8D4;background:rgba(236,72,153,.09);border-color:rgba(236,72,153,.14)}
body.ux-v56 .profile-chart-card.accent-v56-5 .profile-card-icon-v56{color:#FCD34D;background:rgba(245,158,11,.09);border-color:rgba(245,158,11,.14)}
body.ux-v56 .profile-offline-badge-v56{margin-left:auto;padding:5px 8px;border-radius:999px;background:rgba(16,185,129,.08);border:1px solid rgba(16,185,129,.18);color:#A7F3D0;font-size:8px;font-weight:900;text-transform:uppercase;letter-spacing:.05em;white-space:nowrap}

/* Mapa offline, grande e legível. */
body.ux-v56 .profile-brazil-state-map-card{min-height:620px!important}
body.ux-v56 .profile-brazil-map-layout{grid-template-columns:minmax(0,1fr) 320px!important;gap:14px!important;min-height:520px!important;margin-top:10px!important}
body.ux-v56 .profile-brazil-map-v54{position:relative!important;min-height:520px!important;border-radius:16px!important;background:radial-gradient(620px 310px at 52% 48%,rgba(124,58,237,.10),transparent 68%),rgba(6,10,23,.36)!important;border-color:rgba(96,165,250,.10)!important}
body.ux-v56 .profile-brazil-map-v54.is-loading-v56::before{content:"";position:absolute;inset:0;z-index:20;background:rgba(9,12,25,.66);backdrop-filter:blur(2px);border-radius:16px}
body.ux-v56 .profile-brazil-map-v54.is-loading-v56::after{content:"Atualizando mapa offline…";position:absolute;left:50%;top:50%;z-index:21;transform:translate(-50%,-50%);padding-top:43px;color:#D8DDF2;font-size:10px;font-weight:800;white-space:nowrap;background:radial-gradient(circle at 50% 16px,transparent 13px,rgba(139,92,246,.9) 14px 16px,transparent 17px);animation:v56MapPulse 1s ease-in-out infinite}
@keyframes v56MapPulse{0%,100%{opacity:.55;transform:translate(-50%,-50%) scale(.98)}50%{opacity:1;transform:translate(-50%,-50%) scale(1)}}
body.ux-v56 .profile-state-ranking-v54{border-radius:16px!important;padding:14px!important;background:rgba(255,255,255,.022)!important}
body.ux-v56 .profile-state-ranking-list-v54{max-height:430px;overflow:auto;padding-right:3px}
body.ux-v56 .profile-state-ranking-item-v54{border-radius:12px!important}
body.ux-v56 .highcharts-credits{display:none!important}

/* Feedback de carregamento: o conteúdo continua visível e recebe uma camada informativa. */
body.ux-v56 .profile-loading-overlay-v56{position:absolute;inset:0;z-index:80;display:flex;align-items:flex-start;justify-content:center;padding-top:92px;background:rgba(8,12,25,.42);backdrop-filter:blur(1.5px);border-radius:16px;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .14s ease,visibility .14s ease}
body.ux-v56 .profile-content-area.is-loading-v56 .profile-loading-overlay-v56{opacity:1;visibility:visible;pointer-events:auto}
body.ux-v56 .profile-loading-card-v56{display:flex;align-items:center;gap:11px;padding:12px 15px;border:1px solid rgba(167,139,250,.22);border-radius:13px;background:rgba(15,20,38,.96);box-shadow:0 18px 42px rgba(0,0,0,.28);color:#EEF2FF}
body.ux-v56 .profile-loading-spinner-v56{width:22px;height:22px;border:3px solid rgba(167,139,250,.18);border-top-color:#8B5CF6;border-right-color:#22D3EE;border-radius:50%;animation:v56Spin .75s linear infinite}
body.ux-v56 .profile-loading-card-v56 strong{display:block;font-size:10px}
body.ux-v56 .profile-loading-card-v56 span{display:block;margin-top:2px;color:#9CA3C1;font-size:8px}
@keyframes v56Spin{to{transform:rotate(360deg)}}
body.ux-v56 .global-progress-v56{position:fixed;top:76px;right:18px;z-index:2200;display:flex;align-items:center;gap:9px;padding:9px 12px;border:1px solid rgba(167,139,250,.22);border-radius:12px;background:rgba(13,18,34,.96);box-shadow:0 16px 38px rgba(0,0,0,.28);color:#F8FAFF;opacity:0;visibility:hidden;transform:translateY(-8px);transition:.18s ease;pointer-events:none}
body.ux-v56 .global-progress-v56.active{opacity:1;visibility:visible;transform:translateY(0)}
body.ux-v56 .global-progress-v56 .profile-loading-spinner-v56{width:18px;height:18px;border-width:2px}
body.ux-v56 .global-progress-v56 strong{font-size:9px}

/* Tabelas e formulários com o mesmo padrão visual. */
body.ux-v56 :is(.data-table,.profile-table,.control-daily-table,.audit-table) th{background:#12182B!important;color:#AAB1CB!important}
body.ux-v56 :is(.data-table,.profile-table,.control-daily-table,.audit-table) tbody tr:hover{background:rgba(59,130,246,.055)!important}
body.ux-v56 :is(select,input[type="date"],input[type="month"],input[type="number"],input[type="text"]){accent-color:#8B5CF6}

@media(max-width:1450px){
    body.ux-v56 #tab-public-profile .profile-kpi-grid{grid-template-columns:repeat(3,minmax(180px,1fr))!important}
    body.ux-v56 .profile-filter-grid,body.ux-v56 .profile-filter-grid-v29{grid-template-columns:repeat(3,minmax(150px,1fr))!important}
}
@media(max-width:1120px){
    body.ux-v56 .profile-filter-body-v56{grid-template-columns:1fr!important}
    body.ux-v56 .profile-filter-grid,body.ux-v56 .profile-filter-grid-v29{grid-template-columns:repeat(2,minmax(150px,1fr))!important}
    body.ux-v56 .profile-brazil-map-layout{grid-template-columns:1fr!important}
    body.ux-v56 .profile-state-ranking-list-v54{max-height:310px}
    body.ux-v56 .profile-subnav{top:8px!important}
}
@media(max-width:720px){
    body.ux-v56 .offline-status-v56{display:none}
    body.ux-v56 .profile-sidebar-heading{align-items:flex-start!important;flex-direction:column!important}
    body.ux-v56 .profile-filter-heading-actions-v56{width:100%;justify-content:flex-start}
    body.ux-v56 .profile-filter-grid,body.ux-v56 .profile-filter-grid-v29{grid-template-columns:1fr!important}
    body.ux-v56 #tab-public-profile .profile-kpi-grid{grid-template-columns:1fr!important}
    body.ux-v56 .profile-subnav{grid-template-columns:repeat(2,minmax(0,1fr))!important;position:relative!important;top:auto!important}
    body.ux-v56 .profile-brazil-map-v54{min-height:420px!important}
    body.ux-v56 .profile-brazil-state-map-card{min-height:auto!important}
}