/* ================================================
   VARIÁVEIS (estilo do CSS antigo)
================================================= */
:root {
    --primary-color: #00C4A7;
    --primary-dark: #006D7A;
    --secondary-color: #5d7189;
    --success-color: #00A884;
    --danger-color: #dc2626;
    --warning-color: #ea580c;
    --bg-color: #f4f7fa;
    --card-bg: #ffffff;
    --border-color: #dce5ee;
    --text-color: #0D1323;
    --text-light: #607086;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --brand-navy: #0D1323;
    --brand-blue: #1A2E4D;
    --brand-teal: #00C4A7;
    --brand-cyan: #006D7A;
    --brand-light: #E6E8EB;
}

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

/* ================================================
   LAYOUT GERAL
================================================= */
body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
}

/* Container */
.container { display: flex; height: 100vh; }

/* Sidebar */
.sidebar {
    width: 250px;
    background:
        radial-gradient(circle at 0% 0%, rgba(0, 196, 167, 0.18), transparent 32%),
        linear-gradient(180deg, #0D1323 0%, #10213a 56%, #08111f 100%);
    border-right: 1px solid rgba(230, 232, 235, 0.12);
    padding: 20px;
    overflow-y: auto;
    box-shadow: 14px 0 38px rgba(13, 19, 35, 0.22);
}

.sidebar h1 {
    color: #ffffff;
    font-size: 18px;
    letter-spacing: 0;
}

.brand {
    margin-bottom: 24px;
    text-align: center;
}

.brand small {
    color: #94a9bd;
    display: block;
    margin-top: 4px;
}

.brand img {
    width: 100%;
    max-width: 180px;
    max-height: 96px;
    object-fit: contain;
    margin-bottom: 10px;
}

/* Menu */
.menu { list-style: none; }
.menu li { margin-bottom: 10px; }

.menu button {
    width: 100%;
    padding: 12px;
    background: rgba(230, 232, 235, 0.045);
    border: 1px solid rgba(230, 232, 235, 0.1);
    color: #dce8f4;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    text-align: left;
}

.menu button:hover {
    background: rgba(0, 196, 167, 0.12);
    border-color: rgba(0, 196, 167, 0.32);
    color: #ffffff;
}

.menu button.active {
    background: linear-gradient(90deg, var(--brand-cyan), var(--brand-teal));
    border-color: rgba(0, 196, 167, 0.8);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(0, 196, 167, 0.18);
}

/* ================================================
   MAIN
================================================= */
.main { flex: 1; display: flex; flex-direction: column; }

/* Header */
.header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.header h2 {
    color: var(--text-color);
}

.header span {
    color: var(--text-light);
}

/* Content */
.content { flex: 1; overflow-y: auto; padding: 20px; }

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

/* Alerts */
#alert { 
    margin-bottom: 20px; 
    padding: 15px; 
    border-radius: 6px; 
}

.error { 
    background: #fee2e2; 
    border: 1px solid var(--danger-color); 
    color: var(--danger-color); 
}

.success { 
    background: #dcfce7;
    border: 1px solid var(--success-color); 
    color: var(--success-color); 
}

/* ================================================
   DASHBOARD CARDS
================================================= */
.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 20px; 
    margin-bottom: 30px; 
}

.executive-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-card h4 {
    color: var(--text-light);
    margin-bottom: 10px;
}

