:root{
  --brand:#5b21b6;
  --brand-dark:#3b0764;
  --brand-soft:#f3e8ff;
  --ink:#1f2937;
  --muted:#6b7280;
  --bg:#f5f7fb;
  --card:#ffffff;
  --line:#e5e7eb;
  --success:#16a34a;
  --warning:#f59e0b;
  --danger:#dc2626;
  --info:#2563eb;
}
*{box-sizing:border-box}
body{
  min-height:100vh;
  background:var(--bg);
  color:var(--ink);
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
a{color:var(--brand);text-decoration:none}
.btn-primary{
  --bs-btn-bg:var(--brand);
  --bs-btn-border-color:var(--brand);
  --bs-btn-hover-bg:var(--brand-dark);
  --bs-btn-hover-border-color:var(--brand-dark);
}
.btn-outline-primary{
  --bs-btn-color:var(--brand);
  --bs-btn-border-color:var(--brand);
  --bs-btn-hover-bg:var(--brand);
  --bs-btn-hover-border-color:var(--brand);
}
.loading-screen{
  position:fixed;
  inset:0;
  display:grid;
  place-items:center;
  background:#fff;
  z-index:3000;
}
.loading-logo{max-width:150px;max-height:90px;object-fit:contain}
.login-screen{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:
    radial-gradient(circle at top left, rgba(91,33,182,.22), transparent 35%),
    linear-gradient(135deg,#fbfbff 0%,#f3e8ff 100%);
}
.login-card{
  width:min(500px,100%);
  background:rgba(255,255,255,.92);
  border:1px solid rgba(255,255,255,.8);
  border-radius:28px;
  padding:32px;
  backdrop-filter:blur(12px);
}
.login-logo{max-width:145px;max-height:90px;object-fit:contain}
.app-shell{display:flex;min-height:100vh}
.sidebar{
  width:292px;
  background:#111827;
  color:#fff;
  position:fixed;
  inset:0 auto 0 0;
  padding:22px;
  display:flex;
  flex-direction:column;
  z-index:1040;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  padding-bottom:22px;
  border-bottom:1px solid rgba(255,255,255,.09);
}
.brand img{width:58px;height:58px;object-fit:contain;background:#fff;border-radius:16px;padding:7px}
.brand strong{display:block;font-size:1rem}
.brand span{display:block;color:#cbd5e1;font-size:.78rem}
.menu{display:flex;flex-direction:column;gap:6px;margin-top:20px}
.menu-link{
  width:100%;
  border:0;
  background:transparent;
  color:#d1d5db;
  border-radius:14px;
  padding:12px 14px;
  display:flex;
  align-items:center;
  gap:12px;
  text-align:left;
  transition:.2s;
}
.menu-link:hover,.menu-link.active{
  background:linear-gradient(135deg,var(--brand),#7c3aed);
  color:#fff;
  transform:translateX(2px);
}
.menu-link i{font-size:1.05rem}
.sidebar-footer{
  margin-top:auto;
  padding-top:18px;
  border-top:1px solid rgba(255,255,255,.09);
  font-size:.85rem;
}
.sidebar-footer a{color:#cbd5e1;display:block;margin-top:8px}
.cloud-status{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#cbd5e1;
  font-size:.82rem;
}
.cloud-status span{
  width:10px;
  height:10px;
  border-radius:999px;
  display:inline-block;
  background:#ef4444;
}
.cloud-status.online span{background:#22c55e}
.cloud-status.syncing span{background:#f59e0b}
.main{
  margin-left:292px;
  width:calc(100% - 292px);
  min-height:100vh;
}
.topbar{
  position:sticky;
  top:0;
  z-index:100;
  min-height:84px;
  background:rgba(245,247,251,.9);
  backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:18px 28px;
}
.topbar h2{margin:0;font-size:1.35rem;font-weight:800}
.topbar p{margin:2px 0 0;color:var(--muted);font-size:.92rem}
.top-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.user-pill{
  border:1px solid var(--line);
  background:#fff;
  border-radius:999px;
  padding:8px 12px;
  font-size:.85rem;
  color:#374151;
  display:inline-flex;
  align-items:center;
}
.content-section{
  display:none;
  padding:28px;
}
.content-section.active{display:block}
.metric-card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:22px;
  padding:18px;
  display:flex;
  align-items:center;
  gap:14px;
  box-shadow:0 10px 30px rgba(15,23,42,.04);
}
.metric-icon{
  width:48px;height:48px;
  border-radius:16px;
  background:var(--brand-soft);
  color:var(--brand);
  display:grid;place-items:center;
  font-size:1.35rem;
}
.metric-card small{display:block;color:var(--muted);font-weight:600}
.metric-card strong{display:block;font-size:1.55rem;font-weight:900;line-height:1.1}
.painel{
  border:1px solid var(--line);
  border-radius:22px;
  box-shadow:0 10px 30px rgba(15,23,42,.04);
  overflow:hidden;
}
.painel .card-header{
  background:#fff;
  border-bottom:1px solid var(--line);
  padding:18px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.painel .card-header h5{margin:0;font-weight:800;font-size:1rem}
.painel .card-header span{display:block;color:var(--muted);font-size:.85rem;margin-top:2px}
.table{font-size:.92rem}
.table thead th{
  background:#f9fafb;
  color:#4b5563;
  font-size:.78rem;
  letter-spacing:.02em;
  text-transform:uppercase;
  border-bottom:1px solid var(--line);
  white-space:nowrap;
}
.table td{vertical-align:middle}
.section-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}
.section-toolbar h3{margin:0;font-weight:900}
.section-toolbar p{margin:2px 0 0;color:var(--muted)}
.client-card{
  border:1px solid var(--line);
  border-radius:22px;
  background:#fff;
  box-shadow:0 10px 30px rgba(15,23,42,.04);
  padding:18px;
  height:100%;
}
.client-card h5{font-weight:850;margin:0 0 4px}
.client-card .segment{color:var(--muted);font-size:.88rem;margin-bottom:12px}
.client-meta{
  display:grid;
  gap:7px;
  font-size:.9rem;
  color:#374151;
}
.client-meta i{color:var(--brand);margin-right:6px}
.tag-list{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px}
.badge-soft{
  border-radius:999px;
  padding:6px 9px;
  font-size:.76rem;
  font-weight:700;
  background:#f3f4f6;
  color:#374151;
}
.badge-status{
  border-radius:999px;
  padding:6px 10px;
  font-size:.76rem;
  font-weight:800;
  white-space:nowrap;
}
.status-ativo,.status-pago,.status-publicado,.status-aprovado,.status-finalizado,.status-vencendo{background:#dcfce7;color:#166534}
.status-pausado,.status-pendente,.status-aguardando-aprovacao,.status-em-producao,.status-em-edicao,.status-planejado,.status-em-analise{background:#fef3c7;color:#92400e}
.status-encerrado,.status-vencido,.status-atrasado,.status-reprovado,.status-cancelado,.status-ajustes-solicitados{background:#fee2e2;color:#991b1b}
.status-agendado,.status-ativo-ads,.status-gravado,.status-roteiro-pendente,.status-gravacao-agendada{background:#dbeafe;color:#1e40af}
.check-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  background:#f9fafb;
}
.check-grid label{
  display:flex;
  gap:7px;
  align-items:center;
  font-size:.9rem;
}
.quick-list{display:grid;gap:10px}
.quick-item{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fbfdff;
}
.quick-item i{color:var(--brand);font-size:1.1rem;margin-top:2px}
.quick-item strong{display:block;font-size:.92rem}
.quick-item span{color:var(--muted);font-size:.83rem}
.empty-state{
  padding:28px;
  text-align:center;
  color:var(--muted);
}
.empty-state i{font-size:2rem;color:#d1d5db;display:block;margin-bottom:8px}
.action-btn{
  border:0;background:#f3f4f6;color:#374151;
  width:34px;height:34px;border-radius:10px;
  display:inline-grid;place-items:center;
  margin-right:4px;
}
.action-btn:hover{background:var(--brand-soft);color:var(--brand)}
.danger-zone{border-color:#fecaca}
.report-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  padding:20px;
  height:100%;
  box-shadow:0 10px 30px rgba(15,23,42,.04);
}
.report-card small{text-transform:uppercase;color:var(--muted);font-weight:800;letter-spacing:.03em}
.report-card strong{display:block;font-size:1.85rem;margin-top:8px}
.report-card p{margin:8px 0 0;color:var(--muted)}
@media(max-width:991px){
  .sidebar{transform:translateX(-100%);transition:.25s}
  .sidebar.open{transform:translateX(0)}
  .main{margin-left:0;width:100%}
  .topbar{padding:14px 16px}
  .content-section{padding:18px}
  .top-actions .btn{padding:.45rem .65rem}
  .section-toolbar{align-items:flex-start;flex-direction:column}
}
@media(max-width:575px){
  .login-card{padding:24px;border-radius:22px}
  .metric-card{padding:14px}
  .metric-icon{width:42px;height:42px}
  .metric-card strong{font-size:1.25rem}
  .check-grid{grid-template-columns:1fr}
  .top-actions{width:100%;justify-content:flex-start}
}


.permission-hidden{display:none!important}
.locked-section{
  background:#fff;
  border:1px dashed #cbd5e1;
  border-radius:22px;
  padding:28px;
  color:#64748b;
  text-align:center;
}
.locked-section i{
  display:block;
  font-size:2rem;
  color:#94a3b8;
  margin-bottom:8px;
}
.role-help{
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:18px;
  padding:16px;
}


.approval-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  padding:18px;
  height:100%;
  box-shadow:0 10px 30px rgba(15,23,42,.04);
}
.approval-card h5{
  font-weight:850;
  margin:6px 0 8px;
}
.approval-card .approval-meta{
  color:#64748b;
  font-size:.88rem;
  display:grid;
  gap:4px;
}
.approval-caption{
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:14px;
  padding:12px;
  color:#334155;
  font-size:.9rem;
  margin:12px 0;
  white-space:pre-wrap;
}
.approval-preview{
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:18px;
  padding:16px;
}
.approval-preview small{
  text-transform:uppercase;
  color:#64748b;
  font-weight:800;
  letter-spacing:.03em;
}
.approval-history{
  border-top:1px solid #e2e8f0;
  margin-top:12px;
  padding-top:12px;
  color:#64748b;
  font-size:.84rem;
}


.service-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  padding:18px;
  height:100%;
  box-shadow:0 10px 30px rgba(15,23,42,.04);
}
.service-progress{
  height:10px;
  background:#e5e7eb;
  border-radius:999px;
  overflow:hidden;
  margin:12px 0;
}
.service-progress span{
  display:block;
  height:100%;
  background:linear-gradient(135deg,var(--brand),#7c3aed);
}
.check-item{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:8px 0;
  border-bottom:1px solid #eef2f7;
}
.check-item:last-child{border-bottom:0}
.check-item input{margin-top:3px}
.check-item.done label{text-decoration:line-through;color:#64748b}
.contract-paper{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:18px;
  padding:28px;
  white-space:pre-wrap;
  line-height:1.65;
  color:#111827;
}
.signature-box{
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:18px;
  padding:18px;
}
@media print{
  body *{visibility:hidden}
  #contractViewText, #contractViewText *{visibility:visible}
  #contractViewText{
    position:absolute;
    left:0;
    top:0;
    width:100%;
    border:0;
  }
}


.signature-summary{
  margin-top:24px;
  border:2px solid #111827;
  border-radius:14px;
  padding:18px;
  background:#fff;
  color:#111827;
  page-break-inside:avoid;
}
.signature-summary h4{
  margin:0 0 12px;
  font-size:1.05rem;
  font-weight:900;
  text-transform:uppercase;
}
.signature-summary-grid{
  display:grid;
  grid-template-columns:180px 1fr;
  gap:6px 12px;
  font-size:.92rem;
}
.signature-summary-grid strong{
  font-weight:800;
}
.contract-print-area{
  background:#fff;
}
@media print{
  body *{visibility:hidden!important}
  #contractPrintArea, #contractPrintArea *{visibility:visible!important}
  #contractPrintArea{
    position:absolute;
    left:0;
    top:0;
    width:100%;
    padding:0;
    margin:0;
    background:#fff;
  }
  #contractViewText{
    border:0!important;
    border-radius:0!important;
    padding:0 0 18px 0!important;
    box-shadow:none!important;
  }
  #contractSignatureSummary{
    display:block!important;
  }
  @page{
    size:A4;
    margin:18mm;
  }
}


.danger-soft{
  background:linear-gradient(135deg,#fff1f2,#fff);
}
.warning-soft{
  background:linear-gradient(135deg,#fffbeb,#fff);
}
.attendance-item{
  padding:14px 16px;
  border-bottom:1px solid #eef2f7;
}
.attendance-item:last-child{border-bottom:0}
.attendance-item h6{
  margin:0 0 4px;
  font-weight:850;
}
.attendance-item p{
  margin:0;
  color:#64748b;
  font-size:.9rem;
}
.attendance-priority{
  font-size:.72rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.03em;
  padding:4px 8px;
  border-radius:999px;
  white-space:nowrap;
}
.priority-high{background:#fee2e2;color:#991b1b}
.priority-medium{background:#fef3c7;color:#92400e}
.priority-low{background:#dbeafe;color:#1e40af}
.log-detail{
  max-width:360px;
  white-space:normal;
  color:#475569;
  font-size:.86rem;
}


.nav-alert-count{
  margin-left:auto;
  min-width:22px;
  height:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 6px;
  border-radius:999px;
  background:#ef4444;
  color:#fff;
  font-size:.72rem;
  font-weight:900;
}
.nav-alert-count.is-zero{
  background:#94a3b8;
}
.alerts-summary{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:1px;
  background:#e5e7eb;
  border-top:1px solid #e5e7eb;
}
.alert-summary-item{
  background:#fff;
  padding:14px 16px;
}
.alert-summary-item small{
  display:block;
  color:#64748b;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.03em;
}
.alert-summary-item strong{
  display:block;
  font-size:1.5rem;
  margin-top:4px;
}
.alert-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  padding:18px;
  height:100%;
  box-shadow:0 10px 30px rgba(15,23,42,.04);
}
.alert-card.high{
  border-color:#fecaca;
  background:linear-gradient(135deg,#fff1f2,#fff);
}
.alert-card.medium{
  border-color:#fde68a;
  background:linear-gradient(135deg,#fffbeb,#fff);
}
.alert-card.low{
  border-color:#bfdbfe;
  background:linear-gradient(135deg,#eff6ff,#fff);
}
.alert-card h5{
  font-size:1rem;
  font-weight:900;
  margin:8px 0 6px;
}
.alert-card p{
  color:#475569;
  margin:0;
  font-size:.92rem;
}
.alert-meta{
  color:#64748b;
  font-size:.84rem;
  margin-top:10px;
}
.alert-priority{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 10px;
  border-radius:999px;
  font-size:.72rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.03em;
}
.alert-priority.high{background:#fee2e2;color:#991b1b}
.alert-priority.medium{background:#fef3c7;color:#92400e}
.alert-priority.low{background:#dbeafe;color:#1e40af}
.alerts-dashboard{
  display:grid;
  gap:0;
}
.dashboard-alert-line{
  display:flex;
  gap:12px;
  justify-content:space-between;
  align-items:center;
  padding:12px 16px;
  border-top:1px solid #eef2f7;
}
.dashboard-alert-line:first-child{
  border-top:0;
}
.dashboard-alert-line strong{
  font-weight:850;
}
.dashboard-alert-line span{
  color:#64748b;
  font-size:.88rem;
}
@media(max-width:900px){
  .alerts-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:560px){
  .alerts-summary{grid-template-columns:1fr}
  .dashboard-alert-line{align-items:flex-start;flex-direction:column}
}


.production-tab{
  width:100%;
  border:1px solid var(--line);
  background:#fff;
  border-radius:18px;
  padding:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  font-weight:900;
  color:#334155;
  box-shadow:0 10px 25px rgba(15,23,42,.04);
}
.production-tab i{
  font-size:1.35rem;
}
.production-tab.active{
  background:linear-gradient(135deg,var(--brand),#7c3aed);
  color:#fff;
  border-color:transparent;
}
.production-panel{
  display:none;
}
.production-panel.active{
  display:block;
}


.history-pagination{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:14px 16px;
  border-top:1px solid #eef2f7;
  flex-wrap:wrap;
}
.history-pagination .page-info{
  color:#64748b;
  font-size:.9rem;
}
.history-pagination .page-buttons{
  display:flex;
  gap:8px;
}
.history-pagination button{
  border:1px solid #e2e8f0;
  background:#fff;
  border-radius:10px;
  padding:7px 12px;
  font-weight:800;
  color:#334155;
}
.history-pagination button:disabled{
  opacity:.45;
  cursor:not-allowed;
}
.alerts-dashboard{
  min-height:250px;
}


.alert-action-link{
  margin-top:14px;
  display:inline-flex;
  align-items:center;
  gap:7px;
  border:0;
  border-radius:12px;
  background:linear-gradient(135deg,var(--brand),#7c3aed);
  color:#fff;
  padding:9px 13px;
  font-weight:900;
  font-size:.86rem;
}
.alert-action-link:hover{
  filter:brightness(.96);
}
.alert-focus-highlight{
  outline:3px solid rgba(124,58,237,.22)!important;
  box-shadow:0 0 0 6px rgba(124,58,237,.10)!important;
  border-radius:18px!important;
}


.client-card .btn-primary{
  border-radius:999px;
  font-weight:850;
}


.document-link{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-weight:850;
  text-decoration:none;
}
.document-link i{
  font-size:1rem;
}
.document-file-muted{
  color:#64748b;
  font-size:.84rem;
}
.upload-progress{
  height:8px;
  border-radius:999px;
  background:#e2e8f0;
  overflow:hidden;
  margin-top:8px;
}
.upload-progress span{
  display:block;
  height:100%;
  width:0%;
  background:linear-gradient(135deg,var(--brand),#7c3aed);
  transition:.25s ease;
}


.settings-page{
  padding-bottom:40px;
}
.settings-hero{
  background:linear-gradient(135deg,#111827,#4f46e5);
  color:#fff;
  border-radius:28px;
  padding:28px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  box-shadow:0 24px 70px rgba(79,70,229,.25);
  margin-bottom:22px;
}
.settings-kicker{
  display:inline-block;
  font-size:.76rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.08em;
  background:rgba(255,255,255,.14);
  padding:6px 10px;
  border-radius:999px;
  margin-bottom:12px;
}
.settings-hero h3{
  font-size:2rem;
  font-weight:950;
  margin:0 0 6px;
}
.settings-hero p{
  margin:0;
  color:rgba(255,255,255,.82);
  max-width:720px;
}
.settings-hero-icon{
  min-width:78px;
  height:78px;
  border-radius:24px;
  background:rgba(255,255,255,.14);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:2.25rem;
}
.settings-grid{
  display:grid;
  grid-template-columns:minmax(0,1.6fr) minmax(300px,.9fr);
  gap:18px;
  align-items:start;
}
.settings-side{
  display:grid;
  gap:18px;
}
.settings-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:24px;
  box-shadow:0 16px 40px rgba(15,23,42,.05);
  overflow:hidden;
}
.settings-card-main{
  padding:0;
}
.settings-card-header{
  padding:20px 22px;
  border-bottom:1px solid #eef2f7;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
}
.settings-card-header.compact{
  border-bottom:0;
  padding-bottom:10px;
}
.settings-card-header h5{
  margin:0;
  font-size:1.05rem;
  font-weight:950;
  color:#0f172a;
}
.settings-card-header span{
  display:block;
  color:#64748b;
  margin-top:3px;
  font-size:.9rem;
}
.settings-card-icon{
  font-size:1.6rem;
  color:#4f46e5;
  background:#eef2ff;
  width:44px;
  height:44px;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:none;
}
.settings-form{
  padding:22px;
}
.settings-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:18px;
}
.settings-card-text{
  color:#64748b;
  margin:0;
  padding:0 22px 18px;
  font-size:.93rem;
}
.settings-side .btn{
  margin:0 22px 22px;
  width:calc(100% - 44px)!important;
}
.settings-mini-stats{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:1px;
  background:#eef2f7;
  border-top:1px solid #eef2f7;
}
.settings-mini-stats div{
  background:#fff;
  padding:16px;
}
.settings-mini-stats small{
  color:#64748b;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.settings-mini-stats strong{
  display:block;
  font-size:1.55rem;
  font-weight:950;
  color:#111827;
  margin-top:4px;
}
.settings-admin-card .settings-card-header{
  border-bottom:1px solid #eef2f7;
}
.settings-admin-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  padding:18px;
}
.admin-action{
  border:1px solid #e2e8f0;
  background:#f8fafc;
  border-radius:18px;
  padding:16px;
  display:flex;
  gap:14px;
  align-items:flex-start;
  text-align:left;
  transition:.2s ease;
}
.admin-action:hover{
  background:#eef2ff;
  border-color:#c7d2fe;
  transform:translateY(-1px);
}
.admin-action i{
  width:42px;
  height:42px;
  border-radius:15px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff;
  color:#4f46e5;
  font-size:1.25rem;
  flex:none;
}
.admin-action strong{
  display:block;
  color:#0f172a;
  font-weight:900;
}
.admin-action span{
  display:block;
  color:#64748b;
  font-size:.88rem;
  margin-top:2px;
}
.settings-history-wrap .settings-card,
.settings-history-wrap .card{
  border-radius:24px;
  overflow:hidden;
  border:1px solid var(--line);
  box-shadow:0 16px 40px rgba(15,23,42,.05);
}
.settings-history-wrap .card-header{
  padding:20px 22px;
  background:#fff;
}
.settings-history-wrap .card-header h5{
  margin:0;
  font-weight:950;
}
.settings-history-wrap .card-header span{
  color:#64748b;
  font-size:.9rem;
}
@media(max-width:1000px){
  .settings-grid{
    grid-template-columns:1fr;
  }
}
@media(max-width:700px){
  .settings-hero{
    align-items:flex-start;
    flex-direction:column;
  }
  .settings-admin-actions{
    grid-template-columns:1fr;
  }
}


/* ===============================
   MODO 9 — REDESIGN VISUAL COMPLETO
   =============================== */

.crm-modern{
  background:
    radial-gradient(circle at top left, rgba(79,70,229,.10), transparent 34%),
    radial-gradient(circle at 80% 0%, rgba(124,58,237,.08), transparent 30%),
    #f8fafc;
}

.crm-modern .app-shell{
  background:transparent;
}

.crm-modern .sidebar{
  background:linear-gradient(180deg,#0f172a 0%,#111827 48%,#1e1b4b 100%);
  border-right:0;
  box-shadow:18px 0 50px rgba(15,23,42,.18);
}

.crm-modern .sidebar .brand{
  padding:22px 18px;
  border-bottom:1px solid rgba(255,255,255,.10);
}

.crm-modern .brand img{
  filter:drop-shadow(0 10px 18px rgba(0,0,0,.18));
}

.brand-version-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:22px;
  min-width:34px;
  padding:0 8px;
  border-radius:999px;
  margin-left:8px;
  background:rgba(255,255,255,.14);
  color:#fff;
  font-size:.72rem;
  font-weight:900;
  letter-spacing:.03em;
}

.crm-modern .menu-link{
  border-radius:16px;
  margin:4px 10px;
  padding:12px 14px;
  font-weight:800;
  color:rgba(255,255,255,.72);
  transition:.22s ease;
}

.crm-modern .menu-link i{
  width:24px;
  height:24px;
  border-radius:9px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,.08);
  color:rgba(255,255,255,.88);
}

.crm-modern .menu-link:hover{
  background:rgba(255,255,255,.09);
  color:#fff;
  transform:translateX(2px);
}

.crm-modern .menu-link.active{
  background:linear-gradient(135deg,#4f46e5,#7c3aed);
  color:#fff;
  box-shadow:0 16px 32px rgba(79,70,229,.28);
}

.crm-modern .menu-link.active i{
  background:rgba(255,255,255,.18);
  color:#fff;
}

.crm-modern .topbar{
  margin:18px 22px 0;
  border:1px solid rgba(226,232,240,.85);
  border-radius:24px;
  background:rgba(255,255,255,.86);
  backdrop-filter:blur(14px);
  box-shadow:0 18px 48px rgba(15,23,42,.06);
}

.crm-modern .topbar h1,
.crm-modern #pageTitle{
  font-weight:950;
  color:#0f172a;
}

.crm-modern #pageSubtitle{
  color:#64748b;
  font-weight:600;
}

.crm-modern .content{
  padding:24px 22px 36px;
}

/* Cabeçalho padrão das páginas */
.crm-modern .section-toolbar{
  background:linear-gradient(135deg,#111827,#4f46e5);
  color:#fff;
  border-radius:28px;
  padding:24px;
  margin-bottom:22px;
  border:0;
  box-shadow:0 24px 70px rgba(79,70,229,.18);
  align-items:center;
}

.crm-modern .section-toolbar h3{
  margin:0 0 4px;
  font-size:1.65rem;
  font-weight:950;
  letter-spacing:-.03em;
}

.crm-modern .section-toolbar p{
  color:rgba(255,255,255,.80);
  margin:0;
  font-weight:500;
}

.crm-modern .section-toolbar .btn,
.crm-modern .section-toolbar button{
  border-radius:14px;
  font-weight:900;
}

.crm-modern .section-toolbar .btn-primary,
.crm-modern .section-toolbar .btn-outline-primary{
  background:#fff;
  border-color:#fff;
  color:#312e81;
}

.crm-modern .section-toolbar .btn-outline-primary:hover,
.crm-modern .section-toolbar .btn-primary:hover{
  background:#eef2ff;
  border-color:#eef2ff;
  color:#312e81;
}

/* Cards e superfícies */
.crm-modern .card,
.crm-modern .painel,
.crm-modern .client-card,
.crm-modern .service-card,
.crm-modern .alert-card,
.crm-modern .metric-card,
.crm-modern .report-card{
  border:1px solid rgba(226,232,240,.92);
  border-radius:24px;
  box-shadow:0 18px 44px rgba(15,23,42,.055);
  background:#fff;
}

.crm-modern .card-header{
  background:#fff;
  border-bottom:1px solid #eef2f7;
  padding:20px 22px;
  border-radius:24px 24px 0 0!important;
}

.crm-modern .card-header h5{
  margin:0;
  font-weight:950;
  color:#0f172a;
}

.crm-modern .card-header span{
  color:#64748b;
  font-weight:600;
  font-size:.9rem;
}

/* Dashboard */
.crm-modern .metric-card{
  padding:18px;
  min-height:104px;
  display:flex;
  align-items:center;
  gap:14px;
  transition:.22s ease;
}

.crm-modern .metric-card:hover{
  transform:translateY(-2px);
  box-shadow:0 24px 60px rgba(15,23,42,.09);
}

.crm-modern .metric-icon{
  width:54px;
  height:54px;
  border-radius:18px;
  background:linear-gradient(135deg,#eef2ff,#f5f3ff);
  color:#4f46e5;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.45rem;
  flex:none;
}

.crm-modern .metric-card small{
  text-transform:uppercase;
  letter-spacing:.055em;
  color:#64748b;
  font-weight:900;
  font-size:.72rem;
}

.crm-modern .metric-card strong{
  display:block;
  font-size:1.55rem;
  color:#0f172a;
  font-weight:950;
}

/* Tabelas */
.crm-modern .table{
  margin:0;
}

.crm-modern .table thead th{
  background:#f8fafc;
  color:#475569;
  font-size:.74rem;
  text-transform:uppercase;
  letter-spacing:.055em;
  font-weight:950;
  border-bottom:1px solid #e2e8f0;
  padding:14px 16px;
}

.crm-modern .table tbody td{
  padding:14px 16px;
  border-color:#eef2f7;
  color:#334155;
}

.crm-modern .table tbody tr{
  transition:.18s ease;
}

.crm-modern .table tbody tr:hover{
  background:#f8fafc;
}

/* Botões */
.crm-modern .btn{
  border-radius:14px;
  font-weight:850;
  box-shadow:none!important;
}

.crm-modern .btn-primary{
  background:linear-gradient(135deg,#4f46e5,#7c3aed);
  border:0;
}

.crm-modern .btn-primary:hover{
  filter:brightness(.96);
  transform:translateY(-1px);
}

.crm-modern .btn-outline-primary{
  border-color:#c7d2fe;
  color:#4f46e5;
  background:#fff;
}

.crm-modern .btn-outline-primary:hover{
  background:#eef2ff;
  border-color:#a5b4fc;
  color:#312e81;
}

.crm-modern .action-btn{
  width:36px;
  height:36px;
  border-radius:13px;
  border:1px solid #e2e8f0;
  background:#fff;
  color:#475569;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:.18s ease;
}

.crm-modern .action-btn:hover{
  background:#eef2ff;
  color:#4f46e5;
  border-color:#c7d2fe;
}

/* Formulários */
.crm-modern .form-control,
.crm-modern .form-select{
  border-radius:14px;
  border-color:#e2e8f0;
  min-height:44px;
}

.crm-modern textarea.form-control{
  min-height:auto;
}

.crm-modern .form-control:focus,
.crm-modern .form-select:focus{
  border-color:#a5b4fc;
  box-shadow:0 0 0 .22rem rgba(79,70,229,.12);
}

.crm-modern .form-label{
  font-weight:850;
  color:#334155;
  font-size:.88rem;
}

/* Clientes */
.crm-modern .client-card{
  padding:20px;
  height:100%;
  transition:.22s ease;
}

.crm-modern .client-card:hover{
  transform:translateY(-3px);
  box-shadow:0 28px 70px rgba(15,23,42,.09);
}

.crm-modern .client-card h5{
  font-weight:950;
  color:#0f172a;
}

.crm-modern .segment{
  color:#64748b;
  font-weight:650;
}

.crm-modern .client-meta{
  display:grid;
  gap:9px;
  margin-top:14px;
}

.crm-modern .client-meta div{
  display:flex;
  align-items:center;
  gap:8px;
  color:#475569;
  font-size:.92rem;
}

.crm-modern .client-meta i{
  width:28px;
  height:28px;
  border-radius:10px;
  background:#f1f5f9;
  color:#4f46e5;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

/* Badges */
.crm-modern .badge,
.crm-modern .badge-soft,
.crm-modern .status-badge{
  border-radius:999px;
  font-weight:900;
  letter-spacing:.01em;
}

.crm-modern .badge-soft{
  background:#eef2ff;
  color:#4338ca;
  padding:6px 10px;
  display:inline-flex;
  margin:2px;
}

/* Serviços */
.crm-modern .service-card{
  padding:20px;
  height:100%;
}

.crm-modern .service-card h5{
  font-weight:950;
  color:#0f172a;
}

.crm-modern .service-progress{
  height:10px;
  border-radius:999px;
  overflow:hidden;
  background:#e2e8f0;
}

.crm-modern .service-progress span{
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(135deg,#4f46e5,#7c3aed);
}

/* Produção */
.crm-modern .production-tab{
  border-radius:20px;
  padding:18px;
  transition:.22s ease;
}

.crm-modern .production-tab:hover{
  transform:translateY(-2px);
}

.crm-modern .production-tab.active{
  box-shadow:0 18px 48px rgba(79,70,229,.22);
}

/* Alertas */
.crm-modern .dashboard-alert-line{
  padding:16px 18px;
}

.crm-modern .alert-action-link{
  box-shadow:0 12px 28px rgba(79,70,229,.20);
}

/* Modais */
.crm-modern .modal-content{
  border:0;
  border-radius:26px;
  overflow:hidden;
  box-shadow:0 40px 120px rgba(15,23,42,.25);
}

.crm-modern .modal-header{
  background:linear-gradient(135deg,#111827,#4f46e5);
  color:#fff;
  border-bottom:0;
  padding:20px 24px;
}

.crm-modern .modal-header .modal-title{
  font-weight:950;
}

.crm-modern .modal-header .btn-close{
  filter:invert(1);
  opacity:.85;
}

.crm-modern .modal-body{
  padding:24px;
}

.crm-modern .modal-footer{
  border-top:1px solid #eef2f7;
  padding:18px 24px;
  background:#f8fafc;
}

/* Página de login */
.crm-modern .login-card{
  border-radius:30px;
  box-shadow:0 30px 100px rgba(15,23,42,.18);
  border:1px solid rgba(226,232,240,.8);
}

.crm-modern .login-brand{
  background:linear-gradient(135deg,#111827,#4f46e5);
  border-radius:24px;
}

/* Empty states */
.crm-modern .empty-state{
  border-radius:22px;
  background:#fff;
  color:#64748b;
}

/* Responsivo */
@media(max-width:992px){
  .crm-modern .topbar{
    margin:12px;
    border-radius:20px;
  }
  .crm-modern .content{
    padding:16px 12px 30px;
  }
  .crm-modern .section-toolbar{
    border-radius:22px;
    padding:20px;
    align-items:flex-start;
    flex-direction:column;
  }
}

@media(max-width:560px){
  .crm-modern .metric-card{
    min-height:92px;
    padding:15px;
  }
  .crm-modern .metric-icon{
    width:46px;
    height:46px;
  }
  .crm-modern .section-toolbar h3{
    font-size:1.38rem;
  }
}


.dashboard-hero{
  background:linear-gradient(135deg,#111827,#4f46e5);
  color:#fff;
  border-radius:28px;
  padding:28px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-bottom:22px;
  box-shadow:0 24px 70px rgba(79,70,229,.18);
}
.dashboard-hero h3{
  font-size:2rem;
  font-weight:950;
  margin:0 0 6px;
}
.dashboard-hero p{
  margin:0;
  color:rgba(255,255,255,.82);
  max-width:760px;
}
.dashboard-hero-icon{
  min-width:78px;
  height:78px;
  border-radius:24px;
  background:rgba(255,255,255,.14);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:2.25rem;
}
@media(max-width:700px){
  .dashboard-hero{
    flex-direction:column;
    align-items:flex-start;
  }
}


/* ===============================
   V10.6 — FINANCEIRO ESTÁVEL SEM HOLERITE
   =============================== */
.finance-filter-bar{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:24px;
  padding:18px;
  box-shadow:0 18px 44px rgba(15,23,42,.055);
  margin-bottom:16px;
}
.finance-kpi{
  border-radius:24px;
  border:1px solid #e2e8f0;
  padding:20px;
  background:#fff;
  box-shadow:0 18px 44px rgba(15,23,42,.055);
  min-height:130px;
  position:relative;
  overflow:hidden;
}
.finance-kpi::after{
  content:"";
  position:absolute;
  right:-24px;
  top:-24px;
  width:88px;
  height:88px;
  border-radius:999px;
  opacity:.12;
  background:#4f46e5;
}
.finance-kpi small{
  display:block;
  text-transform:uppercase;
  letter-spacing:.06em;
  font-weight:950;
  color:#64748b;
  font-size:.72rem;
}
.finance-kpi strong{
  display:block;
  color:#0f172a;
  font-size:1.55rem;
  font-weight:950;
  margin:8px 0 4px;
}
.finance-kpi span{
  color:#64748b;
  font-weight:650;
  font-size:.9rem;
}
.finance-kpi.entrada::after{background:#16a34a}
.finance-kpi.saida::after{background:#dc2626}
.finance-kpi.pendente::after{background:#f59e0b}
.finance-kpi.saldo::after{background:#4f46e5}
.finance-tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.finance-tab{
  border:1px solid #e2e8f0;
  background:#fff;
  color:#475569;
  padding:12px 16px;
  border-radius:999px;
  font-weight:900;
  display:inline-flex;
  align-items:center;
  gap:8px;
  transition:.2s ease;
}
.finance-tab:hover{
  background:#eef2ff;
  color:#4f46e5;
  border-color:#c7d2fe;
}
.finance-tab.active{
  background:linear-gradient(135deg,#4f46e5,#7c3aed);
  color:#fff;
  border-color:transparent;
  box-shadow:0 16px 36px rgba(79,70,229,.23);
}
.finance-panel{display:none;}
.finance-panel.active{display:block;}
@media(max-width:900px){
  .finance-filter-bar{grid-template-columns:1fr;}
}


/* ===============================
   MODO 11 — REVISÃO FINAL E ESTABILIDADE
   =============================== */
.settings-diagnostics-card .diagnostics-body{
  padding:18px 22px 22px;
}
.diagnostics-result{
  margin-top:16px;
  border:1px dashed #cbd5e1;
  background:#f8fafc;
  border-radius:18px;
  padding:16px;
  color:#475569;
}
.diagnostics-summary{
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  padding-bottom:12px;
  margin-bottom:12px;
  border-bottom:1px solid #e2e8f0;
}
.diagnostics-summary strong{
  color:#0f172a;
}
.diagnostics-summary span{
  color:#64748b;
}
.diagnostic-line{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:10px 0;
  border-bottom:1px solid #eef2f7;
}
.diagnostic-line:last-child{
  border-bottom:0;
}
.diagnostic-line i{
  margin-top:2px;
}
.diagnostic-line.ok i{
  color:#16a34a;
}
.diagnostic-line.warn i{
  color:#f59e0b;
}
.diagnostic-line strong{
  display:block;
  color:#0f172a;
  font-weight:900;
}
.diagnostic-line span{
  display:block;
  color:#64748b;
  font-size:.9rem;
  margin-top:2px;
}


/* ===============================
   V12 — MENU DP / DEPARTAMENTO PESSOAL
   =============================== */
.dp-kpi{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:24px;
  padding:18px;
  display:flex;
  align-items:center;
  gap:14px;
  min-height:112px;
  box-shadow:0 18px 44px rgba(15,23,42,.055);
}
.dp-kpi i{
  width:54px;
  height:54px;
  border-radius:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,#eef2ff,#f5f3ff);
  color:#4f46e5;
  font-size:1.45rem;
  flex:none;
}
.dp-kpi small{
  display:block;
  text-transform:uppercase;
  letter-spacing:.055em;
  color:#64748b;
  font-weight:950;
  font-size:.72rem;
}
.dp-kpi strong{
  display:block;
  color:#0f172a;
  font-size:1.55rem;
  font-weight:950;
  margin-top:4px;
}
.dp-tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.dp-tab{
  border:1px solid #e2e8f0;
  background:#fff;
  color:#475569;
  padding:12px 16px;
  border-radius:999px;
  font-weight:900;
  display:inline-flex;
  align-items:center;
  gap:8px;
  transition:.2s ease;
}
.dp-tab:hover{
  background:#eef2ff;
  color:#4f46e5;
  border-color:#c7d2fe;
}
.dp-tab.active{
  background:linear-gradient(135deg,#4f46e5,#7c3aed);
  color:#fff;
  border-color:transparent;
  box-shadow:0 16px 36px rgba(79,70,229,.23);
}
.dp-panel{
  display:none;
}
.dp-panel.active{
  display:block;
}
.dp-placeholder{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:24px;
  padding:34px;
  text-align:center;
  box-shadow:0 18px 44px rgba(15,23,42,.055);
}
.dp-placeholder i{
  width:72px;
  height:72px;
  border-radius:24px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#eef2ff;
  color:#4f46e5;
  font-size:2rem;
  margin-bottom:16px;
}
.dp-placeholder h5{
  font-weight:950;
  color:#0f172a;
  margin-bottom:8px;
}
.dp-placeholder p{
  color:#64748b;
  max-width:720px;
  margin:0 auto 10px;
}
.dp-placeholder span{
  display:inline-block;
  color:#4338ca;
  background:#eef2ff;
  border-radius:999px;
  padding:7px 12px;
  font-weight:850;
  font-size:.86rem;
}


/* ===============================
   V13 — DP FÉRIAS E AFASTAMENTOS
   =============================== */
.dp-filter-bar{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  padding:18px 22px;
  border-bottom:1px solid #eef2f7;
  background:#f8fafc;
}
@media(max-width:900px){
  .dp-filter-bar{
    grid-template-columns:1fr;
  }
}


/* ===============================
   V14 — FICHA COMPLETA DO FUNCIONÁRIO
   =============================== */
.employee-form-note{
  display:flex;
  gap:12px;
  align-items:flex-start;
  background:#eef2ff;
  border:1px solid #c7d2fe;
  color:#312e81;
  border-radius:18px;
  padding:14px;
  margin-bottom:16px;
}
.employee-form-note i{font-size:1.25rem;margin-top:2px;}
.employee-form-note strong{display:block;font-weight:950;}
.employee-form-note span{display:block;color:#475569;font-size:.9rem;margin-top:2px;}
.employee-form-section{
  border:1px solid #e2e8f0;
  border-radius:20px;
  padding:16px;
  margin-bottom:16px;
  background:#fff;
}
.employee-form-section h6{
  display:flex;
  align-items:center;
  gap:8px;
  color:#0f172a;
  font-weight:950;
  margin:0 0 14px;
}
.employee-form-section h6 i{color:#4f46e5;}
.payment-preferred{
  background:linear-gradient(135deg,#fff,#f8fafc);
  border-color:#c7d2fe;
}
.employee-completion{
  height:9px;
  background:#e2e8f0;
  border-radius:999px;
  overflow:hidden;
  margin-bottom:4px;
  min-width:90px;
}
.employee-completion span{
  display:block;
  height:100%;
  background:linear-gradient(135deg,#4f46e5,#7c3aed);
  border-radius:999px;
}


/* ===============================
   V15 — DP DOCUMENTOS DO COLABORADOR
   =============================== */
#employeeDocumentsTable .document-link{
  display:inline-flex;
  align-items:center;
  gap:4px;
  color:#4f46e5;
  font-weight:900;
  text-decoration:none;
}
#employeeDocumentsTable .document-link:hover{
  text-decoration:underline;
}


/* ===============================
   V16 — DP PENDÊNCIAS E ALERTAS
   =============================== */
.dp-alert-kpi{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:24px;
  padding:18px;
  display:flex;
  align-items:center;
  gap:14px;
  min-height:112px;
  box-shadow:0 18px 44px rgba(15,23,42,.055);
}
.dp-alert-kpi i{
  width:54px;
  height:54px;
  border-radius:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f1f5f9;
  color:#475569;
  font-size:1.45rem;
  flex:none;
}
.dp-alert-kpi small{
  display:block;
  text-transform:uppercase;
  letter-spacing:.055em;
  color:#64748b;
  font-weight:950;
  font-size:.72rem;
}
.dp-alert-kpi strong{
  display:block;
  color:#0f172a;
  font-size:1.55rem;
  font-weight:950;
  margin-top:4px;
}
.dp-alert-kpi.danger i{
  background:#fee2e2;
  color:#dc2626;
}
.dp-alert-kpi.warning i{
  background:#fef3c7;
  color:#d97706;
}
.dp-alert-kpi.info i{
  background:#dbeafe;
  color:#2563eb;
}


/* ===============================
   V17 — DP CHECKLISTS E PROCESSOS
   =============================== */
.dp-checklist-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  padding:18px;
}
.dp-checklist-card{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:24px;
  padding:18px;
  box-shadow:0 18px 44px rgba(15,23,42,.055);
}
.dp-checklist-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  margin-bottom:12px;
}
.dp-checklist-head small{
  display:block;
  color:#64748b;
  font-weight:850;
}
.dp-checklist-head h5{
  margin:3px 0 0;
  color:#0f172a;
  font-weight:950;
}
.dp-checklist-meta{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  color:#64748b;
  font-size:.88rem;
  font-weight:750;
  margin-bottom:12px;
}
.dp-checklist-meta span{
  display:inline-flex;
  align-items:center;
  gap:6px;
}
.dp-checklist-steps{
  display:grid;
  gap:6px;
}
.dp-checklist-actions{
  display:flex;
  gap:8px;
  justify-content:flex-end;
  margin-top:14px;
}
@media(max-width:1100px){
  .dp-checklist-grid{
    grid-template-columns:1fr;
  }
}


/* ===============================
   V18 — DP FICHA CADASTRAL
   =============================== */
.employee-profile{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:24px;
  padding:20px;
}
.employee-profile-header{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
  border-bottom:1px solid #e2e8f0;
  padding-bottom:16px;
  margin-bottom:18px;
}
.employee-profile-brand{
  display:flex;
  gap:12px;
  align-items:center;
}
.employee-profile-brand img{
  width:64px;
  max-height:64px;
  object-fit:contain;
}
.employee-profile-brand h4{
  margin:0;
  color:#0f172a;
  font-weight:950;
}
.employee-profile-brand p,
.employee-profile-title span,
.employee-profile-main p{
  margin:2px 0 0;
  color:#64748b;
}
.employee-profile-title{
  text-align:right;
}
.employee-profile-title strong{
  display:block;
  color:#0f172a;
  font-weight:950;
}
.employee-profile-main{
  display:flex;
  justify-content:space-between;
  gap:16px;
  background:linear-gradient(135deg,#eef2ff,#f8fafc);
  border:1px solid #c7d2fe;
  border-radius:20px;
  padding:18px;
  margin-bottom:16px;
}
.employee-profile-main h3{
  margin:0;
  color:#0f172a;
  font-weight:950;
}
.employee-profile-completion{
  border:1px solid #e2e8f0;
  border-radius:18px;
  padding:14px;
  margin-bottom:16px;
}
.employee-profile-completion strong{
  display:block;
  color:#0f172a;
  font-weight:950;
}
.employee-profile-completion span{
  color:#64748b;
  font-size:.9rem;
}
.employee-profile-section{
  border:1px solid #e2e8f0;
  border-radius:18px;
  padding:16px;
  margin-bottom:16px;
  background:#fff;
}
.employee-profile-section h6{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 0 14px;
  color:#0f172a;
  font-weight:950;
}
.employee-profile-section h6 i{
  color:#4f46e5;
}
.employee-profile-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.employee-profile-grid div{
  background:#f8fafc;
  border:1px solid #eef2f7;
  border-radius:14px;
  padding:10px;
}
.employee-profile-grid span{
  display:block;
  color:#64748b;
  font-size:.72rem;
  text-transform:uppercase;
  letter-spacing:.05em;
  font-weight:900;
}
.employee-profile-grid strong{
  display:block;
  color:#0f172a;
  font-weight:850;
  margin-top:3px;
  word-break:break-word;
}
.employee-profile-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
.employee-profile-summary div{
  background:#f8fafc;
  border:1px solid #eef2f7;
  border-radius:16px;
  padding:14px;
  text-align:center;
}
.employee-profile-summary strong{
  display:block;
  color:#4f46e5;
  font-size:1.5rem;
  font-weight:950;
}
.employee-profile-summary span{
  color:#64748b;
  font-weight:750;
  font-size:.85rem;
}
.employee-profile-signature{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:60px;
  margin-top:46px;
}
.employee-profile-signature div{
  border-top:1px solid #94a3b8;
  text-align:center;
  padding-top:8px;
  color:#64748b;
  font-weight:750;
}
@media(max-width:900px){
  .employee-profile-header,
  .employee-profile-main{
    flex-direction:column;
  }
  .employee-profile-title{
    text-align:left;
  }
  .employee-profile-grid,
  .employee-profile-summary,
  .employee-profile-signature{
    grid-template-columns:1fr;
  }
}


/* ===============================
   V19 — DP FOLHA E HOLERITE
   =============================== */
.payroll-preview{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-top:4px;
}
.payroll-preview div{
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:18px;
  padding:14px;
  text-align:center;
}
.payroll-preview small{
  display:block;
  text-transform:uppercase;
  letter-spacing:.055em;
  color:#64748b;
  font-weight:950;
  font-size:.72rem;
}
.payroll-preview strong{
  display:block;
  color:#0f172a;
  font-size:1.2rem;
  font-weight:950;
  margin-top:4px;
}
@media(max-width:800px){
  .payroll-preview{
    grid-template-columns:1fr;
  }
}


/* ===============================
   V19.2 — CÁLCULO INSS E IRRF
   =============================== */
.payroll-auto-tax{
  background:#f8fafc;
  border-color:#c7d2fe;
}


/* ===============================
   V19.3 — MODELO CONTRACHEQUE / INSS EMPRESA
   =============================== */
#payrollCompanyInss,
#payrollCompanyInssRate{
  background:#f8fafc;
  border-color:#c7d2fe;
}


/* ===============================
   V19.4 — FGTS 8% E DADOS DA EMPRESA
   =============================== */
#payrollFgtsBase,
#payrollFgts{
  background:#f8fafc;
  border-color:#c7d2fe;
}


/* ===============================
   V19.5 — IRRF 2026 REDUTOR
   =============================== */
#payrollIrrfReduction{
  background:#eef2ff;
  border-color:#c7d2fe;
  font-weight:800;
}


/* ===============================
   V19.6 — VT AUTOMÁTICO 6%
   =============================== */
#employeeReceivesVt,
#payrollBenefitDiscount{
  background:#f8fafc;
  border-color:#c7d2fe;
}


/* ===============================
   V19.7 — CAMPO VT VISÍVEL
   =============================== */
.employee-benefit-field{
  background:#f8fafc;
  border:1px solid #c7d2fe;
  border-radius:16px;
  padding:12px;
}
.employee-benefit-field label{
  color:#1e1b4b;
}
#employeeReceivesVt{
  border-color:#818cf8;
}


/* ===============================
   V19.8 — HOLERITE E RECIBO POR REGIME
   =============================== */
.payroll-regime-info{
  display:flex;
  gap:12px;
  align-items:flex-start;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:18px;
  padding:14px;
  margin-bottom:16px;
}
.payroll-regime-info i{
  width:38px;
  height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  background:#e0e7ff;
  color:#3730a3;
  font-size:1.1rem;
  flex-shrink:0;
}
.payroll-regime-info strong{
  display:block;
  color:#0f172a;
  font-weight:950;
}
.payroll-regime-info span{
  display:block;
  color:#64748b;
  font-size:.9rem;
  margin-top:2px;
}
.payroll-regime-info.clt{
  border-color:#c7d2fe;
  background:#eef2ff;
}
.payroll-regime-info.recibo{
  border-color:#bbf7d0;
  background:#f0fdf4;
}
.payroll-regime-info.recibo i{
  background:#dcfce7;
  color:#166534;
}


/* ===============================
   V19.9 — FOLHA CLT E RECIBOS
   =============================== */
.payroll-type-guide{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.payroll-type-guide div{
  display:flex;
  align-items:flex-start;
  gap:10px;
  border:1px solid #e2e8f0;
  border-radius:16px;
  background:#f8fafc;
  padding:12px;
}
.payroll-type-guide i{
  width:34px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  background:#e0e7ff;
  color:#3730a3;
  flex-shrink:0;
}
.payroll-type-guide strong{
  display:block;
  color:#0f172a;
  font-weight:950;
}
.payroll-type-guide span{
  display:block;
  color:#64748b;
  font-size:.86rem;
}
@media(max-width:800px){
  .payroll-type-guide{
    grid-template-columns:1fr;
  }
}


/* ===============================
   V19.10 — FOLHA INTEGRADA AO FINANCEIRO
   =============================== */
.payroll-finance-alert{
  display:flex;
  gap:12px;
  align-items:flex-start;
  border:1px solid #bbf7d0;
  background:#f0fdf4;
  border-radius:16px;
  padding:13px;
}
.payroll-finance-alert i{
  width:36px;
  height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  background:#dcfce7;
  color:#166534;
  flex-shrink:0;
}
.payroll-finance-alert strong{
  display:block;
  color:#14532d;
  font-weight:950;
}
.payroll-finance-alert span{
  display:block;
  color:#166534;
  font-size:.9rem;
}


/* ===============================
   V19.11 — DEMONSTRATIVO FINANCEIRO
   =============================== */
.finance-report-bar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  background:linear-gradient(135deg,#eef2ff,#f8fafc);
  border:1px solid #c7d2fe;
  border-radius:22px;
  padding:16px;
  margin-bottom:16px;
}
.finance-report-bar h5{
  margin:0;
  color:#0f172a;
  font-weight:950;
}
.finance-report-bar span{
  display:block;
  color:#64748b;
  font-weight:650;
  margin-top:2px;
}
@media(max-width:800px){
  .finance-report-bar{
    flex-direction:column;
    align-items:flex-start;
  }
}


/* ===============================
   V20 — AUDITORIA, BACKUP E SEGURANÇA
   =============================== */
.security-admin-card{
  border-color:#c7d2fe;
}
.security-action-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.security-action{
  border:1px solid #e2e8f0;
  background:#f8fafc;
  border-radius:18px;
  padding:14px;
  display:flex;
  gap:12px;
  align-items:flex-start;
  text-align:left;
  width:100%;
  transition:.2s ease;
}
.security-action:hover{
  transform:translateY(-1px);
  border-color:#818cf8;
  background:#eef2ff;
}
.security-action i{
  width:40px;
  height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  background:#e0e7ff;
  color:#3730a3;
  font-size:1.15rem;
  flex-shrink:0;
}
.security-action strong{
  display:block;
  color:#0f172a;
  font-weight:950;
}
.security-action span{
  display:block;
  color:#64748b;
  font-size:.88rem;
  line-height:1.35;
  margin-top:2px;
}
.system-health-result{
  border:1px dashed #cbd5e1;
  background:#f8fafc;
  border-radius:18px;
  padding:14px;
}
.health-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.health-mini-card{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:16px;
  padding:12px;
}
.health-mini-card small{
  display:block;
  color:#64748b;
  font-weight:800;
}
.health-mini-card strong{
  display:block;
  color:#0f172a;
  font-size:1.35rem;
  font-weight:950;
  margin-top:3px;
}
@media(max-width:900px){
  .security-action-grid,
  .health-grid{
    grid-template-columns:1fr;
  }
}


/* ===============================
   V20.1 — LOGIN REDESENHADO
   =============================== */
.login-screen{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px;
  background:
    radial-gradient(circle at left top, rgba(91,33,182,.26), transparent 32%),
    radial-gradient(circle at right bottom, rgba(37,99,235,.20), transparent 28%),
    linear-gradient(135deg,#f8fafc 0%,#eef2ff 52%,#f5f3ff 100%);
}
.login-layout{
  width:min(1180px,100%);
  display:grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(380px, 460px);
  gap:26px;
  align-items:stretch;
}
.login-showcase{
  position:relative;
  overflow:hidden;
  border-radius:34px;
  padding:36px;
  background:
    linear-gradient(145deg, rgba(17,24,39,.96), rgba(59,7,100,.95)),
    linear-gradient(145deg, #111827, #3b0764);
  color:#fff;
  min-height:640px;
  box-shadow:0 28px 60px rgba(15,23,42,.16);
}
.login-showcase::before{
  content:"";
  position:absolute;
  width:280px;
  height:280px;
  border-radius:999px;
  right:-80px;
  top:-80px;
  background:rgba(255,255,255,.08);
}
.login-showcase::after{
  content:"";
  position:absolute;
  width:220px;
  height:220px;
  border-radius:999px;
  left:-70px;
  bottom:-80px;
  background:rgba(255,255,255,.06);
}
.login-showcase > *{position:relative;z-index:1}
.login-showcase-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.08);
  color:#ede9fe;
  padding:10px 16px;
  border-radius:999px;
  font-weight:800;
  font-size:.86rem;
}
.login-showcase-logo{
  width:160px;
  max-width:100%;
  margin-top:28px;
  background:#fff;
  border-radius:24px;
  padding:14px 18px;
  object-fit:contain;
}
.login-showcase h1{
  margin:26px 0 14px;
  font-size:2.35rem;
  line-height:1.08;
  font-weight:900;
  letter-spacing:-.03em;
}
.login-showcase p{
  margin:0;
  max-width:560px;
  color:#ddd6fe;
  font-size:1.03rem;
  line-height:1.6;
}
.login-feature-list{
  display:grid;
  gap:14px;
  margin-top:32px;
}
.login-feature-item{
  display:flex;
  gap:14px;
  align-items:flex-start;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.06);
  border-radius:22px;
  padding:16px 18px;
  backdrop-filter:blur(6px);
}
.login-feature-item i{
  width:44px;
  height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:15px;
  background:rgba(255,255,255,.12);
  color:#fff;
  font-size:1.15rem;
  flex-shrink:0;
}
.login-feature-item strong{
  display:block;
  font-size:1rem;
  font-weight:900;
  color:#fff;
}
.login-feature-item span{
  display:block;
  color:#ddd6fe;
  margin-top:3px;
  line-height:1.45;
  font-size:.92rem;
}
.login-showcase-footer{
  margin-top:30px;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.login-showcase-footer span{
  color:#fff;
  font-weight:800;
}
.login-showcase-footer small{
  color:#c4b5fd;
  font-size:.9rem;
}

.login-card{
  width:100%;
  background:rgba(255,255,255,.95);
  border:1px solid rgba(255,255,255,.85);
  border-radius:34px;
  padding:34px;
  box-shadow:0 28px 60px rgba(15,23,42,.12);
  backdrop-filter:blur(14px);
}
.login-card-head h1{
  margin:6px 0 6px;
  font-size:1.95rem;
  line-height:1.1;
  font-weight:900;
  color:#111827;
}
.login-card-head p{
  margin:0;
  color:#64748b;
}
.login-kicker{
  display:inline-flex;
  align-items:center;
  padding:8px 12px;
  background:#ede9fe;
  color:#5b21b6;
  border-radius:999px;
  font-size:.82rem;
  font-weight:900;
}
.login-helper-box{
  display:flex;
  gap:12px;
  align-items:flex-start;
  margin:22px 0 20px;
  padding:15px;
  border:1px solid #dbeafe;
  background:#eff6ff;
  border-radius:20px;
}
.login-helper-box i{
  width:40px;
  height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  background:#dbeafe;
  color:#2563eb;
  font-size:1.1rem;
  flex-shrink:0;
}
.login-helper-box strong{
  display:block;
  color:#0f172a;
  font-weight:900;
}
.login-helper-box span{
  display:block;
  color:#475569;
  margin-top:2px;
  font-size:.93rem;
  line-height:1.45;
}
.login-card .form-label{
  font-weight:800;
  color:#334155;
}
.login-card .form-control{
  border-radius:16px;
  border:1px solid #dbe3ef;
  background:#fff;
  box-shadow:none;
}
.login-card .form-control:focus{
  border-color:#8b5cf6;
  box-shadow:0 0 0 .2rem rgba(139,92,246,.15);
}
.login-main-btn,
.login-secondary-btn{
  border-radius:16px;
  font-weight:800;
}
.login-divider{
  position:relative;
  text-align:center;
  margin:22px 0 18px;
}
.login-divider::before{
  content:"";
  position:absolute;
  top:50%;
  left:0;
  right:0;
  height:1px;
  background:#e5e7eb;
}
.login-divider span{
  position:relative;
  z-index:1;
  display:inline-block;
  background:rgba(255,255,255,.96);
  color:#94a3b8;
  font-size:.85rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
  padding:0 12px;
}
.register-panel{
  border:1px solid #e5e7eb;
  background:#f8fafc;
  border-radius:22px;
  padding:18px;
}
.register-panel-head{
  margin-bottom:12px;
}
.register-panel-head strong{
  display:block;
  color:#0f172a;
  font-weight:900;
}
.register-panel-head span{
  display:block;
  color:#64748b;
  font-size:.9rem;
  margin-top:2px;
}

@media (max-width: 991px){
  .login-layout{
    grid-template-columns:1fr;
  }
  .login-showcase{
    min-height:auto;
    padding:28px;
  }
  .login-showcase h1{
    font-size:1.9rem;
  }
}

@media (max-width: 576px){
  .login-screen{
    padding:18px;
  }
  .login-card,
  .login-showcase{
    border-radius:26px;
    padding:22px;
  }
  .login-card-head h1{
    font-size:1.6rem;
  }
  .login-showcase h1{
    font-size:1.65rem;
  }
}


/* ===============================
   V20.2 — BANCO LIMPO PARA PRODUÇÃO
   =============================== */
.security-action.danger-action{
  border-color:#fecaca;
  background:#fff7ed;
}
.security-action.danger-action:hover{
  border-color:#f97316;
  background:#ffedd5;
}
.security-action.danger-action i{
  background:#fee2e2;
  color:#b91c1c;
}
.production-ready-card{
  border-color:#bbf7d0;
}
.production-ready-box{
  border:1px solid #bbf7d0;
  background:#f0fdf4;
  border-radius:18px;
  padding:15px;
}
.production-ready-box strong{
  display:block;
  color:#14532d;
  font-weight:950;
}
.production-ready-box p{
  color:#166534;
  margin:5px 0 0;
  line-height:1.45;
}


/* ===============================
   V20.3 — ECOSSISTEMA E CAIXA
   =============================== */
.ecosystem-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border-radius:999px;
  background:#eef2ff;
  color:#3730a3;
  border:1px solid #c7d2fe;
  padding:4px 10px;
  font-size:.75rem;
  font-weight:900;
  white-space:nowrap;
}
.ecosystem-badge::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:999px;
  background:#7c3aed;
  display:inline-block;
}
.ecosystem-balance-card .card-header{
  background:linear-gradient(135deg,#f8fafc,#eef2ff);
}


/* V20.4 — Prospecção e propostas */
.prospection-page .proposal-paper{background:#fff;border-radius:30px;box-shadow:0 22px 60px rgba(15,23,42,.10);overflow:hidden;border:1px solid #e5e7eb;max-width:980px;margin:0 auto}.prospection-page .proposal-cover{min-height:520px;color:#fff;padding:42px;display:flex;flex-direction:column;justify-content:space-between;background:radial-gradient(circle at right top,rgba(250,204,21,.32),transparent 25%),radial-gradient(circle at left bottom,rgba(126,34,206,.35),transparent 30%),linear-gradient(135deg,#111827,#3b0764)}.prospection-page .proposal-cover-top{display:flex;align-items:center;gap:14px}.prospection-page .proposal-cover-top img{width:72px;height:72px;background:#fff;border-radius:20px;padding:8px;object-fit:contain}.prospection-page .proposal-cover-top strong{display:block;font-size:1.35rem;font-weight:950}.prospection-page .proposal-cover-top span{display:block;color:#ddd6fe}.prospection-page .proposal-cover-content{max-width:760px}.prospection-page .proposal-tag{display:inline-flex;align-items:center;padding:8px 13px;border-radius:999px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);font-weight:900;margin-bottom:18px}.prospection-page .proposal-cover-content h1{font-size:clamp(2.4rem,5vw,4.5rem);line-height:1.02;letter-spacing:-.06em;font-weight:950;margin-bottom:18px}.prospection-page .proposal-cover-content p{color:#e9d5ff;font-size:1.05rem;line-height:1.7}.prospection-page .proposal-cover-footer{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.prospection-page .proposal-cover-footer div{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);border-radius:18px;padding:14px}.prospection-page .proposal-cover-footer small{display:block;color:#c4b5fd;text-transform:uppercase;font-weight:900;font-size:.72rem}.prospection-page .proposal-cover-footer strong{display:block;margin-top:5px}.prospection-page .proposal-section{padding:32px 38px;border-bottom:1px solid #e5e7eb}.prospection-page .proposal-section h2{color:#7e22ce;font-weight:950;font-size:1.45rem;margin-bottom:18px}.prospection-page .proposal-section p{color:#475569;line-height:1.75}.prospection-page .info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.prospection-page .info-grid div{background:#f8fafc;border:1px solid #e2e8f0;border-radius:18px;padding:15px}.prospection-page .info-grid small{display:block;color:#64748b;font-size:.76rem;text-transform:uppercase;font-weight:900;margin-bottom:5px}.prospection-page .info-grid strong{display:block;color:#111827}.prospection-page .preview-services{display:grid;gap:12px;margin-top:18px}.prospection-page .preview-service{display:grid;grid-template-columns:1fr auto;gap:14px;align-items:start;padding:16px;border:1px solid #e2e8f0;border-radius:18px;background:#f8fafc}.prospection-page .preview-service strong{display:block;color:#111827}.prospection-page .preview-service span{display:block;color:#64748b;margin-top:4px}.prospection-page .preview-service b{color:#7e22ce;white-space:nowrap}.prospection-page .investment-card{background:linear-gradient(135deg,#7e22ce,#3b0764);color:#fff;border-radius:24px;padding:24px}.prospection-page .investment-card span{display:block;color:#ddd6fe;font-weight:900;text-transform:uppercase;font-size:.78rem}.prospection-page .investment-card strong{display:block;font-size:2.3rem;line-height:1.1;margin-top:6px;font-weight:950}.prospection-page .signature-grid{display:grid;grid-template-columns:1fr 1fr;gap:32px;margin-top:48px}.prospection-page .signature-grid span{display:block;border-top:1px solid #111827;margin-bottom:10px}.prospection-page .signature-grid strong{display:block;text-align:center}.prospection-page .proposal-footer{padding:24px 38px;background:#111827;color:#e5e7eb;font-size:.86rem;line-height:1.7;text-align:center}.prospection-page .proposal-footer strong{color:#fff}.prospect-service-list{display:grid;gap:10px}.prospect-service-pill{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:12px 14px;border:1px solid #e2e8f0;border-radius:16px;background:#f8fafc}.prospect-service-pill strong{display:block;font-weight:950}.prospect-service-pill span{display:block;color:#64748b;font-size:.86rem}.prospect-service-pill button{border:0;background:#fee2e2;color:#b91c1c;width:34px;height:34px;border-radius:999px;flex-shrink:0}@media(max-width:768px){.prospection-page .proposal-cover,.prospection-page .proposal-section,.prospection-page .proposal-footer{padding:28px}.prospection-page .proposal-cover-footer,.prospection-page .info-grid,.prospection-page .signature-grid{grid-template-columns:1fr}}


/* V20.6 - Prospecção ajustada */
.saved-proposals-panel{
  border:2px solid rgba(126,34,206,.18);
  box-shadow:0 16px 40px rgba(15,23,42,.08);
}

.saved-proposals-panel .card-header{
  background:linear-gradient(135deg,#ffffff,#f5f3ff);
}

.saved-proposals-panel table thead th{
  white-space:nowrap;
}

.saved-proposals-panel .btn-group .btn{
  min-width:36px;
}

#prospectSaveStatus{
  border-radius:16px;
}


/* V20.7 - Prospecção funcional */
.saved-proposals-panel{
  border:2px solid rgba(126,34,206,.22)!important;
  box-shadow:0 18px 45px rgba(15,23,42,.10)!important;
}

.saved-proposals-panel .card-header{
  background:linear-gradient(135deg,#ffffff,#f5f3ff)!important;
}

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

.prospection-empty-card,
.prospection-saved-card{
  border:1px solid #e5e7eb;
  background:#ffffff;
  border-radius:18px;
  padding:16px;
  box-shadow:0 10px 28px rgba(15,23,42,.05);
}

.prospection-empty-card span{
  display:block;
  color:#64748b;
  margin-top:4px;
}

.prospection-saved-card{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:14px;
  min-height:210px;
}

.prospection-saved-origin{
  display:inline-flex;
  align-items:center;
  width:max-content;
  max-width:100%;
  background:#f3e8ff;
  color:#7e22ce;
  border:1px solid rgba(126,34,206,.18);
  border-radius:999px;
  padding:5px 10px;
  font-size:.76rem;
  font-weight:900;
  margin-bottom:10px;
}

.prospection-saved-card h6{
  font-weight:950;
  color:#111827;
  margin:0 0 6px;
  line-height:1.25;
}

.prospection-saved-card p{
  color:#64748b;
  margin:0 0 8px;
}

.prospection-saved-card strong{
  display:block;
  color:#166534;
  font-size:1.15rem;
}

.prospection-card-actions{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
}

.prospection-card-actions .btn{
  border-radius:999px;
  font-weight:800;
}

.saved-proposals-panel table thead th{
  white-space:nowrap;
}

.saved-proposals-panel .btn-group .btn{
  min-width:36px;
}


/* V20.8 - Funil Comercial */
.prospect-funnel-panel{
  border:2px solid rgba(126,34,206,.18)!important;
}

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

.prospect-funnel-empty{
  border:1px dashed #d1d5db;
  border-radius:18px;
  padding:18px;
  color:#64748b;
  background:#f8fafc;
}

.prospect-funnel-empty strong{
  display:block;
  color:#111827;
}

.prospect-funnel-column{
  border:1px solid #e5e7eb;
  border-radius:18px;
  background:#ffffff;
  overflow:hidden;
  min-height:190px;
}

.prospect-funnel-head{
  background:linear-gradient(135deg,#ffffff,#f8fafc);
  border-bottom:1px solid #e5e7eb;
  padding:12px;
}

.prospect-funnel-head strong{
  display:block;
  color:#111827;
  font-size:.92rem;
}

.prospect-funnel-head span{
  display:block;
  color:#64748b;
  font-size:.78rem;
  font-weight:800;
  margin-top:3px;
}

.prospect-funnel-list{
  display:grid;
  gap:8px;
  padding:10px;
}

.prospect-funnel-card{
  width:100%;
  text-align:left;
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:14px;
  padding:10px;
  transition:.2s;
}

.prospect-funnel-card:hover{
  border-color:#7e22ce;
  background:#f5f3ff;
}

.prospect-funnel-card b,
.prospect-funnel-card span,
.prospect-funnel-card em{
  display:block;
}

.prospect-funnel-card b{
  color:#111827;
  font-size:.84rem;
  line-height:1.25;
}

.prospect-funnel-card span{
  color:#64748b;
  font-size:.78rem;
  margin-top:3px;
}

.prospect-funnel-card em{
  color:#166534;
  font-size:.82rem;
  font-style:normal;
  font-weight:900;
  margin-top:5px;
}

.prospect-funnel-muted{
  color:#94a3b8;
  background:#f8fafc;
  border:1px dashed #e5e7eb;
  border-radius:14px;
  padding:12px;
  font-size:.84rem;
}

.proposal-template-box{
  border:1px solid rgba(126,34,206,.18);
  background:#faf5ff;
  border-radius:18px;
  padding:14px;
}

.proposal-template-box .form-select{
  max-width:360px;
}

.prospection-card-actions{
  align-items:center;
}

.prospection-card-actions .btn{
  margin-bottom:2px;
}


/* V23.9.1 - Fontes oficiais: Poppins + Arimo */
:root{
  --font-menu: "Poppins", sans-serif;
  --font-body: "Arimo", sans-serif;
}

/* Fonte base mais limpa para leitura */
body,
input,
select,
textarea,
.table,
.card,
.modal,
.dropdown-menu{
  font-family: var(--font-body);
}

/* Menus, navegação e títulos do sistema com Poppins */
.sidebar,
.sidebar *,
.menu,
.menu *,
.nav,
.nav *,
.navbar,
.navbar *,
.topbar,
.topbar *,
.brand,
.brand *,
.menu-link,
.sidebar-link,
button,
.btn,
.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.section-title,
.page-title,
.metric-card small,
.metric-card strong{
  font-family: var(--font-menu);
}

/* Classes utilitárias Poppins */
.poppins-thin{font-family:"Poppins",sans-serif;font-weight:100;font-style:normal}
.poppins-extralight{font-family:"Poppins",sans-serif;font-weight:200;font-style:normal}
.poppins-light{font-family:"Poppins",sans-serif;font-weight:300;font-style:normal}
.poppins-regular{font-family:"Poppins",sans-serif;font-weight:400;font-style:normal}
.poppins-medium{font-family:"Poppins",sans-serif;font-weight:500;font-style:normal}
.poppins-semibold{font-family:"Poppins",sans-serif;font-weight:600;font-style:normal}
.poppins-bold{font-family:"Poppins",sans-serif;font-weight:700;font-style:normal}
.poppins-extrabold{font-family:"Poppins",sans-serif;font-weight:800;font-style:normal}
.poppins-black{font-family:"Poppins",sans-serif;font-weight:900;font-style:normal}
.poppins-thin-italic{font-family:"Poppins",sans-serif;font-weight:100;font-style:italic}
.poppins-extralight-italic{font-family:"Poppins",sans-serif;font-weight:200;font-style:italic}
.poppins-light-italic{font-family:"Poppins",sans-serif;font-weight:300;font-style:italic}
.poppins-regular-italic{font-family:"Poppins",sans-serif;font-weight:400;font-style:italic}
.poppins-medium-italic{font-family:"Poppins",sans-serif;font-weight:500;font-style:italic}
.poppins-semibold-italic{font-family:"Poppins",sans-serif;font-weight:600;font-style:italic}
.poppins-bold-italic{font-family:"Poppins",sans-serif;font-weight:700;font-style:italic}
.poppins-extrabold-italic{font-family:"Poppins",sans-serif;font-weight:800;font-style:italic}
.poppins-black-italic{font-family:"Poppins",sans-serif;font-weight:900;font-style:italic}

/* Classes utilitárias Arimo */
.arimo-regular{font-family:"Arimo",sans-serif;font-optical-sizing:auto;font-weight:400;font-style:normal}
.arimo-medium{font-family:"Arimo",sans-serif;font-optical-sizing:auto;font-weight:500;font-style:normal}
.arimo-semibold{font-family:"Arimo",sans-serif;font-optical-sizing:auto;font-weight:600;font-style:normal}
.arimo-bold{font-family:"Arimo",sans-serif;font-optical-sizing:auto;font-weight:700;font-style:normal}

/* Ajuste fino para menu lateral */
.sidebar .brand strong,
.sidebar .brand span,
.sidebar .menu button,
.sidebar .menu a,
.sidebar .nav-link,
.menu-link{
  letter-spacing:-.01em;
}

.sidebar .menu button,
.menu-link{
  font-weight:700;
}


/* V23.9.1 - I.A. interna de propostas */
.proposal-ai-box{
  border:1px solid rgba(126,34,206,.24);
  background:
    radial-gradient(circle at top right, rgba(126,34,206,.10), transparent 32%),
    linear-gradient(135deg,#ffffff,#faf5ff);
  border-radius:20px;
  padding:16px;
  box-shadow:0 12px 30px rgba(15,23,42,.06);
}

.proposal-ai-box .form-label{
  color:#111827;
  font-weight:900;
  font-family:var(--font-menu, "Poppins", sans-serif);
}

.proposal-ai-box textarea{
  background:#fff;
}

.ai-status{
  border:1px solid #e5e7eb;
  background:#ffffff;
  border-radius:14px;
  padding:10px 12px;
  color:#64748b;
  font-size:.86rem;
}

.ai-status-success{
  border-color:#bbf7d0;
  background:#f0fdf4;
  color:#166534;
}

.ai-status-info{
  border-color:#e5e7eb;
  background:#ffffff;
  color:#64748b;
}


/* V23.9.1 - proposta limpa para cliente */
.proposal-ai-box::after{
  content:"Briefing interno: não aparece na proposta do cliente.";
  display:block;
  margin-top:10px;
  font-size:.78rem;
  color:#64748b;
  font-weight:700;
}


/* V23.9.1 - Prospecção leve com abas */
.prospect-tabs-card{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:20px;
  padding:10px;
  box-shadow:0 10px 30px rgba(15,23,42,.06);
}

.prospect-tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.prospect-tab{
  border:1px solid #e5e7eb;
  background:#fff;
  color:#334155;
  border-radius:999px;
  padding:10px 14px;
  font-family:var(--font-menu, "Poppins", sans-serif);
  font-weight:800;
  transition:.2s;
}

.prospect-tab:hover{
  border-color:#7e22ce;
  color:#7e22ce;
}

.prospect-tab.active{
  background:#7e22ce;
  border-color:#7e22ce;
  color:#fff;
}

.prospect-tab-panel{
  display:none!important;
}

.prospect-tab-panel.active{
  display:block!important;
}

.row.prospect-tab-panel.active{
  display:flex!important;
}

.prospect-filter-grid{
  display:grid;
  grid-template-columns:2fr 1fr 1fr 1fr;
  gap:12px;
}

.preview-toggle-box{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:18px;
  padding:14px;
  box-shadow:0 10px 26px rgba(15,23,42,.05);
}

.prospect-preview-hidden{
  display:none!important;
}

.prospect-ai-dock{
  display:grid;
  gap:14px;
}

#prospectAiModelDock .proposal-ai-box,
#prospectAiModelDock .proposal-template-box{
  margin-bottom:0!important;
}

@media(max-width:992px){
  .prospect-filter-grid{
    grid-template-columns:1fr 1fr;
  }
}

@media(max-width:576px){
  .prospect-filter-grid{
    grid-template-columns:1fr;
  }

  .prospect-tab{
    width:100%;
  }
}


/* V23.9.1 - Follow-up comercial */
.prospect-followup-panel{
  border:2px solid rgba(22,163,74,.18)!important;
}

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

.followup-empty,
.followup-column{
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:18px;
  overflow:hidden;
}

.followup-empty{
  padding:18px;
  color:#64748b;
}

.followup-empty strong{
  display:block;
  color:#111827;
}

.followup-column-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  background:#f8fafc;
  border-bottom:1px solid #e5e7eb;
  padding:12px;
}

.followup-column-head strong{
  font-family:var(--font-menu, "Poppins", sans-serif);
  color:#111827;
}

.followup-column-head span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  height:28px;
  border-radius:999px;
  background:#fff;
  border:1px solid #e5e7eb;
  font-weight:900;
}

.followup-list{
  display:grid;
  gap:10px;
  padding:10px;
}

.followup-muted{
  color:#94a3b8;
  border:1px dashed #e5e7eb;
  border-radius:14px;
  padding:12px;
  background:#f8fafc;
}

.followup-card{
  border:1px solid #e5e7eb;
  border-left:5px solid #cbd5e1;
  background:#fff;
  border-radius:16px;
  padding:12px;
}

.followup-card.followup-danger{
  border-left-color:#dc2626;
}

.followup-card.followup-warning{
  border-left-color:#f59e0b;
}

.followup-card.followup-primary{
  border-left-color:#2563eb;
}

.followup-card-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  margin-bottom:8px;
}

.followup-card-top span{
  display:inline-flex;
  border-radius:999px;
  background:#f8fafc;
  border:1px solid #e5e7eb;
  padding:4px 8px;
  color:#334155;
  font-size:.76rem;
  font-weight:900;
}

.followup-card-top b{
  color:#166534;
  font-size:.84rem;
}

.followup-card h6{
  font-weight:950;
  color:#111827;
  margin:0 0 5px;
}

.followup-card p{
  color:#64748b;
  margin:0 0 8px;
}

.followup-action{
  background:#f8fafc;
  border:1px solid #e5e7eb;
  border-radius:12px;
  padding:9px;
  color:#334155;
  font-weight:700;
}

.followup-buttons{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-top:10px;
}

.followup-buttons .btn{
  border-radius:999px;
  font-weight:800;
}


/* V23.9.1 - Dashboard Comercial Geral e Catálogo de Serviços */
.commercial-dashboard-card{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:24px;
  padding:18px;
  box-shadow:0 18px 45px rgba(15,23,42,.08);
}

.commercial-dashboard-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom:16px;
}

.commercial-dashboard-header h4{
  margin:0;
  color:#111827;
  font-family:var(--font-menu, "Poppins", sans-serif);
  font-weight:950;
}

.commercial-dashboard-header p{
  margin:4px 0 0;
  color:#64748b;
}

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

.commercial-kpi{
  border:1px solid #e5e7eb;
  background:#f8fafc;
  border-radius:18px;
  padding:14px;
}

.commercial-kpi small,
.commercial-mini-panel h5{
  display:block;
  color:#64748b;
  text-transform:uppercase;
  font-size:.72rem;
  font-weight:900;
  letter-spacing:.04em;
}

.commercial-kpi strong{
  display:block;
  color:#111827;
  font-size:1.45rem;
  font-family:var(--font-menu, "Poppins", sans-serif);
  margin-top:4px;
}

.commercial-kpi span{
  display:block;
  color:#64748b;
  font-size:.82rem;
  margin-top:4px;
}

.commercial-kpi.warning strong{color:#b45309}
.commercial-kpi.danger strong{color:#dc2626}
.commercial-kpi.success strong{color:#166534}

.commercial-mini-panel{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:20px;
  padding:16px;
  height:100%;
}

.commercial-mini-panel h5{
  margin:0 0 8px;
}

.commercial-mini-panel > strong{
  display:block;
  color:#111827;
  font-size:1.1rem;
  font-family:var(--font-menu, "Poppins", sans-serif);
}

.commercial-mini-panel > span{
  display:block;
  color:#64748b;
  margin-top:3px;
  font-size:.86rem;
}

.commercial-breakdown{
  display:grid;
  gap:8px;
  margin-top:12px;
}

.commercial-break-line{
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  align-items:center;
}

.commercial-break-line span{
  color:#334155;
  font-size:.86rem;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.commercial-break-line strong{
  color:#111827;
  font-size:.86rem;
}

.commercial-break-line div{
  grid-column:1 / -1;
  height:8px;
  background:#f1f5f9;
  border-radius:999px;
  overflow:hidden;
}

.commercial-break-line em{
  display:block;
  height:100%;
  background:#7e22ce;
  border-radius:999px;
}

.commercial-next-actions{
  display:grid;
  gap:8px;
  margin-top:10px;
}

.commercial-action-item{
  width:100%;
  text-align:left;
  border:1px solid #e5e7eb;
  background:#f8fafc;
  border-radius:14px;
  padding:10px;
}

.commercial-action-item:hover{
  border-color:#7e22ce;
  background:#faf5ff;
}

.commercial-action-item span,
.commercial-action-item strong,
.commercial-action-item small{
  display:block;
}

.commercial-action-item span{
  color:#7e22ce;
  font-weight:900;
  font-size:.74rem;
}

.commercial-action-item strong{
  color:#111827;
}

.commercial-action-item small{
  color:#64748b;
}

.commercial-empty-line{
  color:#94a3b8;
  border:1px dashed #e5e7eb;
  border-radius:12px;
  padding:10px;
  background:#f8fafc;
}

.service-catalog-card{
  border:2px solid rgba(126,34,206,.18)!important;
}

.service-catalog-form{
  background:#faf5ff;
  border:1px solid rgba(126,34,206,.16);
  border-radius:18px;
  padding:16px;
}

#prospectCatalogServiceSelect{
  max-width:520px;
}


/* V23.9.1 - Manual dinâmico e histórico de versões */
.module-help-bar{
  display:flex;
  justify-content:flex-end;
  margin-bottom:12px;
}

.manual-version-summary{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
  gap:12px;
  margin-top:12px;
}

.manual-version-summary > div{
  border:1px solid #e5e7eb;
  background:#f8fafc;
  border-radius:16px;
  padding:14px;
}

.manual-version-summary small{
  display:block;
  color:#64748b;
  text-transform:uppercase;
  font-size:.72rem;
  font-weight:900;
}

.manual-version-summary strong{
  display:block;
  color:#111827;
  font-size:1.25rem;
  font-family:var(--font-menu, "Poppins", sans-serif);
  margin-top:4px;
}

.manual-version-summary span{
  display:block;
  color:#64748b;
  font-size:.86rem;
  margin-top:3px;
}

.manual-overlay{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.72);
  z-index:5000;
  display:none;
  padding:20px;
}

.manual-overlay.active{
  display:flex;
  align-items:center;
  justify-content:center;
}

.manual-dialog{
  width:min(1120px,100%);
  max-height:92vh;
  background:#fff;
  border-radius:26px;
  overflow:hidden;
  box-shadow:0 35px 90px rgba(0,0,0,.35);
  display:flex;
  flex-direction:column;
}

.manual-dialog-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  padding:20px 24px;
  background:linear-gradient(135deg,#111827,#3b0764);
  color:#fff;
}

.manual-dialog-header h3{
  margin:0;
  font-family:var(--font-menu, "Poppins", sans-serif);
  font-weight:950;
}

.manual-dialog-header p{
  margin:4px 0 0;
  color:#ddd6fe;
}

.manual-dialog-body{
  display:grid;
  grid-template-columns:260px 1fr;
  min-height:0;
  overflow:hidden;
}

.manual-sidebar{
  background:#f8fafc;
  border-right:1px solid #e5e7eb;
  padding:12px;
  overflow:auto;
}

.manual-nav{
  display:block;
  width:100%;
  border:0;
  background:transparent;
  text-align:left;
  padding:10px 12px;
  border-radius:12px;
  color:#334155;
  font-family:var(--font-menu, "Poppins", sans-serif);
  font-weight:800;
  margin-bottom:4px;
}

.manual-nav:hover{
  background:#eef2ff;
  color:#4338ca;
}

.manual-nav.active{
  background:#7e22ce;
  color:#fff;
}

.manual-content{
  padding:24px;
  overflow:auto;
}

.manual-content h4{
  font-family:var(--font-menu, "Poppins", sans-serif);
  font-weight:950;
  color:#111827;
  margin-bottom:8px;
}

.manual-content p{
  color:#475569;
  line-height:1.7;
}

.manual-content ol,
.manual-content ul{
  padding-left:20px;
  color:#334155;
  line-height:1.7;
}

.manual-callout{
  background:#faf5ff;
  border:1px solid rgba(126,34,206,.18);
  border-left:5px solid #7e22ce;
  color:#3b0764;
  border-radius:14px;
  padding:14px;
  font-weight:800;
  margin-top:18px;
}

.manual-version-list{
  display:grid;
  gap:12px;
  margin-top:18px;
}

.manual-version-item{
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:16px;
  padding:14px;
}

.manual-version-item strong{
  display:block;
  font-family:var(--font-menu, "Poppins", sans-serif);
  color:#111827;
  margin-bottom:8px;
}

@media(max-width:768px){
  .manual-overlay{
    padding:8px;
  }

  .manual-dialog-body{
    grid-template-columns:1fr;
  }

  .manual-sidebar{
    display:flex;
    overflow:auto;
    gap:6px;
    border-right:0;
    border-bottom:1px solid #e5e7eb;
  }

  .manual-nav{
    white-space:nowrap;
    width:auto;
    margin-bottom:0;
  }
}


.quick-manual-floating{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:4200;
  box-shadow:0 16px 40px rgba(15,23,42,.22);
}


/* V23.9.1 - Mobile e Tablet */
html,
body{
  max-width:100%;
  overflow-x:hidden;
}

.main{
  min-width:0;
}

.sidebar{
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
}

.sidebar-close-btn{
  margin-left:auto;
  width:38px;
  height:38px;
  border:0;
  border-radius:999px;
  background:rgba(255,255,255,.12);
  color:#fff;
  display:grid;
  place-items:center;
}

.sidebar-close-btn:hover{
  background:rgba(255,255,255,.2);
}

.sidebar-backdrop{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.58);
  backdrop-filter:blur(2px);
  z-index:1035;
  opacity:0;
  pointer-events:none;
  transition:.2s ease;
}

.sidebar-backdrop.active{
  opacity:1;
  pointer-events:auto;
}

body.sidebar-open{
  overflow:hidden;
}

.mobile-menu-btn{
  width:42px;
  height:42px;
  display:inline-grid;
  place-items:center;
  flex:0 0 auto;
}

.mobile-bottom-nav{
  display:none;
}

.table-responsive{
  -webkit-overflow-scrolling:touch;
}

.table{
  min-width:720px;
}

.modal-dialog{
  max-width:min(96vw, var(--bs-modal-width));
}

.form-control,
.form-select,
.btn{
  max-width:100%;
}

@media(max-width:1199px){
  .commercial-kpi-grid,
  .prospect-followup-grid,
  .manual-version-summary{
    grid-template-columns:repeat(auto-fit,minmax(155px,1fr));
  }

  .settings-grid,
  .commercial-dashboard-card .row,
  .dashboard-hero{
    min-width:0;
  }
}

@media(max-width:991px){
  .sidebar{
    width:min(86vw,330px);
    max-width:330px;
    transform:translateX(-105%);
    transition:transform .24s ease;
    padding:18px;
    z-index:1040;
  }

  .sidebar.open{
    transform:translateX(0);
  }

  .sidebar .brand{
    position:sticky;
    top:0;
    z-index:2;
    background:linear-gradient(180deg,#0f172a 0%,#111827 100%);
    margin:-18px -18px 14px;
    padding:18px!important;
  }

  .menu{
    padding-bottom:18px;
  }

  .menu-link{
    min-height:46px;
    font-size:.95rem;
  }

  .main{
    margin-left:0!important;
    width:100%!important;
    padding-bottom:72px;
  }

  .topbar{
    position:sticky;
    top:0;
    z-index:900;
    display:grid;
    grid-template-columns:auto 1fr;
    align-items:center;
    gap:10px 12px;
    padding:12px 14px;
    min-height:auto;
  }

  .topbar > div:nth-child(2){
    min-width:0;
  }

  .topbar h2{
    font-size:1.05rem;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .topbar p{
    font-size:.78rem;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .top-actions{
    grid-column:1 / -1;
    width:100%;
    justify-content:flex-start;
    overflow-x:auto;
    flex-wrap:nowrap;
    padding-bottom:2px;
    scrollbar-width:none;
  }

  .top-actions::-webkit-scrollbar{
    display:none;
  }

  .top-actions .user-pill{
    white-space:nowrap;
    flex:0 0 auto;
  }

  .top-actions .btn{
    white-space:nowrap;
    flex:0 0 auto;
  }

  .content-section{
    padding:14px;
  }

  .module-help-bar{
    justify-content:flex-start;
  }

  .section-toolbar,
  .painel .card-header,
  .commercial-dashboard-header{
    flex-direction:column;
    align-items:flex-start!important;
  }

  .painel .card-header .btn,
  .commercial-dashboard-header .btn{
    width:100%;
  }

  .dashboard-hero{
    grid-template-columns:1fr!important;
    padding:18px!important;
  }

  .dashboard-hero-icon{
    display:none!important;
  }

  .prospect-tabs-card{
    position:sticky;
    top:112px;
    z-index:80;
  }

  .prospect-tabs{
    flex-wrap:nowrap;
    overflow-x:auto;
    padding-bottom:2px;
    scrollbar-width:none;
  }

  .prospect-tabs::-webkit-scrollbar{
    display:none;
  }

  .prospect-tab{
    white-space:nowrap;
    flex:0 0 auto;
  }

  .prospect-filter-grid,
  .service-catalog-form .row,
  .commercial-dashboard-card .row{
    grid-template-columns:1fr!important;
  }

  .proposal-paper,
  .crm-proposal-paper{
    width:100%;
    max-width:100%;
    overflow:hidden;
  }

  .prospection-page .proposal-cover,
  .prospection-page .proposal-section,
  .prospection-page .proposal-footer{
    padding:22px!important;
  }

  .prospection-page .proposal-cover{
    min-height:auto!important;
  }

  .prospection-page .proposal-cover-footer,
  .prospection-page .info-grid,
  .prospection-page .signature-grid,
  .prospection-page .preview-service{
    grid-template-columns:1fr!important;
  }

  .manual-dialog{
    width:100%;
    max-height:96vh;
    border-radius:18px;
  }

  .manual-dialog-header{
    padding:16px;
  }

  .manual-dialog-header h3{
    font-size:1.05rem;
  }

  .manual-dialog-header p{
    font-size:.82rem;
  }

  .manual-content{
    padding:16px;
  }
}

@media(max-width:768px){
  body{
    padding-bottom:72px;
  }

  .mobile-bottom-nav{
    position:fixed;
    left:10px;
    right:10px;
    bottom:10px;
    z-index:4100;
    display:flex;
    justify-content:space-around;
    gap:4px;
    padding:7px;
    border:1px solid rgba(226,232,240,.95);
    border-radius:22px;
    background:rgba(255,255,255,.96);
    box-shadow:0 18px 45px rgba(15,23,42,.18);
    backdrop-filter:blur(14px);
  }

  .mobile-nav-link{
    border:0;
    background:transparent;
    color:#64748b;
    border-radius:16px;
    min-width:0;
    flex:1 1 0;
    padding:8px 4px;
    display:grid;
    justify-items:center;
    gap:2px;
    font-family:var(--font-menu, "Poppins", sans-serif);
    font-weight:800;
    font-size:.68rem;
  }

  .mobile-nav-link i{
    font-size:1.08rem;
  }

  .mobile-nav-link.active{
    background:#7e22ce;
    color:#fff;
  }

  .quick-manual-floating{
    right:14px!important;
    bottom:88px!important;
    padding:.55rem .8rem;
  }

  .quick-manual-floating::after{
    content:"";
  }

  .top-actions .user-pill{
    display:none;
  }

  .top-actions .btn[data-bs-target="#clientModal"]{
    flex:1 0 auto;
  }

  .commercial-kpi-grid,
  .prospect-followup-grid,
  .manual-version-summary,
  .report-grid,
  .settings-grid{
    grid-template-columns:1fr!important;
  }

  .metric-card,
  .commercial-kpi,
  .client-card,
  .report-card,
  .painel{
    border-radius:18px;
  }

  .metric-card{
    min-height:86px;
  }

  .card-body{
    padding:14px;
  }

  .modal-dialog{
    margin:0;
    max-width:100vw;
    min-height:100vh;
  }

  .modal-content{
    min-height:100vh;
    border-radius:0;
  }

  .modal-body{
    overflow:auto;
    -webkit-overflow-scrolling:touch;
  }

  .btn-group,
  .d-flex.gap-2.flex-wrap{
    gap:6px!important;
  }

  .btn-group .btn{
    padding:.45rem .6rem;
  }
}

@media(max-width:576px){
  .content-section{
    padding:10px;
  }

  .topbar{
    padding:10px;
  }

  .topbar h2{
    font-size:1rem;
  }

  .topbar p{
    display:none;
  }

  .mobile-bottom-nav{
    left:8px;
    right:8px;
    bottom:8px;
    border-radius:20px;
  }

  .mobile-nav-link span{
    font-size:.62rem;
  }

  .section-toolbar h3,
  .dashboard-hero h3,
  .commercial-dashboard-header h4{
    font-size:1.25rem!important;
  }

  .commercial-dashboard-card,
  .settings-card,
  .proposal-ai-box,
  .proposal-template-box{
    padding:14px!important;
    border-radius:18px!important;
  }

  .prospect-tab{
    padding:9px 12px;
    font-size:.82rem;
  }

  .manual-overlay{
    padding:6px;
  }

  .manual-dialog{
    max-height:98vh;
    border-radius:14px;
  }

  .manual-dialog-header{
    gap:8px;
  }

  .manual-dialog-header .btn{
    padding:.4rem .6rem;
    font-size:.78rem;
  }

  .manual-sidebar{
    padding:8px!important;
  }

  .manual-content{
    padding:14px;
  }

  .table{
    font-size:.82rem;
  }

  .table th,
  .table td{
    padding:.55rem;
  }
}

@media(min-width:769px){
  .mobile-bottom-nav{
    display:none!important;
  }
}

@media(min-width:992px){
  .sidebar-backdrop,
  .sidebar-close-btn{
    display:none!important;
  }
}


/* V23.9.1 - Importação de Leads */
.prospect-import-panel{
  border:2px solid rgba(14,165,233,.18)!important;
}

.lead-import-alert{
  border:1px solid #bae6fd;
  background:#f0f9ff;
  color:#075985;
  border-radius:16px;
  padding:14px;
}

.lead-import-defaults{
  display:grid;
  grid-template-columns:2fr 1fr 1fr 1fr;
  gap:12px;
  align-items:end;
}

.lead-import-defaults > div:nth-child(5){
  grid-column:span 2;
}

.lead-import-summary{
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:14px;
  padding:12px;
  color:#334155;
}

#leadImportPreviewTable tr.table-warning td{
  background:#fffbeb!important;
  color:#92400e;
}

@media(max-width:1199px){
  .lead-import-defaults{
    grid-template-columns:1fr 1fr;
  }

  .lead-import-defaults > div:nth-child(5){
    grid-column:span 1;
  }
}

@media(max-width:768px){
  .lead-import-defaults{
    grid-template-columns:1fr;
  }
}


/* V23.9.1 - Correção do modelo CSV */
#downloadLeadTemplateLink,
#downloadLeadTemplateBtn{
  white-space:nowrap;
}


/* V23.9.1 - Importação CSV/Excel corrigida */
.lead-import-alert small{
  display:block;
  margin-top:4px;
}


/* V23.9.1 - Salvar planilha importada */
.lead-import-history{
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:18px;
  padding:14px;
}

.lead-import-history h6{
  font-family:var(--font-menu, "Poppins", sans-serif);
  font-weight:950;
  color:#111827;
}


/* V23.9.1 - Importação sem duplicados */
.lead-duplicate-row td{
  background:#fef2f2!important;
}

#leadImportSummary small{
  color:#64748b;
}


/* V23.9.1 - Cadastro do lead e histórico de contato */
.prospect-contact-history-box{
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:18px;
  padding:14px;
  box-shadow:0 10px 24px rgba(15,23,42,.04);
}

.prospect-contact-history-box .form-label{
  font-family:var(--font-menu, "Poppins", sans-serif);
  font-weight:950;
  color:#111827;
}

.prospect-history-list{
  display:grid;
  gap:10px;
  max-height:320px;
  overflow:auto;
  padding-right:4px;
}

.prospect-history-item{
  border:1px solid #e5e7eb;
  border-left:5px solid #7e22ce;
  background:#f8fafc;
  border-radius:14px;
  padding:12px;
}

.prospect-history-top{
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:6px;
}

.prospect-history-top strong{
  color:#111827;
  font-family:var(--font-menu, "Poppins", sans-serif);
}

.prospect-history-top span,
.prospect-history-item small{
  color:#64748b;
  font-size:.8rem;
}

.prospect-history-item p{
  margin:0 0 8px;
  color:#334155;
  white-space:pre-wrap;
}

@media(max-width:768px){
  .prospect-history-list{
    max-height:260px;
  }
}


/* V23.9.1 - Filtro por categoria na prospecção */
.prospection-badge-row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  margin-bottom:8px;
}

.prospection-category-badge{
  display:inline-flex;
  align-items:center;
  border:1px solid #ddd6fe;
  background:#f5f3ff;
  color:#6d28d9;
  border-radius:999px;
  padding:4px 10px;
  font-size:.75rem;
  font-weight:900;
  font-family:var(--font-menu, "Poppins", sans-serif);
}

#prospectCategoryFilter,
#prospectCategory{
  font-weight:700;
}


/* V23.9.1 - Prospecção em lista e cadastro do lead */
#prospectionCards,
.prospection-card-grid{
  display:none!important;
}

.prospect-lead-modal .modal-header{
  background:linear-gradient(135deg,#f8fafc,#fff);
  border-bottom:1px solid #e5e7eb;
}

.prospect-lead-modal .modal-title{
  font-family:var(--font-menu, "Poppins", sans-serif);
  font-weight:950;
  color:#111827;
}

.lead-edit-section{
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:18px;
  padding:16px;
  margin-bottom:16px;
  box-shadow:0 10px 24px rgba(15,23,42,.04);
}

.lead-edit-section h6{
  font-family:var(--font-menu, "Poppins", sans-serif);
  font-weight:950;
  color:#111827;
  margin-bottom:14px;
}

.lead-edit-history-list{
  display:grid;
  gap:10px;
  max-height:330px;
  overflow:auto;
  padding-right:4px;
}

.lead-edit-history-item{
  border:1px solid #e5e7eb;
  border-left:5px solid #7e22ce;
  background:#f8fafc;
  border-radius:14px;
  padding:12px;
}

.lead-edit-history-top{
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:6px;
}

.lead-edit-history-top strong{
  color:#111827;
  font-family:var(--font-menu, "Poppins", sans-serif);
}

.lead-edit-history-top span,
.lead-edit-history-item small{
  color:#64748b;
  font-size:.8rem;
}

.lead-edit-history-item p{
  margin:0 0 8px;
  color:#334155;
  white-space:pre-wrap;
}

.saved-proposals-panel .table{
  background:#fff;
  border-radius:16px;
  overflow:hidden;
}

@media(max-width:768px){
  .lead-edit-history-list{
    max-height:260px;
  }

  .prospect-lead-modal .modal-footer{
    justify-content:flex-start!important;
  }
}


/* V23.9.1 - Alertas, WhatsApp e checklist comercial */
.lead-checklist-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}

.lead-checklist-item{
  display:flex;
  gap:10px;
  align-items:flex-start;
  border:1px solid #e5e7eb;
  background:#f8fafc;
  border-radius:14px;
  padding:12px;
  cursor:pointer;
  transition:.2s ease;
}

.lead-checklist-item:hover{
  border-color:#c4b5fd;
  background:#fff;
}

.lead-checklist-item.is-done{
  border-color:#bbf7d0;
  background:#f0fdf4;
}

.lead-checklist-item span{
  display:grid;
  gap:2px;
}

.lead-checklist-item strong{
  color:#111827;
  font-family:var(--font-menu, "Poppins", sans-serif);
  font-size:.92rem;
}

.lead-checklist-item small{
  color:#64748b;
  font-size:.78rem;
}

.prospect-signal-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border-radius:999px;
  padding:5px 10px;
  font-size:.78rem;
  font-weight:950;
  font-family:var(--font-menu, "Poppins", sans-serif);
  border:1px solid #e5e7eb;
  white-space:nowrap;
}

.prospect-signal-badge.danger{
  background:#fef2f2;
  color:#b91c1c;
  border-color:#fecaca;
}

.prospect-signal-badge.warning{
  background:#fffbeb;
  color:#92400e;
  border-color:#fde68a;
}

.prospect-signal-badge.primary{
  background:#eff6ff;
  color:#1d4ed8;
  border-color:#bfdbfe;
}

.prospect-signal-badge.success{
  background:#f0fdf4;
  color:#15803d;
  border-color:#bbf7d0;
}

.prospect-signal-badge.secondary,
.prospect-signal-badge.muted{
  background:#f8fafc;
  color:#64748b;
  border-color:#e2e8f0;
}

@media(max-width:768px){
  .lead-checklist-grid{
    grid-template-columns:1fr;
  }
}


/* V23.9.1 - Sequência de WhatsApp Comercial */
.whatsapp-sequence-help{
  border:1px solid #bbf7d0;
  background:#f0fdf4;
  color:#166534;
  border-radius:14px;
  padding:12px;
  font-size:.9rem;
}

#leadWhatsappMessage{
  min-height:140px;
  white-space:pre-wrap;
}

#leadWhatsappSequenceStatus{
  color:#166534;
  background:#f0fdf4!important;
  border-color:#bbf7d0!important;
}

.lead-edit-section:has(#leadWhatsappStage){
  border-color:#bbf7d0;
  background:linear-gradient(135deg,#ffffff,#f0fdf4);
}


/* V23.9.1 - Ponto de Equilíbrio */
.break-even-page .section-toolbar{
  align-items:flex-start;
}

.break-even-admin-alert{
  display:flex;
  gap:12px;
  align-items:flex-start;
  border:1px solid #bfdbfe;
  background:linear-gradient(135deg,#eff6ff,#ffffff);
  color:#1e3a8a;
  border-radius:18px;
  padding:14px;
  margin-bottom:16px;
  box-shadow:0 10px 22px rgba(37,99,235,.08);
}

.break-even-admin-alert i{
  font-size:1.35rem;
}

.break-even-admin-alert strong,
.break-even-admin-alert span{
  display:block;
}

.break-even-kpi{
  border:1px solid #e5e7eb;
  border-radius:20px;
  padding:16px;
  background:#fff;
  min-height:132px;
  box-shadow:0 14px 30px rgba(15,23,42,.06);
}

.break-even-kpi small{
  display:block;
  color:#64748b;
  text-transform:uppercase;
  font-size:.72rem;
  font-weight:900;
  letter-spacing:.04em;
}

.break-even-kpi strong{
  display:block;
  font-size:1.45rem;
  font-weight:950;
  color:#111827;
  margin:6px 0;
}

.break-even-kpi span{
  color:#64748b;
  font-size:.88rem;
}

.break-even-kpi.danger{border-color:#fecaca;background:#fff7f7;}
.break-even-kpi.warning{border-color:#fde68a;background:#fffbeb;}
.break-even-kpi.success{border-color:#bbf7d0;background:#f0fdf4;}
.break-even-kpi.primary{border-color:#bfdbfe;background:#eff6ff;}

.break-even-card .card-header,
.break-even-diagnostic-card .card-header{
  align-items:flex-start;
}

.break-even-form-grid{
  display:grid;
  gap:16px;
  padding:16px;
}

.break-even-block{
  border:1px solid #e5e7eb;
  border-radius:18px;
  padding:14px;
  background:#f8fafc;
}

.break-even-block h6{
  font-family:var(--font-menu, "Poppins", sans-serif);
  font-weight:950;
  color:#111827;
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:12px;
}

.break-even-input{
  font-weight:700;
}

.break-even-diagnostic{
  padding:16px;
}

.break-even-status{
  border-radius:18px;
  border:1px solid #e5e7eb;
  padding:14px;
  display:grid;
  gap:6px;
  margin-bottom:12px;
}

.break-even-status i{
  font-size:1.25rem;
}

.break-even-status strong{
  font-family:var(--font-menu, "Poppins", sans-serif);
  font-size:1.1rem;
}

.break-even-status span{
  color:#475569;
}

.break-even-status.danger{background:#fef2f2;border-color:#fecaca;color:#991b1b;}
.break-even-status.warning{background:#fffbeb;border-color:#fde68a;color:#92400e;}
.break-even-status.primary{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8;}
.break-even-status.success{background:#f0fdf4;border-color:#bbf7d0;color:#15803d;}
.break-even-status.muted{background:#f8fafc;color:#64748b;}

.break-even-diagnostic-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.break-even-diagnostic-grid div,
.break-even-mini-list div{
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:10px;
  background:#fff;
}

.break-even-diagnostic-grid small,
.break-even-mini-list span{
  display:block;
  color:#64748b;
  font-size:.78rem;
  font-weight:800;
  text-transform:uppercase;
}

.break-even-diagnostic-grid strong,
.break-even-mini-list strong{
  display:block;
  color:#111827;
  font-weight:950;
  margin-top:4px;
}

.break-even-mini-list{
  display:grid;
  gap:10px;
  padding:16px;
}

.break-even-service-table input{
  min-width:110px;
}

.break-even-service-minimum,
.break-even-service-ideal{
  font-weight:950;
  white-space:nowrap;
}

.break-even-note{
  border:1px solid #ddd6fe;
  background:#f5f3ff;
  color:#4c1d95;
  border-radius:16px;
  padding:14px;
}

@media(max-width:768px){
  .break-even-diagnostic-grid{
    grid-template-columns:1fr;
  }

  .break-even-page .section-toolbar{
    gap:12px;
  }
}

@media print{
  .break-even-page .no-print,
  .break-even-page .section-toolbar button{
    display:none!important;
  }
}


/* V23.9.1 - Ponto de Equilíbrio detalhado e histórico */
.break-even-scenario-plan{padding:16px;}
.break-even-plan-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
.break-even-plan-grid div{border:1px solid #e5e7eb;border-radius:14px;background:#fff;padding:12px;}
.break-even-plan-grid small{display:block;color:#64748b;text-transform:uppercase;font-size:.74rem;font-weight:900;}
.break-even-plan-grid strong{display:block;margin-top:4px;color:#111827;font-weight:950;}
.break-even-plan-note{margin-top:12px;border:1px solid #bfdbfe;background:#eff6ff;color:#1e3a8a;border-radius:14px;padding:12px;line-height:1.45;}
#breakEvenHistoryTable td{vertical-align:middle;}
#beStrategicNotes{min-height:70px;}
.break-even-card .btn-group .btn{font-weight:800;}
@media(max-width:768px){.break-even-plan-grid{grid-template-columns:1fr;}}


/* V23.9.1 - Histórico do Ponto de Equilíbrio corrigido */
#breakEvenHistoryTable .btn-group .btn{
  min-width:34px;
}


/* V23.9.1 - Mobile completo sem perda de funcionalidades */
.crm-mobile-full-menu{display:none;}

@media (max-width: 991.98px){
  html,body{max-width:100%;overflow-x:hidden;}
  body{padding-bottom:90px;}
  .app-shell,.main-content,.content-wrapper,.content-section,.section-toolbar,.card,.painel{max-width:100%;min-width:0;}
  .main-content{width:100%;padding-left:10px!important;padding-right:10px!important;}

  .section-toolbar{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:14px!important;padding:16px!important;}
  .section-toolbar>div{width:100%;min-width:0;}
  .section-toolbar h3{font-size:1.65rem!important;line-height:1.15!important;overflow-wrap:anywhere;}
  .section-toolbar p{font-size:.98rem;line-height:1.45;}
  .section-toolbar .d-flex,.section-toolbar .toolbar-actions{width:100%;display:grid!important;grid-template-columns:1fr!important;gap:10px!important;}
  .section-toolbar .btn{width:100%;min-height:48px;}

  .topbar{display:flex!important;flex-wrap:wrap!important;gap:10px!important;padding:12px!important;}
  .topbar .user-chip,.topbar .role-chip{flex:1 1 145px;max-width:100%;justify-content:center;}
  .topbar .btn{min-height:46px;}

  .crm-responsive-modal{width:calc(100% - 12px)!important;max-width:none!important;margin:6px auto!important;}
  .crm-responsive-modal .modal-content{max-height:calc(100vh - 12px)!important;border-radius:18px!important;overflow:hidden;}
  .crm-responsive-modal .modal-header,.crm-responsive-modal .modal-body,.crm-responsive-modal .modal-footer{padding:14px!important;}
  .crm-responsive-modal .modal-body{overflow-y:auto!important;overflow-x:hidden!important;}
  .crm-responsive-modal .modal-footer{display:flex!important;flex-direction:column!important;align-items:stretch!important;}
  .crm-responsive-modal .modal-footer>div,.crm-responsive-modal .modal-footer .btn{width:100%!important;}

  #manualModal .modal-dialog,#manualQuickModal .modal-dialog{width:calc(100% - 12px)!important;margin:6px auto!important;}
  #manualModal .modal-content,#manualQuickModal .modal-content{height:calc(100vh - 12px)!important;max-height:calc(100vh - 12px)!important;overflow:hidden!important;}
  #manualModal .modal-body,#manualQuickModal .modal-body{overflow-y:auto!important;overflow-x:hidden!important;padding:14px!important;}
  .manual-tabs,.manual-nav,.manual-category-tabs{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;gap:8px!important;padding-bottom:8px!important;-webkit-overflow-scrolling:touch;}
  .manual-tabs button,.manual-nav button,.manual-category-tabs button{flex:0 0 auto!important;white-space:nowrap!important;}
  .manual-content,.manual-section-content{width:100%!important;overflow-wrap:anywhere;}

  .table-responsive{width:100%!important;max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch;border-radius:16px;}
  .table{min-width:780px!important;}
  #breakEvenHistoryTable{min-width:880px!important;}
  .break-even-service-table{min-width:1020px!important;}
  #prospectionTable,.prospection-table{min-width:1020px!important;}

  .break-even-page .row>[class*="col-"],.prospection-page .row>[class*="col-"],.prospect-lead-modal .row>[class*="col-"],.break-even-block .row>[class*="col-"]{width:100%!important;max-width:100%!important;}
  .break-even-form-grid{padding:10px!important;}
  .break-even-block,.lead-edit-section{padding:12px!important;}
  .break-even-diagnostic-grid,.break-even-plan-grid,.lead-checklist-grid{grid-template-columns:1fr!important;}
  .prospect-lead-modal textarea{min-height:110px;}
  .prospect-lead-modal .modal-body{padding-bottom:120px!important;}

  .card-header{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:10px!important;}
  .card-header .btn{width:100%!important;}
  .btn-group{display:flex!important;flex-wrap:wrap!important;gap:6px!important;}
  .btn-group>.btn{border-radius:10px!important;margin:0!important;}

  .crm-mobile-full-menu{
    position:fixed;left:0;right:0;bottom:0;z-index:1080;display:flex!important;gap:8px;overflow-x:auto;
    padding:9px 10px calc(9px + env(safe-area-inset-bottom));background:rgba(15,23,42,.98);
    border-top:1px solid rgba(255,255,255,.12);box-shadow:0 -10px 28px rgba(15,23,42,.32);-webkit-overflow-scrolling:touch;
  }
  .crm-mobile-full-menu button{
    flex:0 0 82px;min-height:62px;border:0;border-radius:14px;background:rgba(255,255,255,.08);color:#fff;
    display:grid;place-items:center;gap:3px;padding:7px 5px;font-size:.7rem;font-weight:800;
  }
  .crm-mobile-full-menu button i{font-size:1.2rem;}
  .crm-mobile-full-menu button.is-active{background:linear-gradient(135deg,#5b36f2,#7c3aed);}
  .mobile-bottom-nav{display:none!important;}

  .empty-state{min-height:180px;padding:22px 16px;text-align:center;}
  .empty-state p,.empty-state span{white-space:normal!important;overflow-wrap:anywhere!important;}
}

@media (max-width: 575.98px){
  .main-content{padding-left:7px!important;padding-right:7px!important;}
  .section-toolbar{border-radius:18px;padding:14px!important;}
  .section-toolbar h3{font-size:1.45rem!important;}
  .topbar .user-chip,.topbar .role-chip{flex-basis:100%!important;}
  .crm-mobile-full-menu button{flex-basis:76px;}
}


/* V23.9.1 - Análise do cliente em PDF */
.client-analysis-editor-card{border:1px solid #d1d5db;border-radius:18px;overflow:hidden;background:#fff}
.client-analysis-toolbar{display:flex;flex-wrap:wrap;gap:6px;padding:10px;background:#f8fafc;border-bottom:1px solid #e5e7eb}
.client-analysis-toolbar button{width:38px;height:38px;border:1px solid #d1d5db;border-radius:10px;background:#fff;color:#334155}
.client-analysis-toolbar button:hover{background:#f5f3ff;color:#6d28d9;border-color:#c4b5fd}
.client-analysis-editor{min-height:420px;padding:28px;outline:none;font-family:Arial,Helvetica,sans-serif;font-size:1rem;line-height:1.65;color:#111827;background:#fff}
.client-analysis-editor h2{border-bottom:1px solid #e5e7eb;padding-bottom:6px}
.client-analysis-editor ul,.client-analysis-editor ol{padding-left:28px}
.client-analysis-table{min-width:820px}
.client-analysis-panel .card-header .form-select{min-width:220px}
@media(max-width:991.98px){
  .client-analysis-editor{min-height:350px;padding:18px}
  .client-analysis-toolbar{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .client-analysis-toolbar button{flex:0 0 38px}
  .client-analysis-modal .row>[class*="col-"]{width:100%!important;max-width:100%!important}
}


/* V23.9.1 - Análise também na Prospecção */
.lead-analysis-list{display:grid;gap:10px}
.lead-analysis-item{display:flex;justify-content:space-between;align-items:center;gap:12px;border:1px solid #e5e7eb;border-left:5px solid #06b6d4;background:#f8fafc;border-radius:14px;padding:12px}
.lead-analysis-item strong,.lead-analysis-item small{display:block}.lead-analysis-item small{color:#64748b;margin-top:3px}
.btn-outline-info[data-analysis-prospect]{color:#0891b2;border-color:#67e8f9}
@media(max-width:768px){.lead-analysis-item{flex-direction:column;align-items:stretch}.lead-analysis-item .btn-group{width:100%}.lead-analysis-item .btn{flex:1}}


/* V23.9.1 - PDF salvo e enviável */
.client-analysis-file-status{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  border:1px solid #fde68a;
  background:#fffbeb;
  color:#92400e;
  border-radius:16px;
  padding:13px;
}

.client-analysis-file-status > div:first-child{
  display:flex;
  align-items:center;
  gap:11px;
}

.client-analysis-file-status i{
  font-size:1.45rem;
}

.client-analysis-file-status span,
.client-analysis-file-status strong,
.client-analysis-file-status small{
  display:block;
}

.client-analysis-file-status small{
  margin-top:3px;
  color:#64748b;
}

.client-analysis-file-status.is-saved{
  border-color:#bbf7d0;
  background:#f0fdf4;
  color:#166534;
}

.analysis-pdf-export-root{
  pointer-events:none;
}

@media(max-width:768px){
  .client-analysis-file-status{
    flex-direction:column;
    align-items:stretch;
  }

  .client-analysis-file-status .btn{
    width:100%;
  }
}


/* V23.9.1 - Agenda da Prospecção */
.agenda-prospect-panel{padding:16px}
.agenda-prospect-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;border:1px solid #ddd6fe;background:linear-gradient(135deg,#f5f3ff,#fff);border-radius:20px;padding:18px;margin-bottom:16px}
.agenda-prospect-header h4{margin:0;font-family:var(--font-menu,"Poppins",sans-serif);font-weight:950;color:#4c1d95}
.agenda-prospect-header p{margin:5px 0 0;color:#64748b}
.agenda-prospect-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}
.agenda-summary-card{border:1px solid #e5e7eb;border-radius:18px;padding:14px;background:#fff;box-shadow:0 10px 24px rgba(15,23,42,.05)}
.agenda-summary-card span,.agenda-summary-card strong,.agenda-summary-card small{display:block}
.agenda-summary-card span{font-size:.76rem;font-weight:900;text-transform:uppercase;color:#64748b}
.agenda-summary-card strong{font-family:var(--font-menu,"Poppins",sans-serif);font-size:1.75rem;margin:4px 0;color:#111827}
.agenda-summary-card small{color:#64748b}
.agenda-summary-card.danger{background:#fef2f2;border-color:#fecaca}.agenda-summary-card.warning{background:#fffbeb;border-color:#fde68a}.agenda-summary-card.primary{background:#eff6ff;border-color:#bfdbfe}.agenda-summary-card.muted{background:#f8fafc;border-color:#e2e8f0}
.agenda-prospect-filters{border:1px solid #e5e7eb;border-radius:18px;background:#fff;padding:14px;margin-bottom:14px}
.agenda-prospect-layout{display:grid;grid-template-columns:repeat(4,minmax(260px,1fr));gap:14px;align-items:start}
.agenda-prospect-column{border:1px solid #e5e7eb;border-radius:18px;background:#f8fafc;overflow:hidden;min-height:260px}
.agenda-prospect-column>header{display:flex;justify-content:space-between;align-items:center;padding:13px 14px;border-bottom:1px solid #e5e7eb;background:#fff}
.agenda-prospect-column>header>div{display:flex;align-items:center;gap:8px}.agenda-prospect-column h5{margin:0;font-family:var(--font-menu,"Poppins",sans-serif);font-size:.95rem;font-weight:950}
.agenda-prospect-column header strong{display:grid;place-items:center;min-width:30px;height:30px;border-radius:999px;background:#f1f5f9;color:#334155}
.agenda-dot{width:10px;height:10px;border-radius:50%;background:#94a3b8}.agenda-prospect-column.overdue .agenda-dot{background:#dc2626}.agenda-prospect-column.today .agenda-dot{background:#d97706}.agenda-prospect-column.upcoming .agenda-dot{background:#2563eb}.agenda-prospect-column.nodate .agenda-dot{background:#64748b}
.agenda-prospect-list{display:grid;gap:10px;padding:10px}.agenda-prospect-item{border:1px solid #e5e7eb;border-radius:16px;background:#fff;padding:12px;box-shadow:0 8px 18px rgba(15,23,42,.04)}
.agenda-prospect-item.overdue{border-left:5px solid #dc2626}.agenda-prospect-item.today{border-left:5px solid #d97706}.agenda-prospect-item.week,.agenda-prospect-item.month,.agenda-prospect-item.future{border-left:5px solid #2563eb}.agenda-prospect-item.nodate{border-left:5px solid #64748b}
.agenda-prospect-item-top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.agenda-prospect-item h6{margin:6px 0 2px;font-family:var(--font-menu,"Poppins",sans-serif);font-weight:950;color:#111827}.agenda-prospect-item small{color:#64748b}
.agenda-prospect-date{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;font-size:.72rem;font-weight:900;background:#f1f5f9;color:#475569}
.agenda-prospect-date.overdue{background:#fef2f2;color:#b91c1c}.agenda-prospect-date.today{background:#fffbeb;color:#92400e}.agenda-prospect-date.week,.agenda-prospect-date.month,.agenda-prospect-date.future{background:#eff6ff;color:#1d4ed8}
.agenda-prospect-action,.agenda-prospect-last-contact{margin-top:10px;border-radius:12px;background:#f8fafc;padding:9px}.agenda-prospect-action small,.agenda-prospect-action strong,.agenda-prospect-last-contact small,.agenda-prospect-last-contact span{display:block}
.agenda-prospect-action strong{margin-top:3px;font-size:.88rem;color:#1f2937}.agenda-prospect-last-contact span{margin-top:3px;font-size:.8rem;color:#475569}
.agenda-prospect-item-buttons{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin-top:10px}.agenda-prospect-item-buttons .btn{min-height:36px}
.agenda-prospect-empty{min-height:150px;display:grid;place-items:center;align-content:center;gap:8px;color:#94a3b8;text-align:center;padding:20px}.agenda-prospect-empty i{font-size:1.6rem}
@media(max-width:1200px){.agenda-prospect-layout{grid-template-columns:repeat(2,minmax(280px,1fr))}}
@media(max-width:768px){.agenda-prospect-panel{padding:10px}.agenda-prospect-header{flex-direction:column;align-items:stretch}.agenda-prospect-header .d-flex{display:grid!important;grid-template-columns:1fr}.agenda-prospect-header .btn{width:100%}.agenda-prospect-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.agenda-prospect-layout{display:flex;overflow-x:auto;gap:12px;padding-bottom:8px;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch}.agenda-prospect-column{flex:0 0 88vw;scroll-snap-align:start}}
@media(max-width:480px){.agenda-prospect-summary{grid-template-columns:1fr}}


/* V23.9.1 - Agenda Comercial Completa */
.agenda-summary-card.success{background:#f0fdf4;border-color:#bbf7d0}
.agenda-summary-card.info{background:#ecfeff;border-color:#a5f3fc}
.agenda-summary-card.purple{background:#faf5ff;border-color:#e9d5ff}
.agenda-summary-card.dark{background:#f1f5f9;border-color:#cbd5e1}

.agenda-card-tags{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:7px;
}

.agenda-priority,
.agenda-owner,
.agenda-stale{
  display:inline-flex;
  align-items:center;
  gap:4px;
  border-radius:999px;
  padding:3px 7px;
  font-size:.68rem;
  font-weight:900;
}

.agenda-priority.low{background:#f1f5f9;color:#64748b}
.agenda-priority.normal{background:#eff6ff;color:#1d4ed8}
.agenda-priority.high{background:#fffbeb;color:#92400e}
.agenda-priority.urgent{background:#fef2f2;color:#b91c1c}
.agenda-owner{background:#f5f3ff;color:#6d28d9}
.agenda-stale{background:#fff7ed;color:#c2410c}

#prospectAgendaActionModal .modal-body{
  background:#f8fafc;
}

#prospectAgendaActionModal .form-label{
  font-weight:800;
  color:#334155;
}

@media(max-width:768px){
  .agenda-prospect-item-buttons{
    grid-template-columns:repeat(5,1fr)!important;
  }
}


/* V23.9.1 - Central de Inteligência Comercial */
.executive-intelligence-card{
  border:1px solid #c4b5fd;
  background:linear-gradient(145deg,#ffffff 0%,#faf5ff 48%,#eff6ff 100%);
  border-radius:26px;
  padding:20px;
  box-shadow:0 20px 50px rgba(76,29,149,.10);
}

.executive-intelligence-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  margin-bottom:18px;
}

.executive-intelligence-header h4{
  font-family:var(--font-menu,"Poppins",sans-serif);
  font-weight:950;
  font-size:1.55rem;
  color:#2e1065;
  margin:3px 0 5px;
}

.executive-intelligence-header p{
  margin:0;
  color:#64748b;
}

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

.executive-kpi{
  border:1px solid rgba(148,163,184,.3);
  border-radius:18px;
  background:rgba(255,255,255,.88);
  padding:14px;
  min-height:120px;
}

.executive-kpi span,
.executive-kpi strong,
.executive-kpi small{
  display:block;
}

.executive-kpi span{
  color:#64748b;
  font-size:.74rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.03em;
}

.executive-kpi strong{
  font-family:var(--font-menu,"Poppins",sans-serif);
  color:#111827;
  font-size:1.4rem;
  font-weight:950;
  margin:7px 0;
}

.executive-kpi strong.negative{color:#b91c1c}
.executive-kpi small{color:#64748b}
.executive-kpi.income{border-top:4px solid #16a34a}
.executive-kpi.goal{border-top:4px solid #7c3aed}
.executive-kpi.break-even{border-top:4px solid #d97706}
.executive-kpi.forecast{border-top:4px solid #2563eb}
.executive-kpi.profit{border-top:4px solid #059669}
.executive-kpi.recurring{border-top:4px solid #0891b2}
.executive-kpi.conversion{border-top:4px solid #db2777}
.executive-kpi.ticket{border-top:4px solid #475569}

.executive-progress-panel{
  margin-top:14px;
  border:1px solid #ddd6fe;
  background:#fff;
  border-radius:18px;
  padding:14px;
}

.executive-progress-header,
.executive-progress-footer{
  display:flex;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}

.executive-progress-header div strong,
.executive-progress-header div span{
  display:block;
}

.executive-progress-header div span{
  color:#64748b;
  margin-top:2px;
}

.executive-progress-header > strong{
  font-size:1.25rem;
  color:#6d28d9;
}

.executive-progress-track{
  height:14px;
  border-radius:999px;
  background:#ede9fe;
  overflow:hidden;
  margin:12px 0;
}

.executive-progress-bar{
  width:0;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#7c3aed,#2563eb,#16a34a);
  transition:width .4s ease;
}

.executive-progress-footer{
  color:#64748b;
  font-size:.86rem;
}

.executive-progress-footer strong{color:#111827}

.executive-panel{
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:20px;
  padding:15px;
}

.executive-panel-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  margin-bottom:13px;
}

.executive-panel-header h5{
  margin:0;
  font-family:var(--font-menu,"Poppins",sans-serif);
  font-weight:950;
  color:#111827;
}

.executive-panel-header span{
  display:block;
  color:#64748b;
  margin-top:3px;
}

.forecast-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
}

.forecast-grid article{
  border:1px solid #e5e7eb;
  background:#f8fafc;
  border-radius:14px;
  padding:11px;
}

.forecast-grid span,
.forecast-grid strong,
.forecast-grid small{
  display:block;
}

.forecast-grid span{
  color:#64748b;
  font-size:.72rem;
  font-weight:900;
  text-transform:uppercase;
}

.forecast-grid strong{
  font-size:1.08rem;
  margin:5px 0;
  color:#111827;
}

.forecast-grid small{color:#64748b}

.forecast-stage-bars{
  display:grid;
  gap:10px;
  margin-top:15px;
}

.forecast-stage-row{
  display:grid;
  grid-template-columns:minmax(145px,220px) 1fr;
  gap:12px;
  align-items:center;
}

.forecast-stage-row strong,
.forecast-stage-row span{
  display:block;
}

.forecast-stage-row span{
  color:#64748b;
  font-size:.78rem;
}

.forecast-stage-track,
.executive-funnel-track{
  height:9px;
  background:#e2e8f0;
  border-radius:999px;
  overflow:hidden;
}

.forecast-stage-track span,
.executive-funnel-track span{
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#7c3aed,#2563eb);
}

.executive-radar-list,
.executive-lead-ranking,
.executive-funnel-summary{
  display:grid;
  gap:9px;
}

.executive-radar-item{
  display:flex;
  gap:11px;
  align-items:center;
  border:1px solid #e5e7eb;
  border-left:5px solid #64748b;
  background:#f8fafc;
  border-radius:14px;
  padding:11px;
}

.executive-radar-item i{font-size:1.25rem}
.executive-radar-item strong,
.executive-radar-item span{display:block}
.executive-radar-item span{color:#64748b;font-size:.82rem;margin-top:2px}
.executive-radar-item.hot{border-left-color:#dc2626;color:#b91c1c}
.executive-radar-item.danger{border-left-color:#ef4444}
.executive-radar-item.warning{border-left-color:#d97706}
.executive-radar-item.primary{border-left-color:#2563eb}

.executive-lead-row{
  display:grid;
  grid-template-columns:34px 1fr auto 38px;
  gap:10px;
  align-items:center;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:9px;
}

.executive-rank-number{
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border-radius:10px;
  background:#f5f3ff;
  color:#6d28d9;
  font-weight:950;
}

.executive-lead-main strong,
.executive-lead-main span{
  display:block;
}

.executive-lead-main span{
  color:#64748b;
  font-size:.8rem;
  margin-top:2px;
}

.lead-score-badge{
  min-width:88px;
  text-align:center;
  border-radius:12px;
  padding:6px 8px;
}

.lead-score-badge strong,
.lead-score-badge span{
  display:block;
}

.lead-score-badge strong{font-size:1.05rem}
.lead-score-badge span{font-size:.68rem;font-weight:800}
.lead-score-badge.hot,.prospect-score-chip.hot,.prospect-score-inline.hot{background:#fee2e2;color:#b91c1c}
.lead-score-badge.high,.prospect-score-chip.high,.prospect-score-inline.high{background:#dcfce7;color:#15803d}
.lead-score-badge.medium,.prospect-score-chip.medium,.prospect-score-inline.medium{background:#dbeafe;color:#1d4ed8}
.lead-score-badge.low,.prospect-score-chip.low,.prospect-score-inline.low{background:#fef3c7;color:#92400e}
.lead-score-badge.cold,.prospect-score-chip.cold,.prospect-score-inline.cold{background:#f1f5f9;color:#64748b}

.executive-funnel-row{
  display:grid;
  gap:6px;
}

.executive-funnel-row > div:first-child{
  display:flex;
  justify-content:space-between;
  gap:10px;
}

.executive-funnel-row span{
  color:#64748b;
  font-size:.78rem;
}

.prospect-score-chip{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:4px 8px;
  font-size:.72rem;
  font-weight:900;
  margin-bottom:7px;
}

.prospect-score-inline{
  display:inline-block;
  border-radius:999px;
  padding:3px 7px;
  font-size:.68rem;
  font-weight:900;
  margin-top:5px;
}

@media(max-width:1200px){
  .executive-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .forecast-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:768px){
  .executive-intelligence-card{padding:13px;border-radius:20px}
  .executive-intelligence-header{flex-direction:column;align-items:stretch}
  .executive-intelligence-header .d-flex{display:grid!important;grid-template-columns:1fr}
  .executive-intelligence-header .btn{width:100%}
  .executive-kpi-grid{grid-template-columns:1fr}
  .forecast-grid{grid-template-columns:1fr}
  .forecast-stage-row{grid-template-columns:1fr}
  .executive-lead-row{grid-template-columns:30px 1fr auto}
  .executive-lead-row .btn{grid-column:1/-1;width:100%}
  .executive-progress-footer{display:grid;grid-template-columns:1fr}
}

/* V23.9.1 - Pipeline Kanban Profissional */
.prospect-kanban-panel{padding:16px}.prospect-kanban-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;border:1px solid #bfdbfe;background:linear-gradient(135deg,#eff6ff,#fff);border-radius:20px;padding:18px;margin-bottom:14px}.prospect-kanban-header h4{margin:0;font-family:var(--font-menu,"Poppins",sans-serif);font-weight:950;color:#1e3a8a}.prospect-kanban-header p{margin:5px 0 0;color:#64748b}.prospect-kanban-header .form-select{min-width:190px}.kanban-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}.kanban-summary-grid article{border:1px solid #e5e7eb;border-radius:16px;background:#fff;padding:13px}.kanban-summary-grid span,.kanban-summary-grid strong{display:block}.kanban-summary-grid span{color:#64748b;text-transform:uppercase;font-size:.72rem;font-weight:900}.kanban-summary-grid strong{margin-top:5px;font-size:1.25rem;color:#111827}.prospect-kanban-board{display:flex;gap:12px;overflow-x:auto;padding-bottom:12px;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}.kanban-column{flex:0 0 310px;border:1px solid #e5e7eb;border-radius:18px;background:#f8fafc;overflow:hidden;scroll-snap-align:start}.kanban-column>header{display:flex;justify-content:space-between;align-items:center;padding:13px;background:#fff;border-bottom:1px solid #e5e7eb}.kanban-column>header>div{display:flex;align-items:center;gap:8px}.kanban-column h5{margin:0;font-size:.92rem;font-weight:950}.kanban-column header strong{display:grid;place-items:center;min-width:30px;height:30px;border-radius:999px;background:#f1f5f9}.kanban-stage-dot{width:10px;height:10px;border-radius:50%}.kanban-stage-dot.new{background:#64748b}.kanban-stage-dot.contact{background:#0ea5e9}.kanban-stage-dot.diagnosis{background:#8b5cf6}.kanban-stage-dot.proposal{background:#f59e0b}.kanban-stage-dot.negotiation{background:#ec4899}.kanban-stage-dot.won{background:#16a34a}.kanban-stage-dot.lost{background:#dc2626}.kanban-column-value{padding:8px 13px;background:#fff;border-bottom:1px solid #e5e7eb;color:#475569;font-weight:900}.kanban-dropzone{min-height:420px;display:grid;align-content:start;gap:10px;padding:10px}.kanban-dropzone.drag-over{background:#eef2ff;box-shadow:inset 0 0 0 2px #818cf8}.kanban-card{border:1px solid #e5e7eb;border-radius:16px;background:#fff;padding:11px;box-shadow:0 8px 18px rgba(15,23,42,.05);cursor:grab}.kanban-card.dragging{opacity:.45;transform:rotate(2deg)}.kanban-card-head{display:flex;justify-content:space-between;align-items:flex-start}.kanban-card h6{margin:9px 0 3px;font-weight:950}.kanban-card p{margin:0;color:#64748b;font-size:.8rem}.kanban-card-value{margin-top:9px;font-size:1.08rem;font-weight:950;color:#1e3a8a}.kanban-card-meta{display:grid;gap:5px;margin-top:9px}.kanban-card-meta span{display:flex;align-items:center;gap:5px;font-size:.75rem;color:#64748b}.kanban-card-meta span.warning{color:#b45309}.kanban-card-meta span.danger{color:#b91c1c}.kanban-card-action{margin-top:9px;border-radius:12px;background:#f8fafc;padding:8px}.kanban-card-action small,.kanban-card-action strong{display:block}.kanban-card-action small{color:#64748b}.kanban-card-action strong{margin-top:3px;font-size:.82rem}.kanban-card-history{margin-top:8px;color:#64748b;font-size:.72rem}.kanban-card-buttons{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:9px}.kanban-empty{min-height:140px;display:grid;place-items:center;align-content:center;gap:8px;color:#94a3b8;text-align:center}.kanban-move-route{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;align-items:center;border:1px solid #ddd6fe;background:#f5f3ff;border-radius:16px;padding:13px}.kanban-move-route div{text-align:center}.kanban-move-route small,.kanban-move-route strong{display:block}@media(max-width:991.98px){.prospect-kanban-header{flex-direction:column;align-items:stretch}.prospect-kanban-header .d-flex{display:grid!important;grid-template-columns:1fr!important}.prospect-kanban-header .form-select,.prospect-kanban-header .btn{width:100%}.kanban-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:575.98px){.prospect-kanban-panel{padding:10px}.kanban-summary-grid{grid-template-columns:1fr}.kanban-column{flex-basis:88vw}.kanban-dropzone{min-height:360px}}

/* V23.9.1 - CRM 360 */
.crm360-backdrop{position:fixed;inset:0;z-index:1998;background:rgba(15,23,42,.55);opacity:0;visibility:hidden;transition:.25s;backdrop-filter:blur(2px)}.crm360-backdrop.show{opacity:1;visibility:visible}
.crm360-drawer{position:fixed;top:0;right:0;bottom:0;z-index:1999;width:min(82vw,1380px);background:#f8fafc;transform:translateX(102%);transition:.3s;box-shadow:-25px 0 60px rgba(15,23,42,.25);display:flex;flex-direction:column}.crm360-drawer.open{transform:translateX(0)}body.crm360-open{overflow:hidden}
.crm360-header{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:18px 20px;background:#fff;border-bottom:1px solid #e5e7eb}.crm360-identity{display:flex;align-items:center;gap:14px}.crm360-avatar{width:54px;height:54px;display:grid;place-items:center;border-radius:18px;background:linear-gradient(135deg,#6d28d9,#2563eb);color:#fff;font-size:1.35rem;font-weight:950}.crm360-identity span{color:#7c3aed;font-size:.72rem;font-weight:900;text-transform:uppercase}.crm360-header h3{margin:2px 0;font-weight:950}.crm360-header p{margin:0;color:#64748b}.crm360-header-actions{display:flex;gap:8px}
.crm360-search{display:flex;align-items:center;gap:10px;padding:10px 18px;background:#fff;border-bottom:1px solid #e5e7eb}.crm360-search input{flex:1;border:0;outline:0;background:#f8fafc;border-radius:12px;padding:10px}
.crm360-hero{padding:16px 18px;background:linear-gradient(135deg,#f5f3ff,#eff6ff);border-bottom:1px solid #ddd6fe}.crm360-health-card{display:flex;align-items:center;gap:14px;border:1px solid #c4b5fd;background:#fff;border-radius:18px;padding:14px;margin-bottom:12px}.crm360-health-card.excellent{border-left:6px solid #16a34a}.crm360-health-card.healthy{border-left:6px solid #2563eb}.crm360-health-card.attention{border-left:6px solid #d97706}.crm360-health-card.risk{border-left:6px solid #dc2626}.crm360-health-score{width:68px;height:68px;display:grid;place-items:center;border-radius:50%;background:#f5f3ff;color:#6d28d9;font-size:1.75rem;font-weight:950}.crm360-health-card span,.crm360-health-card strong,.crm360-health-card small{display:block}.crm360-health-card span{color:#64748b;font-size:.72rem;font-weight:900;text-transform:uppercase}.crm360-health-card small{color:#64748b}
.crm360-hero-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px}.crm360-hero-grid article,.crm360-summary-grid article{border:1px solid #e5e7eb;background:#fff;border-radius:14px;padding:10px}.crm360-hero-grid span,.crm360-hero-grid strong,.crm360-summary-grid span,.crm360-summary-grid strong{display:block}.crm360-hero-grid span,.crm360-summary-grid span{color:#64748b;font-size:.7rem;font-weight:900;text-transform:uppercase}.crm360-hero-grid strong,.crm360-summary-grid strong{margin-top:5px}
.crm360-tabs{display:flex;gap:6px;overflow-x:auto;padding:10px 16px;background:#fff;border-bottom:1px solid #e5e7eb}.crm360-tabs button{flex:0 0 auto;border:1px solid #e5e7eb;background:#fff;color:#475569;border-radius:999px;padding:8px 12px;font-weight:800}.crm360-tabs button.active{background:#5b21b6;color:#fff;border-color:#5b21b6}
.crm360-content{flex:1;overflow-y:auto;padding:18px}.crm360-panel{display:none}.crm360-panel.active{display:block}.crm360-title h4{margin:0;font-weight:950}.crm360-title p{margin:3px 0 14px;color:#64748b}.crm360-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.crm360-two{display:grid;grid-template-columns:1.4fr 1fr;gap:12px}.crm360-card{border:1px solid #e5e7eb;background:#fff;border-radius:18px;padding:14px}.crm360-card h5{margin:0 0 12px;font-weight:950}
.crm360-list article{display:flex;align-items:center;gap:10px;border:1px solid #e5e7eb;border-radius:14px;background:#fff;padding:10px;margin-bottom:8px}.crm360-list article>i{color:#6d28d9;font-size:1.15rem}.crm360-list strong,.crm360-list span,.crm360-list small{display:block}.crm360-list span{color:#475569}.crm360-list small{color:#94a3b8}.crm360-actions{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.crm360-actions button{border:1px solid #ddd6fe;background:#f5f3ff;color:#5b21b6;border-radius:14px;padding:12px;font-weight:900}.crm360-empty{border:1px dashed #cbd5e1;border-radius:16px;padding:28px;text-align:center;color:#94a3b8;background:#fff}
@media(max-width:1200px){.crm360-drawer{width:92vw}.crm360-hero-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:768px){.crm360-drawer{width:100vw}.crm360-header{padding:13px}.crm360-header-actions .btn-outline-secondary{display:none}.crm360-hero{padding:12px}.crm360-health-score{width:58px;height:58px}.crm360-hero-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.crm360-content{padding:12px}.crm360-summary-grid,.crm360-two{grid-template-columns:1fr}.crm360-actions{grid-template-columns:1fr}}


/* V23.9.1 - Automação Comercial */
.commercial-automation-panel{
  padding:16px;
}

.commercial-automation-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  border:1px solid #fde68a;
  background:linear-gradient(135deg,#fffbeb,#ffffff);
  border-radius:20px;
  padding:18px;
  margin-bottom:14px;
}

.commercial-automation-header h4{
  margin:0;
  font-family:var(--font-menu,"Poppins",sans-serif);
  font-weight:950;
  color:#92400e;
}

.commercial-automation-header p{
  margin:5px 0 0;
  color:#64748b;
}

.automation-summary-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-bottom:14px;
}

.automation-summary-grid article{
  border:1px solid #e5e7eb;
  border-radius:17px;
  background:#fff;
  padding:13px;
}

.automation-summary-grid span,
.automation-summary-grid strong,
.automation-summary-grid small{
  display:block;
}

.automation-summary-grid span{
  color:#64748b;
  font-size:.72rem;
  font-weight:900;
  text-transform:uppercase;
}

.automation-summary-grid strong{
  margin:5px 0;
  font-size:1.35rem;
  color:#111827;
}

.automation-summary-grid small{
  color:#64748b;
}

.automation-card{
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:18px;
  padding:14px;
}

.automation-card-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:12px;
}

.automation-card-header h5{
  margin:0;
  font-family:var(--font-menu,"Poppins",sans-serif);
  font-weight:950;
}

.automation-card-header span{
  color:#64748b;
  display:block;
  margin-top:3px;
}

.automation-rules-list,
.automation-tasks-list{
  display:grid;
  gap:9px;
}

.automation-rule-item{
  display:grid;
  grid-template-columns:42px 1fr auto;
  gap:11px;
  align-items:center;
  border:1px solid #e5e7eb;
  border-left:5px solid #16a34a;
  border-radius:15px;
  padding:11px;
  background:#fff;
}

.automation-rule-item.inactive{
  border-left-color:#94a3b8;
  opacity:.72;
}

.automation-rule-status{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:#fef3c7;
  color:#d97706;
  font-size:1.1rem;
}

.automation-rule-main strong,
.automation-rule-main span,
.automation-rule-main small{
  display:block;
}

.automation-rule-main span{
  color:#475569;
  margin-top:3px;
}

.automation-rule-main small{
  color:#94a3b8;
  margin-top:2px;
}

.automation-rule-actions,
.automation-task-actions{
  display:flex;
  gap:5px;
}

.automation-task-item{
  display:flex;
  justify-content:space-between;
  gap:10px;
  border:1px solid #e5e7eb;
  border-left:5px solid #2563eb;
  border-radius:15px;
  padding:11px;
  background:#fff;
}

.automation-task-item.alta{
  border-left-color:#d97706;
}

.automation-task-item.urgente{
  border-left-color:#dc2626;
}

.automation-task-item.baixa{
  border-left-color:#94a3b8;
}

.automation-task-item strong,
.automation-task-item small,
.automation-task-item p{
  display:block;
}

.automation-task-item small{
  color:#64748b;
  margin-top:3px;
}

.automation-task-item p{
  margin:6px 0 0;
  color:#475569;
  font-size:.83rem;
}

.automation-task-status{
  display:inline-flex;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  padding:3px 7px;
  font-size:.68rem;
  font-weight:900;
  margin-bottom:5px;
}

.automation-cadence-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:10px;
}

.automation-cadence-grid article{
  position:relative;
  border:1px solid #e5e7eb;
  background:#f8fafc;
  border-radius:15px;
  padding:12px;
}

.automation-step-number{
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border-radius:10px;
  background:#fef3c7;
  color:#92400e;
  font-weight:950;
  margin-bottom:8px;
}

.automation-cadence-grid strong,
.automation-cadence-grid small{
  display:block;
}

.automation-cadence-grid small{
  color:#64748b;
  margin-top:3px;
}

.automation-form-block{
  border:1px solid #e5e7eb;
  border-radius:17px;
  background:#f8fafc;
  padding:14px;
}

.automation-form-block h6{
  font-family:var(--font-menu,"Poppins",sans-serif);
  font-weight:950;
  margin-bottom:12px;
}

.automation-empty{
  min-height:160px;
  display:grid;
  place-items:center;
  align-content:center;
  gap:8px;
  color:#94a3b8;
  text-align:center;
}

.automation-empty i{
  font-size:1.6rem;
}

@media(max-width:1200px){
  .automation-summary-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .automation-cadence-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media(max-width:768px){
  .commercial-automation-panel{
    padding:10px;
  }

  .commercial-automation-header{
    flex-direction:column;
    align-items:stretch;
  }

  .commercial-automation-header .d-flex{
    display:grid!important;
    grid-template-columns:1fr;
  }

  .commercial-automation-header .btn{
    width:100%;
  }

  .automation-summary-grid{
    grid-template-columns:1fr;
  }

  .automation-rule-item{
    grid-template-columns:38px 1fr;
  }

  .automation-rule-actions{
    grid-column:1/-1;
    width:100%;
  }

  .automation-rule-actions .btn{
    flex:1;
  }

  .automation-task-item{
    flex-direction:column;
  }

  .automation-task-actions{
    width:100%;
  }

  .automation-task-actions .btn{
    flex:1;
  }

  .automation-cadence-grid{
    grid-template-columns:1fr;
  }
}


/* V23.9.1 - IA Comercial */
.commercial-ai-panel{
  padding:16px;
}

.commercial-ai-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  border:1px solid #c4b5fd;
  background:linear-gradient(135deg,#f5f3ff,#ffffff);
  border-radius:20px;
  padding:18px;
  margin-bottom:14px;
}

.commercial-ai-header h4{
  margin:0;
  font-family:var(--font-menu,"Poppins",sans-serif);
  font-weight:950;
  color:#5b21b6;
}

.commercial-ai-header p{
  margin:5px 0 0;
  color:#64748b;
}

.commercial-ai-header .form-select{
  min-width:300px;
}

.commercial-ai-summary-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-bottom:14px;
}

.commercial-ai-summary-grid article{
  border:1px solid #e5e7eb;
  border-radius:17px;
  background:#fff;
  padding:13px;
}

.commercial-ai-summary-grid span,
.commercial-ai-summary-grid strong,
.commercial-ai-summary-grid small{
  display:block;
}

.commercial-ai-summary-grid span{
  color:#64748b;
  font-size:.72rem;
  font-weight:900;
  text-transform:uppercase;
}

.commercial-ai-summary-grid strong{
  margin:5px 0;
  font-size:1.35rem;
  color:#111827;
}

.commercial-ai-summary-grid small{
  color:#64748b;
}

.commercial-ai-card{
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:18px;
  padding:14px;
}

.commercial-ai-card-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:12px;
}

.commercial-ai-card-header h5{
  margin:0;
  font-family:var(--font-menu,"Poppins",sans-serif);
  font-weight:950;
}

.commercial-ai-card-header span{
  display:block;
  margin-top:3px;
  color:#64748b;
}

.commercial-ai-score-badge{
  display:grid!important;
  place-items:center;
  width:52px;
  height:52px;
  border-radius:16px;
  background:#f5f3ff;
  color:#6d28d9!important;
  font-size:1.3rem;
  font-weight:950;
}

.commercial-ai-main-result{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.commercial-ai-probability,
.commercial-ai-risk{
  border:1px solid #e5e7eb;
  border-radius:16px;
  padding:12px;
}

.commercial-ai-probability > span,
.commercial-ai-risk > span{
  color:#64748b;
  font-size:.74rem;
  font-weight:900;
  text-transform:uppercase;
}

.commercial-ai-probability > strong,
.commercial-ai-risk > strong{
  display:block;
  margin:5px 0 8px;
  font-size:1.4rem;
}

.commercial-ai-probability > div,
.commercial-ai-risk > div{
  height:9px;
  border-radius:999px;
  background:#e5e7eb;
  overflow:hidden;
}

.commercial-ai-probability > div span{
  display:block;
  height:100%;
  background:linear-gradient(90deg,#2563eb,#16a34a);
}

.commercial-ai-risk > div span{
  display:block;
  height:100%;
  background:linear-gradient(90deg,#f59e0b,#dc2626);
}

.commercial-ai-info-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
  margin-top:12px;
}

.commercial-ai-info-grid article{
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:10px;
  background:#f8fafc;
}

.commercial-ai-info-grid span,
.commercial-ai-info-grid strong{
  display:block;
}

.commercial-ai-info-grid span{
  color:#64748b;
  font-size:.7rem;
  font-weight:900;
  text-transform:uppercase;
}

.commercial-ai-info-grid strong{
  margin-top:5px;
}

.commercial-ai-recommendation{
  border:1px solid #c4b5fd;
  background:#f5f3ff;
  border-radius:16px;
  padding:13px;
  margin-top:12px;
}

.commercial-ai-recommendation span,
.commercial-ai-recommendation strong{
  display:block;
}

.commercial-ai-recommendation span{
  color:#7c3aed;
  font-size:.72rem;
  font-weight:900;
  text-transform:uppercase;
}

.commercial-ai-recommendation strong{
  margin-top:5px;
  color:#2e1065;
}

.commercial-ai-signals{
  height:100%;
  border-radius:15px;
  padding:12px;
}

.commercial-ai-signals.positive{
  background:#f0fdf4;
  border:1px solid #bbf7d0;
}

.commercial-ai-signals.negative{
  background:#fff7ed;
  border:1px solid #fed7aa;
}

.commercial-ai-signals h6{
  font-weight:950;
}

.commercial-ai-signals ul{
  margin:8px 0 0;
  padding-left:20px;
}

.commercial-ai-signals p{
  margin:8px 0 0;
  color:#64748b;
}

.commercial-ai-actions{
  display:grid;
  gap:9px;
}

.commercial-ai-actions button{
  display:flex;
  align-items:center;
  gap:11px;
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:15px;
  padding:11px;
  text-align:left;
}

.commercial-ai-actions button:hover{
  border-color:#c4b5fd;
  background:#faf5ff;
}

.commercial-ai-actions button > i{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:#f5f3ff;
  color:#6d28d9;
  font-size:1.1rem;
}

.commercial-ai-actions strong,
.commercial-ai-actions span{
  display:block;
}

.commercial-ai-actions span{
  color:#64748b;
  font-size:.78rem;
  margin-top:2px;
}

.commercial-ai-output{
  min-height:240px;
  font-family:Arial,Helvetica,sans-serif;
  line-height:1.6;
}

.commercial-ai-ranking{
  display:grid;
  gap:8px;
}

.commercial-ai-ranking-item{
  display:grid;
  grid-template-columns:34px 1fr auto 38px;
  gap:10px;
  align-items:center;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:9px;
}

.commercial-ai-ranking-number{
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border-radius:10px;
  background:#f5f3ff;
  color:#6d28d9;
  font-weight:950;
}

.commercial-ai-ranking-item strong,
.commercial-ai-ranking-item small,
.commercial-ai-ranking-metrics span{
  display:block;
}

.commercial-ai-ranking-item small{
  color:#64748b;
}

.commercial-ai-ranking-metrics{
  text-align:right;
}

.commercial-ai-ranking-metrics span{
  color:#16a34a;
  font-size:.78rem;
  font-weight:900;
}

.commercial-ai-empty{
  min-height:220px;
  display:grid;
  place-items:center;
  align-content:center;
  gap:8px;
  text-align:center;
  color:#94a3b8;
}

.commercial-ai-empty i{
  font-size:2rem;
}

@media(max-width:1200px){
  .commercial-ai-summary-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .commercial-ai-info-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:768px){
  .commercial-ai-panel{
    padding:10px;
  }

  .commercial-ai-header{
    flex-direction:column;
    align-items:stretch;
  }

  .commercial-ai-header .d-flex{
    display:grid!important;
    grid-template-columns:1fr;
  }

  .commercial-ai-header .form-select,
  .commercial-ai-header .btn{
    width:100%;
    min-width:0;
  }

  .commercial-ai-summary-grid,
  .commercial-ai-main-result,
  .commercial-ai-info-grid{
    grid-template-columns:1fr;
  }

  .commercial-ai-card-header{
    flex-direction:column;
  }

  .commercial-ai-ranking-item{
    grid-template-columns:30px 1fr;
  }

  .commercial-ai-ranking-metrics{
    grid-column:2;
    text-align:left;
  }

  .commercial-ai-ranking-item .btn{
    grid-column:1/-1;
    width:100%;
  }
}

/* V23.9.1 - Gestão de Projetos */
.project-summary-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}.project-summary-grid article{border:1px solid #e5e7eb;border-radius:17px;background:#fff;padding:13px}.project-summary-grid span,.project-summary-grid strong,.project-summary-grid small{display:block}.project-summary-grid span{color:#64748b;font-size:.72rem;font-weight:900;text-transform:uppercase}.project-summary-grid strong{margin:5px 0;font-size:1.3rem}.project-summary-grid small{color:#64748b}.project-filter-card{padding:14px}
.project-view-tabs{display:flex;gap:8px}.project-view-tabs button{border:1px solid #e5e7eb;background:#fff;border-radius:999px;padding:8px 13px;font-weight:900}.project-view-tabs button.active{background:#5b21b6;color:#fff}.project-view-panel{display:none}.project-view-panel.active{display:block}
.project-kanban-board{display:flex;gap:12px;overflow-x:auto;padding-bottom:10px}.project-column{flex:0 0 310px;border:1px solid #e5e7eb;border-radius:18px;background:#f8fafc;overflow:hidden}.project-column>header{display:flex;justify-content:space-between;align-items:center;padding:13px;background:#fff;border-bottom:1px solid #e5e7eb}.project-column h5{margin:0;font-size:.92rem;font-weight:950}.project-column header strong{display:grid;place-items:center;min-width:30px;height:30px;border-radius:999px;background:#f1f5f9}.project-column-value{padding:8px 13px;background:#fff;border-bottom:1px solid #e5e7eb;font-weight:900}.project-dropzone{min-height:420px;display:grid;align-content:start;gap:10px;padding:10px}.project-dropzone.drag-over{background:#eef2ff;box-shadow:inset 0 0 0 2px #818cf8}
.project-card{border:1px solid #e5e7eb;border-radius:16px;background:#fff;padding:11px;box-shadow:0 8px 18px rgba(15,23,42,.05);cursor:grab}.project-card.dragging{opacity:.45}.project-card.overdue{border-left:5px solid #dc2626}.project-card.today{border-left:5px solid #d97706}.project-card.soon{border-left:5px solid #2563eb}.project-card-top{display:flex;justify-content:space-between}.project-priority{border-radius:999px;padding:4px 8px;font-size:.68rem;font-weight:900;background:#f1f5f9}.project-priority.alta{background:#fffbeb;color:#92400e}.project-priority.urgente{background:#fef2f2;color:#b91c1c}.project-card h6{margin:9px 0 3px;font-weight:950}.project-card p{margin:0;color:#64748b;font-size:.8rem}.project-service{display:inline-block;margin-top:7px;border-radius:999px;background:#f5f3ff;color:#6d28d9;padding:3px 7px;font-size:.68rem;font-weight:900}.project-card-value{margin-top:9px;font-size:1.08rem;font-weight:950;color:#1e3a8a}.project-card-progress{margin-top:9px}.project-card-progress>div:first-child{display:flex;justify-content:space-between;font-size:.75rem}.project-progress-track,.project-table-progress{height:8px;border-radius:999px;background:#e5e7eb;overflow:hidden}.project-progress-track span,.project-table-progress span{display:block;height:100%;background:linear-gradient(90deg,#7c3aed,#2563eb,#16a34a)}.project-card-meta{display:grid;gap:5px;margin-top:9px}.project-card-meta span{font-size:.75rem;color:#64748b}.project-card-meta .overdue{color:#b91c1c}.project-card-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:10px}.project-empty{min-height:110px;display:grid;place-items:center;align-content:center;color:#94a3b8;text-align:center;padding:16px}.project-due.overdue{color:#b91c1c}.project-due.today{color:#92400e}.project-due.soon{color:#1d4ed8}
.project-checklist-builder{border:1px solid #e5e7eb;border-radius:17px;background:#f8fafc;padding:14px}.project-check-row{display:grid;grid-template-columns:34px 1fr 170px 42px;gap:8px;align-items:center;margin-bottom:8px}.project-detail-summary{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}.project-detail-summary article,.project-detail-card{border:1px solid #e5e7eb;border-radius:15px;background:#fff;padding:11px}.project-detail-summary span,.project-detail-summary strong{display:block}.project-detail-summary span{font-size:.7rem;color:#64748b;font-weight:900;text-transform:uppercase}.project-detail-check{display:flex;gap:9px;align-items:center;border:1px solid #e5e7eb;border-radius:12px;padding:9px;margin-bottom:7px}
@media(max-width:1200px){.project-summary-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.project-detail-summary{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:768px){.project-summary-grid{grid-template-columns:1fr 1fr}.project-column{flex-basis:88vw}.project-check-row{grid-template-columns:30px 1fr}.project-check-row input[type=date],.project-check-row button{grid-column:2}.project-detail-summary{grid-template-columns:1fr}}@media(max-width:480px){.project-summary-grid{grid-template-columns:1fr}}


/* V23.9.1 - Projetos somente no CRM 360 */
.crm360-project-toolbar{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  margin-bottom:14px;
}

.crm360-project-toolbar h4{
  margin:0;
  font-family:var(--font-menu,"Poppins",sans-serif);
  font-weight:950;
}

.crm360-project-toolbar p{
  margin:3px 0 0;
  color:#64748b;
}

.crm360-project-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
  margin-bottom:13px;
}

.crm360-project-summary article{
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:15px;
  padding:11px;
}

.crm360-project-summary span,
.crm360-project-summary strong{
  display:block;
}

.crm360-project-summary span{
  color:#64748b;
  font-size:.7rem;
  font-weight:900;
  text-transform:uppercase;
}

.crm360-project-summary strong{
  margin-top:5px;
  color:#111827;
}

.crm360-project-list{
  display:grid;
  gap:10px;
}

.crm360-project-item{
  display:grid;
  grid-template-columns:1fr auto;
  gap:12px;
  border:1px solid #e5e7eb;
  border-left:5px solid #7c3aed;
  background:#fff;
  border-radius:17px;
  padding:13px;
}

.crm360-project-item.overdue{border-left-color:#dc2626}
.crm360-project-item.today{border-left-color:#d97706}
.crm360-project-item.soon{border-left-color:#2563eb}

.crm360-project-item-top{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}

.crm360-project-item h5{
  margin:7px 0 2px;
  font-family:var(--font-menu,"Poppins",sans-serif);
  font-weight:950;
}

.crm360-project-item small{
  color:#64748b;
}

.crm360-project-progress{
  margin-top:10px;
}

.crm360-project-progress > div:first-child{
  display:flex;
  justify-content:space-between;
  margin-bottom:5px;
  font-size:.78rem;
}

.crm360-project-meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:10px;
}

.crm360-project-meta span{
  display:inline-flex;
  align-items:center;
  gap:5px;
  color:#64748b;
  font-size:.76rem;
}

.crm360-project-meta span.overdue{color:#b91c1c}
.crm360-project-meta span.today{color:#92400e}
.crm360-project-meta span.soon{color:#1d4ed8}

.crm360-project-item-actions{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.crm360-project-empty{
  min-height:230px;
}

.crm360-project-empty i{
  font-size:2rem;
}

.crm360-project-empty strong,
.crm360-project-empty span{
  display:block;
}

@media(max-width:768px){
  .crm360-project-toolbar{
    flex-direction:column;
    align-items:stretch;
  }

  .crm360-project-toolbar .btn{
    width:100%;
  }

  .crm360-project-summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .crm360-project-item{
    grid-template-columns:1fr;
  }

  .crm360-project-item-top{
    flex-direction:column;
  }

  .crm360-project-item-actions{
    display:grid;
    grid-template-columns:repeat(2,1fr);
  }
}

@media(max-width:480px){
  .crm360-project-summary{
    grid-template-columns:1fr;
  }
}


/* V23.9.1 - Central 360 centralizada e hierarquia de camadas */
.crm360-backdrop{
  position:fixed;
  inset:0;
  z-index:2140!important;
  background:rgba(15,23,42,.62)!important;
  opacity:0;
  visibility:hidden;
  transition:opacity .22s ease,visibility .22s ease;
  backdrop-filter:blur(4px);
}

.crm360-backdrop.show{
  opacity:1;
  visibility:visible;
}

.crm360-drawer.crm360-centered-window{
  position:fixed!important;
  top:50%!important;
  left:50%!important;
  right:auto!important;
  bottom:auto!important;
  z-index:2150!important;
  width:min(94vw,1380px)!important;
  height:min(92vh,940px)!important;
  max-width:1380px!important;
  max-height:92vh!important;
  background:#f8fafc;
  border:1px solid rgba(255,255,255,.75);
  border-radius:24px!important;
  overflow:hidden;
  transform:translate(-50%,-48%) scale(.97)!important;
  opacity:0;
  visibility:hidden;
  transition:transform .24s ease,opacity .24s ease,visibility .24s ease;
  box-shadow:0 30px 90px rgba(15,23,42,.38)!important;
  display:flex!important;
  flex-direction:column;
}

.crm360-drawer.crm360-centered-window.open{
  transform:translate(-50%,-50%) scale(1)!important;
  opacity:1;
  visibility:visible;
}

.crm360-drawer .crm360-header{
  flex:0 0 auto;
  position:relative;
  z-index:2;
}

.crm360-drawer .crm360-search,
.crm360-drawer .crm360-hero,
.crm360-drawer .crm360-tabs{
  flex:0 0 auto;
}

.crm360-drawer .crm360-content{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto!important;
  overflow-x:hidden;
}

body.crm360-open{
  overflow:hidden!important;
}

/* Todos os modais Bootstrap devem aparecer acima da Central 360 */
.modal{
  z-index:3000!important;
}

.modal-backdrop{
  z-index:2990!important;
}

.modal.show .modal-dialog{
  position:relative;
  z-index:3010!important;
}

/* Dropdowns, selects, tooltips e menus sempre acima */
.dropdown-menu,
.select2-container,
.flatpickr-calendar,
.popover,
.tooltip{
  z-index:3050!important;
}

/* Evita que elementos antigos criem uma camada acima dos formulários */
.crm360-drawer,
.crm360-backdrop{
  isolation:isolate;
}

/* Modais abertos a partir da Central ficam visivelmente destacados */
body.modal-open .crm360-drawer.open{
  filter:brightness(.88);
  pointer-events:none;
}

body.modal-open .crm360-backdrop.show{
  opacity:.72;
}

/* O modal ativo continua clicável e acima de tudo */
body.modal-open .modal.show{
  pointer-events:auto;
}

/* Ajuste de rolagem para formulários grandes */
.modal-dialog-scrollable{
  max-height:calc(100vh - 32px)!important;
}

.modal-dialog-scrollable .modal-content{
  max-height:calc(100vh - 32px)!important;
}

.crm-responsive-modal{
  width:min(96vw,1200px)!important;
  max-width:1200px!important;
  margin:16px auto!important;
}

/* No celular, ocupa praticamente toda a tela, mas ainda centralizado */
@media(max-width:768px){
  .crm360-drawer.crm360-centered-window{
    width:calc(100vw - 12px)!important;
    height:calc(100vh - 12px)!important;
    max-height:calc(100vh - 12px)!important;
    border-radius:18px!important;
  }

  .crm360-header{
    padding:12px!important;
  }

  .crm360-content{
    padding:12px!important;
  }

  .crm-responsive-modal{
    width:calc(100vw - 12px)!important;
    max-width:calc(100vw - 12px)!important;
    margin:6px auto!important;
  }

  .modal-dialog-scrollable{
    max-height:calc(100vh - 12px)!important;
  }

  .modal-dialog-scrollable .modal-content{
    max-height:calc(100vh - 12px)!important;
  }
}


/* V23.9.1 - Situações editáveis em todas as abas do CRM 360 */
.crm360-tab-action-toolbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  border:1px solid #ddd6fe;
  background:linear-gradient(135deg,#faf5ff,#ffffff);
  border-radius:16px;
  padding:11px 13px;
  margin-bottom:14px;
}
.crm360-tab-action-toolbar strong,.crm360-tab-action-toolbar span{display:block}
.crm360-tab-action-toolbar strong{color:#2e1065;font-weight:950}
.crm360-tab-action-toolbar span{color:#64748b;font-size:.8rem;margin-top:2px}
.crm360-tab-updates-container{margin-top:18px}
.crm360-tab-updates{border-top:1px solid #e5e7eb;padding-top:15px}
.crm360-tab-updates-header{display:flex;justify-content:space-between;margin-bottom:10px}
.crm360-tab-updates-header h5{margin:0;font-weight:950}
.crm360-tab-updates-header span{color:#64748b;font-size:.82rem}
.crm360-update-list{display:grid;gap:9px}
.crm360-update-item{display:grid;grid-template-columns:1fr auto;gap:12px;border:1px solid #e5e7eb;border-left:5px solid #64748b;background:#fff;border-radius:15px;padding:11px}
.crm360-update-item.primary{border-left-color:#2563eb}.crm360-update-item.warning{border-left-color:#d97706}.crm360-update-item.success{border-left-color:#16a34a}.crm360-update-item.danger{border-left-color:#dc2626}
.crm360-update-item-top{display:flex;justify-content:space-between;gap:10px;align-items:center}
.crm360-update-status{display:inline-flex;border-radius:999px;background:#f1f5f9;padding:3px 8px;font-size:.68rem;font-weight:900}
.crm360-update-item h6{margin:8px 0 4px;font-weight:950}
.crm360-update-item p{margin:0;color:#475569;white-space:pre-wrap}
.crm360-update-meta{display:flex;flex-wrap:wrap;gap:10px;margin-top:9px}
.crm360-update-meta span{display:inline-flex;align-items:center;gap:5px;color:#64748b;font-size:.75rem}
.crm360-update-actions{display:flex;flex-direction:column;gap:5px}
@media(max-width:768px){
  .crm360-tab-action-toolbar{flex-direction:column;align-items:stretch}
  .crm360-tab-action-toolbar .btn{width:100%}
  .crm360-update-item{grid-template-columns:1fr}
  .crm360-update-actions{display:grid;grid-template-columns:repeat(2,1fr)}
}

/* V23.9.1 - Edição Final de Produção */
.production-status-banner{display:flex;justify-content:space-between;align-items:center;gap:14px;border:1px solid #cbd5e1;background:#fff;border-radius:20px;padding:16px;margin-bottom:14px}.production-status-banner>div{display:flex;align-items:center;gap:12px}.production-status-banner i{font-size:1.45rem}.production-status-banner strong,.production-status-banner span{display:block}.production-status-banner span{color:#64748b;margin-top:2px}.production-status-banner.approved{border-left:6px solid #16a34a;background:#f0fdf4}.production-status-banner.approved i{color:#16a34a}.production-status-banner.attention{border-left:6px solid #d97706;background:#fffbeb}.production-status-banner.attention i{color:#d97706}.production-version-badge{border-radius:999px;padding:7px 12px;background:#5b21b6;color:#fff!important;font-weight:950}
.production-kpi-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}.production-kpi-grid article{border:1px solid #e5e7eb;background:#fff;border-radius:17px;padding:13px}.production-kpi-grid span,.production-kpi-grid strong,.production-kpi-grid small{display:block}.production-kpi-grid span{color:#64748b;font-size:.72rem;font-weight:900;text-transform:uppercase}.production-kpi-grid strong{margin:5px 0;font-size:1.18rem}.production-kpi-grid small{color:#64748b}
.production-card-header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:12px}.production-card-header h5{margin:0;font-weight:950}.production-card-header span{display:block;color:#64748b;margin-top:3px}
.production-checklist{display:grid;gap:8px}.production-check-item{display:flex;align-items:center;gap:10px;border:1px solid #e5e7eb;border-left:5px solid #64748b;border-radius:14px;padding:10px;background:#fff}.production-check-item.success{border-left-color:#16a34a}.production-check-item.success i{color:#16a34a}.production-check-item.danger{border-left-color:#dc2626}.production-check-item.danger i{color:#dc2626}.production-check-item strong,.production-check-item span{display:block}.production-check-item span{color:#64748b;font-size:.82rem;margin-top:2px}
.production-technical-summary{display:grid;gap:8px}.production-technical-summary>div{border:1px solid #e5e7eb;border-radius:13px;padding:9px 11px}.production-technical-summary span,.production-technical-summary strong{display:block}.production-technical-summary span{font-size:.7rem;color:#64748b;font-weight:900;text-transform:uppercase}.production-technical-summary strong{margin-top:4px;word-break:break-word}
.production-log-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px}.production-log-grid article{border:1px solid #e5e7eb;border-radius:14px;background:#f8fafc;padding:11px}.production-log-grid span,.production-log-grid strong{display:block}.production-log-grid span{font-size:.7rem;color:#64748b;font-weight:900;text-transform:uppercase}.production-log-grid strong{margin-top:5px;font-size:1.15rem}.production-log-footer{margin-top:12px;color:#64748b;font-size:.82rem}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(124,58,237,.28)!important;outline-offset:2px}
@media print{body{background:#fff!important;color:#000!important}.sidebar,.mobile-bottom-nav,.mobile-nav,.topbar,.section-toolbar .btn,button,.btn,.manual-quick-button,.crm360-backdrop,.crm360-drawer:not(.print-active),.modal-backdrop,.toast-container{display:none!important}.main,.app-main,.main-content,.content-wrapper,.content-section.active{margin:0!important;padding:0!important;width:100%!important;max-width:none!important}.card,.painel,.report-sheet{box-shadow:none!important;border:1px solid #ddd!important;break-inside:avoid}table{width:100%!important;border-collapse:collapse!important}th,td{border:1px solid #ddd!important;padding:6px!important;color:#000!important}@page{size:A4;margin:12mm}}
@media(max-width:1200px){.production-kpi-grid,.production-log-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:768px){.production-status-banner,.production-status-banner>div{flex-direction:column;align-items:flex-start}.production-kpi-grid,.production-log-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:480px){.production-kpi-grid,.production-log-grid{grid-template-columns:1fr}}



/* V23.9.1 - Template visual da Inteligência Comercial e BI */
.bi-page{
  --bi-bg:#f8fafc;
  --bi-line:#e5e7eb;
  --bi-text:#0f172a;
  --bi-muted:#64748b;
  --bi-purple:#6d28d9;
  --bi-blue:#2563eb;
  --bi-green:#16a34a;
  --bi-orange:#d97706;
  --bi-cyan:#0891b2;
  padding-bottom:36px;
}

.bi-hero{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:24px;
  border:1px solid #ddd6fe;
  border-radius:24px;
  padding:22px 24px;
  background:
    radial-gradient(circle at top right,rgba(124,58,237,.16),transparent 32%),
    linear-gradient(135deg,#ffffff,#faf5ff 55%,#eff6ff);
  box-shadow:0 14px 34px rgba(91,33,182,.08);
  margin-bottom:18px;
}

.bi-hero-content{max-width:720px}
.bi-hero-content h3{
  margin:5px 0 6px;
  font-family:var(--font-menu,"Poppins",sans-serif);
  font-weight:950;
  color:var(--bi-text);
}
.bi-hero-content p{margin:0;color:var(--bi-muted);line-height:1.55}
.bi-hero-actions{
  display:grid;
  grid-template-columns:minmax(180px,220px) auto auto;
  gap:9px;
  align-items:center;
}
.bi-hero-actions .form-select,
.bi-hero-actions .btn{height:42px}

.bi-dashboard-shell{
  display:grid;
  gap:16px;
  width:100%;
  max-width:100%;
}

.bi-greeting{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:18px 20px;
  border:1px solid var(--bi-line);
  border-radius:20px;
  background:#fff;
  box-shadow:0 10px 28px rgba(15,23,42,.045);
}
.bi-greeting-copy span{
  color:var(--bi-purple);
  font-size:.72rem;
  font-weight:900;
  text-transform:uppercase;
}
.bi-greeting-copy h4{
  margin:3px 0;
  font-family:var(--font-menu,"Poppins",sans-serif);
  font-weight:950;
  color:var(--bi-text);
}
.bi-greeting-copy p{margin:0;color:var(--bi-muted)}
.bi-current-date{
  display:flex;
  align-items:center;
  gap:8px;
  border:1px solid #ddd6fe;
  border-radius:14px;
  background:#faf5ff;
  padding:10px 13px;
  color:#4c1d95;
  white-space:nowrap;
}

.bi-section-label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:2px 0 -4px;
}
.bi-section-label span{
  display:block;
  color:var(--bi-purple);
  font-size:.68rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.bi-section-label h5{
  margin:2px 0 0;
  font-family:var(--font-menu,"Poppins",sans-serif);
  font-weight:950;
  color:var(--bi-text);
}

.bi-kpi-grid,.bi-mini-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:12px;
}

.bi-kpi-card,.bi-mini-grid article{
  min-width:0;
  min-height:112px;
  display:flex;
  align-items:center;
  gap:12px;
  border:1px solid var(--bi-line);
  border-radius:18px;
  background:#fff;
  padding:14px;
  box-shadow:0 9px 24px rgba(15,23,42,.04);
}

.bi-kpi-card>i,.bi-mini-grid article>i{
  flex:0 0 auto;
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:#f5f3ff;
  color:var(--bi-purple);
  font-size:1.08rem;
}
.bi-kpi-card span,.bi-kpi-card strong,
.bi-mini-grid span,.bi-mini-grid strong{display:block}
.bi-kpi-card span,.bi-mini-grid span{
  color:var(--bi-muted);
  font-size:.66rem;
  font-weight:900;
  line-height:1.35;
  text-transform:uppercase;
}
.bi-kpi-card strong,.bi-mini-grid strong{
  margin-top:6px;
  color:var(--bi-text);
  font-size:1.12rem;
  line-height:1.25;
  overflow-wrap:anywhere;
}
.bi-kpi-purple{border-top:4px solid var(--bi-purple)}
.bi-kpi-blue{border-top:4px solid var(--bi-blue)}
.bi-kpi-green{border-top:4px solid var(--bi-green)}
.bi-kpi-orange{border-top:4px solid var(--bi-orange)}
.bi-kpi-violet{border-top:4px solid #7c3aed}
.bi-kpi-cyan{border-top:4px solid var(--bi-cyan)}

.bi-mini-grid article{min-height:92px}
.bi-mini-grid article>i{background:#eff6ff;color:var(--bi-blue)}

.bi-layout-grid{display:grid;gap:16px}
.bi-layout-main{grid-template-columns:minmax(0,2fr) minmax(300px,1fr)}
.bi-layout-half{grid-template-columns:repeat(2,minmax(0,1fr))}
.bi-layout-insights{grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr)}

.bi-page .card.painel{
  min-width:0;
  border:1px solid var(--bi-line);
  border-radius:20px;
  background:#fff;
  padding:18px;
  box-shadow:0 10px 30px rgba(15,23,42,.045);
}

.bi-chart-card{
  min-height:390px;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.bi-card-header{margin-bottom:14px}
.bi-card-header span{
  display:block;
  color:var(--bi-purple);
  font-size:.66rem;
  font-weight:900;
  text-transform:uppercase;
}
.bi-card-header h5{
  margin:3px 0 0;
  font-family:var(--font-menu,"Poppins",sans-serif);
  font-weight:950;
  color:var(--bi-text);
}

.bi-canvas-wrap{
  position:relative;
  flex:1 1 auto;
  min-height:290px;
  height:290px;
  width:100%;
}
.bi-canvas-wide{min-height:310px;height:310px}
.bi-canvas-wrap canvas{
  width:100%!important;
  height:100%!important;
  max-width:100%;
}

.bi-target-card{min-height:390px}
.bi-meta-box{
  flex:1;
  min-height:300px;
  display:grid;
  align-content:center;
  justify-items:center;
  gap:12px;
  border-radius:18px;
  background:linear-gradient(145deg,#faf5ff,#fff);
}
.bi-meta-box strong{
  width:150px;
  height:150px;
  display:grid;
  place-items:center;
  border:16px solid #ede9fe;
  border-top-color:var(--bi-purple);
  border-radius:50%;
  color:var(--bi-purple);
  font-size:1.7rem;
}
.bi-meta-box span{color:var(--bi-muted);font-weight:800}

.bi-attention-list{display:grid;gap:9px}
.bi-alert{
  display:flex;
  align-items:flex-start;
  gap:10px;
  border:1px solid #fed7aa;
  border-left:5px solid var(--bi-orange);
  border-radius:14px;
  background:#fff7ed;
  padding:11px;
  margin:0;
}
.bi-alert.danger{
  border-color:#fecaca;
  border-left-color:#dc2626;
  background:#fff1f2;
}
.bi-alert strong,.bi-alert span{display:block}
.bi-alert span{margin-top:2px;color:var(--bi-muted);font-size:.82rem}

.bi-forecast{display:grid;gap:9px}
.bi-forecast>div{
  border:1px solid var(--bi-line);
  border-radius:14px;
  background:#f8fafc;
  padding:11px;
}
.bi-forecast span,.bi-forecast strong{display:block}
.bi-forecast span{
  color:var(--bi-muted);
  font-size:.68rem;
  font-weight:900;
  text-transform:uppercase;
}
.bi-forecast strong{margin-top:4px;color:var(--bi-text);font-size:1.14rem}
.bi-forecast p{
  margin:0;
  border:1px solid #ddd6fe;
  border-radius:14px;
  background:#faf5ff;
  padding:12px;
  color:#4c1d95;
  line-height:1.55;
}

.bi-summary-card{margin-top:0!important}
#biExecutiveSummary{display:grid}
#biExecutiveSummary p{
  display:flex;
  align-items:flex-start;
  gap:8px;
  margin:0;
  padding:10px 0;
  border-bottom:1px solid #ede9fe;
  color:#334155;
}
#biExecutiveSummary p:last-child{border-bottom:0}
#biExecutiveSummary i{color:var(--bi-purple);margin-top:3px}

@media(max-width:1400px){
  .bi-kpi-grid,.bi-mini-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:1100px){
  .bi-hero{align-items:flex-start}
  .bi-hero-actions{grid-template-columns:1fr 1fr}
  .bi-hero-actions .form-select{grid-column:1/-1;max-width:none}
  .bi-layout-main,.bi-layout-insights{grid-template-columns:1fr}
}
@media(max-width:850px){
  .bi-hero{flex-direction:column}
  .bi-hero-actions{width:100%}
  .bi-layout-half{grid-template-columns:1fr}
}
@media(max-width:768px){
  .bi-greeting{flex-direction:column;align-items:flex-start}
  .bi-current-date{width:100%;white-space:normal}
  .bi-kpi-grid,.bi-mini-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .bi-chart-card,.bi-target-card{min-height:350px}
  .bi-canvas-wrap,.bi-canvas-wide{min-height:270px;height:270px}
}
@media(max-width:520px){
  .bi-hero{padding:18px}
  .bi-hero-actions{grid-template-columns:1fr}
  .bi-hero-actions .form-select{grid-column:auto}
  .bi-kpi-grid,.bi-mini-grid{grid-template-columns:1fr}
  .bi-kpi-card,.bi-mini-grid article{min-height:88px}
}


/* V23.9.1 - Template e lógica do Diagnóstico corrigidos */
.diagnostic-page{
  --diag-line:#e5e7eb;
  --diag-text:#0f172a;
  --diag-muted:#64748b;
  --diag-purple:#6d28d9;
  --diag-blue:#2563eb;
  --diag-green:#16a34a;
  --diag-orange:#d97706;
  --diag-red:#dc2626;
  padding-bottom:36px;
}

.diagnostic-hero{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:22px;
  border:1px solid #dbeafe;
  border-radius:24px;
  background:
    radial-gradient(circle at top right,rgba(37,99,235,.15),transparent 34%),
    linear-gradient(135deg,#fff,#eff6ff 68%,#f8fafc);
  padding:22px 24px;
  margin-bottom:16px;
  box-shadow:0 14px 34px rgba(37,99,235,.07);
}

.diagnostic-hero h3{
  margin:5px 0 6px;
  font-family:var(--font-menu,"Poppins",sans-serif);
  font-weight:950;
  color:var(--diag-text);
}

.diagnostic-hero p{
  margin:0;
  max-width:760px;
  color:var(--diag-muted);
  line-height:1.55;
}

.diagnostic-hero-actions{
  display:flex;
  align-items:center;
  gap:9px;
  flex-wrap:wrap;
}

.diagnostic-status-card{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:14px;
  border:1px solid var(--diag-line);
  border-left:6px solid #94a3b8;
  border-radius:20px;
  background:#fff;
  padding:16px 18px;
  margin-bottom:16px;
  box-shadow:0 10px 28px rgba(15,23,42,.04);
}

.diagnostic-status-card.approved{
  border-left-color:var(--diag-green);
  background:#f0fdf4;
}

.diagnostic-status-card.attention{
  border-left-color:var(--diag-orange);
  background:#fffbeb;
}

.diagnostic-status-icon{
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  border-radius:15px;
  background:#f1f5f9;
  font-size:1.25rem;
}

.diagnostic-status-card.approved .diagnostic-status-icon{
  background:#dcfce7;
  color:var(--diag-green);
}

.diagnostic-status-card.attention .diagnostic-status-icon{
  background:#fef3c7;
  color:var(--diag-orange);
}

.diagnostic-status-copy strong,
.diagnostic-status-copy span{display:block}

.diagnostic-status-copy strong{
  color:var(--diag-text);
  font-size:1rem;
}

.diagnostic-status-copy span{
  margin-top:3px;
  color:var(--diag-muted);
}

.diagnostic-version-badge{
  border-radius:999px;
  background:var(--diag-blue);
  color:#fff;
  padding:7px 12px;
  font-weight:950;
  white-space:nowrap;
}

.diagnostic-kpi-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:12px;
  margin-bottom:16px;
}

.diagnostic-kpi-grid article{
  min-width:0;
  min-height:104px;
  display:flex;
  align-items:center;
  gap:11px;
  border:1px solid var(--diag-line);
  border-radius:18px;
  background:#fff;
  padding:13px;
  box-shadow:0 9px 24px rgba(15,23,42,.04);
}

.diagnostic-kpi-grid article>i{
  flex:0 0 auto;
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  border-radius:13px;
  background:#eff6ff;
  color:var(--diag-blue);
  font-size:1.05rem;
}

.diagnostic-kpi-grid span,
.diagnostic-kpi-grid strong,
.diagnostic-kpi-grid small{display:block}

.diagnostic-kpi-grid span{
  color:var(--diag-muted);
  font-size:.64rem;
  font-weight:900;
  text-transform:uppercase;
  line-height:1.35;
}

.diagnostic-kpi-grid strong{
  margin:5px 0 2px;
  color:var(--diag-text);
  font-size:1.08rem;
  overflow-wrap:anywhere;
}

.diagnostic-kpi-grid small{
  color:var(--diag-muted);
  line-height:1.3;
}

.diagnostic-layout{
  display:grid;
  gap:16px;
  margin-bottom:16px;
}

.diagnostic-layout-main{
  grid-template-columns:minmax(0,1.4fr) minmax(320px,.6fr);
}

.diagnostic-page .diagnostic-card{
  min-width:0;
  border:1px solid var(--diag-line);
  border-radius:20px;
  background:#fff;
  padding:18px;
  margin-bottom:16px;
  box-shadow:0 10px 30px rgba(15,23,42,.045);
}

.diagnostic-layout .diagnostic-card{
  margin-bottom:0;
}

.diagnostic-card-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  margin-bottom:14px;
}

.diagnostic-card-header span{
  display:block;
  color:var(--diag-blue);
  font-size:.66rem;
  font-weight:900;
  text-transform:uppercase;
}

.diagnostic-card-header h5{
  margin:3px 0 0;
  font-family:var(--font-menu,"Poppins",sans-serif);
  font-weight:950;
  color:var(--diag-text);
}

.diagnostic-card-header p{
  margin:4px 0 0;
  color:var(--diag-muted);
}

.diagnostic-checklist{
  display:grid;
  gap:9px;
}

.diagnostic-check-item{
  display:flex;
  align-items:flex-start;
  gap:10px;
  border:1px solid var(--diag-line);
  border-left:5px solid #94a3b8;
  border-radius:14px;
  background:#fff;
  padding:11px;
}

.diagnostic-check-item.success{
  border-left-color:var(--diag-green);
}

.diagnostic-check-item.danger{
  border-left-color:var(--diag-red);
}

.diagnostic-check-item.neutral{
  border-left-color:var(--diag-blue);
  background:#eff6ff;
}

.diagnostic-check-item>i{
  margin-top:2px;
}

.diagnostic-check-item.success>i{color:var(--diag-green)}
.diagnostic-check-item.danger>i{color:var(--diag-red)}
.diagnostic-check-item.neutral>i{color:var(--diag-blue)}

.diagnostic-check-item strong,
.diagnostic-check-item span{display:block}

.diagnostic-check-item strong{
  color:var(--diag-text);
}

.diagnostic-check-item span{
  margin-top:2px;
  color:var(--diag-muted);
  font-size:.82rem;
}

.diagnostic-technical-summary{
  display:grid;
  gap:8px;
}

.diagnostic-technical-summary>div{
  border:1px solid var(--diag-line);
  border-radius:13px;
  background:#f8fafc;
  padding:10px 11px;
}

.diagnostic-technical-summary span,
.diagnostic-technical-summary strong{display:block}

.diagnostic-technical-summary span{
  color:var(--diag-muted);
  font-size:.64rem;
  font-weight:900;
  text-transform:uppercase;
}

.diagnostic-technical-summary strong{
  margin-top:4px;
  color:var(--diag-text);
  overflow-wrap:anywhere;
}

.diagnostic-card-header-table{
  align-items:center;
}

.diagnostic-legend{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.diagnostic-legend span{
  display:inline-flex;
  align-items:center;
  gap:5px;
  color:var(--diag-muted);
  font-size:.75rem;
  text-transform:none;
}

.diagnostic-dot{
  width:9px;
  height:9px;
  border-radius:50%;
  background:#94a3b8;
}

.diagnostic-dot.essential{background:var(--diag-green)}
.diagnostic-dot.optional{background:var(--diag-blue)}
.diagnostic-dot.empty{background:var(--diag-orange)}

.diagnostic-table td:first-child strong,
.diagnostic-table td:first-child small{display:block}

.diagnostic-table td:first-child small{
  margin-top:2px;
  color:var(--diag-muted);
}

.diagnostic-type-badge,
.diagnostic-status-badge{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:4px 8px;
  font-size:.68rem;
  font-weight:900;
}

.diagnostic-type-badge.essential{
  background:#dcfce7;
  color:#166534;
}

.diagnostic-type-badge.optional{
  background:#dbeafe;
  color:#1d4ed8;
}

.diagnostic-status-badge.success{
  background:#dcfce7;
  color:#166534;
}

.diagnostic-status-badge.danger{
  background:#fee2e2;
  color:#991b1b;
}

.diagnostic-status-badge.empty{
  background:#fef3c7;
  color:#92400e;
}

.diagnostic-status-badge.neutral{
  background:#f1f5f9;
  color:#475569;
}

.diagnostic-row-danger{
  background:#fff7f7;
}

.diagnostic-row-empty{
  background:#fffcf3;
}

.diagnostic-log-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}

.diagnostic-log-grid article{
  border:1px solid var(--diag-line);
  border-radius:14px;
  background:#f8fafc;
  padding:11px;
}

.diagnostic-log-grid span,
.diagnostic-log-grid strong{display:block}

.diagnostic-log-grid span{
  color:var(--diag-muted);
  font-size:.64rem;
  font-weight:900;
  text-transform:uppercase;
}

.diagnostic-log-grid strong{
  margin-top:5px;
  color:var(--diag-text);
  font-size:1.12rem;
}

.diagnostic-log-note{
  margin-top:12px;
  border:1px solid #bfdbfe;
  border-radius:13px;
  background:#eff6ff;
  padding:10px;
  color:#1e40af;
}

.diagnostic-log-footer{
  margin-top:11px;
  color:var(--diag-muted);
  font-size:.82rem;
}

@media(max-width:1400px){
  .diagnostic-kpi-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media(max-width:1050px){
  .diagnostic-hero{
    align-items:flex-start;
  }

  .diagnostic-layout-main{
    grid-template-columns:1fr;
  }
}

@media(max-width:850px){
  .diagnostic-hero{
    flex-direction:column;
  }

  .diagnostic-hero-actions{
    width:100%;
  }

  .diagnostic-hero-actions .btn{
    flex:1;
  }

  .diagnostic-card-header-table{
    flex-direction:column;
  }
}

@media(max-width:768px){
  .diagnostic-status-card{
    grid-template-columns:auto 1fr;
  }

  .diagnostic-version-badge{
    grid-column:1/-1;
    text-align:center;
  }

  .diagnostic-kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .diagnostic-log-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:520px){
  .diagnostic-hero{
    padding:18px;
  }

  .diagnostic-hero-actions{
    display:grid;
    grid-template-columns:1fr;
  }

  .diagnostic-kpi-grid,
  .diagnostic-log-grid{
    grid-template-columns:1fr;
  }
}


/* V23.9.1 - Navegação interna segura sem mover os módulos */
.module-subnav{
  display:flex;
  align-items:center;
  gap:8px;
  width:100%;
  overflow-x:auto;
  margin-bottom:16px;
  padding:6px;
  border:1px solid #e5e7eb;
  border-radius:16px;
  background:#f8fafc;
  scrollbar-width:thin;
}

.module-subnav button{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:40px;
  border:1px solid transparent;
  border-radius:11px;
  background:transparent;
  color:#475569;
  padding:8px 13px;
  font-weight:900;
  white-space:nowrap;
}

.module-subnav button:hover{
  background:#fff;
  border-color:#e5e7eb;
}

.module-subnav button.active{
  background:#fff;
  color:#5b21b6;
  border-color:#c4b5fd;
  box-shadow:0 5px 16px rgba(91,33,182,.08);
}

.finance-subnav{
  border-color:#bfdbfe;
  background:#eff6ff;
}

.settings-subnav{
  border-color:#ddd6fe;
  background:#faf5ff;
}

@media(max-width:768px){
  .module-subnav{
    margin-left:0;
    margin-right:0;
  }

  .module-subnav button{
    min-height:42px;
  }
}


/* V23.9.1 - Inteligência Empresarial */
.intelligence-page{
  --intel-purple:#6d28d9;
  --intel-blue:#2563eb;
  --intel-green:#16a34a;
  --intel-orange:#d97706;
  --intel-red:#dc2626;
  padding-bottom:36px;
}

.intelligence-hero{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:24px;
  border:1px solid #ddd6fe;
  border-radius:24px;
  padding:22px 24px;
  background:linear-gradient(135deg,#fff,#faf5ff 58%,#eff6ff);
  box-shadow:0 14px 34px rgba(91,33,182,.08);
  margin-bottom:14px;
}

.intelligence-hero h3{
  margin:5px 0 6px;
  font-family:var(--font-menu,"Poppins",sans-serif);
  font-weight:950;
}

.intelligence-hero p{margin:0;color:#64748b}
.intelligence-hero-actions{
  display:grid;
  grid-template-columns:minmax(170px,220px) auto auto;
  gap:9px;
  align-items:center;
}

.intelligence-tabs{
  display:flex;
  align-items:center;
  gap:8px;
  overflow-x:auto;
  border:1px solid #e5e7eb;
  border-radius:16px;
  background:#f8fafc;
  padding:6px;
  margin-bottom:16px;
}

.intelligence-tabs button{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:7px;
  border:1px solid transparent;
  border-radius:11px;
  background:transparent;
  color:#475569;
  padding:9px 13px;
  font-weight:900;
  white-space:nowrap;
}

.intelligence-tabs button.active{
  background:#fff;
  color:#5b21b6;
  border-color:#c4b5fd;
  box-shadow:0 5px 16px rgba(91,33,182,.08);
}

.intelligence-panel{display:none}
.intelligence-panel.active{display:grid;gap:16px}

.intelligence-panel-heading{
  border:1px solid #e5e7eb;
  border-radius:18px;
  background:#fff;
  padding:16px;
}

.intelligence-panel-heading span{
  display:block;
  color:var(--intel-purple);
  font-size:.68rem;
  font-weight:900;
  text-transform:uppercase;
}

.intelligence-panel-heading h4{
  margin:3px 0;
  font-family:var(--font-menu,"Poppins",sans-serif);
  font-weight:950;
}

.intelligence-panel-heading p{margin:0;color:#64748b}

.company-health-card{
  display:grid;
  grid-template-columns:auto minmax(220px,1fr);
  gap:14px 20px;
  align-items:center;
  border:1px solid #c4b5fd;
  border-radius:20px;
  background:linear-gradient(135deg,#faf5ff,#fff);
  padding:16px 18px;
}

.company-health-card>div:first-child{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:4px 10px;
  align-items:center;
}

.company-health-card span{color:#6d28d9;font-size:.72rem;font-weight:900;text-transform:uppercase}
.company-health-card strong{grid-row:1/3;font-size:2.2rem;color:#5b21b6}
.company-health-card small{color:#64748b}
.company-health-card p{grid-column:1/-1;margin:0;color:#475569}

.company-health-bar{
  height:14px;
  border-radius:999px;
  background:#ede9fe;
  overflow:hidden;
}
.company-health-bar span{
  display:block;
  height:100%;
  width:0;
  border-radius:999px;
  background:linear-gradient(90deg,#dc2626,#d97706,#16a34a);
  transition:width .4s ease;
}

.commercial-intelligence-kpis,
.financial-intelligence-kpis,
.ai-insight-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:12px;
}

.commercial-intelligence-kpis article,
.financial-intelligence-kpis article,
.ai-insight-grid article{
  min-width:0;
  border:1px solid #e5e7eb;
  border-radius:17px;
  background:#fff;
  padding:13px;
}

.commercial-intelligence-kpis span,
.commercial-intelligence-kpis strong,
.financial-intelligence-kpis span,
.financial-intelligence-kpis strong{
  display:block;
}

.commercial-intelligence-kpis span,
.financial-intelligence-kpis span{
  color:#64748b;
  font-size:.66rem;
  font-weight:900;
  text-transform:uppercase;
}

.commercial-intelligence-kpis strong,
.financial-intelligence-kpis strong{
  margin-top:6px;
  font-size:1.08rem;
  color:#0f172a;
  overflow-wrap:anywhere;
}

.intelligence-grid{display:grid;gap:16px}
.intelligence-grid.two-columns{grid-template-columns:repeat(2,minmax(0,1fr))}

.commercial-ranking,.commercial-action-list,
.financial-ranking,.ai-priority-list,.ai-risk-list{
  display:grid;
  gap:9px;
}

.commercial-rank-item{
  border:1px solid #e5e7eb;
  border-radius:15px;
  background:#fff;
  padding:11px;
}

.commercial-rank-position{
  display:grid;
  place-items:center;
  width:28px;
  height:28px;
  border-radius:999px;
  background:#ede9fe;
  color:#5b21b6;
  font-weight:950;
}

.commercial-rank-main{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  margin-top:8px;
}
.commercial-rank-main strong,.commercial-rank-main small{display:block}
.commercial-rank-main small{margin-top:3px;color:#64748b}
.commercial-score{
  display:grid;
  place-items:center;
  min-width:46px;
  height:46px;
  border-radius:14px;
  background:#f5f3ff;
  color:#5b21b6;
  font-weight:950;
}

.commercial-rank-footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-top:10px;
}

.commercial-action-item{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:10px;
  align-items:center;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:10px;
}

.commercial-action-item i{color:#2563eb}
.commercial-action-item strong,.commercial-action-item span{display:block}
.commercial-action-item span{margin-top:2px;color:#64748b;font-size:.82rem}
.commercial-action-item small{color:#6d28d9;font-weight:900}

.commercial-loss-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.commercial-loss-grid article{
  display:flex;
  justify-content:space-between;
  gap:10px;
  border:1px solid #e5e7eb;
  border-radius:14px;
  background:#f8fafc;
  padding:11px;
}
.commercial-loss-grid span{color:#475569}
.commercial-loss-grid strong{color:#dc2626}

.financial-ranking article,
.ai-priority-item,
.ai-risk-list article{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:10px;
  align-items:center;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:10px;
}
.financial-ranking article>span,
.ai-priority-item>span{
  display:grid;
  place-items:center;
  width:28px;
  height:28px;
  border-radius:999px;
  background:#eff6ff;
  color:#2563eb;
  font-weight:950;
}
.financial-ranking strong,.financial-ranking small,
.ai-priority-item strong,.ai-priority-item small,
.ai-risk-list strong,.ai-risk-list span{display:block}
.financial-ranking small,.ai-priority-item small,.ai-risk-list span{color:#64748b;margin-top:2px}
.financial-ranking b,.ai-priority-item b{color:#0f172a}

.financial-projection-summary{
  display:grid;
  gap:9px;
}
.financial-projection-summary>div{
  border:1px solid #e5e7eb;
  border-radius:14px;
  background:#f8fafc;
  padding:11px;
}
.financial-projection-summary span,.financial-projection-summary strong{display:block}
.financial-projection-summary span{color:#64748b;font-size:.68rem;font-weight:900;text-transform:uppercase}
.financial-projection-summary strong{margin-top:4px}
.financial-projection-summary p{
  margin:0;
  border:1px solid #bfdbfe;
  border-radius:14px;
  background:#eff6ff;
  padding:11px;
  color:#1e40af;
}

.ai-assistant-hero{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  border:1px solid #ddd6fe;
  border-radius:20px;
  background:linear-gradient(135deg,#faf5ff,#fff);
  padding:18px;
}
.ai-assistant-hero span{display:block;color:#6d28d9;font-size:.68rem;font-weight:900;text-transform:uppercase}
.ai-assistant-hero h4{margin:4px 0;font-weight:950}
.ai-assistant-hero p{margin:0;color:#64748b}

.ai-insight-grid article{
  display:flex;
  align-items:center;
  gap:10px;
}
.ai-insight-grid i{
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  border-radius:13px;
  background:#f5f3ff;
  color:#6d28d9;
}
.ai-insight-grid span,.ai-insight-grid strong{display:block}
.ai-insight-grid span{font-size:.66rem;color:#64748b;font-weight:900;text-transform:uppercase}
.ai-insight-grid strong{margin-top:4px;font-size:1.1rem}

.ai-risk-list article{grid-template-columns:auto 1fr}
.ai-risk-list i{color:#d97706}

.ai-commercial-plan{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.ai-commercial-plan article{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:10px;
  border:1px solid #e5e7eb;
  border-radius:14px;
  background:#fff;
  padding:11px;
}
.ai-commercial-plan span{
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border-radius:999px;
  background:#ede9fe;
  color:#5b21b6;
  font-weight:950;
}
.ai-commercial-plan p{margin:0;color:#334155;line-height:1.5}

.ai-business-summary{display:grid}
.ai-business-summary p{
  display:flex;
  gap:8px;
  margin:0;
  padding:10px 0;
  border-bottom:1px solid #ede9fe;
  color:#334155;
}
.ai-business-summary p:last-child{border-bottom:0}
.ai-business-summary i{color:#6d28d9;margin-top:3px}

@media(max-width:1300px){
  .commercial-intelligence-kpis,
  .financial-intelligence-kpis,
  .ai-insight-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media(max-width:1000px){
  .intelligence-hero{align-items:flex-start}
  .intelligence-hero-actions{grid-template-columns:1fr 1fr}
  .intelligence-hero-actions .form-select{grid-column:1/-1}
  .intelligence-grid.two-columns{grid-template-columns:1fr}
}

@media(max-width:768px){
  .intelligence-hero{flex-direction:column}
  .intelligence-hero-actions{width:100%}
  .company-health-card{grid-template-columns:1fr}
  .commercial-intelligence-kpis,
  .financial-intelligence-kpis,
  .ai-insight-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .commercial-loss-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ai-commercial-plan{grid-template-columns:1fr}
  .ai-assistant-hero{flex-direction:column;align-items:flex-start}
  .ai-assistant-hero .btn{width:100%}
}

@media(max-width:520px){
  .intelligence-hero{padding:18px}
  .intelligence-hero-actions{grid-template-columns:1fr}
  .intelligence-hero-actions .form-select{grid-column:auto}
  .commercial-intelligence-kpis,
  .financial-intelligence-kpis,
  .ai-insight-grid,
  .commercial-loss-grid{grid-template-columns:1fr}
}


/* V23.9.1 - Abas clicáveis da Inteligência Empresarial */
.intelligence-tabs button{
  cursor:pointer!important;
  pointer-events:auto!important;
  user-select:none;
  position:relative;
  z-index:2;
}

.intelligence-tabs button:hover{
  background:#ffffff;
  border-color:#ddd6fe;
  color:#5b21b6;
}

.intelligence-tabs button:focus-visible{
  outline:3px solid rgba(109,40,217,.25)!important;
  outline-offset:2px;
}

.intelligence-panel{
  position:relative;
  z-index:1;
}

/* V23.9.1 - Produção Final */
.top-utility-btn{display:inline-flex;align-items:center;gap:7px;border:1px solid #dbe1ea;background:#fff;border-radius:12px;padding:8px 10px;color:#334155;font-weight:800}.top-utility-btn kbd{font-size:.62rem;background:#f1f5f9;color:#64748b}.notification-top-btn{position:relative}.notification-badge{position:absolute;top:-7px;right:-7px;min-width:20px;height:20px;display:grid;place-items:center;border-radius:999px;background:#dc2626;color:#fff;font-size:.68rem;font-weight:950}
.productivity-page{padding-bottom:36px}.productivity-hero{display:flex;justify-content:space-between;align-items:center;gap:20px;border:1px solid #ddd6fe;border-radius:24px;background:linear-gradient(135deg,#fff,#faf5ff,#eff6ff);padding:22px 24px;margin-bottom:16px}.productivity-hero h3{margin:5px 0;font-weight:950}.productivity-hero p{margin:0;color:#64748b}.productivity-actions{display:flex;gap:9px;flex-wrap:wrap}
.day-greeting-card{display:flex;justify-content:space-between;align-items:center;gap:16px;border:1px solid #e5e7eb;border-radius:20px;background:#fff;padding:18px;margin-bottom:16px}.day-greeting-card span{color:#6d28d9;font-size:.7rem;font-weight:900;text-transform:uppercase}.day-greeting-card h4{margin:3px 0;font-weight:950}.day-greeting-card p{margin:0;color:#64748b}.day-date-box{display:flex;gap:8px;align-items:center;border:1px solid #ddd6fe;background:#faf5ff;border-radius:14px;padding:10px 12px}
.productivity-kpi-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin-bottom:16px}.productivity-kpi-grid article{display:flex;align-items:center;gap:10px;border:1px solid #e5e7eb;border-radius:17px;background:#fff;padding:13px}.productivity-kpi-grid i{width:40px;height:40px;display:grid;place-items:center;border-radius:13px;background:#f5f3ff;color:#6d28d9}.productivity-kpi-grid span,.productivity-kpi-grid strong{display:block}.productivity-kpi-grid span{font-size:.65rem;color:#64748b;font-weight:900;text-transform:uppercase}.productivity-kpi-grid strong{margin-top:4px;font-size:1.08rem}
.productivity-grid{display:grid;gap:16px;margin-bottom:16px}.productivity-grid-main{grid-template-columns:1fr 1fr}.productivity-grid-bottom{grid-template-columns:.8fr 1.2fr}.productivity-card-header span{color:#6d28d9;font-size:.65rem;font-weight:900;text-transform:uppercase}.productivity-card-header h5{margin:3px 0 13px;font-weight:950}
.smart-agenda-list,.pending-center-list,.global-timeline-list,.smart-checklist-list{display:grid;gap:9px}.smart-agenda-list article{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;border:1px solid #e5e7eb;border-radius:14px;padding:10px}.smart-agenda-list time{font-weight:950;color:#5b21b6}.smart-agenda-list strong,.smart-agenda-list span{display:block}.smart-agenda-list span{color:#64748b;font-size:.82rem}.smart-agenda-list button,.pending-center-list button{border:0;background:#f5f3ff;color:#6d28d9;border-radius:9px;padding:6px 9px}
.pending-center-list article{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;border:1px solid #fed7aa;border-left:5px solid #d97706;background:#fff7ed;border-radius:14px;padding:10px}.pending-center-list article.high{border-color:#fecaca;border-left-color:#dc2626;background:#fff1f2}.pending-center-list strong,.pending-center-list span{display:block}.pending-center-list span{color:#64748b;font-size:.82rem}
.global-timeline-list article{display:grid;grid-template-columns:auto 1fr;gap:10px;border-left:2px solid #ddd6fe;padding:4px 0 12px 14px}.global-timeline-list i{color:#6d28d9}.global-timeline-list strong,.global-timeline-list span,.global-timeline-list small{display:block}.global-timeline-list span,.global-timeline-list small{color:#64748b}.smart-checklist-list article{display:grid;grid-template-columns:1fr 120px auto;gap:10px;align-items:center;border:1px solid #e5e7eb;border-radius:14px;padding:10px}.smart-checklist-list strong,.smart-checklist-list span{display:block}.smart-checklist-list span{color:#64748b;font-size:.8rem}.smart-progress{height:9px;background:#ede9fe;border-radius:999px;overflow:hidden}.smart-progress span{height:100%;background:#6d28d9;border-radius:999px}
.favorites-list{display:grid;gap:8px}.favorites-list button{display:flex;align-items:center;gap:9px;border:1px solid #e5e7eb;background:#fff;border-radius:13px;padding:10px;text-align:left}.favorites-list i{color:#d97706}.productivity-summary{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.productivity-summary article{border:1px solid #e5e7eb;background:#f8fafc;border-radius:14px;padding:11px}.productivity-summary span,.productivity-summary strong{display:block}.productivity-summary span{font-size:.66rem;color:#64748b;font-weight:900;text-transform:uppercase}.productivity-summary strong{margin-top:5px;font-size:1.12rem}
.command-search-box{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;border:2px solid #ddd6fe;border-radius:15px;padding:10px}.command-search-box input{border:0;outline:0;font-size:1.05rem}.command-quick-actions{display:flex;gap:8px;overflow-x:auto;margin:13px 0}.command-quick-actions button{flex:0 0 auto;border:1px solid #e5e7eb;background:#fff;border-radius:12px;padding:9px 11px}.global-search-results,.top-notification-list{display:grid;gap:8px}.global-search-results article{display:grid;grid-template-columns:auto 1fr auto auto;gap:10px;align-items:center;border:1px solid #e5e7eb;border-radius:14px;padding:10px}.global-result-icon{width:40px;height:40px;display:grid;place-items:center;border-radius:12px;background:#f5f3ff;color:#6d28d9}.global-search-results strong,.global-search-results span{display:block}.global-search-results span{color:#64748b;font-size:.82rem}.global-search-results button{border:1px solid #ddd6fe;background:#fff;border-radius:9px;padding:6px 9px}.favorite-result-btn{color:#d97706}.search-hint{text-align:center;color:#64748b;padding:40px}.top-notification-list article{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;border:1px solid #fed7aa;border-left:5px solid #d97706;border-radius:14px;padding:10px}.top-notification-list article.high{border-color:#fecaca;border-left-color:#dc2626}.top-notification-list strong,.top-notification-list span{display:block}.top-notification-list span{color:#64748b;font-size:.82rem}
@media(max-width:1300px){.productivity-kpi-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:900px){.productivity-grid-main,.productivity-grid-bottom{grid-template-columns:1fr}.productivity-hero{flex-direction:column;align-items:flex-start}.productivity-actions{width:100%}.productivity-actions .btn{flex:1}}@media(max-width:768px){.productivity-kpi-grid{grid-template-columns:repeat(2,1fr)}.day-greeting-card{flex-direction:column;align-items:flex-start}.productivity-summary{grid-template-columns:1fr}.top-utility-btn span,.top-utility-btn kbd{display:none!important}}@media(max-width:480px){.productivity-kpi-grid{grid-template-columns:1fr}.smart-checklist-list article{grid-template-columns:1fr}.productivity-actions{display:grid;grid-template-columns:1fr}}

/* V23.9.1 - Correção completa do mobile */
@media(max-width:768px){
  html,body,.main,.content-section{width:100%!important;max-width:100%!important;overflow-x:hidden!important}
  .content-section{padding-left:12px!important;padding-right:12px!important}

  .topbar{
    position:relative!important;
    display:grid!important;
    grid-template-columns:48px minmax(0,1fr)!important;
    gap:10px!important;
    align-items:start!important;
    padding:14px 12px!important;
    min-height:auto!important;
    border-radius:0 0 22px 22px!important;
  }
  .mobile-menu-btn{
    grid-column:1!important;grid-row:1!important;
    width:44px!important;height:44px!important;padding:0!important;
    display:grid!important;place-items:center!important;align-self:end!important
  }
  .topbar>div:nth-of-type(1){grid-column:2!important;grid-row:1!important;min-width:0!important;padding-top:4px!important}
  .topbar h2{font-size:1.5rem!important;line-height:1.15!important;margin:0!important}
  .topbar p{font-size:.92rem!important;line-height:1.35!important;margin:4px 0 0!important;max-width:220px!important}

  .top-actions{
    grid-column:1/-1!important;grid-row:2!important;
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;width:100%!important;margin-top:4px!important;align-items:stretch!important
  }
  .top-actions .user-pill{
    width:100%!important;min-width:0!important;justify-content:center!important;
    padding:9px 8px!important;font-size:.84rem!important;white-space:nowrap!important;
    overflow:hidden!important;text-overflow:ellipsis!important
  }
  .top-actions .btn,.top-actions .top-utility-btn{
    width:100%!important;min-width:0!important;min-height:44px!important;
    justify-content:center!important;border-radius:14px!important;font-size:.88rem!important;padding:8px 10px!important
  }
  .top-actions .mobile-search-trigger{grid-column:1!important}
  .top-actions .mobile-notification-trigger{grid-column:2!important}
  .top-actions #newClientAnalysisBtn,.top-actions [data-bs-target="#clientModal"]{grid-column:1/-1!important}
  .top-actions #logoutBtn{grid-column:1/-1!important;width:52px!important;justify-self:center!important}
  .top-utility-btn span,.top-utility-btn kbd{display:none!important}
  .notification-badge{top:3px!important;right:8px!important}

  .dashboard-hero{display:grid!important;grid-template-columns:1fr!important;gap:12px!important;padding:18px!important}
  .dashboard-hero-icon{justify-self:start!important}
  .row{--bs-gutter-x:.75rem!important}
  .col-6{width:100%!important;flex:0 0 100%!important}

  .metric-card,.bi-kpi-card,.bi-mini-grid article,.productivity-kpi-grid article{
    min-width:0!important;width:100%!important
  }

  .dashboard-executive,.executive-dashboard,.executive-intelligence,
  .central-intelligence-card,.intelligence-dashboard-card,
  .dashboard-intelligence-card,.executive-dashboard-card{
    width:100%!important;max-width:100%!important;overflow:hidden!important;padding:16px!important;border-radius:18px!important
  }

  .dashboard-executive-grid,.executive-kpi-grid,.dashboard-intelligence-grid,
  .executive-metrics,.dashboard-executive-metrics,.intelligence-metrics{
    display:grid!important;grid-template-columns:1fr!important;gap:8px!important
  }

  .executive-metrics>div,.dashboard-executive-metrics>div,.intelligence-metrics>div{
    display:grid!important;grid-template-columns:1fr!important;gap:2px!important;
    padding:10px!important;border:1px solid #e5e7eb!important;border-radius:12px!important;background:#fff!important
  }

  .intelligence-dashboard-actions,.dashboard-intelligence-actions,.executive-dashboard-actions{
    display:grid!important;grid-template-columns:1fr!important;gap:8px!important
  }
  .intelligence-dashboard-actions .btn,.dashboard-intelligence-actions .btn,.executive-dashboard-actions .btn{width:100%!important}

  .intelligence-hero,.bi-hero,.productivity-hero,.diagnostic-hero{padding:16px!important;border-radius:18px!important}
  .intelligence-hero-actions,.bi-hero-actions{display:grid!important;grid-template-columns:1fr!important;width:100%!important}
  .intelligence-tabs{margin-left:0!important;margin-right:0!important;padding:5px!important}
  .intelligence-tabs button{min-height:42px!important}

  .bi-kpi-grid,.bi-mini-grid,.commercial-intelligence-kpis,.financial-intelligence-kpis,
  .ai-insight-grid,.productivity-kpi-grid{grid-template-columns:1fr!important}
  .bi-layout-main,.bi-layout-half,.bi-layout-insights,.intelligence-grid.two-columns{grid-template-columns:1fr!important}
  .bi-chart-card{min-height:320px!important}
  .bi-canvas-wrap,.bi-canvas-wide{min-height:240px!important;height:240px!important}

  .table-responsive{width:100%!important;max-width:100%!important;overflow-x:auto!important}
  .modal-dialog{margin:6px!important;width:calc(100vw - 12px)!important;max-width:calc(100vw - 12px)!important}
  .manual-quick-button{right:10px!important;bottom:10px!important;transform:scale(.9)!important;transform-origin:bottom right!important}
}
@media(max-width:420px){
  .top-actions{grid-template-columns:1fr!important}
  .top-actions .mobile-search-trigger,.top-actions .mobile-notification-trigger,
  .top-actions #newClientAnalysisBtn,.top-actions [data-bs-target="#clientModal"],.top-actions #logoutBtn{grid-column:1!important}
  .top-actions #logoutBtn{width:100%!important}
  .topbar h2{font-size:1.35rem!important}
  .topbar p{font-size:.86rem!important}
}
