*{box-sizing:border-box;margin:0;padding:0}
body{font-family:'Arial',sans-serif;font-size:12pt;line-height:1.5;color:#1a1a1a;background:#f4f7fa}
.hidden{display:none!important}
input,select,button,textarea{font-family:'Arial',sans-serif;font-size:12pt;line-height:1.5}
.topbar{background:#1e3a5f;padding:12px 20px;display:flex;align-items:center;justify-content:space-between;min-height:60px;line-height:1.5}

/* === SEGMENTED CONTROL (seletor de avaliações moderno) === */
.psico-seg {
  display: inline-flex;
  background: #f4f7fa;
  border: 1px solid #e6ecf5;
  border-radius: 10px;
  padding: 3px;
  position: relative;
  gap: 0;
  box-shadow: inset 0 1px 2px rgba(15,41,66,0.04);
}
.psico-seg-item {
  position: relative;
  padding: 6px 14px;
  font-size: 9.5pt;
  font-weight: 600;
  color: #4a5a70;
  cursor: pointer;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  font-family: Arial, sans-serif;
  transition: color 0.2s;
  white-space: nowrap;
  z-index: 1;
  user-select: none;
}
.psico-seg-item:hover:not(.active) { color: #1e3a5f; }
.psico-seg-item.active {
  color: #0f2942;
  font-weight: 700;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15,41,66,0.08), 0 1px 2px rgba(15,41,66,0.05);
  animation: psico-seg-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes psico-seg-pop {
  0%   { transform: scale(0.92); }
  60%  { transform: scale(1.03); }
  100% { transform: scale(1); }
}
.psico-seg-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.psico-seg-dot.aberto   { background: #3d8b37; box-shadow: 0 0 0 0 rgba(61,139,55,0.5); animation: psico-pulse 2s infinite; }
.psico-seg-dot.encerrado{ background: #bccde4; }

/* Dropdown (fallback para muitos ciclos) */
.psico-seg-more {
  position: relative;
  padding: 6px 14px;
  font-size: 9.5pt;
  font-weight: 600;
  color: #4a5a70;
  cursor: pointer;
  border-radius: 7px;
  background: transparent;
  border: 0;
  font-family: Arial, sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.psico-seg-more:hover { background: rgba(255,255,255,0.6); color: #0f2942; }
.psico-seg-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid #e6ecf5;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15,41,66,0.12), 0 2px 6px rgba(15,41,66,0.05);
  min-width: 260px;
  padding: 6px;
  z-index: 100;
  max-height: 320px;
  overflow-y: auto;
}
.psico-seg-dropdown.hidden { display: none; }
.psico-seg-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 10pt;
  font-family: Arial, sans-serif;
  font-weight: 500;
  color: #1a2a3f;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}
.psico-seg-dropdown-item:hover { background: #f4f7fa; }
.psico-seg-dropdown-item.active { background: #eef4fb; color: #0f2942; font-weight: 700; }
.psico-seg-dropdown-status {
  margin-left: auto;
  font-size: 8pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #6b7e94;
}
.psico-seg-dropdown-status.aberto { color: #3d8b37; }
.topbar-title{color:#fff;font-size:12pt;font-weight:700;display:inline-flex;align-items:center;gap:10px;line-height:1.4}

/* ─── Credenciais da empresa (CNPJ + Código) na topbar azul ─── */
.empresa-credenciais {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-left: 18px;
  padding: 7px 14px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: #fff;
  font-size: 10pt;
  line-height: 1.4;
}
.empresa-credenciais .cred-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 4px;
  transition: background 0.15s;
}
.empresa-credenciais .cred-item:hover {
  background: rgba(255,255,255,0.12);
}
.empresa-credenciais .cred-item.copiado {
  background: #3d8b37;
}
.empresa-credenciais .cred-label {
  font-weight: 600;
  opacity: 0.75;
  font-size: 8.5pt;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.empresa-credenciais .cred-val {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.empresa-credenciais .cred-sep {
  opacity: 0.3;
}
.empresa-credenciais .cred-titulo {
  font-size: 8.5pt;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #fff;
  opacity: 0.95;
  white-space: nowrap;
  line-height: 1.4;
}
.topbar-badge{display:inline-flex;align-items:center;font-size:8.5pt;font-weight:700;text-transform:uppercase;letter-spacing:1.2px;padding:6px 12px;border-radius:20px;line-height:1.4}
.topbar-badge-blue{background:rgba(255,255,255,0.95);color:#1e3a5f;box-shadow:0 2px 6px rgba(0,0,0,0.15)}
.topbar-badge-admin{background:linear-gradient(135deg,#f5a423,#c46a00);color:#fff;box-shadow:0 2px 6px rgba(196,106,0,0.4)}
.topbar-badge-green{background:linear-gradient(135deg,#56b04f,#2d6f28);color:#fff;box-shadow:0 2px 6px rgba(45,111,40,0.35)}
.topbar-txt{color:#fff;font-weight:600;letter-spacing:-0.2px;line-height:1.6;padding:3px 0;display:inline-block}
.topbar-right{display:flex;align-items:center;gap:10px}
.topbar-name{color:#b0c8e0;font-size:10pt}
.btn-sair{padding:5px 12px;font-size:10pt;border:0.5px solid rgba(255,255,255,0.3);border-radius:6px;background:transparent;color:#fff;cursor:pointer}
.login-wrap{display:flex;align-items:center;justify-content:center;padding:3rem 1rem;min-height:520px}
.login-card{background:#fff;border:0.5px solid #dde4ec;border-radius:10px;padding:2rem;width:100%;max-width:380px}
.login-title{font-size:16pt;font-weight:700;margin-bottom:4px}
.login-sub{font-size:10pt;color:#5a7a8a;margin-bottom:1.5rem;line-height:1.5}
.tab-row{display:flex;gap:8px;margin-bottom:1.5rem}
.tab-btn{flex:1;padding:8px;border:0.5px solid #dde4ec;border-radius:6px;background:transparent;color:#5a7a8a;cursor:pointer;font-size:10pt;font-family:'Arial',sans-serif;font-weight:700}
.tab-btn.active{background:#1e3a5f;color:#fff;border-color:#1e3a5f}
.field{margin-bottom:1rem}
.field label{display:block;font-size:10pt;color:#5a7a8a;margin-bottom:5px;font-weight:700}
.field input,.field select{width:100%;padding:8px 10px;border:0.5px solid #c8d4e0;border-radius:6px;background:#fff;color:#1a1a1a;font-size:11pt;font-family:'Arial',sans-serif}
.btn-main{width:100%;padding:10px;background:#1e3a5f;color:#fff;border:none;border-radius:6px;font-size:12pt;font-weight:700;cursor:pointer;font-family:'Arial',sans-serif}
.btn-main:hover{background:#163050}
.btn-main:disabled{opacity:0.5;cursor:not-allowed}
.btn-sm{padding:6px 14px;font-size:10pt;border:0.5px solid #c8d4e0;border-radius:6px;background:#fff;color:#1a1a1a;cursor:pointer;font-family:'Arial',sans-serif;font-weight:700}
.btn-sm:hover{background:#f4f7fa}
.btn-green{background:#5a9e3a;color:#fff;border-color:#5a9e3a}
.btn-green:hover{background:#4a8a2e}
.btn-orange{background:#b85c00;color:#fff;border-color:#b85c00}
.btn-orange:hover{background:#9a4d00}
.btn-red{background:#FCEBEB;color:#A32D2D;border-color:#f7c1c1}
.btn-blue{background:#e8f0f8;color:#1e3a5f;border-color:#b5d4f4}
.dash{padding:1.5rem}
.dash-header{margin-bottom:1.5rem;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px}
.dash-title{font-size:14pt;font-weight:700}

/* ─── Abas Gestão CIPA ─── */
.gest-tab-btn {
  padding: 8px 14px;
  border: 0.5px solid #c8d4e0;
  border-radius: 6px;
  background: #fff;
  color: #1e3a5f;
  font-size: 10pt;
  font-family: Arial, sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.gest-tab-btn:hover:not(:disabled) {
  background: #f0f4f8;
}
.gest-tab-btn.btn-blue {
  background: #1e3a5f;
  color: #fff;
  border-color: #1e3a5f;
}
.gest-tab-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ═══ Módulo Estabilidade ═══ */
.estab-card {
  background: #fff;
  border: 0.5px solid #dce4ef;
  border-left: 4px solid #dce4ef;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: box-shadow 0.15s;
}
.estab-card:hover {
  box-shadow: 0 2px 8px rgba(30,58,95,0.08);
}
.estab-card.est-verde { border-left-color: #3d8b37; }
.estab-card.est-amarelo { border-left-color: #c46a00; }
.estab-card.est-cinza { border-left-color: #9ca3af; }
.estab-card.est-vermelho { border-left-color: #A32D2D; background: #fff8f8; }

.estab-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.estab-nome {
  font-size: 11pt;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 4px;
}
.estab-cargo {
  font-size: 9pt;
  color: #6b7e94;
  margin: 0;
}
.estab-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.estab-badge {
  display: inline-block;
  font-size: 8.5pt;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 12px;
  letter-spacing: 0.3px;
}
.estab-badge.b-verde { background: #e7f4e3; color: #2d6a28; }
.estab-badge.b-amarelo { background: #fdf2e2; color: #8a4a00; }
.estab-badge.b-cinza { background: #e5e7eb; color: #4b5563; }
.estab-badge.b-vermelho { background: #fae3e3; color: #7a2020; }
.estab-badge.b-azul { background: #e2eaf5; color: #1e3a5f; }
.estab-badge.b-dourado { background: #fff4c4; color: #7a5a00; }

.estab-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.estab-info-item {
  font-size: 9pt;
}
.estab-info-label {
  color: #6b7e94;
  font-weight: 600;
  font-size: 8pt;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: block;
  margin-bottom: 2px;
}
.estab-info-val {
  color: #1a1a1a;
  font-weight: 600;
}
.estab-progress {
  width: 100%;
  height: 5px;
  background: #eef2f7;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 10px;
}
.estab-progress-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}
.estab-progress-bar.p-verde { background: #3d8b37; }
.estab-progress-bar.p-amarelo { background: #c46a00; }
.estab-progress-bar.p-cinza { background: #9ca3af; }
.estab-progress-bar.p-vermelho { background: #A32D2D; }

.estab-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 0.5px solid #f0f4f8;
}
.estab-btn-acao {
  font-size: 9pt;
  padding: 5px 12px;
  border: 0.5px solid #A32D2D;
  background: #fff;
  color: #A32D2D;
  border-radius: 4px;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-weight: 600;
}
.estab-btn-acao:hover {
  background: #fae3e3;
}

.estab-alerta {
  background: #fff8f8;
  border: 1px solid #f4b8b8;
  border-left: 4px solid #A32D2D;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 12px;
}
.estab-alerta-aviso {
  background: #fdf7eb;
  border-color: #f0cf8a;
  border-left-color: #c46a00;
}
.estab-alerta-titulo {
  font-weight: 700;
  color: #A32D2D;
  font-size: 10.5pt;
  margin: 0 0 4px;
}
.estab-alerta-aviso .estab-alerta-titulo { color: #8a4a00; }
.estab-alerta-texto {
  font-size: 9.5pt;
  color: #5a7a8a;
  line-height: 1.5;
  margin: 0;
}

/* Header da Composição da CIPA fica "grudado" no topo ao rolar, pra manter o seletor de gestão sempre acessível */
#det-mod-cipa-gestao .dash-header,
#emp-mod-cipa-gestao .dash-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, #fff 0%, #fff 85%, rgba(255,255,255,0.85) 100%);
  padding: 12px 0 10px;
  margin: -12px 0 1rem;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#det-mod-cipa-gestao .dash-header.is-stuck,
#emp-mod-cipa-gestao .dash-header.is-stuck {
  border-bottom-color: #e6edf5;
  box-shadow: 0 4px 12px -6px rgba(15,41,66,0.08);
}
.metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:1.5rem}
.metric{background:#e8f0f8;border-radius:6px;padding:14px;text-align:center}
.metric-num{font-size:24pt;font-weight:700;margin-bottom:3px}
.metric-label{font-size:10pt;color:#5a7a8a}
.n-blue{color:#1e3a5f}.n-green{color:#5a9e3a}.n-orange{color:#b85c00}
.card{background:#fff;border:0.5px solid #dde4ec;border-radius:10px;margin-bottom:1rem}
.card-head{padding:12px 16px;border-bottom:0.5px solid #dde4ec;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px}
.card-head-title{font-size:12pt;font-weight:700}
table{width:100%;border-collapse:collapse;font-size:11pt;table-layout:fixed;line-height:1.5}
th{padding:12px 16px;text-align:left;color:#5a7a8a;font-weight:700;border-bottom:0.5px solid #dde4ec;background:#f4f7fa;font-size:10pt;letter-spacing:0.3px}
td{padding:14px 16px;border-bottom:0.5px solid #eef2f6;vertical-align:middle;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11pt}
tr:last-child td{border-bottom:none}
tr:hover td{background:#fafcfe;transition:background 0.15s}
.badge{display:inline-block;padding:3px 8px;border-radius:20px;font-size:9pt;font-weight:700;white-space:nowrap}
.b-red{background:#FCEBEB;color:#A32D2D}
.b-orange{background:#fff3e0;color:#b85c00}
.b-green{background:#EAF3DE;color:#3B6D11}
.b-gray{background:#f4f7fa;color:#5a7a8a}
.b-blue{background:#e8f0f8;color:#1e3a5f}
.pbar{height:5px;background:#f4f7fa;border-radius:3px;overflow:hidden;width:70px;display:inline-block;vertical-align:middle}
.pfill{height:100%;background:#5a9e3a;border-radius:3px}
.modal-bg{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:1.5rem;background:rgba(0,0,0,0.45);z-index:1000;overflow-y:auto}
.modal{background:#fff;border:0.5px solid #dde4ec;border-radius:10px;width:100%;max-width:500px;padding:1.5rem;max-height:90vh;overflow-y:auto;position:relative}
.modal-title{font-size:14pt;font-weight:700;margin-bottom:4px}
.modal-sub{font-size:10pt;color:#5a7a8a;margin-bottom:1.5rem;line-height:1.5}
.modal-footer{display:flex;gap:8px;justify-content:flex-end;margin-top:1.5rem}
.alert-info{background:#e8f0f8;border-left:3px solid #1e3a5f;padding:10px 12px;font-size:10pt;color:#1e3a5f;line-height:1.5;margin-bottom:1rem}
.alert-warn{background:#fff3e0;border-left:3px solid #b85c00;padding:10px 12px;font-size:10pt;color:#b85c00;line-height:1.5;margin-bottom:1rem}
.alert-err{background:#FCEBEB;border-left:3px solid #E24B4A;padding:10px 12px;font-size:10pt;color:#A32D2D;line-height:1.5;margin-bottom:1rem}
.link-box{background:#f4f7fa;border:0.5px solid #dde4ec;border-radius:6px;padding:10px 12px;font-size:10pt;color:#5a7a8a;word-break:break-all;margin:0.5rem 0;font-family:'Courier New',monospace}
.cid-row{display:grid;grid-template-columns:80px 1fr 90px 60px 28px;gap:5px;margin-bottom:6px;align-items:center}
.ci{padding:6px 8px;border:0.5px solid #c8d4e0;border-radius:6px;width:100%;font-size:10pt;background:#fff;color:#1a1a1a;font-family:'Arial',sans-serif}
.setor-tag-wrap{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.stag{padding:4px 10px;border:0.5px solid #c8d4e0;border-radius:20px;font-size:10pt;background:#f4f7fa;color:#5a7a8a;display:flex;align-items:center;gap:4px}
.codigo-badge{background:#1e3a5f;color:#fff;font-size:14pt;font-weight:700;letter-spacing:3px;padding:6px 14px;border-radius:6px;font-family:'Courier New',monospace}
.loading{display:flex;align-items:center;justify-content:center;padding:3rem;color:#5a7a8a;font-size:12pt;gap:10px}
.spinner{width:20px;height:20px;border:2px solid #dde4ec;border-top-color:#1e3a5f;border-radius:50%;animation:spin 0.8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.admin-badge{background:#b85c00;color:#fff;font-size:9pt;font-weight:700;padding:2px 8px;border-radius:20px;margin-left:8px}
.q-wrap{background:#fff;min-height:520px}
.q-header{background:#1e3a5f;padding:14px 20px;text-align:center}
.q-header-title{color:#fff;font-size:12pt;font-weight:700}
.q-header-sub{color:#b0c8e0;font-size:10pt;margin-top:2px}
.q-prog-area{padding:10px 1.5rem;border-bottom:0.5px solid #dde4ec}
.q-prog-top{display:flex;justify-content:space-between;font-size:10pt;color:#5a7a8a;margin-bottom:5px}
.q-prog-bar{height:4px;background:#f4f7fa;border-radius:2px;overflow:hidden}
.q-prog-fill{height:100%;background:#5a9e3a;border-radius:2px;transition:width 0.3s}
.q-body{padding:1.5rem;max-width:560px;margin:0 auto}
.q-cat{font-size:10pt;font-weight:700;color:#5a9e3a;text-transform:uppercase;letter-spacing:0.5px;margin-bottom:8px}
.q-texto{font-size:12pt;font-weight:700;line-height:1.5;margin-bottom:1.5rem}
.opcoes{display:flex;flex-direction:column;gap:8px;margin-bottom:1.5rem}
.opcao{padding:11px 16px;border:0.5px solid #c8d4e0;border-radius:6px;cursor:pointer;font-size:12pt;background:#fff;color:#1a1a1a;text-align:left;font-family:'Arial',sans-serif;line-height:1.5}
.opcao:hover{border-color:#1e3a5f;background:#e8f0f8;color:#1e3a5f}
.opcao.sel{border-color:#1e3a5f;background:#1e3a5f;color:#fff}
.q-nav{display:flex;gap:8px}
.btn-back{flex:1;padding:10px;border:0.5px solid #c8d4e0;border-radius:6px;background:transparent;color:#5a7a8a;cursor:pointer;font-size:12pt;font-family:'Arial',sans-serif;font-weight:700}
.btn-next{flex:2;padding:10px;background:#5a9e3a;color:#fff;border:none;border-radius:6px;font-size:12pt;font-weight:700;cursor:pointer;font-family:'Arial',sans-serif}
.btn-next:disabled{opacity:0.35;cursor:not-allowed}
.rel-wrap{font-family:'Arial',sans-serif;font-size:12pt;line-height:1.5;color:#000}
.rel-resumo{background:#e8f0f8;border-left:3px solid #1e3a5f;padding:12px 14px;font-size:11pt;line-height:1.6;color:#1e3a5f;margin-bottom:1.5rem;border-radius:0 6px 6px 0}
.rel-titulo-secao{font-size:12pt;font-weight:700;margin:1.5rem 0 0.75rem;border-bottom:2px solid #1e3a5f;padding-bottom:6px;text-transform:uppercase;color:#1e3a5f;letter-spacing:0.3px}
.sc{padding:10px 14px;margin-bottom:8px;border-radius:6px}
.sc.risco{background:#FDF0EF;border-left:4px solid #c0392b}
.sc.inter{background:#FFF8EE;border-left:4px solid #c46a00}
.sc.fav{background:#EDF7EB;border-left:4px solid #3d8b37}
.sc-nome{font-weight:700;font-size:11pt;margin-bottom:5px}
.sc-cats{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:5px}
.sc-desc{font-size:10pt;line-height:1.55;color:#444}
.comp-row{display:flex;justify-content:space-between;align-items:center;padding:8px 0;border-bottom:1px solid #e2e6ea;font-size:11pt;gap:8px}
.comp-row:last-child{border-bottom:none}
.rodape-legal{font-size:10pt;color:#666;margin-top:1.5rem;padding-top:8px;border-top:1px solid #e2e6ea}
.plano-item{border:1px solid #e2e6ea;border-radius:8px;margin-bottom:14px;overflow:hidden}
.plano-head{background:#f7f8fa;padding:10px 14px;display:flex;align-items:flex-start;justify-content:space-between;gap:8px;flex-wrap:wrap;border-bottom:1px solid #e2e6ea}
.plano-head-title{font-weight:700;font-size:12pt;color:#1e3a5f}
.plano-body{padding:14px}
.plano-acao{font-size:11pt;margin-bottom:12px;line-height:1.6}
.plano-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.pf label{display:block;font-size:10pt;color:#5a7a8a;font-weight:700;margin-bottom:3px}
.pf label .obrig{color:#E24B4A;margin-left:2px}
.pf input,.pf select{width:100%;padding:7px 8px;border:1px solid #c8d4e0;border-radius:6px;font-size:11pt;background:#fff;color:#1a1a1a;font-family:'Arial',sans-serif}
.pf input.erro,.pf select.erro{border-color:#E24B4A;background:#FCEBEB}
.btn-finalizar{width:100%;padding:14px;background:#1e3a5f;color:#fff;border:none;border-radius:8px;font-size:12pt;font-weight:700;cursor:pointer;font-family:'Arial',sans-serif;margin-top:1.5rem}
.btn-finalizar:disabled{opacity:0.5;cursor:not-allowed}
.plano-item-rel{border:1px solid #e2e6ea;border-radius:8px;margin-bottom:14px;overflow:hidden}
.plano-head-rel{background:#f7f8fa;padding:10px 14px;display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;border-bottom:1px solid #e2e6ea}
.plano-body-rel{padding:12px 14px;font-size:11pt;line-height:1.6}
.plano-grid-rel{display:grid;grid-template-columns:1fr 1fr;gap:0;margin-top:10px;border:1px solid #e2e6ea;border-radius:6px;overflow:hidden}
.plano-campo-label{font-size:9pt;color:#5a7a8a;font-weight:700;text-transform:uppercase;letter-spacing:0.4px;margin-bottom:3px}
.plano-campo-valor{font-size:11pt;font-weight:600;color:#1a1a1a}
svg-icon{display:inline-flex;align-items:center;justify-content:center}
.det-menu-btn{display:flex;align-items:center;gap:10px;padding:10px 1rem;background:transparent;border:none;color:#b0c8e0;cursor:pointer;font-size:10.5pt;font-family:'Arial',sans-serif;text-align:left;width:100%;transition:background 0.15s}
/* Stepper Gestão CIPA */
.gest-step{display:flex;flex-direction:column;align-items:center;min-width:68px;cursor:pointer;position:relative;padding:3px 4px;border-radius:6px;transition:background 0.15s}
.gest-step:hover:not(.locked){background:#f0f4f8}
.gest-step.locked{cursor:not-allowed;opacity:0.45}
.gest-step-circle{width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:10pt;font-weight:700;background:#e8f0f8;color:#5a7a8a;border:2px solid #c8d4e0;margin-bottom:4px;transition:all 0.2s}
.gest-step.done .gest-step-circle{background:#3d8b37;color:#fff;border-color:#3d8b37}
.gest-step.active .gest-step-circle{background:#1e3a5f;color:#fff;border-color:#1e3a5f;box-shadow:0 0 0 3px rgba(30,58,95,0.15)}
.gest-step-label{font-size:8pt;color:#5a7a8a;text-align:center;line-height:1.15;font-weight:500;white-space:nowrap}
.gest-step.active .gest-step-label{color:#1e3a5f;font-weight:700}
.gest-step.done .gest-step-label{color:#3d8b37}
.gest-step-connector{flex:0 0 14px;height:2px;background:#c8d4e0;margin-top:16px;align-self:flex-start}
.gest-step-connector.done{background:#3d8b37}
.gest-nav-btn{width:34px;height:34px;flex-shrink:0;border-radius:50%;background:#fff;border:1px solid #dce4ef;color:#1e3a5f;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all 0.15s;box-shadow:0 1px 2px rgba(15,41,66,0.04)}
.gest-nav-btn:hover:not(:disabled){background:#1e3a5f;color:#fff;border-color:#1e3a5f;box-shadow:0 3px 10px rgba(15,41,66,0.18)}
.gest-nav-btn:disabled{opacity:0.35;cursor:not-allowed;background:#f4f7fa;border-color:#e3eaf2}
.det-menu-btn:hover{background:rgba(255,255,255,0.08);color:#fff}
.det-menu-btn.active{background:rgba(255,255,255,0.15);color:#fff;font-weight:700;border-left:3px solid #5a9e3a}
.det-modulo.hidden{display:none!important}
.emp-modulo.hidden{display:none!important}
/* ── MOBILE RESPONSIVE ─────────────────────────────────── */
@media (max-width:700px){
  /* Geral */
  body{font-size:11pt}
  input,select,button,textarea{font-size:16px} /* evita zoom no iOS */

  /* Topbar */
  .topbar{padding:10px 14px;flex-wrap:wrap;gap:6px}
  .topbar-title{font-size:11pt}
  .topbar-name{font-size:9pt;max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .btn-sair{font-size:9pt;padding:4px 10px}

  /* Login */
  .login-wrap{padding:1.5rem 1rem;min-height:auto;align-items:flex-start;padding-top:2rem}
  .login-card{padding:1.5rem 1.25rem}
  .login-title{font-size:14pt}

  /* ── SIDEBAR LATERAL → MENU INFERIOR ──────────── */
  #det-sidebar, #emp-sidebar {
    position:fixed!important;
    bottom:0;left:0;right:0;
    width:100%!important;min-width:unset!important;
    height:auto!important;
    flex-direction:row!important;
    overflow-x:auto;
    padding:0!important;
    gap:0!important;
    z-index:900;
    border-top:1px solid rgba(255,255,255,0.15);
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  #det-sidebar::-webkit-scrollbar,
  #emp-sidebar::-webkit-scrollbar{display:none}

  /* Ocultar cabeçalho do sidebar (nome empresa) */
  #det-sidebar>div:first-child,
  #emp-sidebar>div:first-child{display:none!important}

  /* Botões do menu */
  .det-menu-btn,.emp-menu-btn{
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    white-space:nowrap;
    border-radius:0!important;
    padding:8px 12px!important;
    font-size:8pt!important;
    width:auto!important;
    min-width:64px;
    gap:3px!important;
    border-left:none!important;
    border-bottom:3px solid transparent;
  }
  .det-menu-btn span:first-child,
  .emp-menu-btn span:first-child{font-size:18px!important}
  .det-menu-btn.active,.emp-menu-btn.active{
    border-left:none!important;
    border-bottom:3px solid #5a9e3a!important;
    background:rgba(255,255,255,0.15)!important;
  }

  /* Submenu CIPA — inline no mobile */
  #cipa-sub-esp,#cipa-sub-emp{
    display:flex!important;
    flex-direction:row!important;
    background:transparent!important;
  }

  /* Layout principal — compensar menu inferior */
  #det-main-layout,
  #emp-main-layout{
    flex-direction:column!important;
    padding-bottom:70px!important;
  }

  /* Conteúdo ocupa tela toda */
  #det-main-layout>div:last-child,
  #emp-main-layout>div:last-child{
    width:100%!important;
    overflow-y:auto!important;
  }

  /* Dashboard */
  .dash{padding:1rem}
  .dash-header{margin-bottom:1rem;flex-direction:column;align-items:flex-start}
  .dash-title{font-size:13pt}
  .dash-header>div:last-child{width:100%;display:flex;flex-wrap:wrap;gap:6px}
  .dash-header .btn-sm{flex:1;min-width:120px;text-align:center}

  /* Métricas */
  .metrics{grid-template-columns:repeat(3,1fr);gap:6px;margin-bottom:1rem}
  .metric{padding:10px 6px}
  .metric-num{font-size:18pt}
  .metric-label{font-size:8pt}

  /* Tabs admin/especialista */
  .dash > div:first-child{flex-wrap:wrap;gap:4px}
  .dash > div:first-child .btn-sm{flex:1;min-width:80px;text-align:center;font-size:9pt;padding:6px 4px}

  /* Tabelas — esconder, usar cards */
  table{display:none}

  /* Cards mobile */
  .card{border-radius:8px}
  .card-head{padding:10px 14px;flex-wrap:wrap;gap:4px}
  .card-head-title{font-size:11pt}

  /* Mobile cards para tabelas */
  .mobile-card-list{display:block}
  .mobile-card-item{background:#fff;border:0.5px solid #dde4ec;border-radius:8px;padding:12px 14px;margin-bottom:8px}
  .mobile-card-item-title{font-weight:700;font-size:11pt;margin-bottom:6px;color:#1e3a5f}
  .mobile-card-item-row{display:flex;justify-content:space-between;align-items:center;padding:4px 0;border-bottom:0.5px solid #f0f3f6;font-size:10pt;gap:8px}
  .mobile-card-item-row:last-child{border-bottom:none}
  .mobile-card-item-label{color:#5a7a8a;font-size:9.5pt}
  .mobile-card-item-actions{display:flex;gap:6px;margin-top:10px;flex-wrap:wrap}
  .mobile-card-item-actions .btn-sm{flex:1;text-align:center;font-size:9pt;padding:7px 8px}

  /* Modal — bottom sheet */
  .modal-bg{padding:0;align-items:flex-end}
  .modal{max-width:100%;width:100%;padding:1.25rem;border-radius:16px 16px 0 0;max-height:92vh}
  .modal-title{font-size:13pt}
  .modal-footer{flex-direction:column-reverse;gap:8px}
  .modal-footer .btn-sm{width:100%;text-align:center;padding:12px}

  /* Detalhe empresa */
  #det-link-col{font-size:8.5pt;word-break:break-all}
  .codigo-badge{font-size:12pt;letter-spacing:2px}

  /* Botões no detalhe */
  .dash-header .btn-sm{font-size:9pt;padding:7px 10px}

  /* Área empresa — boas vindas */
  #emp-plano-wrap > div:first-child{padding:1.25rem}
  #emp-bv-nome{font-size:14pt}
  #emp-plano-wrap .card > div{padding:1.25rem}
  #emp-plano-wrap .card > div > div{flex-direction:column}
  .btn-finalizar{font-size:10.5pt;padding:14px 16px;width:100%}

  /* Questionário */
  .q-body{padding:1rem}
  .q-texto{font-size:11pt}
  .opcao{font-size:11pt;padding:12px 14px}
  .q-header{padding:12px 16px}

  /* CID rows */
  .cid-row{grid-template-columns:60px 1fr 75px 45px 24px;gap:4px}
  .ci{font-size:9pt;padding:5px 6px}

  /* Plano de ação */
  .plano-fields{grid-template-columns:1fr}
  .plano-head{flex-direction:column;align-items:flex-start}
  .plano-grid-rel{grid-template-columns:1fr}

  /* Reuniões — layout empilhado */
  #reunioes-lista > div,
  #emp-reunioes-lista > div{flex-wrap:wrap!important}

  /* Boas-vindas empresa — stats */
  #emp-plano-wrap > div:first-child > div:last-child{flex-direction:column;gap:0.75rem}

  /* Sem relatório */
  #emp-sem-rel .card > div{padding:1.25rem}

  /* Calendário eleitoral — datas empilhadas */
  #cipa-calendario > div,
  #emp-el-calendario > div{flex-wrap:wrap!important;gap:6px!important}

  /* Grids inline 1fr 1fr → coluna única */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"]{grid-template-columns:1fr!important}

  /* Grid 4 colunas → 2 */
  [style*="grid-template-columns:repeat(4,1fr)"]{grid-template-columns:repeat(2,1fr)!important}

  /* Heatmap */
  #det-db-heatmap,#emp-db-heatmap{grid-template-columns:repeat(2,1fr)!important}

  /* Botões largura total */
  #btn-cipa-calcular,#btn-el-calcular,#btn-cipa-finalizar{width:100%!important}

  /* Links longos */
  #det-link-col,#den-link-col,#emp-den-link{max-width:100%!important;white-space:normal!important}

  /* Reuniões select full width */
  .reun-status-sel{width:100%!important}
  .reun-edit-btn,.reun-pub-btn{flex:1}

  /* Padding módulos */
  .det-modulo .card>div,.emp-modulo .card>div{padding:1rem!important}

  /* Select gestão */
  #cipa-gestao-select,#emp-cipa-gestao-select{width:100%!important}
}

/* Tablet */
@media (min-width:701px) and (max-width:1024px){
  .dash{padding:1.25rem}
  .metrics{gap:8px}
  .metric-num{font-size:20pt}
  table{font-size:10pt}
  td,th{padding:7px 10px}
  #det-sidebar,#emp-sidebar{width:180px;min-width:180px}
  .det-menu-btn,.emp-menu-btn{font-size:10pt;padding:9px 0.75rem}
}
/* ═══ PSICOSSOCIAL — TELA MODERNA SAAS ═══ */
.psico-modern {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  min-height: 100%;
  padding: 1.75rem 2rem 2rem;
  margin: 0 -1.5rem;
}

/* Header */
.psico-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding: 1rem 1.25rem 1.25rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #f5f9ff 0%, #fef6f0 100%);
  border: 1px solid #e6ecf5;
  position: relative;
  overflow: hidden;
}
.psico-header::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,0.22) 0%, transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}
.psico-header-info {
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}
.psico-header-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #3b82f6 0%, #1e3a5f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16pt;
  font-weight: 700;
  letter-spacing: -0.5px;
  box-shadow: 0 8px 20px rgba(30,58,95,0.28), 0 2px 6px rgba(59,130,246,0.22);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
}
.psico-header-avatar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.25) 50%, transparent 60%);
  pointer-events: none;
}
.psico-header-text { flex: 1; min-width: 0; }
.psico-header-greeting {
  font-size: 10pt;
  color: #6b7e94;
  margin: 0 0 2px;
  font-weight: 500;
}
.psico-header-greeting strong {
  background: linear-gradient(135deg, #3b82f6, #1e3a5f);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}
.psico-header-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  color: #1e3a5f;
  font-size: 8.5pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
  border: 1px solid rgba(30,58,95,0.1);
}
.psico-header-chip::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3d8b37;
  box-shadow: 0 0 0 0 rgba(61,139,55,0.5);
  animation: psico-pulse 2s infinite;
  margin-right: 3px;
}
@keyframes psico-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(61,139,55,0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(61,139,55,0); }
  100% { box-shadow: 0 0 0 0 rgba(61,139,55,0); }
}
.psico-header-title {
  font-size: 16pt;
  font-weight: 700;
  color: #0f2942;
  letter-spacing: -0.3px;
  margin: 0 0 6px;
  line-height: 1.2;
}
.psico-header-sub {
  font-size: 10pt;
  color: #6b7e94;
  margin: 0;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.psico-header-cnpj {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.8);
  color: #4a5a70;
  padding: 3px 10px;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-size: 9.5pt;
  font-weight: 700;
  letter-spacing: 0.2px;
  border: 1px solid rgba(74,90,112,0.1);
}
.psico-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* Botões */
.psico-btn-primary {
  background: linear-gradient(135deg, #3d8b37 0%, #2d6f28 100%);
  color: #fff;
  border: 0;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 10.5pt;
  font-weight: 700;
  font-family: Arial, sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(61,139,55,0.25), 0 1px 3px rgba(61,139,55,0.15);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.psico-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(61,139,55,0.32), 0 2px 5px rgba(61,139,55,0.18);
}
.psico-btn-lg { padding: 12px 26px; font-size: 11pt; }

.psico-btn-ghost {
  background: #fff;
  color: #4a5a70;
  border: 1px solid #dce4ef;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 10pt;
  font-weight: 600;
  font-family: Arial, sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}
.psico-btn-ghost:hover {
  background: #f6f9fd;
  border-color: #bccde4;
  color: #1e3a5f;
}

.psico-btn-icon {
  background: #fff;
  color: #4a5a70;
  border: 1px solid #dce4ef;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.psico-btn-icon:hover {
  background: #eef4fb;
  border-color: #9bb5d4;
}
.psico-btn-icon-danger:hover {
  background: #fdecea;
  border-color: #e6a4a4;
  color: #A32D2D;
}

/* Menu dropdown "Mais ações" */
.psico-menu-wrap { position: relative; }
.psico-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid #dce4ef;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15,41,66,0.12), 0 2px 6px rgba(15,41,66,0.06);
  min-width: 240px;
  padding: 6px;
  z-index: 100;
}
.psico-menu.hidden { display: none; }
.psico-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 10pt;
  color: #1a2a3f;
  text-align: left;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-weight: 500;
  transition: background 0.12s;
}
.psico-menu-item:hover { background: #f4f8fc; }
.psico-menu-item span:first-child { font-size: 14px; }
.psico-menu-item.hidden { display: none; }

/* Cards */
.psico-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e6ecf5;
  box-shadow: 0 1px 3px rgba(15,41,66,0.04), 0 4px 12px rgba(15,41,66,0.03);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.psico-card:hover {
  box-shadow: 0 2px 6px rgba(15,41,66,0.06), 0 8px 20px rgba(15,41,66,0.05);
}
.psico-card-head {
  padding: 14px 1.5rem;
  border-bottom: 1px solid #eef2f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.psico-card-title {
  font-size: 11pt;
  font-weight: 700;
  color: #0f2942;
  letter-spacing: -0.1px;
}

/* Empty state */
.psico-empty {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e6ecf5;
  box-shadow: 0 1px 3px rgba(15,41,66,0.04);
  padding: 3.5rem 2rem;
  text-align: center;
}
.psico-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.9;
  filter: drop-shadow(0 4px 12px rgba(15,41,66,0.08));
}
.psico-empty-title {
  font-size: 14pt;
  font-weight: 700;
  color: #0f2942;
  margin: 0 0 8px;
  letter-spacing: -0.2px;
}
.psico-empty-text {
  font-size: 10.5pt;
  color: #6b7e94;
  line-height: 1.65;
  max-width: 440px;
  margin: 0 auto 1.5rem;
}

/* === TOGGLE DE VARIAÇÕES === */
.psico-var-btn {
  background: #fff;
  border: 1px solid #dce4ef;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 9pt;
  font-weight: 600;
  cursor: pointer;
  color: #4a5a70;
  font-family: Arial, sans-serif;
  margin-right: 2px;
}
.psico-var-btn.active {
  background: #1e3a5f;
  color: #fff;
  border-color: #1e3a5f;
}

/* === VARIAÇÃO A — GLASS + HALO === */
.psico-var-A.psico-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 1rem;
}
.psico-glass {
  position: relative;
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 16px;
  padding: 20px 22px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15,41,66,0.06), inset 0 1px 0 rgba(255,255,255,0.9);
  transition: transform 0.25s, box-shadow 0.25s;
}
.psico-glass:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(15,41,66,0.1), inset 0 1px 0 rgba(255,255,255,0.9);
}
.psico-glass-halo {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  top: -30px;
  right: -30px;
  pointer-events: none;
}
.psico-glass-blue   .psico-glass-halo { background: radial-gradient(circle, #3b82f6 0%, transparent 70%); }
.psico-glass-green  .psico-glass-halo { background: radial-gradient(circle, #3d8b37 0%, transparent 70%); }
.psico-glass-orange .psico-glass-halo { background: radial-gradient(circle, #e69900 0%, transparent 70%); }

/* Card com efeito glass aplicado a cards normais */
.psico-card-glass {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #f7faff 100%);
}
.psico-card-glass > .psico-glass-halo {
  background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
  width: 180px;
  height: 180px;
  top: -50px;
  right: -50px;
  opacity: 0.35;
  filter: blur(50px);
  z-index: 0;
}
.psico-glass-icon {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 16px;
  opacity: 0.35;
  z-index: 1;
}
.psico-glass-num {
  position: relative;
  font-size: 28pt;
  font-weight: 700;
  color: #0f2942;
  letter-spacing: -1.2px;
  line-height: 1;
  margin-bottom: 4px;
  z-index: 1;
  font-variant-numeric: tabular-nums;
}
.psico-glass-label {
  position: relative;
  font-size: 10.5pt;
  font-weight: 600;
  color: #1a2a3f;
  margin-bottom: 10px;
  z-index: 1;
}
.psico-glass-status {
  position: relative;
  font-size: 8.5pt;
  font-weight: 600;
  color: #6b7e94;
  z-index: 1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.psico-glass-blue   .psico-glass-status { color: #3b82f6; }
.psico-glass-green  .psico-glass-status { color: #3d8b37; }
.psico-glass-orange .psico-glass-status { color: #b85c00; }

/* === VARIAÇÃO C — DONUT === */
.psico-var-C.psico-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-bottom: 1rem;
}
.psico-donut-card {
  background: #fff;
  border: 1px solid #e6ecf5;
  border-radius: 14px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 6px rgba(15,41,66,0.04);
  position: relative;
  transition: all 0.2s;
}
.psico-donut-card:hover { border-color: #bccde4; box-shadow: 0 4px 14px rgba(15,41,66,0.08); }
.psico-donut {
  width: 80px;
  height: 80px;
  transform: rotate(-90deg);
  flex-shrink: 0;
}
.psico-donut-bg { fill: none; stroke: #eef2f7; stroke-width: 8; }
.psico-donut-fg {
  fill: none;
  stroke: var(--col);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: calc(var(--pct) * 2.01) 201;
  transition: stroke-dasharray 0.8s ease;
}
.psico-donut-center {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 80px;
  text-align: center;
  pointer-events: none;
}
.psico-donut-num {
  font-size: 18pt;
  font-weight: 700;
  color: #0f2942;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.psico-donut-pct {
  font-size: 8pt;
  font-weight: 700;
  color: #6b7e94;
  margin-top: 2px;
}
.psico-donut-meta { flex: 1; }
.psico-donut-title { font-size: 11pt; font-weight: 700; color: #0f2942; margin-bottom: 2px; }
.psico-donut-sub { font-size: 9pt; color: #6b7e94; }

/* === VARIAÇÃO D — EDITORIAL === */
.psico-var-D.psico-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 1rem;
}
.psico-editorial {
  background: #fff;
  border: 1px solid #e6ecf5;
  border-radius: 10px;
  display: flex;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15,41,66,0.04);
  transition: all 0.2s;
  position: relative;
}
.psico-editorial::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(135deg, transparent 40%, rgba(15,41,66,0.01) 50%, transparent 60%),
    repeating-linear-gradient(-45deg, transparent 0, transparent 12px, rgba(15,41,66,0.008) 12px, rgba(15,41,66,0.008) 13px);
  pointer-events: none;
}
.psico-editorial:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(15,41,66,0.08); }
.psico-ed-sidebar { width: 7px; flex-shrink: 0; }
.psico-ed-blue   .psico-ed-sidebar { background: linear-gradient(180deg, #3b82f6 0%, #1e3a5f 100%); }
.psico-ed-green  .psico-ed-sidebar { background: linear-gradient(180deg, #56b04f 0%, #2d6f28 100%); }
.psico-ed-orange .psico-ed-sidebar { background: linear-gradient(180deg, #f5a423 0%, #b85c00 100%); }
.psico-ed-content { padding: 18px 22px; flex: 1; position: relative; z-index: 1; }
.psico-ed-chip {
  display: inline-block;
  font-size: 8pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
  font-family: Georgia, 'Times New Roman', serif;
}
.psico-ed-blue   .psico-ed-chip { background: #eef4fb; color: #1e3a5f; }
.psico-ed-green  .psico-ed-chip { background: #edf7eb; color: #2d6f28; }
.psico-ed-orange .psico-ed-chip { background: #fff4e5; color: #b85c00; }
.psico-ed-num {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 30pt;
  font-weight: 700;
  color: #0f2942;
  line-height: 1;
  letter-spacing: -1.5px;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.psico-ed-label { font-size: 11pt; font-weight: 700; color: #0f2942; margin-bottom: 4px; letter-spacing: -0.2px; }
.psico-ed-caption { font-size: 9pt; color: #6b7e94; font-style: italic; line-height: 1.4; }

/* Métricas */
.psico-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 1rem;
}
.psico-metric {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e6ecf5;
  padding: 18px 22px;
  position: relative;
  box-shadow: 0 1px 2px rgba(15,41,66,0.03);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.psico-metric:hover {
  border-color: #cfdbeb;
  box-shadow: 0 4px 14px rgba(15,41,66,0.06);
}
.psico-metric-blue   { --cm: #3b82f6; }
.psico-metric-green  { --cm: #3d8b37; }
.psico-metric-orange { --cm: #e69900; }
.psico-metric-body { }
.psico-metric-label {
  font-size: 9pt;
  color: #6b7e94;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}
.psico-metric-num {
  font-size: 30pt;
  font-weight: 700;
  color: #0f2942;
  line-height: 1;
  letter-spacing: -1px;
  margin-bottom: 6px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.psico-metric-num::before {
  content: '';
  width: 3px;
  height: 22px;
  background: var(--cm);
  border-radius: 2px;
  display: inline-block;
  align-self: center;
  opacity: 0.85;
}
.psico-metric-hint {
  font-size: 8.5pt;
  color: #8ea0b6;
  font-weight: 500;
  font-style: italic;
}
.psico-metric-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.psico-metric-progress-bar {
  flex: 1;
  height: 6px;
  background: #eef2f7;
  border-radius: 3px;
  overflow: hidden;
}
.psico-metric-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cm), color-mix(in srgb, var(--cm) 70%, #fff));
  border-radius: 3px;
  transition: width 0.5s ease;
}
.psico-metric-progress-txt {
  font-size: 9pt;
  font-weight: 700;
  color: var(--cm);
  min-width: 32px;
  text-align: right;
}

/* Card Acesso */
.psico-access-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
}
@media(max-width: 720px) {
  .psico-access-grid { grid-template-columns: 1fr; }
}
.psico-access-label {
  font-size: 9.5pt;
  font-weight: 700;
  color: #6b7e94;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 0 0 10px;
}
.psico-link-box {
  background: #f4f8fc;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  padding: 10px 14px;
  font-family: 'Courier New', monospace;
  font-size: 9.5pt;
  color: #1e3a5f;
  word-break: break-all;
  margin-bottom: 8px;
  transition: all 0.15s;
}
.psico-link-box.psico-copyable { cursor: pointer; position: relative; user-select: none; }
.psico-link-box.psico-copyable:hover {
  background: #eaf2fb;
  border-color: #bccde4;
}
.psico-link-box.psico-copyable.psico-copied {
  background: linear-gradient(135deg, #edf7eb 0%, #d9ecd6 100%) !important;
  border-color: #3d8b37 !important;
  color: #2d6f28 !important;
}
.psico-link-box.psico-copyable.psico-copied::before {
  content: '✓ Link copiado! ';
  font-family: Arial, sans-serif;
  font-weight: 700;
  color: #2d6f28;
  display: inline;
  margin-right: 6px;
}
.psico-access-hint {
  font-size: 9.5pt;
  color: #6b7e94;
  margin: 0;
  font-style: italic;
}
.psico-access-kv {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}
.psico-access-k {
  font-size: 9.5pt;
  color: #6b7e94;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 60px;
}
.psico-access-v {
  font-size: 11pt;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: #0f2942;
}
.psico-badge-code {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f2942 100%);
  color: #fff;
  padding: 6px 14px;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 11pt;
  letter-spacing: 1px;
  box-shadow: 0 2px 6px rgba(15,41,66,0.25);
}

/* Elementos copiáveis com clique */
.psico-copyable {
  cursor: pointer;
  position: relative;
  transition: all 0.15s;
  user-select: none;
}
.psico-copyable::after {
  content: '📋';
  font-size: 9pt;
  margin-left: 6px;
  opacity: 0;
  transition: opacity 0.15s;
}
.psico-copyable:hover::after { opacity: 0.5; }
.psico-copyable:hover { opacity: 0.85; }
.psico-copyable:active { transform: scale(0.97); }
.psico-copyable.psico-copied {
  background: linear-gradient(135deg, #3d8b37 0%, #2d6f28 100%) !important;
  color: #fff !important;
}
.psico-copyable.psico-copied::after {
  content: '✓ Copiado!';
  opacity: 1;
  margin-left: 6px;
  font-size: 9pt;
  font-weight: 700;
}

/* Setores grid */
.psico-setores-grid {
  padding: 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.psico-setor-card {
  background: #fff;
  border: 1px solid #e6ecf5;
  border-radius: 10px;
  padding: 14px 16px;
  transition: all 0.18s;
  position: relative;
}
.psico-setor-card:hover {
  border-color: #bccde4;
  box-shadow: 0 4px 12px rgba(15,41,66,0.06);
  transform: translateY(-1px);
}
.psico-setor-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 8px;
}
.psico-setor-nome {
  font-size: 10.5pt;
  font-weight: 700;
  color: #0f2942;
  flex: 1;
  word-break: break-word;
  line-height: 1.3;
}
.psico-setor-meta {
  font-size: 9pt;
  color: #6b7e94;
  margin-bottom: 10px;
}
.psico-setor-bar {
  height: 8px;
  background: #eef2f7;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}
.psico-setor-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s;
  background: linear-gradient(90deg, #3d8b37, #56b04f);
}
.psico-setor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9.5pt;
  margin-top: 8px;
  gap: 8px;
}

/* Tabela CID moderna */
.psico-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 10pt;
}
.psico-table thead th {
  background: #f8fafc;
  color: #4a5a70;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-size: 9pt;
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #eef2f7;
}
.psico-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #f0f4f8;
  color: #1a2a3f;
}
.psico-table tbody tr:hover td { background: #fafcfe; }
.psico-table tbody tr:last-child td { border-bottom: 0; }
/* ═══ TOAST de confirmação ═══ */
.psico-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #fff;
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 10.5pt;
  font-weight: 600;
  font-family: Arial, sans-serif;
  color: #0f2942;
  box-shadow: 0 10px 32px rgba(15,41,66,0.18), 0 4px 12px rgba(15,41,66,0.08);
  border: 1px solid #e6ecf5;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  max-width: 360px;
}
.psico-toast-show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.psico-toast-success {
  border-left: 4px solid #3d8b37;
  background: linear-gradient(135deg, #fff 0%, #f0faf0 100%);
}
.psico-toast-info {
  border-left: 4px solid #3b82f6;
  background: linear-gradient(135deg, #fff 0%, #f0f7ff 100%);
}
.psico-toast-error {
  border-left: 4px solid #A32D2D;
  background: linear-gradient(135deg, #fff 0%, #fdf0f0 100%);
}

/* ═══ fim PSICOSSOCIAL MODERNO ═══ */


/* ═══════════════════════════════════════════════════════════════════
   PERFIL DO ESPECIALISTA — Botão Meu Perfil + Modal
   ═══════════════════════════════════════════════════════════════════ */

/* Botão "Meu Perfil" nas topbars */
.btn-perfil {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  margin-right: 6px;
  font-weight: 600;
  transition: all 0.15s;
}

.btn-perfil:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.4);
}

/* Overlay do modal */
.perfil-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.perfil-overlay.hidden {
  display: none;
}

.perfil-caixa {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  overflow: hidden;
}

.perfil-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #1e3a5f;
  color: #fff;
}

.perfil-header h3 {
  margin: 0;
  font-size: 13pt;
  font-weight: 600;
}

.perfil-fechar {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14pt;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.perfil-fechar:hover {
  background: rgba(255,255,255,0.15);
}

.perfil-corpo {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.perfil-label {
  display: block;
  font-size: 9pt;
  color: #5a7a8a;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 10px;
}

.perfil-logo-wrap {
  display: flex;
  gap: 16px;
  align-items: center;
}

.perfil-logo-preview {
  width: 130px;
  height: 130px;
  border: 2px dashed #c5d3e0;
  border-radius: 8px;
  background: #fafbfd;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.perfil-logo-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.perfil-logo-placeholder {
  color: #a0aec0;
  font-size: 9.5pt;
  font-style: italic;
}

.perfil-btn-trocar,
.perfil-btn-remover {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 9.5pt;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.perfil-btn-trocar {
  background: #1e3a5f;
  color: #fff;
  border: 1px solid #1e3a5f;
}

.perfil-btn-trocar:hover {
  background: #2a4a72;
}

.perfil-btn-remover {
  background: #fff;
  color: #A32D2D;
  border: 1px solid #f5c5c5;
}

.perfil-btn-remover:hover {
  background: #fef0f0;
  border-color: #A32D2D;
}

.perfil-btn-remover.hidden {
  display: none;
}

.perfil-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid #eef2f6;
  background: #fafbfd;
}

.perfil-btn-cancelar,
.perfil-btn-salvar {
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 10pt;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.perfil-btn-cancelar {
  background: #fff;
  color: #5a7a8a;
  border: 1px solid #dce4ef;
}

.perfil-btn-cancelar:hover {
  background: #f4f7fa;
}

.perfil-btn-salvar {
  background: #3d8b37;
  color: #fff;
  border: 1px solid #3d8b37;
}

.perfil-btn-salvar:hover {
  background: #4ba146;
}

.perfil-btn-salvar:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Campos do modal Meu Perfil */
.perfil-campo-label {
  display: block;
  font-size: 9pt;
  color: #5a7a8a;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: 0.2px;
}

.perfil-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #dde4ec;
  border-radius: 6px;
  font-size: 10pt;
  font-family: inherit;
  color: #1a1a1a;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.perfil-input:focus {
  outline: none;
  border-color: #1e3a5f;
}

.perfil-input::placeholder {
  color: #a0aec0;
}