.stat-card .value {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-card .value.money {
    font-size: 22px;
}

.dashboard-charts,
.dashboard-tables {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.chart-card {
    min-height: 320px;
}

.chart-card canvas {
    width: 100% !important;
    height: 240px !important;
}

/* ================================================
   CARDS
================================================= */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.card h3 { 
    color: var(--text-color); 
    margin-bottom: 15px; 
}

/* ================================================
   TABELAS
================================================= */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.table th {
    background: var(--bg-color);
    color: var(--text-color);
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
}

.table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.table tr:hover {
    background: var(--bg-color);
}

.status-pill,
.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize;
}

.status-ativa,
.status-ativo {
    background: #dcfce7;
    color: #166534;
}

.status-agendada {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-pausada,
.status-rascunho,
.status-pendente {
    background: #fef3c7;
    color: #92400e;
}

.status-encerrada,
.status-arquivada,
.status-inativo {
    background: #fee2e2;
    color: #991b1b;
}

/* ================================================
   BOTÕES
================================================= */
.btn {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    margin-right: 10px;
    transition: 0.2s;
}

.btn:hover { background: var(--primary-dark); }

.btn-danger {
    background: var(--danger-color);
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-small {
    padding: 6px 10px;
    font-size: 12px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
}

.btn-small:hover {
    background: #475569;
}

.toolbar {
    margin-bottom: 20px;
}

.muted {
    color: var(--text-light);
    font-size: 13px;
    margin-bottom: 12px;
}

/* ================================================
   SEARCH BOX
================================================= */
.search-box {
    margin-bottom: 20px; 
    display: flex; 
    gap: 10px; 
}

.search-box input {
    flex: 1;
    padding: 10px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 6px;
}

.search-box input::placeholder {
    color: var(--text-light);
}

/* ================================================
   MODALS
================================================= */
.modal { 
    display: none; 
    position: fixed; 
    top: 0; left: 0; 
    width: 100%; height: 100%; 
    background: rgba(0, 0, 0, 0.5); 
    z-index: 1000; 
    align-items: center; 
    justify-content: center; 
}

.modal.active,
.modal.show { display: flex; }

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-content.wide {
    max-width: 760px;
}

.modal-content h2 { 
    color: var(--text-color); 
    margin-bottom: 20px; 
}
.admin-session-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border, #dbe5ea);
}

/* Formulários */
.form-group { margin-bottom: 15px; }

.form-group label { 
    display: block; 
    color: var(--text-color); 
    margin-bottom: 5px; 
    font-weight: bold; 
}

.form-group input, 
.form-group textarea, 
.form-group select {
    width: 100%;
    padding: 10px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 6px;
}

.form-group input::placeholder {
    color: var(--text-light);
}

.license-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.license-modules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
}

.license-modules label {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 0;
    font-weight: 500;
}

.license-modules input {
    width: auto;
}

.module-policy-help {
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.45;
    margin: 0 0 10px;
}

.erp-module-policies {
    display: grid;
    gap: 10px;
}

.erp-module-policy {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) repeat(3, minmax(130px, 1fr));
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
}

.erp-module-policy strong,
.erp-module-policy small {
    display: block;
}

.erp-module-policy small {
    color: var(--text-light);
    margin-top: 3px;
}

.erp-module-policy label {
    margin: 0;
    font-size: 12px;
}

.erp-module-policy select {
    margin-top: 4px;
}

@media (max-width: 760px) {
    .erp-module-policy {
        grid-template-columns: 1fr;
    }
}

.settings-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.settings-row.stack {
    display: block;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin: 12px 0;
}

.admin-form-grid input,
.admin-form-grid select,
#email-templates {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font: inherit;
}

#logo-preview {
    max-width: 220px;
    max-height: 120px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
}

.status-ativa,
.status-nao-ativada,
.status-expirada {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status-ativa {
    background: #dcfce7;
    color: var(--success-color);
}

.status-nao-ativada {
    background: #fef3c7;
    color: #92400e;
}

.status-expirada {
    background: #fee2e2;
    color: var(--danger-color);
}

/* Status */
.status {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.status.active {
    background: #dcfce7;
    color: var(--success-color);
}

.status.inactive {
    background: #fee2e2;
    color: var(--danger-color);
}

/* ================================================
   RESPONSIVE
================================================= */
@media (max-width: 768px) {
    .container { flex-direction: column; }
    .sidebar { width: 100%; height: auto; }
    .menu { display: flex; flex-wrap: wrap; }
    .menu li { flex: 1; min-width: 100px; }
    .grid { grid-template-columns: 1fr; }
    .dashboard-charts,
    .dashboard-tables { grid-template-columns: 1fr; }
    .table { font-size: 12px; }
    .table th, .table td { padding: 8px; }
}

/* ================================================
   DASHBOARD EXECUTIVO - GESTAO DE LICENCAS
================================================= */
.dashboard-hero {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.hero-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow);
    min-height: 142px;
}

.hero-card.primary {
    background:
        radial-gradient(circle at 0% 0%, rgba(0, 196, 167, 0.26), transparent 42%),
        linear-gradient(135deg, var(--brand-navy), var(--brand-blue));
    color: #ffffff;
    border: none;
    box-shadow: 0 22px 46px rgba(13, 19, 35, 0.24);
}

.hero-card span {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 10px;
}

.hero-card.primary span,
.hero-card.primary small { color: rgba(255,255,255,.72); }

.hero-card strong {
    display: block;
    font-size: 34px;
    line-height: 1;
    margin-bottom: 12px;
    color: var(--text-color);
}

.hero-card.primary strong { color: #ffffff; font-size: 46px; }
.hero-card small { color: var(--text-light); }
.hero-card small b { color: var(--brand-teal); }

.executive-grid.compact {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.executive-grid.compact .stat-card {
    border-radius: 16px;
    padding: 16px;
}

.executive-grid.compact .stat-card h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.executive-grid.compact .stat-card .value { font-size: 24px; }

.dashboard-ops {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.action-item {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--secondary-color);
    border-radius: 14px;
    padding: 14px;
    margin-top: 10px;
    background: #fff;
}

.action-item.critico { border-left-color: var(--danger-color); background: #fff7f7; }
.action-item.alerta { border-left-color: var(--warning-color); background: #fffaf3; }
.action-item.info { border-left-color: var(--brand-cyan); background: #f3fbff; }
.action-item.ok { border-left-color: var(--success-color); background: #f3fff9; }
.action-item strong { display: block; font-size: 14px; margin-bottom: 4px; }
.action-item span { display: block; color: var(--text-light); font-size: 13px; }
.action-item small {
    white-space: nowrap;
    background: rgba(0, 196, 167, .12);
    color: var(--brand-cyan);
    padding: 7px 10px;
    border-radius: 999px;
    font-weight: 700;
}

.rank-list, .timeline-list { display: grid; gap: 10px; margin-top: 10px; }
.rank-item {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid var(--border-color);
}
.rank-item span { color: var(--brand-teal); font-weight: 800; }
.rank-item strong { font-size: 14px; }
.rank-item em { font-style: normal; color: var(--text-light); font-size: 13px; }

.timeline-item {
    border-left: 3px solid var(--brand-teal);
    padding-left: 12px;
    padding-bottom: 10px;
}
.timeline-item span { color: var(--text-light); font-size: 12px; }
.timeline-item strong { display: block; font-size: 14px; margin: 3px 0; }
.timeline-item p { color: var(--text-light); font-size: 13px; }
.timeline-empty { color: var(--text-light); padding: 14px 0; }
.hidden-compat { display: none; }

@media (max-width: 1180px) {
    .dashboard-hero, .dashboard-ops { grid-template-columns: 1fr; }
}

/* ================================================
   DASHBOARD PRORESOLVER ADMIN - COCKPIT DE LICENCAS
   Ajuste visual solicitado: cards com scroll interno para
   nao empurrar os graficos para baixo.
================================================= */
#dashboard-page {
    --ops-panel-height: 360px;
}

.dashboard-kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(170px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.kpi-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 18px;
    box-shadow: var(--shadow);
    min-height: 118px;
}

.kpi-card .kpi-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border-radius: 18px;
    background: #edf4ff;
    font-size: 24px;
}

.kpi-card.danger .kpi-icon { background: #ffe9ea; }
.kpi-card.success .kpi-icon { background: #e9fff5; }

.kpi-card span {
    display: block;
    color: var(--text-light);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 8px;
}

.kpi-card strong {
    display: block;
    color: var(--text-color);
    font-size: 25px;
    line-height: 1.1;
    margin-bottom: 6px;
}

.kpi-card small {
    display: block;
    color: var(--text-light);
    font-size: 12px;
}

.kpi-card small b { color: var(--success-color); }
.kpi-card.danger strong { color: var(--danger-color); }
.kpi-card.success small,
.kpi-card.success small b { color: var(--success-color); font-weight: 800; }

.dashboard-ops {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr;
    gap: 18px;
    align-items: stretch;
    margin-bottom: 18px;
}

.dashboard-ops .card {
    margin-bottom: 0;
    min-height: var(--ops-panel-height);
    height: var(--ops-panel-height);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dashboard-ops .card h3 { margin-bottom: 8px; }
.dashboard-ops .card .muted { margin-bottom: 12px; }

.panel-scroll {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
    flex: 1 1 auto;
}

.panel-scroll::-webkit-scrollbar { width: 7px; }
.panel-scroll::-webkit-scrollbar-track { background: #edf2f7; border-radius: 999px; }
.panel-scroll::-webkit-scrollbar-thumb { background: #b7c4d8; border-radius: 999px; }
.panel-scroll::-webkit-scrollbar-thumb:hover { background: #8393aa; }

.panel-link {
    display: inline-flex;
    align-items: center;
    margin-top: 12px;
    color: var(--primary-color);
    font-weight: 800;
    font-size: 13px;
    text-decoration: none;
}

.action-item {
    min-height: 72px;
    margin-top: 0;
    margin-bottom: 10px;
}

.rank-list, .timeline-list {
    display: block;
    margin-top: 0;
}

.rank-item {
    grid-template-columns: 34px 1fr auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 8px;
}

.rank-item span {
    color: var(--text-color);
    font-weight: 900;
}

.rank-item em {
    color: var(--text-color);
    font-weight: 900;
}

.timeline-item {
    margin-bottom: 10px;
    padding-bottom: 12px;
    border-left: 4px solid var(--brand-teal);
}

.dashboard-charts.modern {
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    align-items: stretch;
}

.dashboard-charts.modern .chart-card {
    min-height: 285px;
}

.dashboard-charts.modern .chart-card canvas {
    height: 210px !important;
}

.hidden-compat { display: none !important; }

@media (max-width: 1500px) {
    .dashboard-kpis { grid-template-columns: repeat(3, minmax(190px, 1fr)); }
    .dashboard-charts.modern { grid-template-columns: repeat(2, minmax(320px, 1fr)); }
}

@media (max-width: 1180px) {
    .dashboard-kpis,
    .dashboard-ops,
    .dashboard-charts.modern { grid-template-columns: 1fr; }
    .dashboard-ops .card {
        height: 340px;
        min-height: 340px;
    }
}

/* =================================================
   DASHBOARD PRORESOLVER ADMIN - VERSÃO FINAL FOTO
================================================= */
:root{
  --pr-bg:#f4f7fb;
  --pr-card:#fff;
  --pr-border:#dce6f0;
  --pr-text:#0f172a;
  --pr-muted:#52637a;
  --pr-blue:#2563eb;
  --pr-teal:#12b89f;
  --pr-green:#059669;
  --pr-red:#e11d48;
  --pr-orange:#f97316;
  --pr-yellow:#eab308;
  --pr-sidebar:#061221;
  --pr-sidebar-2:#0d2238;
}
body{background:var(--pr-bg);font-family:"Inter","Segoe UI",Arial,sans-serif;color:var(--pr-text);font-size:14px;}
.container{height:100vh;background:var(--pr-bg);}
.sidebar{width:230px;padding:16px 10px 18px;background:linear-gradient(180deg,#051222 0%,#07182a 55%,#04101e 100%);box-shadow:10px 0 28px rgba(6,18,33,.18);border-right:1px solid rgba(255,255,255,.08);}
.proresolver-brand{height:92px;margin:0 0 10px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:0 8px;text-align:left;}
.proresolver-brand img{width:190px;max-width:190px;max-height:66px;object-fit:contain;margin:0;}
.proresolver-brand .brand-subtitle{display:none;}
.side-nav{display:flex;flex-direction:column;min-height:calc(100vh - 126px);}
.menu-section{display:block;color:#7e90a7;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;padding:15px 8px 8px;}
.menu{list-style:none;margin:0;padding:0;}
.menu li{margin-bottom:6px;}
.menu button{height:38px;display:flex;align-items:center;gap:10px;width:100%;padding:0 11px;border:0;border-radius:6px;background:transparent;color:#e5eef8;font-size:14px;font-weight:600;text-align:left;box-shadow:none;}
.menu button:hover{background:rgba(32,193,169,.14);color:#fff;border:0;}
.menu button.active{background:linear-gradient(90deg,#0e9285,#13b69f);box-shadow:none;border:0;color:#fff;}
.menu-ico{width:18px;display:inline-flex;align-items:center;justify-content:center;color:inherit;opacity:.92;font-size:14px;}
.menu-exit{margin-top:auto;padding-top:16px;}
.main{background:var(--pr-bg);min-width:0;}
.header.topbar{height:78px;padding:0 28px 0 24px;background:#fff;border-bottom:1px solid var(--pr-border);box-shadow:0 1px 4px rgba(15,23,42,.04);}
.topbar-title{display:flex;align-items:center;gap:14px;flex:1;min-width:0;}
.topbar-title>div{min-width:0;}
.hamburger{width:34px;height:34px;border:0;background:transparent;color:#243449;font-size:22px;cursor:pointer;}
.header h2{font-size:22px;line-height:1.1;margin:0;color:#111827;font-weight:800;white-space:nowrap;}
.header span{display:block;font-size:13px;color:#475569;margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.topbar-actions{display:flex;align-items:center;gap:10px;flex:0 1 auto;min-width:0;}
.top-btn{height:42px;padding:0 12px;border:1px solid var(--pr-border);background:#fff;border-radius:8px;color:#0f172a;font-weight:700;box-shadow:0 2px 6px rgba(15,23,42,.05);white-space:nowrap;}
.notification-dot{position:relative;width:34px;height:34px;display:flex;align-items:center;justify-content:center;font-size:22px;color:#334155;}
.notification-dot span{position:absolute;right:0;top:0;min-width:18px;height:18px;border-radius:999px;background:#10b981;color:#fff;font-size:11px;font-weight:800;display:flex;align-items:center;justify-content:center;border:2px solid #fff;margin:0;}
.user-box{display:flex!important;align-items:center;gap:10px;color:#111827!important;margin:0!important;}
.user-box .user-avatar{width:38px;height:38px;border-radius:50%;border:2px solid #aebbcc;display:flex;align-items:center;justify-content:center;font-size:21px;color:#0f172a;background:#fff;}
.user-box strong{display:block;font-size:14px;line-height:1.15;}
.user-box small{display:block;font-size:12px;color:#64748b;margin-top:2px;}
.content{padding:20px;overflow-y:auto;background:var(--pr-bg);}
#alert:empty{display:none;}
.dashboard-page-final{max-width:1640px;margin:0 auto;}
.dashboard-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:16px;margin-bottom:18px;}
.kpi-card{min-height:130px;background:#fff;border:1px solid var(--pr-border);border-radius:10px;box-shadow:0 2px 8px rgba(15,23,42,.06);padding:26px 22px;display:flex;align-items:center;gap:18px;margin:0;}
.kpi-card:hover{transform:none;box-shadow:0 2px 8px rgba(15,23,42,.06);}
.kpi-icon{width:58px;height:58px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:26px;flex:0 0 58px;}
.kpi-blue .kpi-icon{background:#eaf0ff;color:var(--pr-blue);}
.kpi-red .kpi-icon{background:#fee2e2;color:var(--pr-red);}
.kpi-green .kpi-icon{background:#dcfce7;color:#059669;}
.kpi-body span{display:block;font-size:14px;font-weight:800;color:#334155;margin-bottom:9px;}
.kpi-body strong{display:block;font-size:24px;font-weight:900;color:#0f172a;line-height:1.1;margin-bottom:12px;}
.kpi-body small{display:flex;align-items:center;gap:12px;font-size:13px;font-weight:600;color:#64748b;}
.kpi-body small em{font-style:normal;color:#059669;font-weight:900;}
.kpi-body small i{font-style:normal;color:#e11d48;font-weight:900;}
.kpi-body small.excellent{display:block;color:#059669;font-weight:900;}
.dashboard-ops{display:grid;grid-template-columns:1.06fr 1fr 1.05fr;gap:16px;margin-bottom:16px;align-items:stretch;}
.card{background:#fff;border:1px solid var(--pr-border);border-radius:10px;box-shadow:0 2px 8px rgba(15,23,42,.06);padding:22px;margin:0;}
.card h3{font-size:20px;line-height:1.2;margin:0 0 12px;color:#020617;font-weight:900;}
.muted{font-size:13px;color:#52637a;margin:0 0 18px;}
.panel-scroll{max-height:400px;overflow-y:auto;padding-right:8px;}
.panel-scroll::-webkit-scrollbar{width:7px;}
.panel-scroll::-webkit-scrollbar-track{background:#f1f5f9;border-radius:999px;}
.panel-scroll::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:999px;}
.panel-link{display:inline-block;margin-top:16px;font-weight:800;color:#2563eb;text-decoration:none;font-size:14px;}
.attention-list{display:flex;flex-direction:column;gap:10px;}
.action-item{min-height:80px;border:1px solid #dbeafe;border-left:4px solid #3b82f6;border-radius:8px;padding:13px 14px 13px 20px;background:linear-gradient(90deg,#f8fbff,#fff);display:grid;grid-template-columns:1fr auto;gap:14px;align-items:center;}
.action-item strong{display:block;font-size:13px;font-weight:900;color:#0f172a;margin-bottom:7px;}
.action-item span{display:block;font-size:12px;color:#334155;line-height:1.55;}
.action-item small{justify-self:end;display:flex;align-items:center;justify-content:center;min-width:72px;height:30px;border-radius:7px;border:1px solid currentColor;background:#fff;font-size:12px;font-weight:900;}
.action-item.critico,.action-item.critical{border-left-color:#f43f5e;border-color:#fecdd3;background:linear-gradient(90deg,#fff1f2,#fff);}
.action-item.critico small,.action-item.critical small{color:#e11d48;background:#fff5f5;}
.action-item.alto,.action-item.warning{border-left-color:#f97316;border-color:#fed7aa;background:linear-gradient(90deg,#fff7ed,#fff);}
.action-item.alto small,.action-item.warning small{color:#f97316;background:#fff7ed;}
.action-item.medio{border-left-color:#eab308;border-color:#fde68a;background:linear-gradient(90deg,#fffbeb,#fff);}
.action-item.medio small{color:#d97706;background:#fffbeb;}
.action-item.baixo,.action-item.ok,.action-item.info{border-left-color:#14b8a6;border-color:#ccfbf1;background:linear-gradient(90deg,#f0fdfa,#fff);}
.action-item.baixo small,.action-item.ok small,.action-item.info small{color:#0f9f8b;background:#ecfeff;}
.rank-list{display:flex;flex-direction:column;gap:0;}
.rank-item{height:70px;border:1px solid #e2e8f0;border-radius:8px;padding:0 14px;display:grid;grid-template-columns:34px 1fr auto;align-items:center;background:#fff;margin-bottom:-1px;}
.rank-item span{font-weight:900;color:#0f172a;}
.rank-item strong{font-size:13px;font-weight:900;color:#111827;}
.rank-item strong small{display:block;font-size:13px;font-weight:500;color:#475569;margin-top:4px;}
.rank-item em{font-style:normal;font-weight:900;color:#0f172a;font-size:14px;}
.timeline-list{display:flex;flex-direction:column;gap:0;}
.timeline-item{position:relative;border-left:3px solid #2dd4bf;padding:0 0 22px 18px;margin-left:0;min-height:67px;}
.timeline-item.warning-line{border-left-color:#fbbf24;}
.empty-state{color:#64748b;font-size:13px;padding:14px 10px;border:1px dashed #cbd5e1;border-radius:6px;background:#f8fafc;}
#saude-comercial-label.warning{color:#b45309;}
#saude-comercial-label.critical{color:#b91c1c;}
.timeline-item span{display:block;font-size:12px;color:#53657c;margin-bottom:8px;}
.timeline-item strong{display:block;font-size:13px;font-weight:800;color:#0f172a;margin-bottom:5px;}
.timeline-item p{font-size:13px;color:#334155;line-height:1.4;margin:0;}
.timeline-empty{font-size:14px;color:#64748b;padding:18px 0;}
.dashboard-charts.modern{display:grid;grid-template-columns:1fr 1fr .9fr 1fr;gap:16px;margin:0 0 20px;}
.chart-card{min-height:322px;padding:18px 20px;}
.chart-card h3{font-size:18px;margin-bottom:4px;}
.chart-card canvas{height:220px!important;width:100%!important;margin-top:10px;}
.growth-summary{display:flex;flex-direction:column;gap:9px;margin-top:22px;}
.growth-row{height:42px;border:1px solid #e2e8f0;border-radius:8px;display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:14px;padding:0 13px;background:#fff;font-size:13px;}
.growth-row b{font-weight:800;color:#0f172a;}
.growth-row .up{color:#059669;font-weight:900;}
.growth-row .down{color:#e11d48;font-weight:900;}
.growth-row .delta{font-weight:900;color:#0f172a;}
.geo-content{display:grid;grid-template-columns:1.25fr .75fr;gap:10px;align-items:center;min-height:230px;}
.brazil-map svg{width:100%;height:220px;filter:drop-shadow(0 4px 8px rgba(15,23,42,.05));}
.geo-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:13px;}
.geo-list li{display:grid;grid-template-columns:1fr auto;gap:20px;font-size:13px;color:#0f172a;}
.geo-list b{font-weight:900;}
.geo-list span{font-weight:800;}
.hidden-compat{position:absolute!important;left:-99999px!important;top:auto!important;width:1px!important;height:1px!important;overflow:hidden!important;opacity:0!important;pointer-events:none!important;}
.dashboard-tables{display:none!important;}
@media (max-width:1400px){.dashboard-kpis{grid-template-columns:repeat(3,1fr)}.dashboard-ops{grid-template-columns:1fr}.dashboard-charts.modern{grid-template-columns:repeat(2,1fr)}}
@media (max-width:900px){.sidebar{width:82px}.menu-section,.menu button:not(.active),.proresolver-brand img{font-size:0}.dashboard-kpis,.dashboard-charts.modern{grid-template-columns:1fr}.topbar-actions{display:none}}
.global-search { position: relative; width: min(300px, 23vw); min-width:160px; }
.global-search input { width: 100%; min-height: 38px; border: 1px solid #cad8e6; border-radius: 6px; padding: 0 12px; background: #fff; }
.global-search-results { display: none; position: absolute; z-index: 80; top: calc(100% + 6px); left: 0; right: 0; max-height: 360px; overflow: auto; background: #fff; border: 1px solid #cad8e6; box-shadow: 0 14px 32px rgba(15, 38, 63, .18); border-radius: 6px; }
.global-search-results.open { display: block; }
.global-search-result { display: grid; grid-template-columns: 90px 1fr; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid #edf2f7; background: #fff; text-align: left; cursor: pointer; }
.global-search-result:hover { background: #eef9f8; }
.global-search-result span { color: #087b83; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.global-search-result small { display: block; color: #60758b; margin-top: 2px; }
.dashboard-quick-actions { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 14px; }
.dashboard-quick-actions button { flex: 0 0 auto; border: 1px solid #c9d8e5; background: #fff; color: #075f6c; border-radius: 6px; min-height: 36px; padding: 0 12px; font-weight: 700; cursor: pointer; }
.dashboard-quick-actions button:hover { border-color: #008a95; background: #effafa; }
.page-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.page-heading-row h3 { margin: 0 0 4px; }
.permissions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.permission-profile { border: 1px solid #d6e1eb; border-left: 4px solid #008b95; padding: 14px; background: #fff; border-radius: 6px; }
.permission-profile h4 { margin: 0 0 8px; }
.permission-profile p { margin: 0; color: #5b6f82; line-height: 1.5; }
.action-dialog { max-width: 560px; }
.action-dialog-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.action-dialog-header h2 { margin: 0 0 4px; }
.action-dialog-mark { display: grid; place-items: center; flex: 0 0 42px; height: 42px; border-radius: 50%; background: #fff0db; color: #a65000; font-size: 22px; font-weight: 800; }
.action-dialog-fields { display: grid; gap: 12px; }
.action-dialog-fields label { display: grid; gap: 6px; font-weight: 700; color: #24384b; }
.action-dialog-fields input, .action-dialog-fields select, .action-dialog-fields textarea { width: 100%; border: 1px solid #c8d6e3; border-radius: 5px; padding: 10px; font: inherit; }
.action-dialog-note { margin-top: 14px; padding: 10px 12px; background: #eef7fb; border-left: 3px solid #1685a0; color: #36546c; font-size: 13px; }
.action-dialog-actions { justify-content: flex-end; margin-top: 16px; }
@media (max-width: 900px) { .global-search { width: min(220px, 36vw); } .topbar-actions #dashboard-periodo { display: none; } }
@media (max-width: 1400px) { .header.topbar { padding-right: 18px; } .header h2 { font-size: 20px; } .topbar-actions { gap: 8px; } }
