#funcionarios .func-search-wrap{
  position:relative;
  width:min(560px, 100%);
}


#funcionarios .func-search-ico{
  position:absolute;
  left:14px;
  top:50%;
  transform:translateY(-50%);
  font-size:15px;
  color:#94a3b8;
  pointer-events:none;
}

#funcionarios .func-header__primary{
  display:flex;
  align-items:center;
  gap:12px;
}

#funcionarios .func-search-input{
  width:100%;
  height:44px;
  padding:0 16px 0 40px;
  border-radius:14px;
  border:1px solid #dbe4ef;
  background:linear-gradient(180deg,#ffffff,#fbfdff);
  color:#0f172a;
  margin-right:0;
  box-shadow:0 8px 20px rgba(15,23,42,.04);
  transition:border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

#funcionarios .func-search-input::placeholder{
  color:#94a3b8;
}

#funcionarios .func-search-input:focus{
  outline:none;
  border-color:#93c5fd;
  box-shadow:0 0 0 4px rgba(59,130,246,.10), 0 12px 24px rgba(15,23,42,.06);
  background:#fff;
}

#funcionarios #funcBtnNovo.func-link-novo{
  width:auto;
  min-width:0;
  height:auto;
  padding:0;
  border:none;
  background:transparent;
  color:#2563eb;
  font-size:15px;
  font-weight:800;
  letter-spacing:-0.01em;
  box-shadow:none;
  border-radius:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}

#funcionarios #funcBtnNovo.func-link-novo:hover{
  transform:none;
  filter:none;
  color:#1d4ed8;
  text-decoration:none;
}

#funcionarios #funcBtnNovo.func-link-novo::before{
  content:"+";
  display:inline-block;
  font-size:16px;
  font-weight:900;
  line-height:1;
}

#funcionarios .table-wrap,
#funcionarios .func-table-wrap{
  border:1px solid #e6edf5;
  border-radius:22px;
  overflow:hidden;
  background:rgba(255,255,255,.88);
  box-shadow:0 18px 38px rgba(15,23,42,.06);
  backdrop-filter:blur(10px);
}

#funcionarios table thead th{
  background:#f8fbff;
  color:#475569;
  font-size:11px;
  font-weight:800;
  letter-spacing:.10em;
  text-transform:uppercase;
  padding:16px 16px;
  border-bottom:1px solid #e7eef7;
}

#funcionarios table tbody td{
  padding:16px 16px;
  border-bottom:1px solid #edf2f7;
  vertical-align:middle;
}

#funcionarios table tbody tr{
  transition:
    background .16s ease,
    transform .14s ease,
    box-shadow .16s ease;
}

#funcionarios table tbody tr:hover{
  background:#fbfdff;
}

#funcionarios table tbody tr:last-child td{
  border-bottom:none;
}

#funcionarios .func-header,
#funcionarios .func-topbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  flex-wrap:wrap;
}

#funcionarios .func-header-left{
  min-width:280px;
}

#funcionarios .func-header-right{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

#funcionarios .func-link-novo{
  margin-right:18px;
}
/* ===================== ESTOQUE (DATA GRID PREMIUM) ===================== */
#estoqueConteudo .estoque-grid{
  background:#fff;
  border:1px solid #e5eaf0;
  border-radius:18px;
  overflow:hidden;
  box-shadow: 0 14px 34px rgba(15,23,42,.08);
}

/* ===================== TREINAMENTOS — PENTE-FINO VISUAL FINAL ===================== */

/* 1) Quando houver só 1 card, usar melhor o espaço horizontal */
@media (min-width: 980px){
  #treinamentos .train-grid:has(.train-card:only-child){
    grid-template-columns: minmax(680px, 820px);
    justify-content: start;
    max-width: 860px;
  }

  #treinamentos .train-grid:has(.train-card:only-child) .train-card{
    max-width: 820px;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    grid-template-areas:
      "media body"
      "media actions";
    align-items: stretch;
  }

  #treinamentos .train-grid:has(.train-card:only-child) .train-media{
    grid-area: media;
    height: 100%;
    min-height: 190px;
    border-right: 1px solid rgba(226,232,240,.85);
  }

  #treinamentos .train-grid:has(.train-card:only-child) .train-thumb{
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  #treinamentos .train-grid:has(.train-card:only-child) .train-body{
    grid-area: body;
    padding: 18px 18px 10px;
    gap: 10px;
    justify-content: center;
  }

  #treinamentos .train-grid:has(.train-card:only-child) .train-actions{
    grid-area: actions;
    padding: 0 18px 18px;
    align-items: center;
  }
}

/* 2) Botão "Criar sala" com mais presença premium */
#treinamentos .train-actions .btnAbrirSala{
  min-width: 132px;
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  border: 1px solid rgba(37,99,235,.10);
  box-shadow:
    0 12px 24px rgba(37,99,235,.18),
    inset 0 1px 0 rgba(255,255,255,.18);
  font-weight: 800;
  letter-spacing: -0.01em;
}

#treinamentos .train-actions .btnAbrirSala:hover{
  transform: translateY(-1px);
  box-shadow:
    0 16px 28px rgba(37,99,235,.24),
    inset 0 1px 0 rgba(255,255,255,.18);
  filter: brightness(1.02);
}

#treinamentos .train-actions .btnAbrirSala:active{
  transform: translateY(0);
  box-shadow:
    0 10px 18px rgba(37,99,235,.18),
    inset 0 1px 0 rgba(255,255,255,.12);
}

/* botão Configurar acompanha melhor o nível visual */
#treinamentos .train-actions .btnConfig{
  height: 40px;
  border-radius: 12px;
  border: 1px solid #dbe4ef;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  color: #0f172a;
  box-shadow: 0 8px 18px rgba(15,23,42,.04);
}

#treinamentos .train-actions .btnConfig:hover{
  background: #ffffff;
  border-color: #c9d6e4;
  box-shadow: 0 12px 22px rgba(15,23,42,.06);
}

/* 3) Botão Abrir PDF menos pesado e mais elegante */
#treinamentos .btnCertTreina{
  height: 40px;
  min-width: 124px;
  padding: 0 14px;
  border-radius: 11px;
  background: linear-gradient(135deg, #19b67f, #0f9f6e);
  border: 1px solid rgba(5,150,105,.10);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  box-shadow:
    0 10px 20px rgba(5,150,105,.14),
    inset 0 1px 0 rgba(255,255,255,.16);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease, opacity .16s ease;
}

#treinamentos .btnCertTreina:hover{
  transform: translateY(-1px);
  box-shadow:
    0 14px 24px rgba(5,150,105,.18),
    inset 0 1px 0 rgba(255,255,255,.16);
  filter: brightness(1.015);
}

#treinamentos .btnCertTreina:active{
  transform: translateY(0);
  box-shadow:
    0 8px 16px rgba(5,150,105,.14),
    inset 0 1px 0 rgba(255,255,255,.12);
}

/* tabela ganha um pouco mais de respiro para combinar com o restante */
#treinamentosConcluidosWrap .table-wrap{
  border-radius: 20px;
  box-shadow: 0 16px 32px rgba(15,23,42,.045);
}

#treinamentosConcluidosWrap .table-epi tbody td{
  padding-top: 16px;
  padding-bottom: 16px;
}

/* no mobile, volta para card vertical normal */
@media (max-width: 979px){
  #treinamentos .train-grid{
    max-width: none;
  }

  #treinamentos .train-card{
    max-width: 380px;
  }
}

@media (max-width: 760px){
  #treinamentos .train-card{
    max-width: none;
  }

  #treinamentos .btnCertTreina{
    width: 100%;
  }
}

/* ===================== TREINAMENTOS — ALINHAMENTO FINO DA TABELA ===================== */

/* mantém Colaborador e CPF à esquerda */
#treinamentosConcluidosWrap .table-epi thead th:nth-child(1),
#treinamentosConcluidosWrap .table-epi tbody td:nth-child(1),
#treinamentosConcluidosWrap .table-epi thead th:nth-child(2),
#treinamentosConcluidosWrap .table-epi tbody td:nth-child(2){
  text-align: left;
}

/* centraliza Treinamento */
#treinamentosConcluidosWrap .table-epi thead th:nth-child(3),
#treinamentosConcluidosWrap .table-epi tbody td:nth-child(3){
  text-align: center;
}

/* centraliza Data + status */
#treinamentosConcluidosWrap .table-epi thead th:nth-child(4),
#treinamentosConcluidosWrap .table-epi tbody td:nth-child(4){
  text-align: center;
}

#treinamentosConcluidosWrap .table-epi tbody td:nth-child(4){
  white-space: nowrap;
}

/* garante que data + badge fiquem centralizados juntos */
#treinamentosConcluidosWrap .table-epi tbody td.date-cell{
  justify-content: center;
  text-align: center;
}

/* centraliza Certificado */
#treinamentosConcluidosWrap .table-epi thead th:nth-child(5),
#treinamentosConcluidosWrap .table-epi tbody td:nth-child(5){
  text-align: center;
}

/* deixa o botão do certificado centralizado dentro da célula */
#treinamentosConcluidosWrap .table-epi tbody td:nth-child(5){
  vertical-align: middle;
}

#estoqueConteudo table th,
#estoqueConteudo table td{
  vertical-align: middle;
}

#estoqueConteudo table th:nth-child(1),
#estoqueConteudo table td:nth-child(1){
  text-align: left;
}

#estoqueConteudo table th:nth-child(2),
#estoqueConteudo table td:nth-child(2){
  text-align: center;
  white-space: nowrap;
}

#estoqueConteudo table th:nth-child(3),
#estoqueConteudo table td:nth-child(3){
  text-align: center;
}

#estoqueConteudo table thead th{
  padding-top: 12px;
  padding-bottom: 12px;
}

#estoqueConteudo table tbody td{
  padding-top: 10px;
  padding-bottom: 10px;
}

#estoqueConteudo table tbody tr{
  height: 52px;
}

.paginacaoEstoque .btnPagNumero{
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--bdr);
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: transform .06s ease, box-shadow .12s ease, background .12s ease, color .12s ease;
}

.paginacaoEstoque .btnPagNumero:hover{ transform: translateY(-1px); }

.paginacaoEstoque .btnPagNumero.active{
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 20px rgba(59,130,246,0.12);
}

.paginacaoEstoque .btnPagSeta{
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--bdr);
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .06s ease, box-shadow .12s ease, background .12s ease, color .12s ease;
}

.paginacaoEstoque .btnPagSeta:hover{ transform: translateY(-1px); }

#estoqueConteudo .paginacaoEstoque{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 0 4px;
  flex-wrap: wrap;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin:0; font-family: Arial, Helvetica, sans-serif; background:#f5f7fb; color:#222; }
/* Sidebar base e layout principal definidos no bloco premium final */
.container { display:flex; min-height:100vh; align-items:flex-start; }

.main-content {
  flex:1;
  padding:24px 32px 32px;
}
/* Cabeçalho principal (card) */
.main-header-card {
  display:flex;
  align-items:center; /* centraliza verticalmente o conteúdo */
  justify-content:space-between;
  gap:20px;
  margin-bottom:18px;         /* antes 24px */
  padding:10px 18px;          /* antes 16px 20px */
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(14px);
  border:1px solid var(--bdr);
  border-radius:16px;
  box-shadow: 0 12px 28px rgba(15,23,42,0.08);
  backdrop-filter:blur(10px);
}

.main-header-left {
  display:flex;
  flex-direction:column;
  gap:4px;
}

.app-tagline {
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:0.12em;
  font-weight:700;
  color:var(--muted); /* cinza-azulado mais discreto */
  opacity:0.85;
}

.main-header-title {
  margin:0;
  font-size:20px;
  color:var(--ink);
}

.main-header-subtitle {
  margin:2px 0 0;
  font-size:13px;
  color:var(--muted);
}

.main-header-right {
  display:flex;
  align-items:flex-start;
  gap:12px;
}

.empresa-selector {
  min-width:220px;
}

.empresa-selector label {
  font-size:12px;
  font-weight:600;        /* mais forte */
  color:var(--ink);       /* um pouco mais escuro */
  margin-bottom:4px;
  display:block;
}

/* Select de empresa com estilo mais “premium” */
#selectEmpresa {
  width:100%;
  padding:9px 12px;                            /* leve aumento na sensação de “pill” */
  border-radius:999px;
  border:1px solid var(--blue-300);
  font-size:13px;
  background:#ffffff;
  color:var(--ink);
}

/* Botão Sair no topo (visual) */
#btnLogout.btn-logout {
  width:auto;
  padding:8px 16px;
  border-radius:999px;
  border:none;
  background:linear-gradient(135deg, #1e4a6c, #3b82f6);
  color:#fff;
  font-size:13px;
  font-weight:600;
  box-shadow:0 10px 26px rgba(15,23,42,0.35);
  transition:transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

#btnLogout.btn-logout:hover {
  transform:translateY(-1px);
  box-shadow:0 14px 32px rgba(15,23,42,0.4);
  filter:brightness(1.03);
}
.page { display:none; }
.page.active { display:block; }
/* legacy .login-section removed: replaced by a scoped block at the end of the file
   (uses #loginSection and .login-layout/.login-panel). */
label { display:block; margin:8px 0 4px; }
input, select, textarea, button { width:100%; padding:10px; border:1px solid #ccc; border-radius:6px; }

/* Corrigir radios e checkboxes (não devem ocupar 100% da largura) */
input[type="radio"],
input[type="checkbox"] {
  width: auto;
  padding: 0;
  margin: 0;
}
button { background:#1e4a6c; color:#fff; cursor:pointer; }
button:hover { filter:brightness(1.05); }



/* =========================================================
   NOVO EPI – TABELA FINAL (colar por último para sobrescrever)
   ========================================================= */

/* Container da tabela */
#listaEPIs .table-wrap {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-gutter: stable both-edges;
}

/* Tabela base */
#listaEPIs .table-epi {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

/* Cabeçalho */
#listaEPIs .table-epi thead th {
  position: sticky;
  top: 0;
  background: #f7f9fc;
  color: #1e2a3a;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: .02em;
  border-bottom: 1px solid #e6e9ef;
  padding: 10px 14px;
}

/* Células */
#listaEPIs .table-epi tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid #f0f2f6;
  vertical-align: top;
  line-height: 1.4;
  font-size: 13px;
}

/* Nome */
#listaEPIs .table-epi thead th:nth-child(1),
#listaEPIs .table-epi tbody td:nth-child(1) {
  width: 24%;
  text-align: left;
}

/* CA bem estreito */
#listaEPIs .table-epi thead th:nth-child(2),
#listaEPIs .table-epi tbody td:nth-child(2) {
  width: 8%;
  text-align: left;
  white-space: nowrap;
}

/* Status CA */
#listaEPIs .table-epi thead th:nth-child(3),
#listaEPIs .table-epi tbody td:nth-child(3) {
  width: 11%;
  text-align: center;
}

/* Validade CA */
#listaEPIs .table-epi thead th:nth-child(4),
#listaEPIs .table-epi tbody td:nth-child(4) {
  width: 14%;
  text-align: left;
}

/* Vida útil (meses) */
#listaEPIs .table-epi thead th:nth-child(5),
#listaEPIs .table-epi tbody td:nth-child(5) {
  width: 7%;
  text-align: center;
}

/* Descrição com espaço grande */
#listaEPIs .table-epi thead th:nth-child(6),
#listaEPIs .table-epi tbody td:nth-child(6) {
  width: 28%;
  text-align: left;
}

/* Descrição SEM corte */
#listaEPIs .cell-desc {
  max-width: none;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

/* Ações */

.loja-det-modal{ padding:0; overflow:hidden; max-height:92vh; display:flex; flex-direction:column; width:min(1100px, calc(100vw - 24px)); margin:0 auto; }

/* LOJA — MODAL DETALHE (consolidado)
   - Bloco único para estilização do modal de detalhe
   - Remove uso excessivo de !important e centraliza propriedades base
*/
#lojaDetModal, .loja-det-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  /* largura/responsivo */
  width: min(1280px, calc(100vw - 24px));
  max-height: 94vh;

  /* o scroll vai ficar no .loja-det-inner */
  overflow: hidden;

  z-index: 5001;

  /* base de layout */
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0 auto;
  backdrop-filter: blur(10px);
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.16);
}

.loja-det-inner {
  padding: 28px 32px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: auto;
  overflow-x: hidden;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 24%, #ffffff 100%);
}

.loja-det-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  position:sticky;
  top:0;
  background: linear-gradient(180deg, rgba(248,250,252,0.92) 0%, rgba(255,255,255,0.95) 65%);
  padding:10px 0 12px;
  z-index:3;
  border-bottom:1px solid rgba(15,23,42,0.06);
}
.loja-det-title{ margin:0; font-size:22px; font-weight:800; color:#0f172a; letter-spacing:-0.01em; }
.loja-det-badges{ display:flex; gap:8px; flex-wrap:wrap; margin-top:6px; }
.loja-det-badges .pill{ background:#edf2ff; color:#1d4ed8; border:1px solid #d9e4ff; font-weight:700; padding:6px 10px; border-radius:999px; }
.loja-det-close{ width:40px; height:40px; border-radius:12px; border:1px solid rgba(15,23,42,0.12); background:#fff; }

.loja-det-grid{ display:grid; grid-template-columns: minmax(0,1.35fr) minmax(0,0.85fr); gap:18px; align-items:start; }
@media (max-width:960px){ .loja-det-grid{ grid-template-columns:1fr; } }

/* Fix horizontal scroll: ensure grid children can shrink and modal hides x-overflow */
.loja-det-modal, .loja-det-inner { overflow-x: hidden; }
.loja-det-grid > * { min-width: 0; }
.loja-det-media, .loja-det-buy { min-width: 0; }

/* Product image polishing */
.loja-det-media { display:flex; align-items:center; justify-content:center; background:linear-gradient(180deg,#f8fafc,#ffffff); }
.loja-det-media img{ max-width:100%; height:auto; object-fit:contain; display:block; box-shadow: 0 8px 28px rgba(2,6,23,0.06); border-radius:12px; }
.loja-det-media { display:flex; align-items:center; justify-content:center; background:linear-gradient(180deg,#f8fafc,#ffffff); }
.loja-det-media img { max-width:100%; height:auto; object-fit:contain; display:block; box-shadow: 0 8px 28px rgba(2,6,23,0.06); border-radius:12px; }
.loja-det-sizes .loja-size-list{ display:grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap:8px; }
.loja-size-pill{ border:1px solid #d8e0ec; background:#fff; border-radius:999px; padding:6px 12px; font-weight:800; color:#0f172a; cursor:pointer; transition:all .12s ease; height:36px; display:inline-flex; align-items:center; justify-content:center; }
.loja-size-pill:hover{ transform:translateY(-2px); box-shadow:0 8px 18px rgba(29,78,216,.08); }
.loja-size-pill.is-on{ border-color:#3b82f6; background:#eaf2ff; color:#0b3a9b; box-shadow:0 10px 22px rgba(59,130,246,.08); }

/* Quantity controls: more polished micro UI */
.loja-qty-ctrl{ display:flex; gap:8px; align-items:center; }
.loja-qty-ctrl--pill button{ width:40px; height:40px; border-radius:8px; border:1px solid #e6e9ef; background:#fff; display:inline-flex; align-items:center; justify-content:center; font-weight:800; }
.loja-qty-ctrl input{ width:64px; text-align:center; font-weight:800; padding:8px; border-radius:8px; }

/* Price hierarchy: smaller currency + larger amount */
.loja-det-price-line { display:flex; align-items:baseline; gap:6px; }
.loja-det-price-line .loja-price-curr{ font-size:14px; color:#64748b; font-weight:700; }
.loja-det-price-line .loja-price-amt{ font-size:34px; font-weight:900; color:#0f172a; letter-spacing:-0.02em; }

/* Accordion polish */
.loja-acc-item{ padding:16px 18px; align-items:center; }
.loja-acc-item .acc-ico{ transition: transform .18s ease, color .12s ease; }
.loja-acc-panel.is-open{ background:#f8fafc; border-top:1px solid #e6e9ef; padding:14px 18px 18px 18px; }
.loja-acc-item.is-open .acc-ico{ transform:rotate(180deg); color:#1d4ed8; }

/* Consistent border-radius for image, buy card, accordion */
.loja-det-media, .loja-det-buy, .loja-det-accordion { border-radius:14px; }

.loja-det-media{
  border:1px solid #e6e9ef;
  border-radius:18px;
  overflow:hidden;
  background:#f6f7fb;
  aspect-ratio: 4 / 3.6;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
}
.loja-det-media img{ width:100%; height:100%; object-fit:cover; object-position:center; display:block; transition:transform .3s ease; }
.loja-det-media:hover img{ transform:scale(1.02); }

.loja-det-buy{
  position:sticky; top:72px;
  border:1px solid #e6e9ef;
  border-radius:18px;
  padding:16px;
  background:#fff;
  box-shadow:0 16px 38px rgba(15,23,42,.10);
  display:flex;
  flex-direction:column;
  gap:16px;
  border-top:3px solid #3b82f6;
}
.loja-det-preco{ display:flex; flex-direction:column; gap:4px; }
.loja-det-price-line b{ font-size:26px; color:#0f172a; letter-spacing:-0.01em; }
.loja-label{ font-size:11px; letter-spacing:0.08em; color:#64748b; font-weight:800; }

.loja-color-list{ display:flex; gap:10px; flex-wrap:wrap; }
.loja-cor-dot{
  width:30px; height:30px; border-radius:50%;
  border:2px solid #e2e8f0;
  box-shadow:0 4px 10px rgba(15,23,42,.10);
  cursor:pointer; position:relative;
  transition:all .15s ease;
}
.loja-cor-dot.is-active{ border-color:#1d4ed8; box-shadow:0 8px 18px rgba(29,78,216,.18); }
.loja-cor-dot.is-off{ opacity:.35; cursor:not-allowed; }
.loja-cor-dot::after{
  content:"✓";
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
}
.loja-det-media {
  border:1px solid #e6e9ef;
  border-radius:18px;
  overflow:hidden;
  background:radial-gradient(circle at 18% 20%, #f5f8ff 0, #ffffff 48%, #f8fafc 100%);
  aspect-ratio: 4 / 3.6;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  box-shadow:0 18px 40px rgba(2,6,23,0.10);
}
.loja-det-media img { width:100%; height:100%; object-fit:cover; object-position:center; display:block; transition:transform .32s ease, filter .18s ease; }
.loja-det-media::after {
  content:"Clique para ampliar";
  position:absolute;
  bottom:10px; right:12px;
  font-size:11px;
  color:#475569;
  background:rgba(255,255,255,0.82);
  padding:6px 10px;
  border-radius:999px;
  box-shadow:0 8px 16px rgba(15,23,42,0.10);
  pointer-events:none;
}
.loja-det-media:hover img { transform:scale(1.02); filter: saturate(1.04); }
.loja-qty-ctrl input{ width:86px; text-align:center; font-weight:800; }
.loja-qty-ctrl--pill button{ width:40px; height:40px; border-radius:50%; border:1px solid #d8e0ec; }

.loja-det-cta{ height:50px; font-weight:800; font-size:15px; letter-spacing:0.01em; border:none; background:linear-gradient(135deg,#2563eb,#1d4ed8); box-shadow:0 14px 30px rgba(37,99,235,.25); transition:transform .08s ease, box-shadow .12s ease, filter .12s ease; }
.loja-det-cta:hover{ transform:translateY(-1px); box-shadow:0 18px 34px rgba(37,99,235,.28); filter:brightness(1.02); }
.loja-det-cta:active{ transform:translateY(0); box-shadow:0 10px 20px rgba(37,99,235,.24); }
.loja-det-cta:disabled{ opacity:.6; filter:grayscale(.2); cursor:not-allowed; box-shadow:none; }
.loja-det-metaextra{ font-size:12px; color:#475569; line-height:1.5; }

.loja-det-desc-text{ color:#334155; line-height:1.6; white-space:pre-wrap; }

/* Accordion */
.loja-det-accordion{ margin-top:6px; border:1px solid #e6e9ef; border-radius:14px; overflow:hidden; background:#fff; }
.loja-acc-item{ width:100%; text-align:left; padding:14px 16px; border:0; background:#fff; display:flex; justify-content:space-between; align-items:center; font-weight:800; color:#0f172a; cursor:pointer; border-bottom:1px solid #e6e9ef; }
.loja-acc-item:last-of-type{ border-bottom:0; }
.loja-acc-item .acc-ico{ color:#94a3b8; }
.loja-acc-panel{ display:block; padding:0 16px 0 16px; max-height:0; overflow:hidden; transition:max-height .26s ease, padding .18s ease; }
.loja-acc-panel.is-open{ padding:0 16px 14px 16px; max-height:420px; }

/* Accordion das especificações dinâmicas (detalhe do produto) */
.det-acc-item{ border:1px solid #e6e9ef; border-radius:12px; margin-bottom:10px; overflow:hidden; background:#fff; }
.det-acc-header{ width:100%; text-align:left; padding:14px 16px; border:0; background:#fff; display:flex; justify-content:space-between; align-items:center; font-weight:800; color:#0f172a; cursor:pointer; }
.det-acc-caret{ transition: transform .18s ease, color .12s ease; color:#94a3b8; }
.det-acc-item.is-open .det-acc-caret{ transform:rotate(180deg); color:#1d4ed8; }
.det-acc-body{ padding:14px 16px 18px 16px; background:#fbfdff; color:#334155; line-height:1.6; white-space:pre-wrap; display:none; }
.det-acc-item.is-open .det-acc-body{ display:block; }

/* =========================
   Ajustes recomendados pelo review — modal detalhe do produto
   - elimina scroll horizontal
   - garante filhos não estourarem largura
   - polimentos de header, price, tamanhos, accordion e imagem
   ========================= */

/* 1) mata scroll horizontal do conteúdo do modal */
#lojaDetModal .loja-det-body{
  overflow-y: auto;
  overflow-x: hidden;
}

/* evita qualquer filho estourar largura */
#lojaDetModal .loja-det-body *{
  max-width: 100%;
  box-sizing: border-box;
}

/* reforço: quando é grid/coluna, permite que elementos encolham */
#lojaDetModal .loja-det-grid,
#lojaDetModal .loja-det-media,
#lojaDetModal .loja-det-buy{
  min-width: 0;
}

/* 2) sticky no desktop (acompanha rolagem do modal) */
@media (min-width: 901px){
  #lojaDetModal .loja-det-buy{
    position: sticky;
    top: 74px; /* abaixo do header do modal */
  }
}

@media (max-width: 900px){
  #lojaDetModal .loja-det-buy{ position: relative; top: 0; }
}

/* 3) hierarquia do preço */
#lojaDetModal .loja-label{
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .75;
  font-weight: 800;
}
#lojaDetModal .loja-det-price-line{ display:flex; align-items:baseline; gap:8px; }
#lojaDetModal .price-value{ font-size: 28px; font-weight: 800; color: #0f172a; }
#lojaDetModal .price-value .currency{ font-size: 14px; font-weight:700; opacity:.75; margin-right:2px; }

/* compat: classes geradas pelo JS atual */
.loja-price-curr{ font-size:14px; font-weight:700; opacity:.78; margin-right:8px; vertical-align: baseline; }
.loja-price-amt{ font-size:26px; font-weight:800; color:#0f172a; vertical-align: baseline; }
.loja-price-amt sup{ font-size:12px; margin-left:4px; }

/* 4) tamanhos — compactos e mais premium */
#lojaDetModal .loja-det-sizes{ padding-top:6px; }
#lojaDetModal .loja-det-sizes .loja-size-list{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}
.loja-size-pill, #lojaDetModal .loja-size-btn{
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,0.12);
  background: #fff;
  font-weight: 700;
  color: #0f172a;
  transition: transform .08s ease, box-shadow .12s ease, border-color .12s ease;
  display:inline-flex; align-items:center; justify-content:center;
}
.loja-size-pill:hover, #lojaDetModal .loja-size-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(2,6,23,0.08);
  border-color: rgba(29,78,216,0.35);
}
.loja-size-pill.is-on, #lojaDetModal .loja-size-btn.is-active{
  background: rgba(29,78,216,0.10);
  border-color: rgba(29,78,216,0.55);
  color: #1d4ed8;
}

/* 5) header / fechar (botão) */
#btnLojaDetFechar, .loja-det-close{
  width: 36px; height: 36px; border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.9);
  display:inline-flex; align-items:center; justify-content:center; cursor:pointer;
}
#btnLojaDetFechar:hover, .loja-det-close:hover{
  box-shadow: 0 10px 22px rgba(2,6,23,0.12);
  transform: translateY(-1px);
}

/* adiciona separador sutil abaixo do header */
#lojaDetModal .loja-det-head{ border-bottom: 1px solid rgba(15,23,42,0.04); }

/* 6) accordion premium + prevenção de overflow-x no conteúdo */
#lojaDetModal .loja-det-accordion{ border-radius: 14px; overflow: hidden; }
#lojaDetModal .loja-acc-item{ padding: 18px 18px; font-weight:800; }
#lojaDetModal .loja-acc-item .acc-ico{ transition: transform .18s ease, color .12s ease; }
#lojaDetModal .loja-acc-panel{ padding: 0 18px 18px 18px; line-height:1.6; }
#lojaDetModal .loja-acc-panel.is-open{ background: #fbfdff; }

#lojaDetModal .loja-det-desc, #lojaDetModal .loja-det-desc *{
  overflow-x: hidden;
  word-break: break-word;
}

/* 7) imagem: bloco substituido abaixo pela nova galeria */

/* Mobile bar */
.loja-det-mobilebar{ position:fixed; left:0; right:0; bottom:0; background:#fff; border-top:1px solid #e2e8f0; padding:10px 14px; display:none; align-items:center; gap:12px; z-index:99; box-shadow:0 -6px 24px rgba(15,23,42,.12); }
.loja-det-mobilebar.is-on{ display:flex; }
.loja-det-mobile-price{ font-weight:800; color:#0f172a; font-size:18px; }
@media (min-width:961px){ .loja-det-mobilebar{ display:none!important; } }
@media (max-width:960px){ .loja-det-buy{ position:relative; top:0; box-shadow:0 8px 20px rgba(15,23,42,.08); } .loja-det-inner{ padding-bottom:32px; } }

/* ===== LOJA: tamanhos ===== */
.loja-size-wrap{ border:1px dashed #cbd5e1; border-radius:14px; padding:12px; background:#f8fafc; margin:14px 0; display:flex; flex-direction:column; gap:10px; }
.loja-size-head{ display:flex; flex-direction:column; gap:10px; }
.loja-size-chips{ display:flex; gap:8px; flex-wrap:wrap; }
.loja-size-chip{ display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border-radius:999px; border:1px solid #e2e8f0; background:#fff; font-weight:800; color:#0f172a; cursor:pointer; }
.loja-size-chip input{ accent-color:#1d4ed8; }
.loja-size-chip span{ line-height:1; }

.loja-det-sizes{ display:flex; flex-direction:column; gap:8px; }
.loja-size-list{ display:flex; gap:8px; flex-wrap:wrap; }
.loja-size-pill{ border:1px solid #cbd5e1; background:#fff; border-radius:10px; padding:6px 12px; font-weight:800; color:#0f172a; cursor:pointer; transition:all .12s ease; }
.loja-size-pill.is-on{ border-color:#1d4ed8; background:#e0edff; color:#0b3a9b; }

/* ===== LOJA: editor de variações ===== */
.loja-var-wrap{ border:1px dashed #cbd5e1; border-radius:14px; padding:12px; background:#f8fafc; }
.loja-var-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.loja-var-switch{ display:flex; gap:10px; align-items:center; font-weight:800; color:#0f172a; }
.loja-var-list{ margin-top:10px; display:flex; flex-direction:column; gap:10px; }

.loja-var-row{
  border:1px solid #e6e9ef;
  background:#fff;
  border-radius:14px;
  padding:10px;
  display:grid;
  grid-template-columns: 1.2fr .55fr .6fr 1fr auto;
  gap:10px;
  align-items:center;
}
@media (max-width:860px){ .loja-var-row{ grid-template-columns:1fr; } }

.loja-var-img{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.loja-var-preview{
  width:64px; height:48px;
  border-radius:10px;
  border:1px solid #e6e9ef;
  overflow:hidden;
  background:#fff;
  display:none;
}
.loja-var-preview.is-on{ display:block; }
.loja-var-preview img{ width:100%; height:100%; object-fit:cover; display:block; }
#listaEPIs .table-epi thead th:nth-child(7),
#listaEPIs .table-epi tbody td:nth-child(7) {
  width: 8%;
  text-align: right;
  padding-right: 12px;
}

/* Listras e hover */
#listaEPIs .table-epi tbody tr:nth-child(even) {
  background: #fcfdff;
}

#listaEPIs .table-epi tbody tr:hover {
  background: #f9fbff;
}

/* Mobile – sem cortar descrição */
@media (max-width: 720px) {
  #listaEPIs .table-epi thead { display: none; }
  #listaEPIs .table-epi tbody tr {
    display: block;
    border: 1px solid #e6e9ef;
    border-radius: 12px;
    margin: 10px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,.04);
    overflow: hidden;
    background: #fff;
  }
  #listaEPIs .table-epi tbody td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px dashed #eef2f7;
  }
  #listaEPIs .table-epi tbody td:last-child {
    border-bottom: none;
  }
  #listaEPIs .table-epi tbody td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #0f172a;
  }
  #listaEPIs .cell-desc {
    max-width: none;
  }
}





/* ============================
   SIDEBAR PREMIUM — OVERRIDE FINAL
   ============================ */

:root{
  --sb-mini: 75px;
  --sb-open: 270px;

  --sb-bg1: #050b1a;
  --sb-bg2: #0b1a3b;

  --sb-border: rgba(255,255,255,.10);
  --sb-text: rgba(255,255,255,.92);
  --sb-muted: rgba(255,255,255,.55);

  --sb-accent: #2f6bff;
  --sb-accent-weak: rgba(47,107,255,.18);
  --sb-glow: rgba(47,107,255,.22);
}

/* sidebar fixa */
.sidebar{
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  width: var(--sb-mini);
  z-index: 50;

  background: radial-gradient(1200px 500px at 20% 15%, rgba(47,107,255,.18), transparent 55%),
              linear-gradient(180deg, var(--sb-bg1), var(--sb-bg2));
  border-right: 1px solid var(--sb-border);
  box-shadow: 0 18px 45px rgba(0,0,0,.35);

  overflow-y: auto;
  overflow-x: hidden;

  transition: width .22s ease, box-shadow .22s ease, transform .22s ease;
}

/* expand no hover (overlay, sem empurrar o conteúdo) */
.sidebar.sidebar--mini:hover{
  width: var(--sb-open);
  box-shadow: 0 26px 70px rgba(0,0,0,.45);
}

/* conteúdo da página sempre respeita o mini */
.main-content{
  margin-left: var(--sb-mini) !important;
  width: calc(100% - var(--sb-mini)) !important;
}

/* Sidebar no tamanho do exemplo (largura, ícones, texto e espaçamento) */
:root{
  --sb-mini: 53px !important;   /* largura colapsada */
  --sb-open: 198px !important;  /* largura expandida no hover */
}

/* Base dos itens (modo aberto) */
.sidebar .sidebar-item{
  height: 44px !important;
  padding: 6px 8px !important;
  margin: 4px 6px !important;
  gap: 0px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.sidebar .nav-ico{
  width: 20px !important;
  height: 20px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.sidebar .nav-ico svg{
  width: 16px !important;
  height: 16px !important;
}

.sidebar .nav-txt{
  font-size: 14px !important;
  line-height: 1.25 !important;
  font-weight: 500 !important;
}

/* Conteúdo principal respeita a nova largura colapsada */
.main-content{
  margin-left: var(--sb-mini) !important;
  width: calc(100% - var(--sb-mini)) !important;
}
/* =====================================================
   MINI MODE — centralização visual SEM mover ícone
===================================================== */

/* Item ocupa toda a largura da sidebar mini */
.sidebar.sidebar--mini:not(:hover) .sidebar-item{
  width: 100% !important;
  padding: 8px 0 !important;
  justify-content: center !important;
}

/* Ícone continua flex (não absoluto) */
.sidebar.sidebar--mini:not(:hover) .nav-ico{
  margin: 0 !important;
}

/* Conteúdo principal não se move quando a sidebar expande */
.main-content{
  margin-left: var(--sb-mini) !important;
  width: calc(100% - var(--sb-mini)) !important;
}

/* ===== itens ===== */
.sidebar .sidebar-item{
  position: relative;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  margin: 4px 8px;

  color: var(--sb-text);
  text-decoration: none;

  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.sidebar .sidebar-item:hover{
  background: rgba(255,255,255,.06);
}

/* ícone */
.sidebar .nav-ico{
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;

  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  color: #fff;
}

.sidebar .nav-ico svg{
  width: 14px;
  height: 14px;
  stroke: #fff;
  stroke-width: 2;
}

/* texto */
.sidebar .nav-txt{
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .2px;
  white-space: nowrap;
}

/* mini: esconder textos e labels */
.sidebar.sidebar--mini:not(:hover) .nav-txt,
.sidebar.sidebar--mini:not(:hover) .sidebar-label,
.sidebar.sidebar--mini:not(:hover) .sidebar-brand .brand-text{
  opacity: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
}

/* ativo: barra azul + glow controlado */
.sidebar .sidebar-item.is-active{
  background: linear-gradient(90deg, rgba(47,107,255,.25), rgba(47,107,255,.10));
  box-shadow: 0 10px 24px rgba(0,0,0,.22), 0 0 0 1px rgba(47,107,255,.22) inset;
}
.sidebar .sidebar-item.is-active::before{
  content:"";
  position:absolute;
  left: 8px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: var(--sb-accent);
  box-shadow: 0 0 18px var(--sb-glow);
}

/* ===== tooltip premium (só no mini) ===== */
.sidebar.sidebar--mini:not(:hover) .sidebar-item[data-tooltip]::after{
  content: attr(data-tooltip);
  position: fixed; /* não corta no overflow */
  left: calc(var(--sb-mini) + 10px);
  transform: translateY(-50%);
  top: var(--ttop, 0px);

  background: rgba(10,18,40,.92);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  white-space: nowrap;

  box-shadow: 0 18px 40px rgba(0,0,0,.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
}

.sidebar.sidebar--mini:not(:hover) .sidebar-item:hover::after{
  opacity: 1;
  transform: translateY(-50%) translateX(2px);
}

/* ===== scrollbar discreta ===== */
.sidebar{
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.18) transparent;
}
.sidebar::-webkit-scrollbar{ width: 8px; }
.sidebar::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.14);
  border-radius: 999px;
}
.sidebar.sidebar--mini:not(:hover){
  scrollbar-width: none;
}
.sidebar.sidebar--mini:not(:hover)::-webkit-scrollbar{ width: 0; }

/* scroll só aparece quando expandir */
.sidebar.sidebar--mini:not(:hover) #menuList {
  scrollbar-width: none;
}
.sidebar.sidebar--mini:not(:hover) #menuList::-webkit-scrollbar {
  width: 0;
}

.sidebar.sidebar--mini:hover #menuList{
  scrollbar-width: thin;
}
.sidebar.sidebar--mini:hover #menuList::-webkit-scrollbar{ width: 6px; }













/* --- carimbo de digital (estilo do “selo” visual) — versão compacta (36px) --- */
.finger-stamp{
  display:inline-flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:4px;
  padding:6px 8px;
  border:1px dashed #9aa3ab;
  border-radius:8px;
  background:#fff;
  margin:4px 0;
  font-size:12px;
  color:#111;
  text-align:center;
}
.finger-stamp .fp-icon{
  width:36px;
  height:36px;
  flex:0 0 auto;
  opacity:1;
  object-fit:contain;
  background:transparent;
}
.finger-stamp .fp-lines{ line-height:1.15; }
.finger-stamp .fp-id{ font-weight:700; font-size:11px; }
.finger-stamp .fp-dt{ color:#333; font-size:10px; }

/* Botão ícone (excluir) - minimalista */
.btn.btn-icon{
  width: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.btn.btn-danger{
  border: 1px solid #fee2e2;
  background: #fff;
  color: #991b1b;
}

.btn.btn-danger:hover{
  background: #fff1f2;
}

/* =========================
   LOJA (vitrine + carrinho + conferência)
   ========================= */

.store-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin: 10px 0 14px;
}
.store-subtitle{ margin:6px 0 0; color:#64748b; font-size:13px; }

.store-hero{
  display:grid;
  grid-template-columns: 1.3fr 1fr;
  gap:12px;
  margin: 12px 0 16px;
}
@media (max-width: 980px){
  .store-hero{ grid-template-columns: 1fr; }
}
.store-hero-title{ margin:6px 0 4px; font-size:20px; color:#0f172a; }
.store-hero-desc{ margin:0; color:#475569; line-height:1.45; font-size:14px; }
.store-hero-steps{ display:flex; flex-direction:column; gap:8px; margin-top:10px; }
.store-step{
  display:flex;
  gap:10px;
  padding:10px;
  border:1px dashed #d5dbe6;
  border-radius:12px;
  background:#f8fafc;
}
.store-step-number{
  width:28px; height:28px;
  border-radius:999px;
  background:#1d4ed8;
  color:#fff;
  font-weight:800;
  display:flex; align-items:center; justify-content:center;
}
.store-step-title{ font-weight:800; color:#0f172a; }
.store-step-text{ margin:4px 0 0; color:#475569; font-size:13px; line-height:1.35; }

.store-hero-right{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap:10px;
}
.store-kpi-card{
  border:1px solid #e6e9ef;
  border-radius:14px;
  background:#fff;
  box-shadow:0 12px 28px rgba(15,23,42,0.06);
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.store-kpi-label{ color:#64748b; font-size:12px; text-transform:uppercase; letter-spacing:0.3px; }
.store-kpi-value{ font-weight:900; color:#0f172a; font-size:18px; }

.store-toolbar{
  display:grid;
  grid-template-columns: 1.2fr 0.9fr auto;
  gap:10px;
  align-items:end;
  margin: 12px 0 16px;
}
@media (max-width: 980px){
  .store-toolbar{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px){
  .store-toolbar{ grid-template-columns: 1fr; }
}
.store-search-block,
.store-filter-block{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.store-label{ font-size:12px; color:#475569; font-weight:700; }
.store-hint{ font-size:12px; color:#94a3b8; }
.store-toolbar-right{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
}

.store-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, 260px);
  gap: 14px;
  justify-content: center;
}

@media (max-width: 620px){
  .store-grid{
    grid-template-columns: 1fr;
  }
}

/* ensure cards can position absolute elements (delete button) */
.store-card{ position: relative; }

/* small delete button in corner of card */
.loja-card-del{
  position: absolute;
  right: 10px;
  top: 10px;
  width:30px;
  height:30px;
  border-radius:8px;
  border:1px solid #e6edf7;
  background:#fff;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:.95;
  font-size:14px;
}
.loja-card-del:hover{
  background:#fff1f2;
  border-color:#fecdd3;
}

/* ===== LOJA TOP NAV (vitrine) ===== */
.loja-topnav{
  display:flex;
  gap:18px;
  align-items:center;
  background:#fff;
  border:1px solid #e6edf7;
  border-radius:14px;
  padding:10px 14px;
  overflow:visible;
  white-space:normal;
  flex-wrap:wrap;
  row-gap:10px;
}

.loja-topitem,
.loja-toplink{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  color:#0f172a;
  font-weight:600;
  text-decoration:none;
}

.loja-topitem:hover,
#loja .loja-topnav{ gap:7px; padding:5px 9px; border-radius:10px; border:1px solid #0d266e; background:#0f2c82; overflow:visible; flex-wrap:wrap; white-space:normal; row-gap:5px; justify-content:center; }
#loja .loja-topnav .store-topnav-btn{ padding:5px 9px; border-radius:12px; font-weight:700; border:1px solid transparent; color:#fff; }

.dd-arrow{ font-size:12px; opacity:.7; }

/* dropdown */
.loja-topitem.has-dd{ position: static; }
.loja-dd{
  position: fixed;
  top: var(--dd-top, 64px);
  left: var(--dd-left, 16px);
  margin-top:0;
  min-width:260px;
  max-width: min(340px, calc(100vw - 32px));
  max-height: min(70vh, 420px);
  overflow-y: auto;
  background:#fff;
  border:1px solid #e6edf7;
  border-radius:14px;
  box-shadow:0 18px 45px rgba(2,6,23,.12);
  padding:10px;
  z-index:60;
  opacity:0;
  transform: translateY(-6px) scale(.995);
  transition: opacity .16s ease, transform .18s ease, box-shadow .18s ease;
  pointer-events:none;
}

.loja-dd.is-open{
  opacity:1;
  transform: translateY(0) scale(1);
  pointer-events:auto;
  box-shadow:0 20px 50px rgba(15,23,42,.12), 0 8px 18px rgba(15,23,42,.06);
}

.loja-dd-item{
  display:block;
  padding:10px 12px;
  border-radius:10px;
  color:#0f172a;
  text-decoration:none;
  font-weight:500;
}

.loja-dd-item:hover{
  background:#f3f7ff;
  color:#1d4ed8;
}

/* mega menu (+ categorias) */
.loja-topitem.has-mega{ position:relative; }

.loja-topitem.has-mega{ position: static; }
.loja-mega{
  position: fixed;
  top: var(--mega-top, 64px);
  left: var(--mega-left, 16px);
  right: auto;
  margin-top:0;
  width:min(860px, 80vw);
  max-width: calc(100vw - 40px);
  max-height: min(80vh, 520px);
  overflow-y: auto;
  background:#fff;
  border:1px solid #e6edf7;
  border-radius:16px;
  box-shadow:0 18px 45px rgba(2,6,23,.12);
  padding:16px;
  z-index:60;

  display: grid;
  grid-template-columns:repeat(3, 1fr);
  gap:12px;

  opacity:0;
  transform: translateY(-6px) scale(.995);
  transition: opacity .16s ease, transform .18s ease, box-shadow .18s ease;
  pointer-events:none;
}

.loja-mega.is-open{
  opacity:1;
  transform: translateY(0) scale(1);
  pointer-events:auto;
  box-shadow:0 20px 50px rgba(15,23,42,.12), 0 8px 18px rgba(15,23,42,.06);
}

.loja-topitem.mega-right .loja-mega{
  left: auto;
  right: 0;
}

.loja-dd::before{
  content:"";
  position:absolute;
  top:-10px;
  left:0;
  right:0;
  height:10px;
}

.loja-mega::before{
  content:"";
  position:absolute;
  top:-10px;
  left:0;
  right:0;
  height:10px;
}

.loja-mega .col{
  padding:6px;
  border-radius:12px;
}

@media (max-width: 860px){
  .loja-mega{ grid-template-columns: 1fr; min-width: 320px; }
}
@media (max-width: 560px){
  .store-grid{ grid-template-columns: repeat(1, minmax(0, 1fr)); }
}

/* Bloco antigo da loja removido para evitar conflitos de grid/cards (v2 aplicado no final) */

.store-process{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:12px;
  margin: 10px 0 16px;
}
@media (max-width: 1080px){
  .store-process{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px){
  .store-process{ grid-template-columns: repeat(1, minmax(0, 1fr)); }
}
.store-process-card{
  background:#fff;
  border:1px solid #e6e9ef;
  border-radius:14px;
  padding:12px;
  box-shadow:0 12px 26px rgba(15,23,42,0.06);
  display:flex;
  flex-direction:column;
  gap:8px;
}
.store-process-title{ font-weight:800; color:#0f172a; }
.store-process-text{ color:#475569; font-size:13px; line-height:1.45; margin:0; }
.store-bullets{
  margin:0;
  padding-left:18px;
  display:flex;
  flex-direction:column;
  gap:6px;
  color:#475569;
  font-size:13px;
}
.store-bullets li{ line-height:1.4; }

.store-grid-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  flex-wrap:wrap;
  margin: 10px 0 8px;
}
.store-grid-title{ margin:4px 0 2px; color:#0f172a; }
.store-grid-sub{ margin:0; color:#64748b; font-size:13px; }
.store-grid-tags{ display:flex; gap:8px; flex-wrap:wrap; }

.store-flow-panels{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:12px;
  margin: 14px 0 18px;
}
@media (max-width: 1080px){
  .store-flow-panels{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px){
  .store-flow-panels{ grid-template-columns: repeat(1, minmax(0, 1fr)); }
}
.store-panel-card{
  background:#fff;
  border:1px solid #e6e9ef;
  border-radius:14px;
  padding:12px;
  box-shadow:0 8px 22px rgba(15,23,42,0.05);
  display:flex;
  flex-direction:column;
  gap:8px;
}
.store-panel-card h4{ margin:0; color:#0f172a; }
.store-panel-card p{ margin:0; color:#475569; font-size:13px; line-height:1.45; }

/* overlay + drawer carrinho */
.store-overlay{
  position:fixed; inset:0;
  background: rgba(0,0,0,0.45);
  z-index: 9998;
}
.store-drawer{
  position:fixed;
  top:0; right:0;
  width:min(460px, 92vw);
  height:100vh;
  background:#fff;
  border-left: 1px solid #e6e9ef;
  z-index: 9999;
  display:flex;
  flex-direction:column;
  box-shadow: -22px 0 60px rgba(2,6,23,0.25);
}
.store-drawer-head{
  padding:14px 14px 10px;
  border-bottom:1px solid #eef2f7;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.store-drawer-title{ font-weight:900; color:#0f172a; }
.store-drawer-sub{ font-size:12px; color:#64748b; margin-top:2px; }

.store-cart-items{
  padding:12px 14px;
  overflow:auto;
  flex:1;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.store-cart-item{
  border:1px solid #eef2f7;
  border-radius:12px;
  padding:10px;
  display:grid;
  grid-template-columns: 1fr auto;
  gap:10px;
}
.store-cart-item .name{ font-weight:800; color:#0f172a; }
.store-cart-item .small{ font-size:12px; color:#64748b; margin-top:2px; }
.store-cart-item .qty{
  display:flex; gap:6px; align-items:center; justify-content:flex-end;
}
.store-cart-item .qty input{
  width:76px;
  text-align:right;
}
.store-cart-footer{
  border-top:1px solid #eef2f7;
  padding:12px 14px 14px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.store-cart-total{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:14px;
}
.store-orders{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-top:6px;
}

.store-orders-empty{
  border:1px dashed #d8e3f2;
  border-radius:20px;
  padding:28px 24px;
  background:linear-gradient(180deg,#ffffff 0%, #f8fbff 100%);
  text-align:center;
  box-shadow:0 14px 34px rgba(15,23,42,.05);
}

.store-orders-empty-title{
  font-size:18px;
  font-weight:800;
  color:#0f172a;
  letter-spacing:-0.02em;
}

.store-orders-empty-subtitle{
  margin-top:8px;
  font-size:13px;
  color:#64748b;
  line-height:1.55;
}

.store-order{
  border:1px solid #e7edf6;
  border-radius:24px;
  padding:20px;
  background:linear-gradient(180deg,#ffffff 0%, #fcfdff 100%);
  box-shadow:
    0 20px 44px rgba(15,23,42,.055),
    0 6px 16px rgba(15,23,42,.03),
    inset 0 1px 0 rgba(255,255,255,.82);
  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    transform .18s ease,
    background .18s ease;
}

.store-order:hover{
  transform:translateY(-1px);
  border-color:#d9e5f7;
  background:linear-gradient(180deg,#ffffff 0%, #fbfdff 100%);
  box-shadow:
    0 24px 52px rgba(15,23,42,.075),
    0 10px 22px rgba(15,23,42,.04),
    inset 0 1px 0 rgba(255,255,255,.88);
}

.store-order--highlight{
  border-color:#bfdbfe;
  box-shadow:
    0 22px 48px rgba(37,99,235,.12),
    inset 0 1px 0 rgba(255,255,255,.85);
}

.store-order-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  flex-wrap:wrap;
  padding-bottom:2px;
}

.store-order-code{
  font-size:20px;
  font-weight:900;
  color:#0f172a;
  letter-spacing:-0.03em;
  line-height:1.05;
}

.store-order-code::before{
  content:"Pedido";
  display:block;
  margin-bottom:5px;
  font-size:10px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#94a3b8;
}

.store-order-date{
  margin-top:6px;
  font-size:12px;
  color:#64748b;
  letter-spacing:.01em;
}

.store-order-head-right{
  display:flex;
  align-items:center;
  gap:10px;
  padding-top:2px;
}

.store-order-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  padding:0 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  letter-spacing:.01em;
  border:1px solid transparent;
  white-space:nowrap;
}

.store-order-badge.is-pendente{
  background:#fff7ed;
  color:#9a3412;
  border-color:#fed7aa;
}

.store-order-badge.is-aprovado{
  background:#eff6ff;
  color:#1d4ed8;
  border-color:#bfdbfe;
}

.store-order-badge.is-separacao{
  background:#eef2ff;
  color:#4338ca;
  border-color:#c7d2fe;
}

.store-order-badge.is-enviado{
  background:#ecfeff;
  color:#0f766e;
  border-color:#a5f3fc;
}

.store-order-badge.is-recebido{
  background:#ecfdf5;
  color:#166534;
  border-color:#bbf7d0;
}

.store-order-badge.is-parcial{
  background:#fefce8;
  color:#854d0e;
  border-color:#fde68a;
}

.store-order-badge.is-cancelado{
  background:#fff1f2;
  color:#b91c1c;
  border-color:#fecdd3;
}

.store-order-badge.is-neutro{
  background:#f8fafc;
  color:#475569;
  border-color:#e2e8f0;
}

.store-order-summary{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:12px;
  margin-top:16px;
}

.store-order-summary-card{
  border:1px solid #e8edf5;
  border-radius:18px;
  padding:14px 16px;
  background:linear-gradient(180deg,#ffffff 0%, #f9fbff 100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72);
}

.store-order-summary-card strong{
  display:block;
  margin-top:3px;
  font-size:28px;
  line-height:1;
  letter-spacing:-0.03em;
  color:#0f172a;
}

.store-order-summary-label{
  display:block;
  font-size:10px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.14em;
  color:#64748b;
  margin-bottom:6px;
}

.store-order-items{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:14px;
}

.store-order-item{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  padding:13px 15px;
  border-radius:16px;
  background:linear-gradient(180deg,#fbfdff 0%, #f7faff 100%);
  border:1px solid #e7edf6;
}

.store-order-item-name{
  font-size:14px;
  color:#0f172a;
  font-weight:700;
  letter-spacing:-0.01em;
}

.store-order-item-qty{
  font-size:12px;
  font-weight:800;
  color:#1d4ed8;
  background:linear-gradient(180deg,#eef4ff 0%, #e5efff 100%);
  border:1px solid #d6e4ff;
  border-radius:999px;
  padding:5px 10px;
  min-width:48px;
  text-align:center;
  white-space:nowrap;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.65);
}

.store-order-delivery{
  margin-top:14px;
  padding:15px 16px;
  border-radius:18px;
  background:linear-gradient(180deg,#ffffff 0%, #fbfcfe 100%);
  border:1px solid #e7edf5;
  color:#526274;
  font-size:13px;
  line-height:1.72;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72);
}

.store-order-delivery strong{
  color:#334155;
  font-weight:800;
}

.store-order-note{
  margin-top:14px;
  padding:12px 14px;
  border-radius:16px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  color:#475569;
  font-size:13px;
  line-height:1.55;
}

.store-order-note--pending{
  background:linear-gradient(180deg,rgba(255,247,237,.58) 0%, rgba(255,250,245,.82) 100%);
  border:1px solid rgba(251,191,36,.30);
  color:#b45309;
  font-weight:600;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.55);
}

.store-order-note{
  margin-top:14px;
  padding:11px 14px;
  border-radius:15px;
  background:#f8fafc;
  border:1px solid #e8eef5;
  color:#526274;
  font-size:13px;
  line-height:1.55;
}

.store-order .row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

.store-order .muted{
  color:#64748b;
  font-size:12px;
}

/* =========================
   SEU CSS EXISTENTE AQUI
   (mantido integralmente)
   ========================= */

/* =========================================================
   Carimbo biométrico fixo — 36px
   ========================================================= */
#fingerIcon,
#digitalIcon,
#biometriaIcon,
#epiDigital,
#fingerprintPlaceholder,
img[data-role="biometria"],
img[alt*="digital"],
img[alt*="biometria"] {
  width: 36px !important;
  height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  object-fit: contain;
  background: transparent !important;
  opacity: 1 !important;
  border: none;
  display: inline-block;
  vertical-align: top;
  image-rendering: auto;
}

@media print {
  #fingerIcon,
  #digitalIcon,
  #biometriaIcon,
  #epiDigital,
  #fingerprintPlaceholder,
  img[data-role="biometria"],
  img[alt*="digital"],
  img[alt*="biometria"] {
    opacity: 1 !important;
    filter: none !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* antigo: regras de .login-card removidas (usamos .login-panel no bloco final) */


#listaEPIs .table-epi tbody tr:hover { background:#f9fbff; }
#listaEPIs .table-epi tbody tr:nth-child(even) { background:#fcfdff; }

/* Ações na tabela de EPIs (Editar / Excluir) */
/* Wrapper das ações dentro da célula */
#listaEPIs .actions {
  display: inline-flex;
  flex-direction: column;   /* Editar em cima, Excluir embaixo */
  align-items: flex-end;
  gap: 6px;
  padding-right: 0;
  white-space: nowrap;
}

/* Base dos botões da linha */
#listaEPIs .btn{
  appearance:none;
  width: auto; /* Dentro do Novo EPI, botão NÃO é full width */
  border-radius:999px;
  padding:6px 14px;
  font-size:13px;
  font-weight:500;
  border:1px solid transparent;
  background:#f9fafb;
  color:#0f172a;
  display:inline-flex;
  align-items:center;
  gap:6px;
  line-height:1;
  cursor:pointer;
  box-shadow:0 3px 8px rgba(15,23,42,0.12);
  transition:
    transform .08s ease,
    box-shadow .16s ease,
    background .16s ease,
    border-color .16s ease,
    color .16s ease;
}

/* Versão pequena (se o JS usar .btn--sm) */
#listaEPIs .btn--sm{
  padding:5px 10px;
  font-size:11px;
}

/* Botão EDITAR – minimalista azul */
#listaEPIs .btn--edit {
  background: #ffffff;
  border-color: #d0e2ff;
  color: #1d4ed8; /* azul do sistema */
}

/* Botão EXCLUIR – minimalista vermelho, porém discreto */
#listaEPIs .btn--del {
  background: #ffffff;
  border-color: #fecaca;
  color: #b91c1c;
  box-shadow: 0 2px 6px rgba(248,113,113,0.15);
}

/* Hover/active (igual clima SaaS) */
#listaEPIs .btn:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(15,23,42,0.20);
  filter:brightness(1.02);
}

#listaEPIs .btn:active{
  transform:translateY(0);
  box-shadow:0 4px 10px rgba(15,23,42,0.16);
  filter:brightness(0.99);
}

/* Ícones desenhados só com CSS (sem mexer no HTML) */
#listaEPIs .btn--edit::before{
  /* Lápis minimalista no botão EDITAR (Novo EPI) */
  content: "✎";        /* lápis simples, sem cor de emoji */
  font-size: 12px;     /* um pouco menor */
  margin-right: 2px;   /* afasta levemente do texto */
  position: relative;
  top: -0.5px;         /* microajuste vertical pra alinhar com o texto */
}

#listaEPIs .btn--del::before{
  content:"🗑";
  font-size:13px;
}

/* Hover específico para o botão de excluir (mais chamativo) */
#listaEPIs .btn--del:hover{
  background:#fecaca;
  border-color:#f87171;
  color:#7f1d1d;
}

#listaEPIs .ca-badge {
  display:inline-block;
  font-size:12px;
  padding:4px 10px;
  border-radius:999px;
  background:#eef2ff;
  color:#1e40af;
  border:1px solid #e0e7ff;
}

#listaEPIs .muted { color:#6b7280; font-size:12px; }

/* célula descrição com truncamento elegante */
/* bloco antigo: célula descrição com truncamento elegante (comentado)
#listaEPIs .cell-desc{
  max-width: 420px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
*/

@media (max-width: 720px){
  #listaEPIs .table-epi thead th { font-size:11px; padding:10px 12px; }
  #listaEPIs .table-epi tbody td { font-size:13px; padding:10px 12px; }
  /*#listaEPIs .cell-desc{ max-width: 220px; }*/
}

/* --- carimbo de digital compact --- */
.finger-stamp{ display:inline-flex; flex-direction:column; align-items:center; justify-content:flex-start; gap:4px; padding:6px 8px; border:1px dashed #9aa3ab; border-radius:8px; background:#fff; margin:4px 0; font-size:12px; color:#111; text-align:center; }
.finger-stamp .fp-icon{ width:36px; height:36px; flex:0 0 auto; opacity:1; object-fit:contain; background:transparent; }
.finger-stamp .fp-lines{ line-height:1.15; }
.finger-stamp .fp-id{ font-weight:700; font-size:11px; }
.finger-stamp .fp-dt{ color:#333; font-size:10px; }

/* antigo: regras de .login-card removidas (usamos .login-panel no bloco final) */

#listaEPIs .btn--sm{ padding:6px 10px; font-size:12px; }
#listaEPIs .btn--ghost{ background:#fff; border:1px solid #e3e7ef; }

/* Popover de filtros */
#listaEPIs .filters-wrap{ position:relative; }
#listaEPIs .filters-menu{
  position:absolute; right:0; top:calc(100% + 6px);
  background:#fff; border:1px solid #e6e9ef; border-radius:12px; box-shadow:0 12px 24px rgba(16,24,40,.12);
  width: min(360px, 92vw); padding:10px; display:none; z-index:10;
}
#listaEPIs .filters-menu.show{ display:block; }
#listaEPIs .filters-row{ display:flex; gap:8px; flex-wrap:wrap; margin:8px 0; }
#listaEPIs .chip{
  border:1px solid #e3e7ef; background:#fff; color:#16243a; padding:6px 10px; border-radius:999px; font-size:12px; cursor:pointer;
}
#listaEPIs .chip.is-active{ background:#0f172a; color:#fff; border-color:#0f172a; }
#listaEPIs .density{ display:flex; gap:6px; }
#listaEPIs .density button{
  border:1px solid #e3e7ef; background:#fff; color:#16243a; padding:6px 8px; border-radius:8px; font-size:12px; cursor:pointer;
}
#listaEPIs .density .is-active{ background:#0f172a; color:#fff; border-color:#0f172a; }

#listaEPIs .table-wrap{ overflow:auto; max-height:62vh; }
#listaEPIs .table-epi{ width:100%; border-collapse:separate; border-spacing:0; }

#listaEPIs .table-epi thead th{
  position:sticky; top:0; background:#f7f9fc; color:#1e2a3a; font-weight:700; text-transform:uppercase;
  font-size:12px; letter-spacing:.02em; border-bottom:1px solid #e6e9ef; padding:12px;
}
#listaEPIs .th-sort{ cursor:pointer; user-select:none; }
#listaEPIs .th-sort .arrow{ margin-left:6px; opacity:.6; }
#listaEPIs .th-sort.is-active{ color:#0f172a; }
#listaEPIs .th-sort.is-active .arrow{ opacity:1; }

#listaEPIs .table-epi tbody td{ padding:12px; border-bottom:1px solid #f0f2f6; vertical-align:top; }
#listaEPIs .row--compact td{ padding:6px 8px; }

#listaEPIs .muted{ color:#6b7280; font-size:12px; }
#listaEPIs .mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }

#listaEPIs .badge{
  display:inline-flex; align-items:center; gap:6px; font-size:12px; padding:4px 8px; border-radius:999px; border:1px solid transparent;
}
#listaEPIs .b-ok{ background:#ecfdf5; color:#065f46; border-color:#a7f3d0; }
#listaEPIs .b-warn{ background:#fff7ed; color:#9a3412; border-color:#fed7aa; }
#listaEPIs .b-bad{ background:#fef2f2; color:#991b1b; border-color:#fecaca; }

#listaEPIs .skeleton{ height:44px; background:linear-gradient(90deg,#f4f6fb,#eef1f7,#f4f6fb); background-size:200% 100%; animation:ske 1.1s infinite linear; border-radius:8px; margin:6px 0; }
@keyframes ske { 0%{background-position: 200% 0;} 100%{background-position: -200% 0;} }

/* responsivo: linhas viram “cards” no mobile */
@media (max-width: 720px){
  #listaEPIs .table-epi thead{ display:none; }
  #listaEPIs .table-epi tbody tr{ display:block; border:1px solid #e6e9ef; border-radius:12px; margin:10px 0; box-shadow:0 4px 12px rgba(0,0,0,.04); overflow:hidden; background:#fff; }
  #listaEPIs .table-epi tbody td{ display:flex; justify-content:space-between; gap:12px; border-bottom:1px dashed #eef2f7; }
  #listaEPIs .table-epi tbody td:last-child{ border-bottom:none; }
  #listaEPIs .table-epi tbody td::before{ content:attr(data-label); font-weight:700; color:#0f172a; }
}










/* legacy centralized login override removed — final, scoped login styles are at the end of this file */




/* ===================== VENCIMENTOS – estética refinada ===================== */
/* ===== Base do app ===== */
:root {
  --ink: #0f172a;
  --muted: #6b7280;

  --blue-50:  #eff6ff;
  --blue-100: #dbeafe;
  --blue-300: #93c5fd;
  --blue-600: #2563eb;
  --blue-800: #1e40af;

  --blue:     var(--blue-600);

  --red-100:    #fee2e2;
  --red-300:    #fca5a5;
  --red-800:    #991b1b;
  --orange-100: #ffedd5;
  --orange-300: #fdba74;
  --orange-800: #9a3412;

  --bdr: rgba(148,163,184,0.45);
}
h1,h2,h3,h4{ margin:0 0 10px; }
.muted{ color:var(--muted); }
.app-header{
  position:sticky; top:0; z-index:100; display:flex; align-items:center; justify-content:space-between;
  padding:12px 16px; background:#fff; border-bottom:1px solid var(--bdr);
}
.pages{ padding:16px; }

/* ===== HOME: layout gráfico + cards ===== */
.home-layout{
  display:grid; grid-template-columns: 1.6fr 1fr; gap:16px; align-items:start;
}
.home-chart{
  background:#fff; border:1px solid var(--bdr); border-radius:16px; min-height:260px;
  padding:12px; box-shadow:0 10px 24px rgba(15,23,42,0.08);
}
.home-side{ display:grid; grid-template-columns: 1fr; gap:14px; }

/* Cards */
.home-card {
  background: var(--card);
  border: 1px solid var(--bdr);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 12px 28px rgba(15,23,42,0.08);
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.home-card .card-top {
  display:flex;
  align-items:center;              /* garante alinhamento vertical do badge + ícone */
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}

.home-card .card-badge{
  display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border-radius:999px;
  font-size:12px; font-weight:700; border:1px solid transparent;
}

.home-card .card-ico {
  width:32px;
  height:32px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  background:#fff;
  border:1px solid transparent;
  flex-shrink:0;                  /* impede o círculo de “amassar” */
}

/* Ajustes para ícones SVG gerados pelo Feather Icons */
.home-card .card-ico svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.6;
}

.card-red .card-ico svg {
  stroke: var(--red-800);
}

.card-orange .card-ico svg {
  stroke: var(--orange-800);
}

.card-blue .card-ico svg {
  stroke: var(--blue-800);
}

.home-card .card-title {
  font-size: 15px;
  font-weight: 600;
  margin-top: 2px;      /* NOVO: deixa alinhamento perfeito */
  margin-bottom: 4px;
}
.card-value {
  font-size: 26px;
  font-weight: 700;
}
.home-card .card-sub{
  font-size:11px;           /* um pouco menor */
  line-height:1.4;
  color:var(--muted);
}

/* variações de cor */
.card-red {
  border-left: 5px solid color-mix(in srgb, var(--red) 70%, #ffffff 30%);
}
.card-orange {
  border-left: 5px solid color-mix(in srgb, var(--orange) 70%, #ffffff 30%);
}

/* Badges com cores um pouco mais suaves */
.card-red .card-badge{
  background:color-mix(in srgb, var(--red-100) 80%, #ffffff 20%);
  border-color:var(--red-100);
  color:var(--red-800);
}

.card-orange .card-badge{
  background:color-mix(in srgb, var(--orange-100) 80%, #ffffff 20%);
  border-color:var(--orange-100);
  color:var(--orange-800);
}

@media (max-width: 1024px){
  .home-layout{ grid-template-columns: 1fr; }
}

/* Intro da Home (título + subtítulo) */
.home-intro {
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  margin:0 0 12px;
  padding-top:0;
}

.home-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  color: #020617;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 0 rgba(255,255,255,0.35);
}

.home-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* Linha de KPIs da Home */
.home-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

/* Ajuste da Home layout (linha 2 – gráfico + lista) */
.home-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 18px;
  align-items: start;
}

/* Cabeçalho dentro do card do gráfico */
.home-chart {
  background:#fff;
  border:1px solid var(--bdr);
  border-radius:16px;
  min-height:260px;
  padding:14px;
  box-shadow: 0 12px 28px rgba(15,23,42,0.08);
  display:flex;
  flex-direction:column;
}

.home-chart-header {
  margin-bottom:10px;
}

.home-chart-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.home-chart-subtitle {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.home-chart-body {
  flex: 1;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#graficoPizzaEstoque {
  max-width: 320px;
  max-height: 260px;
}

/* Card de lista à direita */
.home-list-card {
  height:100%;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(15,23,42,0.08);
}

.home-list {
  margin:12px 0 0;
  padding:0;
  list-style:none;
}

.home-list-empty {
  font-size:12px;
  color:var(--muted);
  line-height:1.4;
}

/* 28) Espaçamento padrão entre header e sections */
.page {
  margin-top: 12px;
}

/* Microinterações dos cards */
.home-card {
  transition:box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.home-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15,23,42,0.08);
  border-color: rgba(59,130,246,0.28);
  background: rgba(255,255,255,0.98);
  filter: brightness(1.02);
}

/* Ícone dentro de círculo */
.home-card .card-top {
  display:flex;
  align-items:center;              /* garante alinhamento vertical do badge + ícone */
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}

.home-card .card-ico {
  width:32px;
  height:32px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  background:#fff;
  border:1px solid transparent;
  flex-shrink:0; /* impede o círculo de “amassar” */
}

/* Variações por tipo de card */
.home-card.card-blue {
  border-left: 5px solid color-mix(in srgb, var(--blue-800) 70%, #ffffff 30%);
}

.home-card.card-blue .card-badge {
  background:color-mix(in srgb, var(--blue-100) 80%, #ffffff 20%);
  border-color:var(--blue-100);
  color:var(--blue-800);
}

.card-red .card-ico {
  color:var(--red-800);
  border-color:var(--red-300);
}

.card-orange .card-ico {
  color:var(--orange-800);
  border-color:var(--orange-300);
}

.card-blue .card-ico {
  color:var(--blue-800);
  border-color:var(--blue-300);
}

/* Link de ação nos cards */
.home-card .card-link {
  display:inline-flex;
  align-items:center;
  margin-top:8px;
  font-size:12px;
  color:var(--blue-800);
  text-decoration:none;
  font-weight:500;
}

.home-card .card-link::after {
  content:"↗";
  font-size:11px;
  margin-left:4px;
  opacity:0.7;
}

.home-card .card-link:hover {
  text-decoration:underline;
}

/* Legenda do gráfico (2 colunas) */
.chart-legend {
  margin-top: 12px;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}
.chart-legend li {
  font-size: 12px;
  color: var(--muted);
}

/* Ícone no título do card de lista */
.list-icon {
  margin-right: 6px;
  font-size: 14px;
}

/* Itens da lista de EPIs movimentados */
.home-list-item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
  border-bottom: 1px solid var(--bdr);
}
.list-item-name { color: var(--ink); }
.list-item-qtd  { color: var(--blue-800); font-weight:600; }

/* 33) Branding – sidebar brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

/* garante que o título fique alinhado verticalmente com a imagem */
.sidebar-brand .brand-text{
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.sidebar-brand .brand-text h2{
  margin: 0;
  line-height: 1;
  font-size: 16px; /* ajuste fino se necessário */
}

.sidebar-logo-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: inherit;
  box-shadow: none;
}

/* quando a marca usa uma imagem, limita o tamanho e ajusta o conteúdo */
.sidebar-logo-icon img{
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 0;
}

/* 34) Header small logo */
.main-header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--blue-800), var(--blue-600));
  color: #f9fafb;
  box-shadow: 0 8px 18px rgba(15,23,42,0.35);
}

/* Responsividade adicional */
@media (max-width: 1024px) {
  .home-layout { grid-template-columns:1fr; }
  .main-content {
    padding: 18px 16px 20px;
  }

  .main-header-card { flex-direction: column; align-items: flex-start; gap: 12px; }
  .main-header-right { width:100%; justify-content:space-between; flex-wrap:wrap; }
  .empresa-selector { flex:1; min-width:0; }
}


@media (max-width: 720px) {

  .home-kpi-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
  }

  .home-kpi-row .home-card {
    min-width: 220px;
    scroll-snap-align: start;
  }

  .home-kpi-row::-webkit-scrollbar { height: 6px; }
  .home-kpi-row::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.7); border-radius: 999px; }

}

/* ===== VENCIMENTOS – sua estética (mantida) ===== */
#vencimentos .muted{ color:#6b7280; }
#vencimentos .venc-kpis{ display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap:12px; margin:10px 0 14px; }
#vencimentos .kpi{ display:flex; gap:10px; align-items:center; background:linear-gradient(180deg,#fff, #f9fbff); border:1px solid #e6e9ef; border-radius:14px; padding:14px; box-shadow:0 8px 24px rgba(2,6,23,.06); }
#vencimentos .kpi-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:32px;
  height:32px;
  border-radius:999px;
  background:rgba(59,130,246,0.06);
  overflow: visible;
  font-size:16px;
}
/* === FIX: ícones dos KPIs do Vencimentos não ficarem cortados === */
#vencimentos .kpi-icon{
  overflow: visible; /* importante p/ não cortar o stroke do svg */
}

/* Feather substitui <i data-feather> por <svg> */
#vencimentos .kpi-icon svg{
  width: 22px;
  height: 22px;
  display: block;
  overflow: visible; /* garante que o traço não "corte" nas bordas */
}

#vencimentos .kpi-info{ line-height:1.05; }
#vencimentos .kpi-label{ font-size:12px; color:#475569; }
#vencimentos .kpi-value{ font-size:22px; font-weight:800; color:#0f172a; letter-spacing:.2px; }
#vencimentos .kpi-red{ border-left:5px solid #ef4444; }
#vencimentos .kpi-orange{ border-left:5px solid #f59e0b; }
#vencimentos .kpi-blue{ border-left:5px solid #3b82f6; }

/* KPIs clicáveis (filtro rápido) */
#vencimentos .kpi-action{
  cursor:pointer;
  user-select:none;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
#vencimentos .kpi-action:hover{
  transform: translateY(-1px);
  box-shadow:0 14px 34px rgba(2,6,23,.10);
  border-color:#d8dde8;
}
#vencimentos .kpi-action:active{
  transform: translateY(0px);
}
#vencimentos .kpi-action.is-active{
  box-shadow:0 0 0 3px rgba(59,130,246,.18), 0 14px 34px rgba(2,6,23,.10);
  border-color:rgba(59,130,246,.35);
}
#vencimentos .kpi-action:focus{ outline:none; }
#vencimentos .kpi-action:focus-visible{
  box-shadow:0 0 0 3px rgba(59,130,246,.28), 0 14px 34px rgba(2,6,23,.10);
}
/* ===== VENCIMENTOS — Toolbar alinhada ===== */
#vencimentos .venc-toolbar{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  flex-wrap:wrap;
  margin:6px 0 12px;
}

#vencimentos .venc-toolbar .left{
  display:flex;
  align-items:center;
  gap:10px;
  flex:1;
  min-width:0;
  flex-wrap:nowrap;
}

#vencimentos .venc-toolbar .right{
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
  white-space:nowrap;
}

/* Barra de busca com lupa no final (minimalista) */
#vencimentos .venc-searchbar{
  position:relative;
  flex:1 1 420px;
  min-width:260px;
  max-width:520px;
}

#vencimentos .venc-searchbar .ctrl--search{
  width:100%;
  padding-right:40px;
}

#vencimentos .venc-search-ico{
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  width:18px;
  height:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#64748b;
  pointer-events:none;
}

#vencimentos .venc-search-ico svg{
  width:16px;
  height:16px;
}

@media (max-width: 680px){
  #vencimentos .venc-toolbar .left{
    flex-wrap:wrap;
  }
  #vencimentos .venc-searchbar{
    flex:1 1 100%;
    max-width:100%;
  }
}
#vencimentos .btn{ appearance:none; border:1px solid #e3e7ef; background:#fff; color:#0f172a; padding:8px 12px; border-radius:10px; font-size:13px; }
#vencimentos .filters-wrap{ position:relative; }
#vencimentos .filters-menu{ position:absolute; left:0; top:calc(100% + 6px); background:#fff; border:1px solid #e6e9ef; border-radius:12px; box-shadow:0 12px 24px rgba(16,24,40,.12); width:min(420px, 92vw); padding:12px; display:none; z-index:10; }
#vencimentos .filters-menu.show{ display:block; }
#vencimentos .filters-title{ font-weight:700; color:#0f172a; }
#vencimentos .filters-row{ display:flex; gap:8px; flex-wrap:wrap; margin:8px 0 6px; }
#vencimentos .chip{ border:1px solid #e3e7ef; background:#fff; color:#16243a; padding:6px 10px; border-radius:999px; font-size:12px; cursor:pointer; }
#vencimentos .chip.is-active{ background:#0f172a; color:#fff; border-color:#0f172a; }
#vencimentos .filters-tip{ font-size:12px; }
#vencimentos .ctrl{ background:#fff; border:1px solid #e3e7ef; border-radius:10px; padding:8px 12px; font-size:13px; }
#vencimentos .venc-header{
  display:flex;
  flex-direction:column;
  gap:2px;
  margin-bottom:8px;
}

#vencimentos .venc-subtitle{
  font-size:13px;
  color:var(--muted);
}

#vencimentos .venc-title{ margin:10px 0 8px; }
#vencimentos .venc-title h4{ margin:0; font-size:16px; letter-spacing:.2px; }
#vencimentos .venc-title .sub{ color:#6b7280; font-size:12px; }

#vencimentos .venc-section-title{
  margin:18px 0 6px;
  font-size:14px;
  font-weight:600;
  color:#0f172a;
}
#vencimentos .venc-divider{ margin:18px 0; border:0; height:1px; background:#eef2f7; }
#vencimentos .table-wrap{
  overflow-x: auto;
  overflow-y: hidden;
  max-height: none;
}
#vencimentos .venc-table{ width:100%; border-collapse:separate; border-spacing:0; background:#fff; border:1px solid #e6e9ef; border-radius:12px; box-shadow:0 10px 28px rgba(2,6,23,.05); overflow:hidden; }
#vencimentos .venc-table thead th{ position:sticky; top:0; z-index:1; background:#f7f9fc; color:#1f2937; font-weight:700; text-transform:uppercase; letter-spacing:.04em; font-size:11px; border-bottom:1px solid #e6e9ef; padding:12px; }
#vencimentos .venc-table tbody td{ padding:12px; border-bottom:1px solid #f1f5f9; vertical-align:top; font-size:13px; }
#vencimentos .venc-table tbody tr:hover{ background:#fbfdff; }
#vencimentos .avatar{ display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; border-radius:50%; margin-right:6px; background:#eef2ff; color:#1e40af; font-weight:700; font-size:12px; border:1px solid #e0e7ff; }
#vencimentos .status-pill{ display:inline-flex; align-items:center; gap:6px; font-size:12px; padding:4px 10px; border-radius:999px; border:1px solid transparent; font-weight:600; }
#vencimentos .status--bad{ background:#fef2f2; color:#991b1b; border-color:#fecaca; }
#vencimentos .status--warn{ background:#fff7ed; color:#9a3412; border-color:#fed7aa; }
#vencimentos tr.is-vencido{ box-shadow: inset 3px 0 0 0 #ef4444; }
#vencimentos .empty{ display:flex; align-items:center; gap:10px; padding:12px; background:#fff; border:1px dashed #e3e7ef; border-radius:12px; }
#vencimentos .empty-ico{ font-size:18px; }
#vencimentos .skeleton{ height:44px; background:linear-gradient(90deg,#f4f6fb,#eef1f7,#f4f6fb); background-size:200% 100%; animation:ske 1.1s infinite linear; border-radius:8px; margin:6px 0; }
@keyframes ske { 0%{background-position: 200% 0;} 100%{background-position: -200% 0;} }
#vencimentos .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }
#vencimentos .venc-table td { word-break: break-word; }
#vencimentos mark.hl{ background:#fff3a3; color:inherit; padding:0 2px; border-radius:3px; }
#vencimentos .ctrl--search{ min-width:260px; }
@media (max-width: 860px){
  #vencimentos .venc-kpis{ grid-template-columns: 1fr; }
  #vencimentos .ctrl--search{ min-width: 0; width:100%; }
}

/* ===== VENCIMENTOS — Paginação (substitui scroll interno) ===== */
#vencimentos .venc-pager{
  display:flex;
  gap:6px;
  justify-content:flex-end;
  align-items:center;
  margin-top:10px;
  user-select:none;
}

#vencimentos .venc-page-btn{
  appearance:none;
  border:1px solid #e6e9ef;
  background:#fff;
  color:#0f172a;
  font-size:12px;
  font-weight:700;
  min-width:32px;
  height:30px;
  padding:0 10px;
  border-radius:999px;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}

#vencimentos .venc-page-btn:hover{
  transform: translateY(-1px);
  box-shadow:0 10px 18px rgba(2,6,23,.08);
  border-color:#cbd5e1;
}

#vencimentos .venc-page-btn.is-active{
  background:#0f172a;
  border-color:#0f172a;
  color:#fff;
  box-shadow:0 10px 18px rgba(2,6,23,.12);
}

#vencimentos .venc-page-ellipsis{
  color:#94a3b8;
  font-weight:700;
  padding:0 4px;
}

/* ===== Pequenos upgrades visuais (bem discretos) ===== */
#vencimentos .kpi-action{ cursor:pointer; transition: transform .12s ease, box-shadow .12s ease; }
#vencimentos .kpi-action:hover{ transform: translateY(-1px); box-shadow:0 10px 26px rgba(2,6,23,.10); }

#vencimentos .kpi-action[aria-pressed="true"]{
  box-shadow:0 0 0 3px rgba(59,130,246,.12), 0 10px 26px rgba(2,6,23,.10);
  border-color:#c7d2fe;
}

#vencimentos #vencInfo{ display:none; }

/* ===== VENCIMENTOS – refinamento premium (UI) ===== */
#vencimentos .venc-hero{
  background:#fff;
  border:1px solid #e6e9ef;
  border-radius:16px;
  padding:16px;
  box-shadow:0 10px 28px rgba(2,6,23,.05);
  margin-bottom:12px;
}

#vencimentos .venc-block{ margin-top:14px; }

/* badge de contagem no título */
#vencimentos .count-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:22px;
  padding:0 10px;
  border-radius:999px;
  background:rgba(59,130,246,.08);
  border:1px solid rgba(59,130,246,.20);
  color:#1e40af;
  font-size:12px;
  font-weight:800;
  vertical-align:middle;
}

/* tabela com “card” de verdade (borda/sombra no wrap) */
#vencimentos .table-wrap{
  border:1px solid #e6e9ef;
  border-radius:12px;
  box-shadow:0 10px 28px rgba(2,6,23,.05);
  background:#fff;
  overflow-x: auto;
  overflow-y: hidden;
  max-height:none;
}
#vencimentos .table-wrap .venc-table{
  border:0;
  box-shadow:none;
  border-radius:0;
}

/* zebra sutil */
#vencimentos .venc-table tbody tr:nth-child(even){ background:#f9fbff; }

/* status pill com “dot” (fica mais elegante) */
#vencimentos .status-pill::before{
  content:'';
  width:6px;
  height:6px;
  border-radius:999px;
  background:currentColor;
  opacity:.55;
}

/* botão filtros com ícone alinhado */
#vencimentos #btnVencFiltros{
  display:flex;
  align-items:center;
  gap:8px;
}
#vencimentos #btnVencFiltros i{
  width:16px;
  height:16px;
}


















/* ===================== FUNCIONÁRIOS – estética premium final ===================== */
#funcionarios .func-header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  margin:4px 0 16px;
}

#funcionarios .func-header__titles{
  display:flex;
  flex-direction:column;
  gap:4px;
}

#funcionarios .func-title{
  margin:0;
  font-size:18px;
  font-weight:800;
  letter-spacing:-0.01em;
  color:#0f172a;
}

#funcionarios .func-subtitle{
  color:#64748b;
  font-size:13px;
  line-height:1.45;
}

#funcionarios .func-header__actions{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  margin-left:auto;
}

#funcionarios .btn{
  appearance:none;
  width:auto;
  min-height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:0 14px;
  border-radius:12px;
  border:1px solid #dbe3ee;
  background:#fff;
  color:#0f172a;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 6px 18px rgba(15,23,42,.06);
  transition:
    transform .12s ease,
    filter .15s ease,
    box-shadow .15s ease,
    border-color .15s ease,
    background .15s ease;
}

#funcionarios .btn:hover{
  transform:translateY(-1px);
  filter:none;
  box-shadow:0 10px 24px rgba(15,23,42,.10);
}

#funcionarios .btn--primary{
  background:linear-gradient(135deg,#1e4a6c,#2563eb);
  color:#fff;
  border-color:transparent;
  box-shadow:0 12px 28px rgba(37,99,235,.25);
}

#funcionarios .btn--primary:hover{
  box-shadow:0 16px 32px rgba(37,99,235,.28);
}

#funcionarios .btn--ghost{
  background:#fff;
  color:#0f172a;
}

#funcionarios .filters-wrap{
  position:relative;
}

#funcionarios .filters-menu{
  position:absolute;
  right:0;
  top:calc(100% + 8px);
  width:min(460px, 92vw);
  padding:14px;
  display:none;
  z-index:20;
  background:rgba(255,255,255,.98);
  backdrop-filter:blur(12px);
  border:1px solid #e5eaf0;
  border-radius:16px;
  box-shadow:0 22px 46px rgba(15,23,42,.14);
  color:#0f172a;
}

#funcionarios .filters-menu.show{
  display:block;
}

#funcionarios .func-company-menu{
  width:260px;
}

#funcionarios .func-company-menu .menu-item{
  width:100%;
  text-align:left;
  border:none;
  background:#fff;
  color:#0f172a;
  padding:10px 12px;
  border-radius:10px;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  transition:background .15s ease;
}

#funcionarios .func-company-menu .menu-item:hover{
  background:#f5f7fb;
}

#funcionarios .filters-title{
  font-weight:800;
  color:#0f172a;
  margin-bottom:8px;
  font-size:14px;
}

#funcionarios .filters-row{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
}

#funcionarios .filters-group{
  min-width:180px;
  flex:1 1 180px;
}

#funcionarios .filters-label{
  font-size:12px;
  color:#64748b;
  margin-bottom:8px;
  font-weight:700;
}

#funcionarios .chips{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

#funcionarios .chip{
  border:1px solid #dbe3ee;
  background:#fff;
  color:#16243a;
  padding:7px 11px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  transition:
    transform .12s ease,
    box-shadow .12s ease,
    border-color .12s ease,
    background .12s ease;
}

#funcionarios .chip:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(15,23,42,.08);
  border-color:#bfd4f6;
}

#funcionarios .chip.is-active{
  background:#eaf2ff;
  color:#1d4ed8;
  border-color:#bfdbfe;
}

#funcionarios .muted{
  color:#6b7280;
  font-size:12px;
}

#funcionarios .func-toolbar-bottom{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  margin:0 0 14px;
}

#funcionarios .ctrl{
  background:#fff;
  border:1px solid #dbe3ee;
  border-radius:14px;
  padding:0 14px;
  min-height:44px;
  font-size:14px;
  color:#0f172a;
  box-shadow:0 6px 18px rgba(15,23,42,.04);
  transition:
    border-color .15s ease,
    box-shadow .15s ease,
    transform .12s ease;
}

#funcionarios .ctrl::placeholder{
  color:#94a3b8;
}

#funcionarios .ctrl:focus{
  outline:none;
  border-color:#93c5fd;
  box-shadow:
    0 0 0 4px rgba(59,130,246,.12),
    0 8px 20px rgba(15,23,42,.06);
}

#funcionarios .ctrl--search{
  min-width:320px;
  width:100%;
  max-width:560px;
}

#funcionarios .func-panel{
  background:rgba(255,255,255,.96);
  border:1px solid #e6ebf2;
  border-radius:18px;
  box-shadow:0 18px 40px rgba(15,23,42,.08);
  padding:0;
  overflow:hidden;
}

/* aqui está o limite antes do cabeçalho */
#funcionarios .table-wrap{
  border:1px solid #e6edf5;
  border-radius:22px;
  overflow:hidden;
  background:rgba(255,255,255,.88);
  box-shadow:0 18px 38px rgba(15,23,42,.06);
  backdrop-filter:blur(10px);
}

#funcionarios .func-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
}

#funcionarios .func-table thead th:nth-child(1),
#funcionarios .func-table tbody td:nth-child(1){
  width:25%;
}

#funcionarios .func-table thead th:nth-child(2),
#funcionarios .func-table tbody td:nth-child(2){
  width:16%;
}

#funcionarios .func-table thead th:nth-child(3),
#funcionarios .func-table tbody td:nth-child(3){
  width:16%;
}

#funcionarios .func-table thead th:nth-child(4),
#funcionarios .func-table tbody td:nth-child(4){
  width:13%;
}

#funcionarios .func-table thead th:nth-child(5),
#funcionarios .func-table tbody td:nth-child(5){
  width:15%;
  text-align:center;
}

#funcionarios .func-table thead th:nth-child(6),
#funcionarios .func-table tbody td:nth-child(6){
  width:15%;
  text-align:right;
}

#funcionarios .func-table thead{
  position:relative;
  z-index:5;
}

#funcionarios .func-table thead th{
  position:sticky;
  top:8px;
  z-index:8;
  background:#f8fbff;
  color:#475569;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.10em;
  font-size:11px;
  border-bottom:1px solid #e7eef7;
  padding:14px 12px;
  vertical-align:middle;
  background-clip:padding-box;
  text-align:left;
}

#funcionarios .func-table tbody{
  position:relative;
  z-index:1;
}

#funcionarios .func-table tbody td{
  padding:14px 12px;
  border-bottom:1px solid #edf2f7;
  vertical-align:middle;
  color:#1f2937;
  font-size:14px;
  background:#fff;
  text-align:left;
}

#funcionarios .func-table tbody tr{
  height:68px;
}

#funcionarios .func-table tbody tr:nth-child(even) td{
  background:#fcfdff;
}

#funcionarios .func-table tbody tr:hover td{
  background:#fbfdff;
}

#funcionarios .func-pagination{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:14px 0 6px;
  flex-wrap:wrap;
}

#funcionarios .func-page-btn{
  width:38px;
  min-width:38px;
  max-width:38px;
  height:38px;
  padding:0;
  border:1px solid rgba(37, 99, 235, 0.10);
  border-radius:12px;
  background:#fff;
  color:#1d4ed8;
  font-size:13px;
  font-weight:800;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 6px 14px rgba(15, 23, 42, 0.04);
  cursor:pointer;
  transition:transform .06s ease, box-shadow .12s ease, background .12s ease, color .12s ease;
}

#funcionarios .func-page-btn:hover{
  transform:translateY(-1px);
  background:#eff6ff;
  box-shadow:0 10px 18px rgba(37, 99, 235, 0.10);
}

#funcionarios .func-page-btn.is-active{
  background:linear-gradient(135deg, #2563eb, #3b82f6);
  color:#fff;
  border-color:transparent;
  box-shadow:0 10px 20px rgba(37, 99, 235, 0.22);
}

#funcionarios .func-page-btn.is-disabled{
  opacity:.45;
  cursor:not-allowed;
  box-shadow:none;
  transform:none;
}

#funcionarios .avatar{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:38px;
  height:38px;
  flex:0 0 38px;
  border-radius:50%;
  margin-right:0;
  background:linear-gradient(180deg,#eef4ff,#dfeafe);
  color:#1d4ed8;
  font-weight:800;
  font-size:12px;
  border:1px solid #cfe0ff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.85),
    0 8px 18px rgba(37,99,235,.08);
}

#funcionarios .avatar svg{
  width:18px;
  height:18px;
  display:block;
}

#funcionarios .avatar-tone-blue{
  background:linear-gradient(180deg,#eef4ff,#dbeafe);
  color:#1d4ed8;
  border-color:#cfe0ff;
}

#funcionarios .avatar-tone-1,
#funcionarios .avatar-tone-2,
#funcionarios .avatar-tone-3,
#funcionarios .avatar-tone-4{
  background:linear-gradient(180deg,#eef4ff,#dbeafe);
  color:#1d4ed8;
  border-color:#cfe0ff;
}

#funcionarios .colab-cell{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

#funcionarios .colab-meta{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-width:0;
}

#funcionarios .colab-name{
  font-weight:800;
  font-size:14px;
  color:#0f172a;
  line-height:1.25;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

#funcionarios .colab-sub{
  margin-top:3px;
  font-size:12px;
  color:#64748b;
  line-height:1.2;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#funcionarios table tbody td:nth-child(2),
#funcionarios table tbody td:nth-child(3){
  color:#334155;
}

#funcionarios .badge,
#funcionarios .status-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:0 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  letter-spacing:-0.01em;
  border:1px solid transparent;
}

#funcionarios .b-ok,
#funcionarios .status-badge.is-active{
  background:#ecfdf3;
  color:#0f8a5f;
  border-color:#a7f3d0;
}

#funcionarios .b-warn{
  background:#fff7ed;
  color:#9a3412;
  border-color:#fed7aa;
}

#funcionarios .b-bad{
  background:#fef2f2;
  color:#991b1b;
  border-color:#fecaca;
}

#funcionarios .b-neutral{
  background:#eff6ff;
  color:#1d4ed8;
  border-color:#dbeafe;
}

#funcionarios .b-muted{
  background:#f8fafc;
  color:#64748b;
  border-color:#e2e8f0;
}

#funcionarios .mono{
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size:13px;
  color:#475569;
}

#funcionarios .row-actions{
  text-align:right;
  white-space:nowrap;
}

#funcionarios .action-wrap{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:8px;
}

#funcionarios .icon-btn{
  appearance:none;
  width:34px;
  height:34px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  border:1px solid #dbe3ee;
  background:#fff;
  color:#2563eb;
  cursor:pointer;
  box-shadow:none;
  transition:
    transform .14s ease,
    box-shadow .16s ease,
    border-color .16s ease,
    background .16s ease,
    color .16s ease;
  font-size:14px;
  line-height:1;
}

#funcionarios .icon-btn:hover{
  transform:translateY(-1px);
  border-color:#bfdbfe;
  background:#f8fbff;
  color:#1d4ed8;
}

#funcionarios .action-wrap .icon-btn.delete{
  border-color:#fecaca;
  color:#b91c1c;
  background:#fff;
}

#gestaoGerentes .func-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}

#gestaoGerentes .func-header__titles{
  display:flex;
  flex-direction:column;
  gap:6px;
}

#gestaoGerentes .func-title{
  margin:0;
  font-size:20px;
  color:#0f172a;
  letter-spacing:-0.02em;
}

#gestaoGerentes .func-subtitle{
  color:#475569;
  font-size:13px;
}

#gestaoGerentes .func-header__actions{
  display:flex;
  gap:10px;
  align-items:center;
}

#gestaoGerentes .btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:1px solid #dbe3ee;
  background:#fff;
  border-radius:12px;
  padding:9px 12px;
  font-weight:800;
  color:#0f172a;
  cursor:pointer;
  transition:transform .15s ease, box-shadow .16s ease, background .15s ease;
}

#gestaoGerentes .btn:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 24px rgba(15,23,42,.10);
}

#gestaoGerentes .btn--primary{
  background:linear-gradient(135deg,#1e4a6c,#2563eb);
  color:#fff;
  border-color:transparent;
  box-shadow:0 12px 28px rgba(37,99,235,.25);
}

#gestaoGerentes .func-toolbar-bottom{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
}

#gestaoGerentes .ctrl{
  width:100%;
  max-width:360px;
}

#gestaoGerentes .func-panel{
  background:#fff;
  border:1px solid #e5eaf0;
  border-radius:16px;
  box-shadow:0 18px 42px rgba(15,23,42,.10);
  padding:12px;
}

#gestaoGerentes .table-wrap{
  width:100%;
  overflow:auto;
}

#gestaoGerentes .func-table{
  width:100%;
  border-collapse:collapse;
}

#gestaoGerentes .func-table th,
#gestaoGerentes .func-table td{
  padding:12px;
  text-align:left;
  border-bottom:1px solid #e5eaf0;
}

#gestaoGerentes .gg-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:4px 10px;
  border-radius:999px;
  font-weight:800;
  font-size:12px;
  border:1px solid transparent;
}

#gestaoGerentes .gg-badge--estoque{
  background:#eff6ff;
  border-color:#dbeafe;
  color:#1d4ed8;
}

#gestaoGerentes .gg-badge--func{
  background:#eef2ff;
  border-color:#e0e7ff;
  color:#4f46e5;
}

#gestaoGerentes .gg-badge--ok{
  background:#ecfdf3;
  border-color:#bbf7d0;
  color:#15803d;
}

#gestaoGerentes .gg-badge--muted{
  background:#f8fafc;
  border-color:#e2e8f0;
  color:#64748b;
}

#gestaoGerentes .gg-badge--off{
  background:#fff7ed;
  border-color:#fed7aa;
  color:#9a3412;
}

#gestaoGerentes .gg-actions{
  display:flex;
  gap:8px;
  justify-content:flex-end;
}

#gestaoGerentes .gg-action{
  height:32px;
  padding:0 10px;
  font-size:12px;
}

#cadGerenteOverlay{
  backdrop-filter: blur(3px);
}

#cadGerenteModal{
  border-radius: 18px;
}

#cadGerenteModal .cad-gerente-shell{
  background: #fff;
  border: 1px solid #e5eaf0;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15,23,42,.18);
  padding: 20px;
}

#cadGerenteModal .cad-gerente-top{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

#cadGerenteModal .cad-gerente-title{
  margin: 0;
  font-size: 22px;
  color: #0f172a;
  letter-spacing: -.02em;
}

#cadGerenteModal .cad-gerente-subtitle{
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
}

#cadGerenteModal .cad-gerente-grid{
  display: grid;
  gap: 10px;
}

#cadGerenteModal .cad-gerente-label{
  font-size: 13px;
  font-weight: 800;
  color: #334155;
}

#cadGerenteModal .cad-gerente-field{
  width: 100%;
  min-height: 42px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  color: #0f172a;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

#cadGerenteModal .cad-gerente-field:focus{
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96,165,250,.18);
}

#cadGerenteModal .cad-gerente-perms{
  display: grid;
  gap: 10px;
  margin-top: 6px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e5eaf0;
  border-radius: 14px;
}

#cadGerenteModal .ck-line{
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}

#cadGerenteModal .ck-line input[type="checkbox"]{
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
}

#cadGerenteModal .cad-gerente-actions{
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

#cadGerenteModal .cad-gerente-msg{
  min-height: 20px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 980px){
  #funcionarios .func-header{
    align-items:stretch;
  }

  #funcionarios .func-header__actions{
    width:100%;
    justify-content:flex-start;
  }

  #funcionarios .func-toolbar-bottom{
    flex-direction:column;
    align-items:stretch;
  }

  #funcionarios .ctrl--search{
    min-width:0;
    max-width:none;
  }
}

@media (max-width: 640px){
  #funcionarios .func-panel{
    border-radius:14px;
  }

  #funcionarios .func-table thead th{
    padding:12px 14px;
    font-size:10px;
    top:8px;
  }

  #funcionarios .func-table tbody td{
    padding:12px 14px;
    font-size:13px;
  }

  #funcionarios .btn{
    width:100%;
    justify-content:center;
  }
}


/* =========================================================
   NOVO EPI – TABELA FINAL (colar por último para sobrescrever)
   ========================================================= */
/* LOGIN – fundo tela inteira (body) apenas na tela de login
  - Usa :has() para aplicar a imagem quando #loginSection existe
  - Mantém fallback via #loginSection::before
  ============================================================ */

/* Garante altura real de viewport */
html, body { height: 100%; min-height: 100dvh; }

/* Quando a tela de login estiver presente, o <body> mostra a imagem em tela cheia */
/* body:has() rule removed for broader browser compatibility.
   Fallback: #loginSection::before provides the fullscreen background. */
/* body:has(#loginSection.login-section){ background: transparent !important; } */

/* Camada de imagem por trás de todo o conteúdo (apenas na tela de login) */
/* removed: body:has(...)::before */

/* Fallback antigo caso :has não esteja disponível (continua funcionando) */
#loginSection{ position: relative; z-index: 0; }
#loginSection::before{
  content: "";
  position: fixed;
  inset: 0;
  background: url('img/telainicial.png') center center / cover no-repeat;
  z-index: -1;
}





/* =======================================================
   FIX: Remover imagem dentro do bloco de login
   - Mantém somente o fundo em tela cheia aplicado no <body>
   - Garante que #loginSection não injete a imagem novamente
   ======================================================= */
/* removed: disabling of #loginSection::before */



/* ======================================================
   LOGIN – ajuste de espaçamento e título centralizado
   ====================================================== */
/* Ajustes antigos de form/button removidos — o espaçamento agora é gerido por .login-panel no bloco final */

/* Removido: centralização do pseudo-título antigo (::after) — usamos o bloco final para títulos quando necessário */
/* #loginSection.login-section::after { ... } */



/* ============================================================
   LOGIN – imagem SOMENTE quando a página de login estiver ativa
   (SPA: usa .page.active para visibilidade)
   ============================================================ */

/* Fundo neutro por padrão nas demais telas */
body{
  background:#f5f7fa !important; /* mantém padrão do app */
}

/* Desliga QUALQUER imagem que esteja no body por regras antigas */
/* removed: body::before */

/* Ativa a imagem de fundo APENAS quando #loginSection .page.active estiver visível */
/* removed: body:has(...)::before */

/* Garante que o próprio #loginSection não injete a imagem (fica transparente) */
/* removed: disabling of #loginSection::before */




/* === App default background (no image outside login) === */
body { background:#f5f7fa !important; }



/* =======================================================
   LOGIN – imagem full-screen SOMENTE no login
   ======================================================= */
#loginSection { position: relative; z-index: 0; }

/* full-bleed background attached to the login section only */
#loginSection::before{
  content:"";
  position: fixed;
  inset: 0;
  background: url('img/telainicial.png') center center / cover no-repeat;
  z-index: -1;         /* sits behind the login fields */
  pointer-events: none;
}




/* ===== Treinamentos (cards + quiz) ===== */
/* Header — estilo SaaS */
.train-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
  padding:12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(250,250,252,0.6));
  border: 1px solid rgba(226,232,240,0.6);
  border-radius:12px;
  box-shadow: 0 10px 30px rgba(15,23,42,0.04);
}
.train-header-left{ display:flex; flex-direction:column; gap:6px; }
.train-header-left h3{ margin:0; font-size:1.125rem; font-weight:800; color:#0f1724; }
.train-header-left .train-subtitle{ margin:0; color:#475569; font-size:0.95rem; }
.train-header-right{ display:flex; gap:10px; align-items:center; }
.train-search{ padding:10px 12px; border-radius:10px; border:1px solid #e6e9ef; min-width:260px; background:#fff; }

/* Grid responsivo que 'enche' a tela mesmo com poucos itens */
.train-grid{
  display:grid;
  gap:18px;
  /* auto-fit + minmax permite 2–4 cards por linha conforme largura, e 'enche' a tela */
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items:start;
  width:100%;
}

/* Card mais executivo */
.train-card{
  display:flex;
  flex-direction:column;
  background:#fff;
  border:1px solid #e7edf7;
  border-radius:14px;
  overflow:hidden;
  box-shadow: 0 12px 30px rgba(15,23,42,0.06);
  min-height: 180px;
}
.train-media{
  position: relative;
  /* altura reduzida por padrão para dar mais espaço ao conteúdo */
  height:100px;
  background:linear-gradient(180deg,#f8fafc,#ffffff);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.train-thumb{ width:100%; height:100%; object-fit:cover; display:block; }
.train-media .no-thumb{ font-weight:700; color:#64748b; font-size:14px; }
.train-body{ padding:14px; display:flex; flex-direction:column; gap:8px; flex:1; }
.train-title{ font-size:15px; font-weight:800; color:#0b1220; line-height:1.15; }
.train-meta{ font-size:13px; color:#6b7280; }
.train-actions{ display:flex; gap:8px; align-items:center; padding:12px 14px; border-top:1px solid #f1f5f9; justify-content:flex-end; }
.train-actions .btnConfig{ background:#fff; color:#0f1724; border:1px solid #e6e9ef; padding:8px 12px; border-radius:10px; }
/* btnAbrirSala: estilo único, antigo .btnIniciar removido (legado) */
.train-actions .btnAbrirSala{ background: linear-gradient(90deg,#0ea5e9,#2563eb); color:#fff; border:none; padding:8px 14px; border-radius:10px; font-weight:700; }

/* Delete button (floating) */
#treinamentos .train-card{ position: relative; }
#treinamentos .train-card .btnDelTpl{ position:absolute; top:10px; right:10px; width:32px; height:32px; padding:0; border-radius:999px; border:1px solid rgba(248,113,113,0.25); background:#fff; color:#b91c1c; display:inline-flex; align-items:center; justify-content:center; box-shadow:0 8px 18px rgba(15,23,42,0.08); }

/* Melhor comportamento de botões dentro dos cards (override do global) */
#treinamentos .train-card button:not(.btnDelTpl){ min-width:120px; }

@media (max-width:760px){
  .train-header{ flex-direction:column; align-items:stretch; }
  .train-header-right{ justify-content:space-between; }
  .train-search{ width:100%; min-width:0; }
  .train-media{ height:100px; }
}

@media (max-width:420px){
  .train-grid{ gap:12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .train-actions .btnIniciar, .train-actions .btnConfig{ padding:8px 10px; font-size:13px; }
}

/* Badges inside card */
.train-title-row{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.train-badges{ display:flex; gap:6px; align-items:center; }
.badge{ font-size:12px; padding:4px 8px; border-radius:999px; font-weight:700; display:inline-block; }
.badge-mod{ background:#eef2ff; color:#2563eb; border:1px solid #dbeafe; }
.badge-warn{ background:#fff7ed; color:#b45309; border:1px solid #fde4c7; }
.badge-atten{ background:#fffbeb; color:#92400e; border:1px solid #fef3c7; }

/* Overlay sutil na imagem para reduzir dominância da ilustração */
.train-media::after{
  content: "";
  position: absolute;
  inset: 0;
  /* overlay sutil para reduzir dominância da imagem */
  background: linear-gradient(180deg, rgba(0,0,0,0.00), rgba(0,0,0,0.08));
  pointer-events: none;
}

/* Compactar card quando for apenas 1 item na grid */
.train-grid > .train-card:only-child{ min-height:110px; }
.train-grid > .train-card:only-child .train-media{ height:70px; }

/* Chips de meta (carga/validade) */
.chip{ display:inline-flex; align-items:center; gap:6px; background:#f8fafc; color:#0f1724; border-radius:999px; padding:6px 10px; font-weight:700; font-size:13px; border:1px solid #eef2ff; }
.chip-time{ background:#eef2ff; color:#1d4ed8; border-color:#dbeafe; }
.chip-exp{ background:#fff7ed; color:#92400e; border-color:#fef3c7; }

/* Resumo / filtros acima da tabela de treinamentos concluídos */
.treina-summary{ display:inline-flex; gap:6px; align-items:center; margin:6px 0 12px 0; background:transparent; border-radius:10px; }
.summary-filter{ background:transparent; border:1px solid transparent; padding:6px 10px; border-radius:8px; cursor:pointer; font-weight:700; color:#2563eb; height:34px; display:inline-flex; align-items:center; justify-content:center; font-size:13px; transition: all .18s ease; }
.summary-filter:hover{ transform:translateY(-2px); box-shadow:0 6px 18px rgba(37,99,235,0.06); }
.summary-filter.active{ background:#2563eb; color:#fff; border-color: #2563eb; box-shadow:0 10px 30px rgba(37,99,235,0.12); }
.summary-filter{ position:relative; }
.summary-filter.active::after{ content: ""; position:absolute; left:8px; right:8px; height:3px; bottom:-6px; background:#1d4ed8; border-radius:3px; }

/* Give segmented look: small separator between buttons when not active */
.summary-filter + .summary-filter{ margin-left:4px; }

/* Table wrap visual feedback when filters change */
.table-wrap{ transition: border-color .22s ease, box-shadow .22s ease, transform .18s ease; }
.table-wrap.filter-valid{ border-color: #10b981; box-shadow: 0 12px 32px rgba(16,185,129,0.06); }
.table-wrap.filter-near{ border-color: #f59e0b; box-shadow: 0 12px 32px rgba(245,158,11,0.06); }
.table-wrap.filter-expired{ border-color: #ef4444; box-shadow: 0 12px 32px rgba(239,68,68,0.06); }
.table-wrap.filter-all{ border-color: #e6e9ef; }
.table-wrap.filter-anim{ transform: translateY(-4px); }

/* Subtle row coloring for status */
.table-epi tbody tr.status-near{ background: linear-gradient(90deg, rgba(255,247,237,0.35), rgba(255,255,255,0)); transition: background .25s ease; }
.table-epi tbody tr.status-expired{ background: linear-gradient(90deg, rgba(255,241,242,0.35), rgba(255,255,255,0)); transition: background .25s ease; }
.table-epi tbody tr.status-valid{ background: transparent; transition: background .25s ease; }

/* Status badges: visual refinements to be inline and subtle
  - use a centered interpunct '•' separator via ::before
  - show status as compact inline label (no heavy background)
  - color the text per status; for expired rows we keep the subtle red
*/
.status-badge{ display:inline-flex; align-items:center; gap:6px; margin-left:8px; padding:0; border-radius:4px; font-weight:700; font-size:13px; line-height:1; color:var(--status-fg, #059669); background:transparent; border:0; }
.status-badge::before{ content: "•"; display:inline-block; color:#9ca3af; font-size:14px; margin-right:6px; }
.status-badge.valid{ color:#059669; }
.status-badge.near{ color:#92400e; }
.status-badge.expired{ color:#b91c1c; }

/* Ajuste do botão Certificado para aparência mais 'soft' */
#treinamentos .btnCertTreina{ padding:6px 10px; border-radius:8px; font-size:13px; }

/* Espaçamento para a área de treinamentos concluídos (anteriormente inline) */
#treinamentos #treinamentosConcluidosWrap,
.treinamentos-concluidos-wrap{
  margin-top: 20px;
}

/* Estilo moderno para a tabela de treinamentos concluídos (dentro de #treinamentos) */
#treinamentos .table-wrap{
  background:#fff;
  border:1px solid #e6e9ef;
  border-radius:12px;
  padding:12px;
  box-shadow:0 10px 30px rgba(15,23,42,0.04);
}
#treinamentos .table-epi{
  width:100%;
  border-collapse: collapse;
  font-size:14px;
}
#treinamentos .table-epi thead th{
  text-align:left;
  padding:10px 12px;
  font-weight:700;
  color:#0f1724;
  border-bottom:1px solid #eef2f6;
}
#treinamentos .table-epi tbody td{
  padding:10px 12px;
  color:#374151;
  border-bottom:1px solid #f2f4f7;
}
#treinamentos .table-epi tbody tr:hover{ background:#fbfdff; }

/* Botão Certificado — destaque visual */
#treinamentos .btnCertTreina{
  background: linear-gradient(90deg,#10b981,#059669);
  color:#fff;
  border:none;
  padding:8px 12px;
  border-radius:8px;
  font-weight:700;
  cursor:pointer;
}
/* Data concluída — integrar status na própria célula (data + badge discreto)
   .mono continuará sendo usado pelo CPF (muted); .date-cell é para data+badge */
#treinamentos .table-epi tbody td.mono{
  color:#6b7280; /* CPF menos proeminente */
  font-size:13px; /* tornar o CPF mais discreto */
  font-weight:500;
}
#treinamentos .table-epi tbody td.date-cell{
  display:inline-flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
  color:#374151; /* cor principal para a data */
}

/* Ajustes específicos sugeridos para a aba Treinamentos */
/* Botão Novo Treinamento - estilo 'pill' azul (igual #btnAbrirCadastroEPI) */
#btnNovoTreina {
  width: auto;
  padding: 10px 22px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(37,99,235,0.35);
  cursor: pointer;
}
#btnNovoTreina:hover{
  transform: translateY(-1px);
  filter: brightness(1.05);
}

/* Corrige comportamento global de `button { width:100% }` apenas dentro dos cards
   e evita estilizar o botão de exclusão (.btnDelTpl) */
/* Botões principais dos cards de treinamento (Iniciar / Configurar) */
#treinamentos .train-card button:not(.btnDelTpl),
.train-grid .train-card button:not(.btnDelTpl){
  width: auto;
  min-width: 140px;
  border-radius: 999px;
  font-weight: 600;
}

/* Botões primário / secundário nos cards */
#treinamentos .train-card button:first-child,
.train-grid .train-card button:first-child{
  background: #1d4ed8;
  color: #fff;
  border: none;
}

#treinamentos .train-card button:last-child,
.train-grid .train-card button:last-child{
  background: #fff;
  color: #1f2937;
  border: 1px solid #d1d5db;
  margin-left: 8px;
}

/* Placeholder 'Sem capa' mais amigável */
.train-media{
  background: #f3f6fb;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #64748b;
  font-size: 13px;
}
/* Garante que o card sirva de referência para posicionamento absoluto do botão */
#treinamentos .train-card{
  position: relative;
}

/* Botão de exclusão do treinamento (ícone flutuando no canto) */
#treinamentos .train-card .btnDelTpl{
  position: absolute;
  top: 10px;
  right: 10px;

  width: 28px;
  height: 28px;
  padding: 0;

  border-radius: 999px;
  border: 1px solid rgba(248,113,113,0.45);
  background: #ffffff;
  color: #b91c1c;

  font-size: 16px;
  line-height: 1;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15,23,42,0.18);
  transition:
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.12s ease;
}

#treinamentos .train-card .btnDelTpl:hover{
  background: #fee2e2;
  color: #991b1b;
  box-shadow: 0 10px 22px rgba(248,113,113,0.32);
  transform: translateY(-1px);
}

#treinamentos .train-card .btnDelTpl:active{
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(15,23,42,0.20);
}
.train-media .no-thumb::before{
  content: "🧑‍🏫";
  font-size: 26px;
  margin-bottom: 4px;
}

/* Tipografia dentro do card */
.train-title{
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}
.train-meta{
  font-size: 12px;
  color:#64748b;
}

/* Espaçamento entre grid de cards e bloco de concluídos */
#trainGrid, .train-grid {
  margin-bottom: 18px;
}

#treinamentosConcluidosWrap {
  margin-top: 0;
}

/* Tabela de Concluídos: CPF em monospace, Certificado central e em verde */
#treinamentosConcluidosWrap .table-epi th:nth-child(2),
#treinamentosConcluidosWrap .table-epi td:nth-child(2){
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

#treinamentosConcluidosWrap .table-epi th:nth-child(4),
#treinamentosConcluidosWrap .table-epi td:nth-child(4){
  text-align: center;
}

#treinamentosConcluidosWrap .table-epi td:nth-child(4){
  font-weight: 600;
  color: #16a34a;
}

/* Responsividade (mobile-first tweaks) */
@media (max-width: 720px){
  .train-header{
    flex-direction: column;
    align-items: flex-start;
  }
  #btnNovoTreina{
    align-self: stretch;
    text-align: center;
  }
}

.quiz-block{
  margin-top: 10px;
  border: none;
  padding: 0;
  background: transparent;
}

.quiz-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}

.quiz-title{
  font-weight:700;
  font-size:16px;
  color:#0f172a;
}

/* Suavização do cartão da questão (visual mais plano) */
.quiz-item{
  border:1px solid #e2e8f0;
  border-radius:14px;
  padding:18px 22px 16px;
  background:#ffffff;
  margin-top:14px;
  box-shadow:0 6px 16px rgba(15,23,42,0.06);
  max-width:100%;          /* garante que nunca fique menor do que o bloco */
  box-sizing:border-box;
}

/* Deixa espaço entre as questões */
.quiz-item + .quiz-item{
  margin-top:14px;
}

/* Enunciado da pergunta (onde aparece “1) …”) */
.q-enunciado{
  font-weight:600;
  font-size:15px;
  color:#0f172a;
  margin-bottom:10px;
  line-height:1.6;
}


/* Cada alternativa em uma linha “pill” flexível */
.q-alt-row{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin-top:8px;
  padding:10px 14px;
  border-radius:16px;              /* mais arredondado */
  border:1px solid #e5e7eb;
  background:#ffffff;
  cursor:pointer;
  transition:
    background-color .15s ease,
    border-color .15s ease,
    box-shadow .15s ease,
    transform .08s ease;
}

/* Espaço entre alternativas */
.q-alt-row + .q-alt-row{
  margin-top:8px;
}

/* Hover suave */
.q-alt-row:hover{
  background:#eff6ff;
  border-color:#93c5fd;
  box-shadow:0 3px 10px rgba(148,163,184,0.30);
  transform:translateY(-1px);
}

/* Radio pequeno, sem ocupar largura toda */
.q-alt-row input[type="radio"]{
  flex:0 0 auto;
  margin:3px 0 0 0;
  width:auto;          /* IMPORTANTÍSSIMO: nada de 100% aqui */
}

/* Texto da alternativa ocupa o resto da linha e quebra certinho */
.q-alt-row span{
  flex:1;
  font-size:14px;
  color:#111827;
  line-height:1.5;
  text-align:left;
  white-space:normal !important;
  word-break:break-word;
  overflow-wrap:anywhere;
}

/* Quando marcada, destaca o texto */
.q-alt-row input[type="radio"]:checked + span{
  font-weight:600;
  color:#1d4ed8;
}

/* Esconde quaisquer linhas antigas dentro da alternativa */
.quiz-item .linha{
  display:none;
}

/* Quando a alternativa estiver marcada, dá destaque no texto */
.q-alt-row input[type="radio"]:checked + span{
  font-weight:600;
  color:#1d4ed8;
}

/* Caso use input de texto na parte administrativa do quiz */
.q-alt-row input[type="text"]{
  flex:1;
}

/* Rodapé do formulário (Cancelar / Enviar) */
.q-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:12px;
}

/* Labels dentro da avaliação – ficam em linha, não em bloco */
.quiz-item label{
  display:inline;
  margin:0;
  font-weight:400;
  color:#0f172a;
}

/* Specific override for Sala de Treinamento to avoid stacking conflicts
   with other global modal rules elsewhere in the stylesheet. This forces
   the overlay/modal for the training flow to appear above other overlays. */
#salaTreinaOverlay.modal-overlay {
  z-index: 10000 !important;
}
#salaTreinaOverlay.modal-overlay.is-open {
  display: block !important;
  z-index: 10000 !important;
  pointer-events: auto !important;
}
#salaTreinamentoBox.sala-treina-modal {
  z-index: 10010 !important;
  pointer-events: auto !important;
}
#salaTreinamentoBox.sala-treina-modal.is-open {
  display: block !important;
  z-index: 10010 !important;
}

.muted{ color:#64748b; font-size:12px; }
.empty,.skeleton{ padding:16px; color:#475569; background:#fff; border:1px solid #e3e7ef; border-radius:10px; }

/* ===== Treinamentos – tabela de concluídos ===== */
#treinamentosConcluidosWrap h4{
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}

#treinamentosConcluidosWrap .table-wrap{
  margin-top: 4px;
}

#treinamentosConcluidosWrap .table-epi{
  font-size: 13px;
}

/* opcional: deixa as colunas mais compactas */
#treinamentosConcluidosWrap .table-epi th,
#treinamentosConcluidosWrap .table-epi td{
  padding: 8px 6px;
}


/* ===== Novo EPI: alinhamento estável do header com colunas ===== */
#listaEPIs .table-wrap{
  scrollbar-gutter: stable both-edges;
}

#listaEPIs .table-epi{
  table-layout: fixed; /* faz cada coluna obedecer ao <colgroup> */
}

/* Coluna de AÇÕES mais enxuta */
#listaEPIs .table-epi th.col-actions,
#listaEPIs .table-epi thead th.col-actions,
#listaEPIs .table-epi tbody td.col-actions {
  min-width: 0;        /* deixa o width: 10% mandar */
  text-align: right;
  padding-right: 12px;
}

#listaEPIs .table-epi td.col-ca{
  white-space: nowrap;
}

/* bloco antigo de corte da descrição removido (versão legível mais abaixo) */
/*#listaEPIs .table-epi td.cell-desc{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}*/

/* ===================== LISTA EPIs — alinhamento perfeito (7 colunas) ===================== */
/* Knobs globais: movem tudo para os lados (X) e para cima/baixo (Y) */
#listaEPIs{
  --gutter-x: 16px;   /* direita/esquerda (padrão) */
  --gutter-y: 10px;   /* cima/baixo (padrão)        */
}

/* Evita "pulo" de cabeçalho com barra de rolagem */
#listaEPIs .table-wrap{ scrollbar-gutter: stable both-edges; }

/* Garante mesma largura entre thead/tbody (usa colgroup do HTML) */
#listaEPIs .table-epi{ table-layout: fixed; }

/* Aplica gutters base */
#listaEPIs .table-epi thead th{ padding: var(--gutter-y) var(--gutter-x); vertical-align: middle; }
#listaEPIs .table-epi tbody td{ padding: var(--gutter-y) var(--gutter-x); vertical-align: top; line-height: 1.35; }

/* ===== Alinhamento por coluna ===== */
/* 1) NOME */
#listaEPIs .table-epi thead th:nth-child(1),
#listaEPIs .table-epi tbody td:nth-child(1){
  text-align: left;
  padding-left: calc(var(--gutter-x) + 8px); /* respiro extra para ficar como referência */
}

/* 2) CA */
#listaEPIs .table-epi thead th:nth-child(2),
#listaEPIs .table-epi tbody td:nth-child(2){
  text-align: left;
  white-space: nowrap;
}

/* 3) STATUS CA */
#listaEPIs .table-epi thead th:nth-child(3),
#listaEPIs .table-epi tbody td:nth-child(3){
  text-align: center;
}

/* 4) VALIDADE DO CA */
#listaEPIs .table-epi thead th:nth-child(4),
#listaEPIs .table-epi tbody td:nth-child(4){
  text-align: right;
}

/* 5) VIDA ÚTIL (meses) */
#listaEPIs .table-epi thead th:nth-child(5),
#listaEPIs .table-epi tbody td:nth-child(5){
  text-align: right;
}

/* 6) DESCRIÇÃO */
#listaEPIs .table-epi thead th:nth-child(6),
#listaEPIs .table-epi tbody td:nth-child(6){
  text-align: left;
}
/* versão antiga de .table-epi td.cell-desc comentada (mantida para referência)
#listaEPIs .table-epi td.cell-desc{
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
*/

/* 7) AÇÕES */
#listaEPIs .table-epi thead th:nth-child(7),
#listaEPIs .table-epi tbody td:nth-child(7){
  text-align: right;
  padding-right: calc(var(--gutter-x) + 6px);
}





/* Novo EPI — Validade do CA (col 4), Vida útil (col 5), Ações (col 7) */
#listaEPIs .table-epi thead th:nth-child(4),
#listaEPIs .table-epi tbody td:nth-child(4){
  text-align: left;
}
#listaEPIs .table-epi thead th:nth-child(5),
#listaEPIs .table-epi tbody td:nth-child(5){
  text-align: center;
}
#listaEPIs .table-epi thead th:nth-child(7),
#listaEPIs .table-epi tbody td:nth-child(7){
  text-align: right;
  padding-right: 8px;
}

/* Bloco antigo de larguras (mantido aqui comentado).
   Mantemos apenas o bloco de larguras único mais abaixo
   (comentado para referência/rollback). */
/*
/* Novo EPI — larguras das colunas (mais espaço para Descrição) */
#listaEPIs .table-epi thead th:nth-child(1),
#listaEPIs .table-epi tbody td:nth-child(1){  /* Nome */
  width: 20%;
}

#listaEPIs .table-epi thead th:nth-child(2),
#listaEPIs .table-epi tbody td:nth-child(2){  /* CA */
  width: 10%;
}

#listaEPIs .table-epi thead th:nth-child(3),
#listaEPIs .table-epi tbody td:nth-child(3){  /* Status CA */
  width: 12%;
}

#listaEPIs .table-epi thead th:nth-child(4),
#listaEPIs .table-epi tbody td:nth-child(4){  /* Validade CA */
  width: 13%;
}

#listaEPIs .table-epi thead th:nth-child(5),
#listaEPIs .table-epi tbody td:nth-child(5){  /* Vida útil */
  width: 10%;
}

#listaEPIs .table-epi thead th:nth-child(6),
#listaEPIs .table-epi tbody td:nth-child(6){  /* Descrição */
  width: 25%;                /* AQUI ganha mais espaço */
}

#listaEPIs .table-epi thead th:nth-child(7),
#listaEPIs .table-epi tbody td:nth-child(7){  /* Ações */
  width: 10%;
}
*/
























/* =============================================================================
   PADRÃO DE TABELAS — Estoque / Histórico / Pré-pedido


/* ---------- Paleta e tokens ---------- */
:root{
  --tbl-bg: #ffffff;
  --tbl-text: #0f172a;
  --tbl-muted:#6b7280;

  --tbl-line:#e5e7eb;
  --tbl-line-strong:#d1d5db;

  --tbl-head-bg:#f4f6fb;        /* cabeçalho padrão claro */
  --tbl-head-fg:#0f172a;

  --tbl-row-alt:#fafafa;        /* zebra */
  --tbl-row-hover:#f1f5f9;      /* hover */

  --focus:#2563eb;

  --card-radius:10px;
  --card-shadow:0 8px 18px rgba(2,6,23,.06);
}

@media (prefers-color-scheme: dark){
  :root{
    --tbl-bg:#0b1220;
    --tbl-text:#e5e7eb;
    --tbl-muted:#9ca3af;

    --tbl-line:#1f2937;
    --tbl-line-strong:#2b3443;

    --tbl-head-bg:#0f172a;
    --tbl-head-fg:#e5e7eb;

    --tbl-row-alt:#0d1526;
    --tbl-row-hover:#111827;

    --card-shadow:0 8px 20px rgba(0,0,0,.35);
  }
}

/* ---------- Casca/contêiner ---------- */
.table-wrap{
  overflow:auto;                 /* rolagem horizontal quando necessário */
  background: var(--tbl-bg);
  border: 1px solid var(--tbl-line);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 8px;
  /* dica visual de overflow horizontal */
  mask-image: linear-gradient(to right, transparent 0, black 18px, black calc(100% - 18px), transparent 100%);
}
.table-card{ overflow: hidden; border-radius: var(--card-radius); }

/* ---------- Base de tabelas ---------- */
.table-epi{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;           /* evita “dança” de colunas */
  color: var(--tbl-text);
  background: var(--tbl-bg);
  border-radius: calc(var(--card-radius) - 2px);
}

.table-epi th,
.table-epi td{
  border: 1px solid var(--tbl-line);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  font-size: 14px;
  line-height: 1.35;
  padding: 10px 8px;
  vertical-align: top;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Cabeçalho padrão (sticky) */
.table-epi thead th{
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--tbl-head-bg);
  color: var(--tbl-head-fg);
  border-bottom: 1px solid var(--tbl-line-strong);
  font-weight: 700;
  text-align: center;
  vertical-align: middle;
}

/* Zebra + hover */
.table-epi tbody tr:nth-child(odd) td{ background: var(--tbl-row-alt); }
.table-epi tbody tr:hover td{ background: var(--tbl-row-hover); transition: background .15s ease; }

/* Tipografia numérica tabular (use .mono onde quiser números “firmes”) */
.table-epi .mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-variant-numeric: tabular-nums;
}

/* Ordenação (th clicável) */
.th-sort{ cursor:pointer; user-select:none; white-space:nowrap; }
.th-sort .arrow{ margin-left:6px; opacity:.7; }
.th-sort.is-active .arrow{ opacity:1; }

/* Densidade reduzida (opcional) */
.table-epi.is-condensed thead th,
.table-epi.is-condensed tbody td{ padding: 6px 6px; font-size: 12.5px; }

/* Tooltip simples quando usar title em TD */
.table-epi td[title]{ cursor:help; text-decoration: underline dotted rgba(0,0,0,.15); }

/* Campos em tabela: foco consistente */
.table-epi input[type="number"],
.table-epi input[type="text"]{
  width: 100%; box-sizing: border-box; height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--tbl-line);
  border-radius: 6px;
  background: var(--tbl-bg);
  color: var(--tbl-text);
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease, background-color .15s ease;
}
.table-epi input[type="number"]:hover,
.table-epi input[type="text"]:hover{
  background: color-mix(in srgb, var(--tbl-row-hover) 35%, transparent);
}
.table-epi input[type="number"]:focus,
.table-epi input[type="text"]:focus{
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 30%, transparent);
}

/* =============================================================================
   ESPECÍFICOS — mantêm o comportamento atual de cada tela
==============================================================================*/

/* =========================================================
   NOVO EPI – TABELA FINAL (colar por último para sobrescrever)
   ========================================================= */

/* Header com título + botão, alinhados lado a lado */
#novoEPI .novoepi-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap; /* para não quebrar em telas menores */
}

/* Bloco do título */
#novoEPI .novoepi-title h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a; /* bem escuro, igual Home */
}

#novoEPI .novoepi-subtitle {
  margin: 6px 0 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: #64748b; /* cinza suave */
}

/* Botão de cadastrar, com cara de SaaS moderno */
#novoEPI .novoepi-btn {
  border: none;
  cursor: pointer;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;

  /* NOVO – impede o width:100% global */
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: linear-gradient(135deg, #1d4ed8, #2563eb); /* azul BRAZSAFE */
  color: #fff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    filter 0.12s ease;
}

#novoEPI .novoepi-btn:hover {
  filter: brightness(1.02);
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.22);
}

#novoEPI .novoepi-btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.35);
}

/* Card branco que envolve a parte da busca, filtros e tabela */
#listaEPIs {
  margin-top: 4px;
  padding: 12px 14px 16px;
  background: #ffffff;
}

/* ===== CORREÇÃO DO CURSOR DE DIGITAÇÃO NO MENU LATERAL ===== */
.sidebar .sidebar-item,
.sidebar .sidebar-item .nav-txt,
.sidebar .sidebar-item .nav-ico{
  -webkit-user-select: none;
  user-select: none;
  caret-color: transparent;
}

.sidebar .sidebar-item:focus,
.sidebar .sidebar-item:focus-visible,
.sidebar .sidebar-item .nav-txt:focus,
.sidebar .sidebar-item .nav-txt:focus-visible,
.sidebar .sidebar-item .nav-ico:focus,
.sidebar .sidebar-item .nav-ico:focus-visible{
  outline: none;
}

.sidebar .sidebar-item,
.sidebar .sidebar-item *{
  -webkit-tap-highlight-color: transparent;
}

/* =============== Estilo genérico para modais =============== */

.modal-overlay {
  position: fixed;
  inset: 0; /* top/right/bottom/left: 0 */
  background: rgba(15, 23, 42, 0.45); /* fundo escuro translúcido */
  z-index: 9000;
  display: none; /* escondido por padrão; mostrado via JS */
}

.modal {
  display: none; /* escondido por padrão; mostrado via JS */
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 901;

  width: min(520px, 92vw);
  max-height: 88vh;
  overflow: auto;

  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35);
  padding: 16px 18px;
}

/* Modal específico da AVALIAÇÃO – mais largo e alto */
.modal.modal-quiz{
  width: min(900px, 96vw);   /* bem mais largo */
  max-height: 90vh;          /* ocupa quase a altura da tela */
  overflow-y: auto;          /* rolagem se tiver muitas questões */
}

/* Formulário da avaliação (prova de treinamento) */
#qForm{
  margin-top: 8px;
  display: block;
}

/* Títulos internos dos modais */
.modal h4,
.modal h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
}

/* =========================
   NOVO EPI — MODAL PREMIUM
   ========================= */

#epiOverlay,
.modal-overlay-epi{
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: none;
  z-index: 980 !important;
  pointer-events: auto;
}

#epiModal{
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;

  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid #e6edf5;
  border-radius: 24px;
  padding: 26px 26px 22px;
  box-shadow:
    0 30px 70px rgba(15, 23, 42, 0.20),
    0 10px 24px rgba(15, 23, 42, 0.08);

  display: none;
  z-index: 990 !important;
  outline: none;
}

#epiModal,
#epiModal *{
  pointer-events: auto;
}

#epiModal h4{
  margin: 0 0 18px;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

#formNovoEPI{
  display: grid;
  gap: 12px;
}

#formNovoEPI label{
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

#epiModal input[type="text"],
#epiModal input[type="number"],
#epiModal input[type="date"],
#epiModal select,
#epiModal textarea{
  width: 100%;
  box-sizing: border-box;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid #dbe4ef;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  color: #0f172a;
  font-size: 14px;
  outline: none;
  transition:
    border-color .16s ease,
    box-shadow .16s ease,
    background .16s ease;
}

#epiModal textarea{
  min-height: 92px;
  padding: 12px 14px;
  resize: vertical;
}

#epiModal input[type="text"]:focus,
#epiModal input[type="number"]:focus,
#epiModal input[type="date"]:focus,
#epiModal select:focus,
#epiModal textarea:focus{
  border-color: #93c5fd;
  background: #ffffff;
  box-shadow:
    0 0 0 4px rgba(59,130,246,.10),
    0 12px 24px rgba(15,23,42,.06);
}

#epiGrupoMeses,
#epiGrupoLote{
  padding: 14px;
  border: 1px solid #e7eef7;
  border-radius: 16px;
  background: rgba(248, 251, 255, 0.75);
}

#epiGrupoLote{
  display: grid;
  gap: 12px;
}

.epi-modal-actions{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
  padding-top: 6px;
}

#epiModal #btnCancelarEPI,
#epiModal #btnSalvarEPI{
  width: auto;
  min-width: 120px;
  height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition:
    transform .16s ease,
    box-shadow .16s ease,
    background .16s ease,
    border-color .16s ease,
    filter .16s ease;
}

#epiModal #btnCancelarEPI{
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  color: #0f172a;
  border: 1px solid #dbe4ef;
  box-shadow: 0 8px 18px rgba(15,23,42,.04);
}

#epiModal #btnSalvarEPI{
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #ffffff;
  border: 1px solid rgba(37,99,235,.10);
  box-shadow:
    0 14px 28px rgba(37,99,235,.18),
    inset 0 1px 0 rgba(255,255,255,.18);
}

#epiModal #btnCancelarEPI:hover,
#epiModal #btnSalvarEPI:hover{
  transform: translateY(-1px);
}

#epiModal #btnCancelarEPI:hover{
  border-color: #cbd5e1;
  box-shadow: 0 12px 22px rgba(15,23,42,.06);
}

#epiModal #btnSalvarEPI:hover{
  box-shadow:
    0 18px 32px rgba(37,99,235,.22),
    inset 0 1px 0 rgba(255,255,255,.18);
  filter: brightness(1.02);
}

#epiModal #btnCancelarEPI:active,
#epiModal #btnSalvarEPI:active{
  transform: translateY(0);
}

/* Barra de busca e filtros do Novo EPI (dentro do card) */
#listaEPIs .epi-toolbar,
#listaEPIs .filters-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

/* Novo EPI – alinhamento da barra de busca + botão Filtros */
#listaEPIs .panel__head .controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

#listaEPIs .filters-wrap {
  flex: 0 0 auto;       /* não deixa o botão ocupar a linha inteira */
}

/* Campo de busca principal (por nome ou CA) */
#listaEPIs input[type="search"],
#listaEPIs input[type="text"].epi-search {
  max-width: 360px;
  width: 100%;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  padding: 8px 14px;
  font-size: 14px;
  background: #f9fafb;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

#listaEPIs input[type="search"]:focus,
#listaEPIs input[type="text"].epi-search:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.20);
}

/* Novo EPI – botão "Filtros" mais compacto e moderno */
#listaEPIs #epiFiltersBtn {
  padding: 4px 12px;              /* altura e largura menores */
  font-size: 12px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #dbeafe;      /* azul bem suave */
  color: #1d4ed8;                 /* azul do sistema */
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;            /* não quebra a palavra */
}

/* Ícone minimalista dentro do botão (setinha de dropdown) */
#listaEPIs #epiFiltersBtn::before {
  content: "⏷";                   /* pode trocar por "☰" se preferir */
  font-size: 11px;
  transform: translateY(1px);
}

/* Quando houver filtros/densidade ativa (classe btn--ghost já vem do JS) */
#listaEPIs #epiFiltersBtn.btn--ghost {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border-color: #1d4ed8;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.35);
}

/* Se necessário: #listaEPIs .ctrl--search { ... } */

#histEstModal .table-epi{ min-width: 1031px; }

/* 1) Data/Hora */
#histEstModal .table-epi th:nth-child(1),
#histEstModal .table-epi td:nth-child(1){ width:183px; }

/* 2) Item (ellipsis) */
#histEstModal .table-epi th:nth-child(2),
#histEstModal .table-epi td:nth-child(2){
  width:185px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 3) CA (numérico em ch) */
#histEstModal .table-epi th:nth-child(3),
#histEstModal .table-epi td:nth-child(3){ width:12ch; }

/* 4) De */
#histEstModal .table-epi th:nth-child(4),
#histEstModal .table-epi td:nth-child(4){ width:8ch; }

/* 5) Para */
#histEstModal .table-epi th:nth-child(5),
#histEstModal .table-epi td:nth-child(5){ width:8ch; }

/* 6) Ação */
#histEstModal .table-epi th:nth-child(6),
#histEstModal .table-epi td:nth-child(6){
  width:10ch; text-transform: capitalize; color: var(--tbl-muted);
}

/* 7) Responsável (ellipsis) */
#histEstModal .table-epi th:nth-child(7),
#histEstModal .table-epi td:nth-child(7){
  width:176px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 8) Motivo — pode quebrar em várias linhas */
#histEstModal .table-epi th:nth-child(8),
#histEstModal .table-epi td:nth-child(8){
  width:168px; white-space: normal; overflow-wrap: anywhere; word-break: break-word;
}

/* Colunas 3/4/5 numéricas alinhadas à direita + monoespaçadas */
#histEstModal .table-epi td:nth-child(3),
#histEstModal .table-epi td:nth-child(4),
#histEstModal .table-epi td:nth-child(5){
  text-align: right;
}
#histEstModal .table-epi td:nth-child(3),
#histEstModal .table-epi td:nth-child(4),
#histEstModal .table-epi td:nth-child(5){ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }

/* PRÉ-PEDIDO: bloco antigo removido — usar apenas o bloco moderno (sticky header, zebra, alinhamento numérico) */
/* (Removido para evitar duplicidade/confusão — mantenha apenas um bloco final para #tablePrePedido) */














/* ===== Cadastrar Empresa===== */
.table-empresas {
  border: 1px solid #e6e9ef;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  width: 100%;
  border-collapse: collapse;
}

.table-empresas thead tr {
  background: #f8fafc;
}

.table-empresas th, .table-empresas td {
  padding: 10px 12px;
}

.empresa-row:hover {
  background: #f9fbff;
}

.empresa-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Nome ocupa o espaço principal */
.empresa-nome {
  font-weight: 600;
  color: #0f172a;
  flex: 1;
  min-width: 160px;
}

/* Doc fiscal (CNPJ/CPF) com carinha de "tag" */
.empresa-doc {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  background: #eef2f7;
  color: #334155;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

/* Ações (engrenagem + X) alinhadas à direita */
.empresa-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ===== Toolbar no topo ===== */
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 6px 0 8px;
}

/* ===== Botões ===== */
.btn {
  background: #fff;
  color: #111827;
  border: 1px solid #e5e7eb;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform .06s ease, background .2s ease, border-color .2s ease;
}

.btn:hover {
  background: #f3f4f6;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue-800), var(--blue-600));
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(15,23,42,0.35);
  border-color: rgba(59,130,246,0.08);
}

.btn-primary:hover {
  filter: brightness(1.02);
}

.btn-success {
  background: #10b981;
  color: #fff;
  border-color: #10b981;
}

.btn-success:hover {
  background: #059669;
  border-color: #059669;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

.btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
}

/* Botões de ícone (⚙️/✖️) */
.icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 16px;
  line-height: 1;
}

/* ===== Toolbar Estoque (minimalista) ===== */
.stk-toolbar{
  display:flex; align-items:center; gap:8px;
  padding:8px 0; border-bottom:1px solid #ffffff; margin-bottom:10px;
}
.stk-toolbar .spacer{ flex:1; }
.stk-actions{ display:flex; align-items:center; gap:10px; }
.icon-btn{
  display:inline-flex; align-items:center; justify-content:center;
  width:36px; height:36px; border-radius:10px; border:1px solid #e5eaf0;
  background:#080738; cursor:pointer;
}
.icon-btn .ico{ font-size:16px; line-height:1; }
.icon-btn:hover{ box-shadow:0 2px 8px rgba(0,0,0,0.06); }

/* Menu dropdown da engrenagem (estoque) */
.menu-wrap{ position: relative; display: inline-block; }
.menu{ position: absolute; top: calc(100% + 10px); right: 0; background: #ffffff; border: 1px solid #e6e9ef; border-radius: 12px; box-shadow: 0 12px 30px rgba(11,34,58,0.12); min-width: 220px; padding: 8px; display: flex; flex-direction: column; gap: 6px; z-index: 1200; }
.menu[aria-hidden="true"]{ display: none; }
.menu-item{ background: transparent; border: none; padding: 10px 12px; text-align: left; border-radius: 8px; cursor: pointer; font-weight: 600; color: #0f4466; display: flex; align-items: center; gap: 10px; }
.menu-item .menu-ico{ width:18px; height:18px; display:inline-block; }
.menu-item:hover{ background: #f4f7fb; }
.menu-sep{ height:1px; background: #eef3f8; border-radius:1px; margin:6px 0; }
.menu-item.danger{ color: #c0392b; }

/* Pequeno ajuste para ícones SVG dentro de botões do estoque */
#estoque .icon-btn-blue svg{ width:18px; height:18px; display:block; }

/* Gráfico compacto */
#estoqueGrafico canvas{ max-height:260px; }
/* Barra de busca da aba Estoque */
#estoque .estoque-busca-wrap{
  position: relative;
  flex: 1;
  max-width: 320px;
}

#estoque .estoque-busca-wrap::before{
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cline x1='15.5' y1='15.5' x2='20' y2='20'/%3E%3C/svg%3E");
  opacity: 0.7;
  pointer-events: none;
}

/* Input da busca: menor e clean */
#estoque #buscaEstoque{
  width: 100%;
  padding: 8px 10px 8px 28px; /* espaço pra lupa */
  border-radius: 8px;
  border: 1px solid var(--bdr);
  font-size: 13px;
  background: #fff;
}

/* Icon buttons – tema azul minimalista dentro da aba Estoque */
#estoque .icon-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  border-radius:10px;
  border:1px solid var(--blue-300);
  background:#ffffff;
  color:var(--blue);
  cursor:pointer;
}

#estoque .icon-btn .ico{
  font-size:16px;
  line-height:1;
}

#estoque .icon-btn:hover{
  box-shadow:0 2px 8px rgba(0,0,0,0.06);
  background:var(--blue-100);
}

/* Botões padrão já existem (.btn, .btn-primary).
   Vamos criar um secundário branco para o topo dos Treinamentos */
.btn-secondary{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 9px 22px;
  border-radius:999px;
  border:1px solid var(--blue-300);
  background:#ffffff;
  color:var(--blue);
  font-weight:500;
  font-size:14px;
  cursor:pointer;
  box-shadow:0 4px 12px rgba(15,23,42,0.06);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.btn-secondary:hover{
  background:#eff6ff;
  box-shadow:0 6px 18px rgba(37,99,235,0.18);
  transform: translateY(-1px);
}

/* Deixar espaço entre os dois botões da direita */
.train-header-right{
  display:flex;
  align-items:center;
  gap:12px;
}

/* -------- Modal da Sala de Treinamento -------- */

/* Overlay escuro por trás do modal */
.modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,0.35);
  backdrop-filter: blur(4px);
  z-index: 980;
  display:none;
}

/* Card do modal */
.sala-treina-modal{
  position:fixed;
  top:50%;
  left:50%;
  transform: translate(-50%, -50%);
  max-width:520px;
  width:100%;
  background:#ffffff;
  border-radius:18px;
  padding:22px 24px 20px;
  box-shadow:0 22px 55px rgba(15,23,42,0.25);
  border:1px solid #e6e9ef;
  z-index: 9010;
  display:none;
}

/* Título e texto do modal */
.sala-treina-modal h4{
  margin:0 0 8px;
  font-size:18px;
  font-weight:600;
}

.sala-treina-modal p{
  margin:0 0 14px;
  font-size:13px;
  color:#4b5563;
}

/* Labels e selects internos */
.sala-treina-modal label{
  display:block;
  font-size:13px;
  font-weight:500;
  margin-bottom:4px;
  color:#374151;
}

.sala-treina-modal select{
  width:100%;
  padding:8px 10px;
  border-radius:8px;
  border:1px solid #d1d5db;
  font-size:13px;
  margin-bottom:12px;
}

/* Skeleton loading inside the sala modal */
.sala-treina-skeleton{ display:none; margin-bottom:12px; }
.sala-treina-skeleton[aria-hidden="false"]{ display:block; }
.sala-treina-skeleton .sk-row{ height:12px; background: linear-gradient(90deg,#f3f4f6,#eef2f7); border-radius:6px; margin:8px 0; }
.sala-treina-skeleton .sk-row.sk-short{ width:40%; height:14px; }
.sala-treina-skeleton .sk-row.sk-long{ width:90%; height:14px; }

/* Área do botão criar + link gerado */
.salaTreina-actions{
  display:flex;
  align-items:center;
  gap:12px;
  margin-top:6px;
}

.salaTreina-actions .btn{
  white-space:nowrap;
}

.sala-link{
  flex:1;
  font-size:12px;
  color:#111827;
  word-break:break-all;
}

/* Botão de fechar (X) no canto */
.modal-close{
  position:absolute;
  top:8px;
  right:8px;
  width:40px;
  height:40px;
  border-radius:10px;
  border:none;
  background:transparent;
  color:#6b7280;
  cursor:pointer;
  font-size:18px;
  line-height:1;
  display:inline-flex; align-items:center; justify-content:center;
}

.modal-close:hover{
  background:#f3f4f6;
  color:#111827;
}

/* Sala modal premium styles */
.sala-header{ padding-bottom:10px; }
.sala-title-row{ display:flex; gap:12px; align-items:center; }
.sala-icon{ width:20px; height:20px; display:inline-flex; align-items:center; justify-content:center; color:#2563eb; }
.sala-icon svg{ width:20px; height:20px; display:block; }
.sala-icon svg path{ stroke: currentColor; }
.sala-title{ margin:0; font-size:18px; font-weight:700; }
.sala-sub{ font-size:13px; color:#6b7280; margin-top:4px; }
.sala-divider{ height:1px; background: linear-gradient(90deg, rgba(15,23,42,0.04), rgba(15,23,42,0.03)); margin-top:12px; margin-bottom:12px; border-radius:1px; }
.sala-body{ padding-bottom:12px; }
.sala-label{ display:block; font-size:12px; color:#6b7280; margin-bottom:6px; font-weight:600; }
.sala-treina-modal{ padding:20px 22px 18px; border-radius:16px; }
.sala-treina-modal select{ transition: box-shadow .12s ease, border-color .12s ease; }
.sala-treina-modal select:focus{ outline:none; box-shadow:0 6px 22px rgba(37,99,235,0.08); border-color:#2563eb; }

.sala-footer{ display:flex; justify-content:space-between; align-items:center; gap:16px; margin-top:10px; }
.sala-actions-left{ display:flex; gap:8px; }
.sala-actions-right{ display:flex; gap:12px; align-items:center; }
.sala-actions-right .btn-tertiary{ font-size:13px; padding:7px 10px; color:#6b7280; opacity:0.95; }
.btn-tertiary{ background:transparent; border:1px solid transparent; color:#374151; padding:8px 12px; border-radius:10px; }
.btn-primary{ background: linear-gradient(90deg,#1d4ed8,#2563eb); color:#fff; border:none; padding:8px 16px; border-radius:10px; font-weight:700; }
.btn-primary[disabled]{ opacity:.6; cursor:default; }

.btn-secondary{ background:#fff; border:1px solid #e6e9ef; color:#0b1220; padding:8px 12px; border-radius:10px; }
.btn-tertiary{ background:transparent; border:1px solid transparent; color:#374151; padding:8px 12px; border-radius:10px; }

.link-input{ width:100%; border:none; background:transparent; font-size:13px; color:#0b5ed7; }
.link-input:focus{ outline:none; }

/* Overlay enhancements */
.modal-overlay.is-open{ backdrop-filter: blur(3px); background: rgba(8,10,20,0.6); }

/* Modal entrance animation */
.sala-treina-modal.is-open{ animation: modalEnter .18s cubic-bezier(.2,.9,.2,1); }
@keyframes modalEnter{ from{ opacity:0; transform: translate(-50%,-48%) scale(.98); } 50% { opacity:0.6; transform: translate(-50%,-49%) scale(.992);} to{ opacity:1; transform: translate(-50%,-50%) scale(1); } }

/* Link box for success modal */
.link-box.sala-link{ padding:12px 14px; border-radius:12px; border:1px solid #e6eefb; background:#fbfdff; word-break:break-all; margin:10px 0; }
.link-box.sala-link a{ color:#0b5ed7; text-decoration:none; }

/* Skeleton rows */
.sala-treina-skeleton{ display:none; margin-bottom:12px; }
.sala-treina-skeleton[aria-hidden="false"]{ display:block; }
.sala-treina-skeleton .sk-row{ height:12px; background: linear-gradient(90deg,#f3f4f6,#eef2f7); border-radius:6px; margin:8px 0; }
.sala-treina-skeleton .sk-row.sk-short{ width:40%; height:14px; }
.sala-treina-skeleton .sk-row.sk-long{ width:90%; height:14px; }

/* Estado "aberto" do modal/overlay */
.modal-overlay.is-open{
  display:block;
}
.modal.is-open{
  display: block;
}

.sala-treina-modal.is-open{
  display:block;
}

/* Regras antigas de `.login-card` removidas — usamos `.login-panel` no bloco final */


/* legacy login overrides removed — final login styles are scoped at the end of this file */

/* ===== Treinamentos (cards + quiz) ===== */
/* LOGIN FINAL — versão corrigida e centralizada
   ============================================ */

#loginSection {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center; /* CENTRALIZA NO MEIO */
  overflow: hidden;
}



/* ======================================================
   LOGIN — Bloco final (atualizado Parte 3)
   - Container + fundo (gradiente + imagem)
   - Grid 2 colunas (.login-layout) com .login-left e .login-right
   - Card oficial: .login-panel
   - Tipografia e responsividade
   ====================================================== */

#loginSection {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
  border: 0;
}

#loginSection::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(15,23,42,0.90) 0%, rgba(15,23,42,0.75) 42%, rgba(15,23,42,0.35) 70%, rgba(15,23,42,0.05) 100%),
    url('img/telainicial.png') center center / cover no-repeat;
  z-index: -1;
  pointer-events: none;
}

#loginSection .login-layout {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: clamp(32px, 7vw, 80px);
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 40px) clamp(20px, 4vw, 56px);
  align-items: center;
}

#loginSection .login-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
  color: #e5e7eb;
}

#loginSection .login-right {
  color: #e5e7eb;
}

#loginSection .login-panel {
  background: rgba(0, 0, 0, 0.45); /* escurecido levemente para destacar o card */
  backdrop-filter: blur(18px);     /* blur aumentado para efeito mais elegante */
  -webkit-backdrop-filter: blur(18px);
  border-radius: 20px;
  padding: 30px 32px; /* aumentado 24 -> 32 nas laterais */
  max-width: 420px;   /* garante que nada extrapola */
  box-shadow: 0 22px 50px rgba(15,23,42,0.85);
  width: min(400px, 100%);
}

#loginSection .login-panel form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#loginSection .login-panel label {
  display: block;
  margin: 6px 0 4px;
  font-size: 13px;
  color: rgba(255,255,255,0.95);
  font-weight: 600;
}

#loginSection .login-panel input[type="text"],
#loginSection .login-panel input[type="email"],
#loginSection .login-panel input[type="password"] {
  width: calc(100% - 4px); /* evita encostar nas bordas do card */
  padding: 10px 14px;
  box-sizing: border-box;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.96);
  color: #0f172a;
  font-size: 14px;
}

#loginSection .login-panel input:focus {
  outline: none;
  box-shadow: 0 6px 22px rgba(3,102,214,0.14);
  border-color: rgba(59,130,246,0.9);
}

#loginSection .btn-login {
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15); /* borda azul mais marcante */
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  box-shadow: 0 10px 30px rgba(37,99,235,0.22);
}

#loginSection .btn-login:hover {
  transform: translateY(-1px);
  background: #1d4ed8;
  box-shadow: 0 8px 20px rgba(59,130,246,0.35); /* glow suave */
}

#loginSection .btn-login:active { transform: translateY(0); box-shadow: 0 6px 14px rgba(59,130,246,0.25); }

#loginSection .login-title { margin:0 0 6px 0; font-size:22px; font-weight:700; letter-spacing: 0.5px; color:#fff; }
#loginSection .login-subtitle { margin:0 0 12px 0; color: rgba(235,245,255,0.88); font-size:13px; }

#loginSection .login-link { display:block; margin-top:8px; text-align:center; color: rgba(255,255,255,0.9); text-decoration: underline; font-size:13px; }
#loginSection .login-footnote { margin-top:14px; font-size:12px; color: rgba(255,255,255,0.72); text-align:center; }

#loginSection .login-hero-text { font-size:20px; line-height:1.2; font-weight:700; }
#loginSection .hero-badge { display:inline-block; padding:6px 10px; border-radius:999px; background: rgba(255,255,255,0.06); color:#fff; font-weight:700; font-size:13px; margin-bottom:12px; }

@media (max-width: 900px) {
  #loginSection { align-items: flex-start; }
  #loginSection .login-layout { grid-template-columns: minmax(0, 1fr); justify-items: center; padding: 20px; }
  #loginSection .login-left, #loginSection .login-right { width: 100%; }
  #loginSection .login-left { order: 1; }
  #loginSection .login-right { order: 2; }
}

@media (max-width: 480px) {
  #loginSection::before { background-position: center top; }
  #loginSection .login-panel { padding: 16px; border-radius: 12px; }
  #loginSection .login-title { font-size: 18px; }
}

/* fim do bloco LOGIN — Parte 3 */

/* =========================
   OVERRIDES FINAIS (polimento visual)
   - garante espaçamento consistente na home
   - garante espaçamento consistente na home

/* =========================
   MODAL DETALHE DO PRODUTO - PREMIUM
   (coloque no FINAL do style.css)
========================= */

.loja-det-overlay{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 6, 23, .55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
}

.loja-det-modal{
  width: min(1280px, 96vw);
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;

  background: linear-gradient(180deg, #ffffff, #fbfcff);
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 18px;
  box-shadow: 0 40px 120px rgba(2, 6, 23, .35);
}

/* header fixo e corpo com 1 scroll */
.loja-det-modal .loja-det-header{
  position: sticky;
  top: 0;
  z-index: 2;

  padding: 18px 22px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(15, 23, 42, .06);
}

.loja-det-modal .loja-det-body{
  flex: 1;
  overflow: auto;
  overflow-x: hidden;
  padding: 18px 22px 22px;
}

.loja-det-modal .loja-det-grid{
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .95fr);
  gap: 22px;
  align-items: start;
}

/* evita scrollbar horizontal “misteriosa” */
.loja-det-modal .loja-det-grid > *{
  min-width: 0;
}

/* card da imagem mais “chique” */
.loja-det-modal .loja-det-imgcard{
  padding: 16px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, .06);
  border-radius: 16px;
}

.loja-det-modal .loja-det-imgwrap{
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;

  background: #fff;
  border: 1px solid rgba(15, 23, 42, .06);
  border-radius: 14px;
  overflow: hidden;
}

.loja-det-modal .loja-det-imgwrap img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* buycard premium e sticky */
.loja-det-modal .loja-det-buycard{
  position: sticky;
  top: 18px;

  padding: 18px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(2, 6, 23, .08);
}

/* TAMANHOS em pílulas (não lista vertical) */
.loja-det-modal .loja-size-list{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.loja-det-modal .loja-size-btn{
  width: auto;              /* importante: remove “full width” */
  min-width: 56px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, .14);
  background: #fff;
  font-weight: 700;
}

.loja-det-modal .loja-size-btn:hover{
  background: rgba(15,23,42,.03);
}

.loja-det-modal .loja-size-btn.is-active{
  background: rgba(37, 99, 235, .10);
  border-color: rgba(37, 99, 235, .45);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

/* ACCORDION com cara de SaaS */
.loja-det-modal .loja-acc-item{
  border: 1px solid rgba(15, 23, 42, .06);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  margin-top: 10px;
}

.loja-det-modal .loja-acc-head{
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.loja-det-modal .loja-acc-head:hover{
  background: rgba(15, 23, 42, .03);
}

.loja-det-modal .loja-acc-caret{
  transition: transform .2s ease;
  opacity: .65;
}

.loja-det-modal .loja-acc-item.is-open .loja-acc-caret{
  transform: rotate(180deg);
}

.loja-det-modal .loja-acc-body{
  padding: 0 16px 16px;
  color: #334155;
  line-height: 1.65;
}

/* Responsivo */
@media (max-width: 980px){
  .loja-det-overlay{ padding: 12px; }
  .loja-det-modal{ width: 96vw; max-height: 96vh; border-radius: 16px; }
  .loja-det-modal .loja-det-grid{ grid-template-columns: 1fr; }
  .loja-det-modal .loja-det-buycard{ position: relative; top: 0; }
}

/* ===== Modal Detalhe do Produto: maior e premium ===== */

/* (Opcional, mas recomendado) trava o fundo quando abrir o modal */
body.modal-open { overflow: hidden; }

/* Modal maior: usa quase toda a largura/altura da tela */
#lojaDetModal{
  width: min(1280px, calc(100vw - 48px));   /* antes era menor */
  max-height: calc(100vh - 48px);           /* mais alto */
  border-radius: 18px;
  overflow: hidden;                          /* evita scroll lateral no modal */
}

/* Corpo do modal é quem rola */
#lojaDetModal .loja-det-body{
  max-height: calc(100vh - 120px);          /* ajusta conforme seu header */
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;                             /* mais espaço interno */
}

/* Grid interno com mais espaço */
#lojaDetModal .loja-det-grid{
  gap: 28px;
}

/* Imagem maior e card mais confortável */
#lojaDetModal .loja-det-media{
  min-height: 520px;                         /* aumenta área visual */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Card de compra ligeiramente maior */
#lojaDetModal .loja-det-buy{
  padding: 22px;
}

/* ===== Isso já deixa o modal bem maior e com mais “espaço de visualização”. ===== */

/* ===== Variação: modo MAX (quase fullscreen) ===== */
/* Use apenas se quiser ocupar ainda mais tela */
#lojaDetModal.max-full,
#lojaDetModal[data-mode="max"]{
  width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  border-radius: 16px;
}
#lojaDetModal.max-full .loja-det-body,
#lojaDetModal[data-mode="max"] .loja-det-body{
  max-height: calc(100vh - 96px);
}

/* ===== Ajuste fino (pra não quebrar em telas menores) ===== */
@media (max-width: 900px){
  #lojaDetModal{
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    border-radius: 14px;
  }
  #lojaDetModal .loja-det-grid{
    grid-template-columns: 1fr;
  }
}

/* ===== Dica premium extra (recomendado) ===== */
@media (min-width: 901px){
  #lojaDetModal .loja-det-buy{
    position: sticky;
    top: 92px; /* ajuste de acordo com seu header */
  }
}

/* Fim do bloco de customizações do modal */
/* =========================
  Ajustes gerais: hover do logout e separadores da sidebar
  ========================= */

/* 1) Força gap consistente entre colunas da home */
.home-layout { gap: 22px !important; }

/* 2) Hover mais suave para o botão Sair (preserva id #btnLogout) */
#btnLogout.btn-logout:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15,23,42,0.16);
  filter: brightness(1.015);
}

/* 3) Separadores sutis na sidebar — agrupa visualmente itens sem tocar no HTML
   Ajuste os nth-child conforme a sua estrutura de menu se quiser outros pontos */
.sidebar ul > li:nth-child(3),
.sidebar ul > li:nth-child(6),
.sidebar ul > li:nth-child(9) {
  padding-top: 10px;
  margin-top: 8px;
  border-top: 1px solid rgba(15,23,42,0.04);
}



/* =========================
   LOGIN – layout novo (2 colunas) + fundo
   ========================= */

#loginSection {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
  border: 0;
}

/* Fundo em tela cheia atrás do conteúdo */
#loginSection::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(120deg,
      rgba(15, 23, 42, 0.90) 0%,
      rgba(15, 23, 42, 0.75) 42%,
      rgba(15, 23, 42, 0.35) 70%,
      rgba(15, 23, 42, 0.05) 100%),
    url("img/telainicial.png") center center / cover no-repeat;
  z-index: -1;
  pointer-events: none;
}

/* Wrapper principal em 2 colunas */
#loginSection .login-layout {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: clamp(32px, 7vw, 80px);
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 40px) clamp(20px, 4vw, 56px);
  align-items: center;
}

/* Coluna esquerda: marca + card */
#loginSection .login-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
  color: #e5e7eb;
}

/* Marca */
#loginSection .login-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#loginSection .brand-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#loginSection .brand-slogan {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* Card de login */
#loginSection .login-panel {
  background: rgba(0, 0, 0, 0.40);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px;
  padding: 24px 24px 20px;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.85);
  width: min(400px, 100%);
}

/* Título e subtítulo */
#loginSection .login-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #f9fafb;
}

#loginSection .login-subtitle {
  margin: 6px 0 18px;
  font-size: 13px;
  color: #cbd5f5;
}

/* Formulário interno */
#loginSection .login-panel form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Labels apenas dentro do card de login */
#loginSection .login-panel label {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 2px;
}

/* Inputs estilizados (pill) – só no login */
#loginSection .login-panel input[type="text"],
#loginSection .login-panel input[type="password"] {
  width: calc(100% - 4px); /* evita encostar nas bordas do card */
  padding: 10px 14px;
  box-sizing: border-box;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.9);
  background: rgba(15, 23, 42, 0.82);
  color: #e5e7eb;
  font-size: 14px;
  outline: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    transform 0.08s ease;
}

#loginSection .login-panel input::placeholder {
  color: rgba(148, 163, 184, 0.9);
}

#loginSection .login-panel input:focus {
  border-color: #3b82f6;
  background: rgba(15, 23, 42, 0.96);
  box-shadow:
    0 0 0 1px rgba(59, 130, 246, 0.7),
    0 0 0 4px rgba(37, 99, 235, 0.45);
}

/* Botão Entrar – pill azul SaaS */
#loginSection .btn-login {
  margin-top: 12px;
  width: calc(100% - 4px); /* alinha com os inputs dentro do card */
  padding: 12px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.55);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

#loginSection .btn-login:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 8px 20px rgba(59,130,246,0.35);
}

#loginSection .btn-login:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(59,130,246,0.25);
}

/* Links de suporte/esqueceu senha */
#loginSection .login-link {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  text-align: center;
  color: #cbd5f5;
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.15s ease, color 0.15s ease;
}

#loginSection .login-link.support {
  font-weight: 500;
}

#loginSection .login-link:hover {
  opacity: 1;
  color: #e5edff;
}

/* Mensagem de erro/feedback */
#loginSection .login-msg {
  margin-top: 10px;
  font-size: 13px;
  text-align: center;
  font-weight: 600;
  color: #f97373;
}

/* Rodapé da coluna esquerda */
#loginSection .login-footnote {
  margin-top: 18px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.95);
}

/* Coluna direita – texto hero */
#loginSection .login-right {
  color: #e5e7eb;
}

#loginSection .login-hero-text {
  max-width: 460px;
  text-shadow: 0 18px 45px rgba(0, 0, 0, 0.7);
}

#loginSection .hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(129, 140, 248, 0.6);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 10px;
}

#loginSection .login-hero-text h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 700;
}

#loginSection .login-hero-text p {
  margin: 0;
  font-size: 14px;
  max-width: 420px;
  color: #e5e7eb;
}

/* Responsivo – empilha em 1 coluna */
@media (max-width: 900px) {
  #loginSection {
    align-items: flex-start;
  }

  #loginSection .login-layout {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: left;
  }

  #loginSection .login-left {
    order: 1;
  }

  #loginSection .login-right {
    order: 2;
  }

  #loginSection .login-panel {
    margin-inline: auto;
  }
}

/* Mobile pequeno */
@media (max-width: 520px) {
  #loginSection .login-layout {
    padding: 24px 16px;
  }

  #loginSection .login-panel {
    padding: 22px 18px 18px;
    border-radius: 18px;
  }

  #loginSection .login-title {
    font-size: 20px;
  }
}
/* ==========================================
   DASHBOARD PÓS-LOGIN – layout geral
   (Home, Estoque, Vencimentos, etc.)
   ========================================== */

/* Container principal da aplicação (depois do login) */
.container {
  display: flex;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, #e5edff 0, transparent 55%),
    radial-gradient(circle at bottom right, #dbeafe 0, transparent 55%),
    #f5f7fb;
}


/* 22.1 – Fundo da tela de login: reduzir a área do azul-claro (30%) */
.login-section {
  /* mantém outras propriedades; apenas sobrescreve o background */
  background: linear-gradient(135deg, #0b1120 0%, #1d4ed8 30%, #0b1120 100%);
}

/* 22.2 – Gradiente da sidebar: azul-marinho quase preto, mais "enterprise" */
.sidebar {
  /* mantém a largura já definida em outro lugar; sobrescreve apenas o background */
  background: linear-gradient(180deg, #020617 0%, #0f172a 40%, #020617 100%);
}

/* Conteúdo principal */
.main-content {
  flex: 1;
  padding: 24px 28px 28px;
}

/* Animação suave ao trocar de página da SPA */
.page.active {
  animation: dashFadeIn 0.25s ease-out;
}

@keyframes dashFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Botão "Sair" com cara de SaaS */
#btnLogout {
  appearance: none;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.10);
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    transform 0.08s ease,
    box-shadow 0.15s ease;
}

#btnLogout:hover {
  background: #0f172a;
  color: #f9fafb;
  border-color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25);
}

#btnLogout:active {
  transform: translateY(0);
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.20);
}

/* Cards e listas da Home */
.home-chart {
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.10);
}

.home-card {
  border-radius:16px;
  box-shadow:0 10px 24px rgba(15,23,42,0.08);
}

.home-card.card-blue {
  border-left: 6px solid var(--blue);
}

.home-card.card-blue .card-badge {
  background:color-mix(in srgb, var(--blue-100) 80%, #ffffff 20%);
  border-color:var(--blue-100);
  color:var(--blue-800);
}

.home-card .card-badge {
  border-radius: 999px;
  padding: 4px 10px;
}

/* =========================
   23) Padrão de botões (primário / secundário)
   ========================= */

/* BOTÕES GERAIS */
.btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 16px;
  border-radius:999px;
  font-size:13px;
  font-weight:600;
  border:1px solid transparent;
  cursor:pointer;
  transition:transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease, background 0.16s ease;
}

/* Botão principal (ações mais importantes) */
.btn-primary {
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color:#ffffff;
  box-shadow:0 10px 24px rgba(15,23,42,0.35);
  border-color: rgba(59,130,246,0.08);
}

/* Botão secundário (menos destaque, geralmente contorno) */
.btn-secondary {
  background:#ffffff;
  color:#1e293b;
  border-color:rgba(148,163,184,0.7);
  box-shadow:0 4px 12px rgba(15,23,42,0.12);
}

/* 23.2 – Simplificar .btn-login para herdar visual de .btn + .btn-primary */
.btn-login {
  width:100%;
  margin-top:12px;
}

/* 24) Micro animação de clique (:hover / :active) */
.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15,23,42,0.28);
  filter: brightness(1.03);
}

.btn-primary:active,
.btn-secondary:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(15,23,42,0.25);
  filter: brightness(0.98);
}

/* segurança: garantir que botões recebam foco visível */
.btn:focus {
  outline: 3px solid rgba(59,130,246,0.14);
  outline-offset: 2px;
}

/* fim das alterações 22..24 */

/* ======================================================
   Ajustes finais – AÇÕES (Editar / Excluir) mais espaçosos
   ====================================================== */

/* Coluna de AÇÕES com largura confortável para 2 botões empilhados */
#listaEPIs .table-epi thead th:nth-child(7),
#listaEPIs .table-epi tbody td:nth-child(7) {
  min-width: 160px;          /* ajusta se quiser mais/menos espaço */
  text-align: right;
  padding-right: 16px;
  border-left: 1px solid rgba(226, 232, 240, 0.9);
}

/* Wrapper dos botões dentro da célula:
   - um embaixo do outro
   - alinhados à direita */
#listaEPIs .actions {
  display: inline-flex;       /* ocupa só o tamanho do conteúdo */
  flex-direction: column;     /* empilha Editar / Excluir */
  align-items: flex-end;      /* grudadinhos na direita */
  gap: 6px;                   /* espaço vertical entre os botões */
  padding-right: 0;
  white-space: nowrap;
}

/* Deixa os dois botões com largura parecida e centraliza o texto/ícone */
#listaEPIs .actions .btn {
  min-width: 110px;           /* largura fixa confortável para "✏️ Editar" */
  justify-content: center;
}

/* Botão EDITAR – minimalista azul */
#listaEPIs .btn--edit {
  background: #ffffff;
  border-color: #d0e2ff;
  color: #1d4ed8; /* azul do sistema */
}

/* Botão EXCLUIR – minimalista vermelho, porém discreto */
#listaEPIs .btn--del {
  background: #ffffff;
  border-color: #fecaca;
  color: #b91c1c;
  box-shadow: 0 2px 6px rgba(248,113,113,0.15);
}

/* Ícones antes do texto (mantém) */
#listaEPIs .btn--edit::before {
  /* Lápis minimalista no botão EDITAR (Novo EPI) */
  content: "✎";        /* lápis simples, sem cor de emoji */
  font-size: 12px;
  margin-right: 2px;
  position: relative;
  top: -0.5px;
}

#listaEPIs .btn--del::before {
  content: "🗑";
  font-size: 13px;
}

/* Estilo para o contador de EPIs perto do título (opcional) */
#listaEPIs .epi-count {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
  margin-left: 6px;
}

/* Small note: se quiser ainda mais espaço para os botões,
   aumente `min-width` acima para 220px conforme necessário. */

/* ===== ESTOQUE — NOVO LAYOUT ===== */

/* ===== ESTOQUE — NOVO LAYOUT ===== */
#estoque {
  margin-top: 8px;
}

#estoque h3 {
  font-size: 1.35rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
}

#estoque .muted {
  margin-bottom: 4px;
}

/* Card do gráfico */
#estoqueGrafico {
  margin-top: 12px;
  padding: 20px 24px 24px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
}

/* Barra de busca + ícones logo abaixo do gráfico */
.estoque-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.86);
  border: 1px solid #e6eefc;
  box-shadow: 0 10px 28px rgba(15,23,42,.06);
}

/* Campo de busca compacto */
.estoque-search {
  position: relative;
  flex: 1;
  max-width: 380px;
}

.estoque-search input {
  width: 100%;
  height: 40px;
  border-radius: 999px;
  border: 1px solid #d0e2ff;
  padding: 0 38px 0 14px;
  font-size: 0.875rem;
  color: #0f172a;
  background: #f9fafb;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.estoque-search input::placeholder {
  color: #9ca3af;
}

.estoque-search input:focus {
  outline: none;
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
}

/* Ícone de lupa (outline) no final do campo */
.estoque-search .search-ico{
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  width:16px;
  height:16px;
  pointer-events:none;
  opacity:.75;

  font-size:0;

  background: no-repeat center / 16px 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
}

/* Botões minimalistas (atualizar / engrenagem) */
.estoque-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn-blue{
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #bcd9ff;
  background: #eef6ff;
  color: #0f5fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 16px;
  line-height: 1;
  cursor:pointer;
  transition: .15s ease;
}
.icon-btn-blue:hover{
  background:#dcecff;
  transform: translateY(-1px);
}

/* Card da tabela de estoque */
#estoqueConteudo {
  margin-top: 12px;
  padding: 12px 18px 18px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
}

/* Garante que a tabela ocupe bem o card */
#estoqueConteudo table {
  width: 100%;
  border-collapse: collapse;
}

/* ===================== NOVO COLABORADOR ===================== */

#novoColaborador {
  margin-top: 16px;
}

/* Header (título + subtítulo) */
#novoColaborador .novo-colab-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

#novoColaborador h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a; /* mesmo tom da Home/Novo EPI */
}

#novoColaborador .novo-colab-subtitle {
  margin: 4px 0 0 0;
  font-size: 13px;
  color: #6b7280;
}

/* Card branco com formulário + biometria lado a lado */
#novoColaborador .novo-colab-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  padding: 16px 18px 18px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr);
  gap: 20px;
}

/* Em telas menores, vira uma coluna só */
@media (max-width: 900px) {
  #novoColaborador .novo-colab-card {
    grid-template-columns: 1fr;
  }
}

/* Layout do formulário */
#formNovoColaborador.novo-colab-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

/* Labels dos campos */
#formNovoColaborador label {
  font-size: 13px;
  font-weight: 500;
  color: #0f172a;
}

/* Inputs dos campos */
#formNovoColaborador input {
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  padding: 8px 10px;
  font-size: 14px;
  background: #f9fafb;
  outline: none;
  transition:
    border-color 0.12s ease,
    box-shadow 0.12s ease,
    background-color 0.12s ease;
}

#formNovoColaborador input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  background: #ffffff;
}

/* Botão Salvar com o mesmo estilo do + Cadastrar EPI */
#novoColaborador .novo-colab-save {
  grid-column: 1 / -1;
  justify-self: flex-end;
  margin-top: 4px;

  border: none;
  cursor: pointer;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;

  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    filter 0.12s ease;
}

#novoColaborador .novo-colab-save:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.45);
}

#novoColaborador .novo-colab-save:active {
  transform: translateY(0);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.35);
}

/* Bloco da biometria */
#novoColaborador .novo-colab-bio-title {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
}

#novoColaborador .novo-colab-bio-text {
  font-size: 13px;
  color: #6b7280;
  margin: 0 0 10px 0;
}

/* Botões Digital / Facial */
#novoColaborador .novo-colab-bio-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

#novoColaborador .novo-colab-bio-btn {
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.18);
  cursor: pointer;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    filter 0.12s ease;
}

#novoColaborador .novo-colab-bio-btn:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.25);
}

/* Mensagem da biometria */
#novoColaborador .novo-colab-msg {
  margin-top: 2px;
  font-size: 12px;
  color: #334155;
}


/* ===================== NOVO COLABORADOR COMO MODAL ===================== */

body.novo-colab-modal-lock{
  overflow: hidden;
}

#novoColaboradorOverlay.novo-colab-modal-overlay{
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 880;
}

#novoColaboradorOverlay.novo-colab-modal-overlay.is-open{
  display: block;
}

#novoColaborador{
  position: relative;
}

#novoColaborador .novo-colab-modal-close{
  display: none;
}

#novoColaborador.novo-colab-modal-open{
  display: block !important;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(980px, 94vw);
  max-height: 90vh;
  overflow: auto;
  margin-top: 0;
  padding: 4px;
  z-index: 890;
  background: transparent;
}

#novoColaborador.novo-colab-modal-open .novo-colab-header{
  padding-right: 48px;
}

#novoColaborador.novo-colab-modal-open .novo-colab-modal-close{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: rgba(255,255,255,0.96);
  color: #475569;
  box-shadow: 0 10px 24px rgba(15,23,42,0.18);
  cursor: pointer;
  z-index: 2;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

#novoColaborador.novo-colab-modal-open .novo-colab-modal-close:hover{
  background: #ffffff;
  color: #0f172a;
}

@media (max-width: 900px){
  #novoColaborador.novo-colab-modal-open{
    width: min(96vw, 96vw);
    max-height: 92vh;
  }
}


/* ===================== ENTREGAR EPI – PREMIUM / MODAL ASSINATURA ===================== */

#entregarEPI {
  margin-top: 16px;
}

#entregarEPI .entrega-shell {
  max-width: 1180px;
}

#entregarEPI .entrega-header-premium {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

#entregarEPI .entrega-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #2563eb;
}

#entregarEPI h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.035em;
  color: #07152b;
}

#entregarEPI .entrega-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
}

#entregarEPI .entrega-card-premium {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.08), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,251,255,.96));
  border: 1px solid rgba(214,226,242,.95);
  border-radius: 24px;
  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255,255,255,.78);
  padding: 22px;
}

#entregarEPI .entrega-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(226,232,240,.9);
}

#entregarEPI .entrega-card-top h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 850;
  letter-spacing: -0.02em;
  color: #0f172a;
}

#entregarEPI .entrega-card-top p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

#entregarEPI .entrega-secure-badge {
  width: auto;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(239,246,255,.92);
  border: 1px solid rgba(191,219,254,.95);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

#entregarEPI .entrega-secure-badge svg {
  width: 15px;
  height: 15px;
}

#entregarEPI .entrega-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

#entregarEPI .entrega-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

#entregarEPI label {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  color: #152238;
  letter-spacing: -0.01em;
}

#entregarEPI select,
#entregarEPI input[type="number"] {
  width: 100%;
  height: 46px;
  box-sizing: border-box;
  border-radius: 14px;
  border: 1px solid #d7e1ee;
  padding: 0 13px;
  font-size: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  color: #0f172a;
  outline: none;
  box-shadow: 0 10px 22px rgba(15,23,42,.035);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background-color 0.16s ease;
}

#entregarEPI select:focus,
#entregarEPI input[type="number"]:focus {
  border-color: #60a5fa;
  box-shadow:
    0 0 0 4px rgba(37,99,235,.11),
    0 14px 28px rgba(15,23,42,.055);
  background: #ffffff;
}

#entregarEPI .entrega-status {
  grid-column: 1 / -1;
  min-height: 20px;
  margin: 0;
  font-size: 12.5px;
  font-weight: 750;
  color: #1d4ed8;
}

#entregarEPI .entrega-status:empty {
  display: none;
}

#entregarEPI .entrega-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid rgba(226,232,240,.9);
}

#entregarEPI .entrega-actions-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 220px;
}

#entregarEPI .entrega-actions-info strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 850;
}

#entregarEPI .entrega-actions-info span {
  color: #64748b;
  font-size: 12.5px;
}

#entregarEPI .btn-entrega {
  width: auto;
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition:
    transform 0.14s ease,
    box-shadow 0.16s ease,
    filter 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease;
}

#entregarEPI .btn-entrega svg {
  width: 16px;
  height: 16px;
}

#entregarEPI .btn-entrega--primary {
  min-width: 176px;
  padding: 0 20px;
  border: 1px solid rgba(37,99,235,.12);
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: -0.01em;
  box-shadow:
    0 16px 30px rgba(37,99,235,.26),
    inset 0 1px 0 rgba(255,255,255,.18);
}

#entregarEPI .btn-entrega--primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.025);
  box-shadow:
    0 20px 36px rgba(37,99,235,.32),
    inset 0 1px 0 rgba(255,255,255,.20);
}

#entregarEPI .btn-entrega--primary:active {
  transform: translateY(0);
  box-shadow:
    0 12px 24px rgba(37,99,235,.24),
    inset 0 1px 0 rgba(255,255,255,.14);
}

/* Mantém os botões técnicos antigos invisíveis, sem quebrar os IDs usados pelo JS */
#entregarEPI .entrega-assinatura-legacy,
#entregarEPI #assinaturaButtonsRow,
#entregarEPI #sigEntregaWrap {
  display: none !important;
}

/* Modal premium */
.entrega-metodo-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background:
    radial-gradient(circle at center, rgba(59,130,246,.12), transparent 42%),
    rgba(15,23,42,.48);
  backdrop-filter: blur(7px);
}

.entrega-metodo-modal {
  position: fixed;
  z-index: 9001;
  left: 50%;
  top: 50%;
  width: min(660px, calc(100vw - 32px));
  transform: translate(-50%, -50%);
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.08), transparent 38%),
    #ffffff;
  border: 1px solid rgba(226,232,240,.98);
  box-shadow:
    0 34px 90px rgba(15,23,42,.28),
    inset 0 1px 0 rgba(255,255,255,.8);
  padding: 22px;
  animation: entregaMetodoIn .18s ease-out;
}

@keyframes entregaMetodoIn {
  from {
    opacity: 0;
    transform: translate(-50%, -48%) scale(.985);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.entrega-metodo-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.entrega-metodo-head h4 {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.035em;
  color: #0f172a;
}

.entrega-metodo-head p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.entrega-metodo-close {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  font-size: 23px;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(15,23,42,.06);
}

.entrega-metodo-close:hover {
  background: #f8fafc;
  color: #0f172a;
}

.entrega-metodo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.entrega-metodo-option {
  width: 100%;
  min-height: 164px;
  padding: 18px 14px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  color: #0f172a;
  box-shadow: 0 16px 34px rgba(15,23,42,.055);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 10px;
}

.entrega-metodo-option:hover {
  transform: translateY(-2px);
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff, #eff6ff);
  box-shadow: 0 24px 44px rgba(37,99,235,.13);
}

.entrega-metodo-icon {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: #eff6ff;
  color: #1d4ed8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dbeafe;
}

.entrega-metodo-icon svg {
  width: 20px;
  height: 20px;
}

.entrega-metodo-option strong {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.entrega-metodo-option small {
  color: #64748b;
  font-size: 12.3px;
  line-height: 1.4;
}

.entrega-metodo-foot {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 12px;
}

@media (max-width: 880px) {
  #entregarEPI .entrega-form {
    grid-template-columns: 1fr;
  }

  #entregarEPI .entrega-actions {
    align-items: stretch;
    flex-direction: column;
  }

  #entregarEPI .btn-entrega--primary {
    width: 100%;
  }

  .entrega-metodo-grid {
    grid-template-columns: 1fr;
  }

  .entrega-metodo-option {
    min-height: 118px;
  }
}


/* ===================== FICHA DE EPI – estética moderna ===================== */

#fichaEPI {
  margin-top: 16px;
}

/* Cabeçalho (título + subtítulo) */
#fichaEPI .ficha-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

#fichaEPI h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

#fichaEPI .ficha-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: #6b7280;
}

/* Card branco envolvendo seletor + resultado */
#fichaEPI .ficha-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  padding: 16px 18px 18px;
}

/* Linha com select + botão */
#fichaEPI .ficha-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

/* Campo colaborador */
#fichaEPI .ficha-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 220px;
  flex: 1;
}

#fichaEPI .ficha-field label {
  font-size: 13px;
  font-weight: 500;
  color: #0f172a;
}

/* Select, com o mesmo padrão das outras abas */
#fichaEPI select#selectColabFicha {
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  padding: 8px 10px;
  font-size: 14px;
  background: #f9fafb;
  outline: none;
  transition:
    border-color 0.12s ease,
    box-shadow 0.12s ease,
    background-color 0.12s ease;
}

#fichaEPI select#selectColabFicha:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  background: #ffffff;
}

/* Bloco do botão Gerar */
#fichaEPI .ficha-actions {
  display: flex;
  align-items: flex-end;
}

/* Botão Gerar – pill azul, sem width:100% */
#fichaEPI #btnGerarFicha.btn-ficha-primary {
  width: auto;
  padding: 9px 22px;
  border-radius: 999px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;

  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
  cursor: pointer;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    filter 0.12s ease;
}

#fichaEPI #btnGerarFicha.btn-ficha-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.45);
}

#fichaEPI #btnGerarFicha.btn-ficha-primary:active {
  transform: translateY(0);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.35);
}

/* Área de prévia/resultado da ficha */
#fichaEPI .ficha-preview {
  margin-top: 14px;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  background: #f9fafb;
  padding: 14px;
  min-height: 60px;
  font-size: 13px;
  color: #475569;
}

/* Em telas pequenas, empilha os elementos */
@media (max-width: 720px) {
  #fichaEPI .ficha-form {
    flex-direction: column;
    align-items: stretch;
  }

  #fichaEPI .ficha-actions {
    justify-content: flex-start;
  }
}



/* ===================== VENCIMENTOS – alinhamento das colunas ===================== */

/* Deixa as duas tabelas com largura estável */
#vencimentos .venc-table {
  width: 100%;
  table-layout: fixed;
}

/* ---------- Tabela 1: Vida útil vencida (tblVidaUtil) ---------- */

/* 1ª coluna: Colaborador (avatar + nome) */
#tblVidaUtil thead th:nth-child(1),
#tblVidaUtil tbody td:nth-child(1) {
  text-align: left;
}

/* Cria um "avatar fantasma" no cabeçalho para alinhar com o círculo das linhas */
#tblVidaUtil thead th:nth-child(1) {
  position: relative;
  padding-left: 46px;            /* 12 (padding) + 26 (avatar) + 8 (espaço) */
}

#tblVidaUtil thead th:nth-child(1)::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  /* sem borda/cor: é só um espaço reservado invisível */
}

/* 2ª coluna: EPI – texto normal à esquerda */
#tblVidaUtil thead th:nth-child(2),
#tblVidaUtil tbody td:nth-child(2) {
  text-align: left;
}

/* 3, 4 e 5: datas + vida útil (deixei centralizadas e com números “firmes”) */
#tblVidaUtil thead th:nth-child(3),
#tblVidaUtil tbody td:nth-child(3),
#tblVidaUtil thead th:nth-child(4),
#tblVidaUtil tbody td:nth-child(4),
#tblVidaUtil thead th:nth-child(5),
#tblVidaUtil tbody td:nth-child(5) {
  text-align: center;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* 6ª coluna: status – alinhado à direita, fica visualmente mais limpo */
#tblVidaUtil thead th:nth-child(6),
#tblVidaUtil tbody td:nth-child(6) {
  text-align: right;
}

/* ---------- Tabela 2: CAs vencidos no estoque (tblCAs) ---------- */

/* 1ª coluna: EPI */
#tblCAs thead th:nth-child(1),
#tblCAs tbody td:nth-child(1) {
  text-align: left;
}

/* 2ª coluna: CA (números) */
#tblCAs thead th:nth-child(2),
#tblCAs tbody td:nth-child(2) {
  text-align: center;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* 3ª coluna: Validade do CA (data) */
#tblCAs thead th:nth-child(3),
#tblCAs tbody td:nth-child(3) {
  text-align: center;
  white-space: nowrap;
}

/* 4ª coluna: Status (pill) alinhado à direita */
#tblCAs thead th:nth-child(4),
#tblCAs tbody td:nth-child(4) {
  text-align: right;
}

/* =========================================================
   NOVO EPI – Ajustes finais da tabela de EPIs
   ========================================================= */

/* NOVO EPI – célula de DESCRIÇÃO com texto legível */
#listaEPIs .table-epi td.cell-desc,
#listaEPIs .cell-desc {
  white-space: normal;        /* permite quebrar em várias linhas */
  overflow: visible;          /* não corta o texto */
  text-overflow: clip;        /* sem "..." automático */
  overflow-wrap: break-word;  /* só quebra palavras MUITO grandes */
  word-break: normal;         /* NÃO quebra "SEGURANÇA" em "SEGURANÇ A" */
  max-width: none;            /* largura vem da coluna, não de px fixo */
}


/* 2) Larguras equilibradas das colunas (somam 100%) */
#listaEPIs .table-epi thead th:nth-child(1),
#listaEPIs .table-epi tbody td:nth-child(1) {  /* Nome */
  width: 18%;
}

#listaEPIs .table-epi thead th:nth-child(2),
#listaEPIs .table-epi tbody td:nth-child(2) {  /* CA */
  width: 8%;
  white-space: nowrap;
}

#listaEPIs .table-epi thead th:nth-child(3),
#listaEPIs .table-epi tbody td:nth-child(3) {  /* Status CA */
  width: 12%;
}

#listaEPIs .table-epi thead th:nth-child(4),
#listaEPIs .table-epi tbody td:nth-child(4) {  /* Validade CA */
  width: 16%;
}

#listaEPIs .table-epi thead th:nth-child(5),
#listaEPIs .table-epi tbody td:nth-child(5) {  /* Vida útil */
  width: 8%;
}

#listaEPIs .table-epi thead th:nth-child(6),
#listaEPIs .table-epi tbody td:nth-child(6) {  /* Descrição */
  width: 28%;  /* AQUI é onde a descrição ganha espaço */
}

#listaEPIs .table-epi thead th:nth-child(7),
#listaEPIs .table-epi tbody td:nth-child(7) {  /* Ações */
  width: 10%;
}


/* Densidade e estilo da tabela Novo EPI */
#listaEPIs .table-epi thead th {
  padding: 10px 14px;
  vertical-align: middle;
  background: #f7f9fc;
  color: #1e2a3a;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
  border-bottom: 1px solid #e6e9ef;
}

#listaEPIs .table-epi tbody td {
  padding: 10px 14px;
  vertical-align: top;
  line-height: 1.4;
  font-size: 13px;
  border-bottom: 1px solid #f0f2f6;
}

/* Listras e hover */
#listaEPIs .table-epi tbody tr:nth-child(even) {
  background: #fcfdff;
}

#listaEPIs .table-epi tbody tr:hover {
  background: #f9fbff;
}


/* Garantir rolagem/responsividade */
#listaEPIs .table-wrap {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-gutter: stable both-edges;
}

@media (max-width: 900px) {
  #listaEPIs .table-epi thead th,
  #listaEPIs .table-epi tbody td {
    font-size: 12px;
  }
}



/* =========================================================
   Ajustes finais: comportamento de tabela e colunas (override)
   ========================================================= */

/* 1) Forçar table-layout automático e permitir quebra de linha */
#listaEPIs .table-epi {
  table-layout: auto !important;
  width: 100% !important;
  border-collapse: collapse !important;
}

/* 2) Larguras via colgroup (compressão/expansão correta) */
.table-epi col:nth-child(1) {  /* Nome */
  width: 35% !important;
}
.table-epi col:nth-child(2) { /* CA */
  width: 90px !important;
}
.table-epi col:nth-child(3) { /* Status CA */
  width: 140px !important;
}
.table-epi col:nth-child(4) { /* Validade */
  width: 150px !important;
}
.table-epi col:nth-child(5) { /* Vida útil */
  width: 140px !important;
}
.table-epi col:nth-child(6) { /* Descrição */
  width: auto !important;
}
.table-epi col:nth-child(7) { /* Ações */
  width: 130px !important;
}

/* 3) Evitar corte de textos */
.table-epi td,
.table-epi th {
  white-space: normal !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
}

/* 4) Visual: padding, fontes e densidade */
.table-epi td {
  padding: 10px 12px !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
}
.table-epi th {
  font-weight: 700 !important;
  font-size: 13px !important;
  background: #f5f5f7 !important;
}

/* 5) Garantir que a descrição dentro de .cell-desc seja bloco quebrável */
.cell-desc span {
  white-space: normal !important;
  display: block;
}

/* 6) Responsividade / rolagem */
.table-wrap {
  overflow-x: auto;
}

/* ===================== MODAIS UNIVERSAIS ====================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9998;
}

.modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(500px, 90vw);
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0px 8px 30px rgba(0,0,0,0.25);
  z-index: 9999;
  font-family: 'Inter', sans-serif;
}

/* Conteúdo interno do modal */
.modal h3 {
  margin-top: 0;
  font-size: 20px;
  font-weight: 700;
  color: #1d2a3a;
}

/* ==================================================
   AVALIAÇÃO (PROVA) – VISUAL REFINADO
   ================================================== */

/* Bloco geral da prova */
.quiz-block{
  margin: 16px auto;
  max-width: 1100px;   /* aumenta a largura máxima */
  width: 95vw;         /* ocupa quase a tela inteira */
  padding: 8px 0 16px; /* um pouco mais de respiro */
}

/* Cabeçalho "Avaliação" */
.quiz-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:12px;
}

.quiz-title{
  font-weight:700;
  font-size:18px;
  color:#0f172a;
}

/* Cada questão em um card */
.quiz-item{
  border:1px solid #e2e8f0;
  border-radius:18px;
  padding:16px 18px 14px;
  background:#ffffff;
  margin-top:14px;
  box-shadow:0 10px 24px rgba(15,23,42,0.08);
  counter-reset: altIndex;   /* reinicia A/B/C/D a cada questão */
}

/* Enunciado (onde estava "1) ..." etc.) */
.q-enunciado{
  font-weight:600;
  font-size:15px;
  color:#0f172a;
  margin-bottom:12px;
  line-height:1.6;
}

/* Linha de alternativa */
/* Cada alternativa no estilo A, B, C, D */
.q-alt-row{
  position: relative;
  display: block;
  margin: 8px 0;
  padding: 6px 0 6px 44px;        /* espaço para o círculo da letra à esquerda */
  cursor: pointer;
}

/* Bolinha com A / B / C / D */
.q-alt-row::before{
  counter-increment: altIndex;
  content: counter(altIndex, upper-alpha);   /* A, B, C, D... */
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #f97316;     /* laranja parecido com seu exemplo */
  color: #f97316;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  background: #fff;
}

/* Esconde o radio (continuamos usando ele, mas sem aparecer) */
.q-alt-row input[type="radio"]{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Texto da alternativa (pode ser grande, várias linhas) */
.q-alt-row span{
  display: block;
  font-size: 14px;
  color: #111827;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
  word-break: break-word;
}

/* Quando a alternativa estiver marcada, só dá um leve destaque */
.q-alt-row input[type="radio"]:checked + span{
  font-weight: 600;
}

/* Rodapé Cancelar / Enviar */
.q-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:16px;
}

/* Remove o width:100% apenas nesses botões */
.q-actions button{
  width:auto;
  min-width:120px;
  border-radius:999px;
}

/* Botão Cancelar (branco) */
.q-actions button:first-child{
  background:#ffffff;
  color:#111827;
  border:1px solid #e5e7eb;
}

/* Botão Enviar (azul BRAZSAFE) */
.q-actions button:last-child{
  background:linear-gradient(135deg,#1d4ed8,#2563eb);
  color:#ffffff;
  border:none;
  box-shadow:0 10px 24px rgba(37,99,235,0.35);
}

/* Caso existam elementos decorativos de linha dentro das alternativas, escondemos aqui */
.quiz-item .linha{ display:none; }


.modal .modal-content {
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.45;
  word-break: break-all;
}

.modal .link-box {
  margin-top: 16px;
  background: #f5f7fb;
  padding: 12px;
  border-radius: 8px;
  color: #0f172a;
  font-size: 14px;
  word-break: break-all;
}

.modal .modal-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

.modal .btn-primary {
  background: linear-gradient(90deg, #0d6efd, #1d4ed8);
  padding: 10px 18px;
  border-radius: 8px;
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

.modal .btn-primary:hover {
  filter: brightness(1.08);
}

/* ========================================== */

/* ==== FIX VISUAL AVALIAÇÃO – SOMENTE LETRA EM BOLINHA, SEM CAIXA AZUL ==== */

/* Linha de alternativa sem cartão azul antigo */
.q-alt-row{
  position: relative;
  display: block;
  margin: 8px 0;
  padding: 6px 0 6px 44px; /* espaço pro círculo A/B/C/D */
  
  /* zera o visual do estilo antigo */
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Hover bem suave só na linha toda */
.q-alt-row:hover{
  background: #f9fafb !important;
  border: none !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Garante que o radio fique invisível e não estique nada */
.q-alt-row input[type="radio"]{
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none;
  width: auto !important;
  margin: 0;
  padding: 0;
}

/* Texto da alternativa, ocupando toda a largura à direita da bolinha */
.q-alt-row span{
  display: block;
  font-size: 14px;
  color: #111827;
  line-height: 1.5;
  white-space: normal;
  word-break: break-word;
}

/* Quando marcada, só destaca o texto (sem mudar a bolinha laranja) */
.q-alt-row input[type="radio"]:checked + span{
  font-weight: 600;
  color: #1d4ed8;
}



/* Modal da avaliação ocupando bem a largura da tela */
.modal {
  max-width: 1100px;
  width: 95%;
}

/* ============ AVALIAÇÃO – QUESTÕES E ALTERNATIVAS ============ */

/* Bloco de cada questão */
.quiz-item {
  background: #fff;
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 18px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

/* Enunciado da pergunta */
.q-enunciado {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 12px;
  line-height: 1.5;
}

/* Cada alternativa em linha: letra + texto */
.q-alt-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  position: relative;
}

/* efeito ao passar o mouse */
.q-alt-row:hover {
  background: #f9fafb;
  transform: translateX(1px);
}

/* Esconde o radio "feio" mas mantém clicável pelo label */
.q-alt-row input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Bolinha com a letra A/B/C/D */
.q-alt-letter {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid #f97316;
  color: #f97316;

  /* centraliza perfeitamente a letra dentro do círculo */
  display: inline-grid !important;
  place-items: center !important;   /* centraliza vertical+horizontal de forma consistente */
  font-family: inherit !important;  /* garante mesma métrica de fonte do restante do app */
  font-weight: 600 !important;
  font-size: 14px !important;
  line-height: 1 !important;        /* evita deslocamento por line-height */
  box-sizing: border-box !important;
  padding: 0 !important;
  transform: translateY(0.6px) !important; /* ajuste fino para centralizar no Windows/Chrome */
  vertical-align: middle !important;
}

/* Texto da alternativa */
.q-alt-text {
  flex: 1;
  font-size: 14px;
  color: #111827;
  line-height: 1.5;
}

/* Quando marcada: pinta a bolinha e dá destaque */
.q-alt-row input[type="radio"]:checked + .q-alt-letter {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.q-alt-row input[type="radio"]:checked ~ .q-alt-text {
  font-weight: 600;
}

/* Desativa o pseudo-elemento anterior que gerava A/B/C/D com ::before
   (mantemos agora a letra via .q-alt-letter para maior controle) */
.q-alt-row::before {
  display: none !important;
  content: none !important;
}

/* ===== Override final: garante alinhamento consistente das letras A/B/C/D ===== */
.quiz-item .q-alt-row {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 6px 10px !important; /* remove eventuais paddings antigos */
  margin: 8px 0 !important;
}

.quiz-item .q-alt-letter {
  flex: 0 0 28px !important;
  width: 28px !important;
  height: 28px !important;
  display: inline-grid !important;
  place-items: center !important;
  font-size: 14px !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  transform: none !important;
  vertical-align: middle !important;
}

.quiz-item .q-alt-text {
  margin: 0 !important;
  padding: 0 !important;
}


/* ===================== PRÉ-PEDIDO (MODAL) ===================== */

/* trava rolagem do fundo quando abrir modal */
body.modal-open { overflow: hidden; }

#preOverlay{
  display:none;
  position:fixed;
  inset:0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  z-index: 99990;
}

#preModal{
  display:none;
  position:fixed;
  left:50%;
  top:50%;
  transform: translate(-50%, -50%);
  width: min(1100px, 96vw);
  max-height: 92vh;

  background: rgba(255,255,255,0.96);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);

  overflow: hidden;              /* importante: quem rola é o conteúdo, não o modal inteiro */
  z-index: 99991;

  display:flex;
  flex-direction: column;
}

/* header */
#preModal .pre-head{
  padding: 14px 16px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #e5e7eb;
}

/* Evita o botão Fechar "esticar" dentro do header do modal */
#preModal #preFechar{
  width: auto !important;
  flex: 0 0 auto;
  white-space: nowrap;
}

#preModal .pre-title{
  margin:0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

#preModal .pre-sub{
  padding: 10px 16px 0 16px;
  margin: 0;
  color:#6b7280;
  font-size: 13px;
}

/* área rolável */
#preContent{
  padding: 12px 16px;
  overflow: auto;
  flex: 1;
}

/* Deixa o input de Qtd sugerida com cara de campo editável (minimalista) */
#tablePrePedido input[data-pre-qtd]{
  border: 1px solid #e6e9ef;
  background: #fff;
  padding:6px 8px;
  border-radius:8px;
}
#tablePrePedido input[data-pre-qtd]:focus{
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

/* footer fixo */
#preModal .pre-foot{
  padding: 12px 16px;
  border-top: 1px solid #e5e7eb;
  background: linear-gradient(180deg, rgba(248,250,252,0.85), #ffffff);
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

#preModal .pre-actions{ display:flex; gap:10px; }

/* Evita quebra de linha nos botões do pré-pedido e garante largura mínima */
#preModal .pre-actions .btn{ white-space: nowrap; }
#preModal .pre-actions .btn{ min-width: 140px; }


/* tabela dentro do modal */
#preContent .table-wrap{
  border: 1px solid #e6e9ef;
  border-radius: 12px;
  overflow: auto;
  background: #fff;
}

/* Ajustes específicos recomendados para o Pré-pedido (visuais SaaS) */
/* Padroniza botões apenas dentro do modal para evitar herança indesejada */
#preModal .btn{
  border-radius: 12px;
  padding: 8px 12px;
  font-weight: 600;
  box-shadow: none;
  border: 1px solid transparent;
  background: #fff;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Ghost dentro do modal */
#preModal .btn--ghost{
  background: #fff;
  border-color: #e6e9ef;
}

/* Primary CTA */
#preModal .btn--primary{
  background: linear-gradient(135deg,#1e4a6c,#3b82f6);
  color: #fff;
  border-color: transparent;
}

/* Ajustes tipográficos do header */
#preModal .pre-title{ font-size: 17px; }
#preModal .pre-sub{ margin-top: 2px; line-height: 1.25; }

/* Header e footer "fixos" dentro do modal para sensação premium */
#preModal .pre-head{
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  z-index: 3;
}

#preModal .pre-head-left{ padding-left: 14px; }

#preModal .pre-foot{
  position: sticky;
  bottom: 0;
  z-index: 3;
}

/* Especificidade para o botão Fechar (visualmente mais leve) */
#preModal #preFechar.btn--ghost{ background: #fff; }

/* Tabela: alinhar colunas numéricas à direita (ERP-like) */
/* Ajuste os índices conforme sua ordem de colunas */
#tablePrePedido td:nth-child(2),
#tablePrePedido td:nth-child(3),
#tablePrePedido td:nth-child(4),
#tablePrePedido td:nth-child(5),
#tablePrePedido td:nth-child(6),
#tablePrePedido td:nth-child(7){
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* coluna Item: alinhada à esquerda, mas com truncamento para nomes longos */
#tablePrePedido td:nth-child(1){
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Destaque para saldos negativos/positivos/neutros quando a célula receber classe via JS */
#tablePrePedido .neg{ color:#b91c1c; background:#fef2f2; border-radius:8px; padding:2px 8px; display:inline-block; min-width:42px; text-align:center; }
#tablePrePedido .pos{ color:#065f46; background:#ecfdf5; border-radius:8px; padding:2px 8px; display:inline-block; min-width:42px; text-align:center; }
#tablePrePedido .neu{ color:#334155; background:#f1f5f9; border-radius:8px; padding:2px 8px; display:inline-block; min-width:42px; text-align:center; }

/* Peso visual da tabela: bordas mais definidas e hierarquia */
#tablePrePedido th, #tablePrePedido td{
  border-bottom: 1px solid #eef2f7;
}
#tablePrePedido thead th{
  border-bottom: 1px solid #e6e9ef;
}

/* alinhamento do rótulo do total no footer da tabela */
#tablePrePedido .pre-total-label{ text-align: right; }

/* remove underline for links inside the pre modal table (if any) */
#preModal #tablePrePedido a{ color:inherit; text-decoration:none; }

/* destaque visual para a linha de total sugerido */
#tablePrePedido .pre-total-row{
  background: linear-gradient(180deg, rgba(248,250,252,0.6), #ffffff);
  font-weight: 600;
}

/* ===== PRÉ-PEDIDO: alinhamento consistente (th + td) ===== */
#tablePrePedido th:nth-child(n+2),
#tablePrePedido td:nth-child(n+2){
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#tablePrePedido th:first-child,
#tablePrePedido td:first-child{
  text-align: left;
}

/* última coluna: input alinhado com o total (lado direito) */
#tablePrePedido td:last-child{
  text-align: right;
}
#tablePrePedido td:last-child input[data-pre-qtd]{
  display: block;
  margin-left: auto;
  text-align: right;
}

/* evita o nome do item quebrar linha (fica elegante) */
#tablePrePedido td:first-child{
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* total “grudado” no grid da última coluna */
#tablePrePedido tfoot .pre-total-label{
  text-align: right;
  padding-right: 14px;
}


/* em vez de width fixa, usa min-width */
#tablePrePedido{
  width: 100%;
  min-width: 924px;              /* mantém seu layout, mas não força sempre */
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

/* header mais moderno + sticky */
#tablePrePedido thead th{
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
}

/* zebra + hover (fica muito mais “SaaS”) */
#tablePrePedido tbody tr:nth-child(even){ background:#fcfdff; }
#tablePrePedido tbody tr:hover{ background:#f1f5ff; }

/* inputs mais bonitos */
#tablePrePedido input[data-pre-qtd]{
  width: 92px !important;
  padding: 6px 8px;
  border-radius: 10px;
}

/* pequenos ajustes visuais */
.btn--ghost{ background:transparent; border:1px solid #e6e9ef; }

/* ===================== PRÉ-PEDIDO — ALINHAMENTO PERFEITO ===================== */
/* (Cabeçalho e corpo alinhados por coluna, igual às outras tabelas do sistema) */

#preModal #tablePrePedido th,
#preModal #tablePrePedido td{
  padding: 12px 14px;
  vertical-align: middle;
}

/* 1) Item: texto à esquerda */
#preModal #tablePrePedido th:nth-child(1),
#preModal #tablePrePedido td:nth-child(1){
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 2) CA: centralizado */
#preModal #tablePrePedido th:nth-child(2),
#preModal #tablePrePedido td:nth-child(2){
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* 3/4/5) Estoque / Mín / Venc 30d: números centralizados */
#preModal #tablePrePedido th:nth-child(3),
#preModal #tablePrePedido td:nth-child(3),
#preModal #tablePrePedido th:nth-child(4),
#preModal #tablePrePedido td:nth-child(4),
#preModal #tablePrePedido th:nth-child(5),
#preModal #tablePrePedido td:nth-child(5){
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* 6) Saldo (badge): centralizado fica mais “limpo” */
#preModal #tablePrePedido th:nth-child(6),
#preModal #tablePrePedido td:nth-child(6){
  text-align: center;
}

/* 7) Qtd sugerida (input): centralizado */
#preModal #tablePrePedido th:nth-child(7),
#preModal #tablePrePedido td:nth-child(7){
  text-align: center;
}
#preModal #tablePrePedido td:nth-child(7) input[data-pre-qtd]{
  text-align: center;
}

/* ===================== PRÉ-PEDIDO (MODAL) — ALINHAMENTO FINAL ===================== */
#preModal #tablePrePedido{
  width: 100%;
  min-width: 924px;            /* mantém sua referência */
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

/* Mesmo espaçamento de tabela “boa” (mais legível) */
#preModal #tablePrePedido th,
#preModal #tablePrePedido td{
  padding: 12px 14px;
  vertical-align: middle;
}

/* Cabeçalho mais consistente */
#preModal #tablePrePedido thead th{
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .02em;
  text-align: left;            /* base: texto à esquerda */
}

/* Larguras (você já tem — aqui só reforço com o escopo do modal) */
#preModal #tablePrePedido th:nth-child(1),
#preModal #tablePrePedido td:nth-child(1){ width:217px; text-align:left; white-space: normal; }

#preModal #tablePrePedido th:nth-child(2),
#preModal #tablePrePedido td:nth-child(2){ width:121px; text-align:left; white-space: nowrap; }

/* NÚMEROS: alinhar “título com número” = mesmo alinhamento */
#preModal #tablePrePedido th:nth-child(3),
#preModal #tablePrePedido td:nth-child(3){ width:97px;  text-align:center; }

#preModal #tablePrePedido th:nth-child(4),
#preModal #tablePrePedido td:nth-child(4){ width:71px;  text-align:center; }

#preModal #tablePrePedido th:nth-child(5),
#preModal #tablePrePedido td:nth-child(5){ width:140px; text-align:center; }

/* Saldo é badge/pílula → fica melhor centralizado */
#preModal #tablePrePedido th:nth-child(6),
#preModal #tablePrePedido td:nth-child(6){ width:165px; text-align:center; }

/* Input (Qtd sugerida) → centralizado e com largura consistente */
#preModal #tablePrePedido th:nth-child(7),
#preModal #tablePrePedido td:nth-child(7){ width:113px; text-align:center; }

#preModal #tablePrePedido td:nth-child(7) input[data-pre-qtd]{
  width: 86px !important;      /* vence inline width:100px do JS */
  text-align: center;
  margin: 0 auto;
  height: 34px;
  border-radius: 10px;
}

/* Se “Saldo (sem compra)” estiver quebrando feio, deixa quebrar bonito */
#preModal #tablePrePedido th:nth-child(6){
  white-space: normal;
  line-height: 1.15;
}




/* ===================== PRÉ-PEDIDO — ALINHAMENTO FINAL ===================== */

/* Espaçamento consistente */
#preModal #tablePrePedido th,
#preModal #tablePrePedido td{
  padding: 10px 8px;
  vertical-align: middle;
  font-size: 13px;
}

/* Pré-pedido: base estrutural da tabela */
#preModal #tablePrePedido{
  table-layout: fixed !important;
  width: 781px !important;           /* exatamente o total das colunas */
  border-collapse: separate;
  border-spacing: 0;
}

/* Coluna 1 — Item */
#preModal #tablePrePedido th:nth-child(1),
#preModal #tablePrePedido td:nth-child(1){
  text-align: left;
  white-space: normal;
}

/* Coluna 2 — CA */
#preModal #tablePrePedido th:nth-child(2),
#preModal #tablePrePedido td:nth-child(2){
  text-align: center;
}

/* Colunas numéricas — alinhamento perfeito título ↔ número */
#preModal #tablePrePedido th:nth-child(3),
#preModal #tablePrePedido td:nth-child(3),
#preModal #tablePrePedido th:nth-child(4),
#preModal #tablePrePedido td:nth-child(4),
#preModal #tablePrePedido th:nth-child(5),
#preModal #tablePrePedido td:nth-child(5){
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Saldo — badge central */
#preModal #tablePrePedido th:nth-child(6),
#preModal #tablePrePedido td:nth-child(6){
  text-align: center;
}

/* Qtd sugerida — input central */
#preModal #tablePrePedido th:nth-child(7),
#preModal #tablePrePedido td:nth-child(7){
  text-align: center;
}

#preModal #tablePrePedido td:nth-child(7) input{
  width: 80px;
  margin: 0 auto;
  text-align: center;
}

/* IMPORTANTE: remover/regra conflitante ex.: */
/* #tablePrePedido tbody td{ text-align: left !important; } */

/* Opcional: centralizar tabela dentro do modal */
#preModal .table-wrap{
  display: flex;
  justify-content: center;
}







/* =========================
   LOJA - TOP NAV (VITRINE)
========================= */
.store-topnav{
  margin: 10px 0 14px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(2, 8, 23, .05);
  position: sticky;
  top: 10px;
  z-index: 20;
}

.store-topnav-list{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  overflow: visible;     /* IMPORTANTÍSSIMO pro mega menu aparecer */
  flex-wrap: wrap;       /* se faltar espaço, quebra linha ao invés de rolar */
}

/* Evita qualquer scroll horizontal provocado por menus na LOJA */
#loja { overflow-x: hidden; }

.store-topnav-item{ position: relative; }

.store-topnav-btn{
  border: 1px solid transparent;
  background: transparent;
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s ease, color .14s ease, transform .12s ease;
}

.store-topnav-btn:hover{
  background: rgba(37, 99, 235, .08);
  border-color: rgba(37, 99, 235, .18);
  transform: translateY(-1px);
}

.store-topnav-btn .chev{
  margin-left: 6px;
  opacity: .7;
}


/* Topnav / dropdowns */
.store-topnav { position: relative; overflow: visible; }
.store-topnav-list { display: flex; gap: 18px; align-items: center; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.store-topnav-item { position: relative; }

.store-topnav-btn { cursor: pointer; border: 0; background: transparent; padding: 10px 12px; border-radius: 999px; font-weight: 800; }
.store-topnav-btn:hover { background: rgba(37, 99, 235, 0.08); }
.store-topnav-btn .chev { margin-left: 6px; font-size: 12px; opacity: .7; }

/* Mega menu — usa fixed pra não empurrar o conteúdo da página */
.store-topnav-item.has-mega { position: static; }

.store-mega{
  position: fixed;
  top: var(--mega-top, 64px);
  left: var(--mega-left, 16px);
  right: auto;

  width: min(980px, calc(100vw - 32px));
  max-width: 980px;
  max-height: min(80vh, 520px);
  overflow-y: auto;

  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.96));
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 14px;
  padding: 16px 18px;

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;

  box-shadow: 0 10px 30px rgba(15,23,42,.08), 0 24px 60px rgba(15,23,42,.06);
  z-index: 9999;
  will-change: transform, opacity, box-shadow;

  opacity: 0;
  transform: translateY(-6px) scale(.995);
  transition: opacity .16s ease, transform .18s cubic-bezier(.2,.9,.3,1), box-shadow .18s ease;
  pointer-events: none;
}

.store-mega.is-open{
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  box-shadow: 0 20px 50px rgba(15,23,42,.12), 0 8px 18px rgba(15,23,42,.06);
}

/* “Ponte” invisível pra não sumir quando desce o mouse */
.store-mega::before{
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: -12px;
  height: 12px;
}

/* Colunas do mega */
.store-mega-col { display: flex; flex-direction: column; gap: 10px; }
.store-mega .store-dd-item{
  text-align: left;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  color: #0f172a;
  transition: background .14s ease, transform .12s ease, padding-left .12s ease;
}
.store-mega .store-dd-item:hover{
  background: rgba(37, 99, 235, 0.08);
  transform: translateX(6px);
  padding-left: 14px;
  box-shadow: inset 0 0 0 1px rgba(37,99,235,0.03);
}

.store-mega .store-dd-item:active{
  transform: translateX(2px);
}


/* Mobile: mega vira 1 coluna */
@media (max-width: 860px){
  .store-topnav{ top: 6px; }
  .store-mega{
    grid-template-columns: 1fr;
    min-width: 320px;
    width: min(420px, calc(100vw - 20px));
  }
}







.loja-specs-title{font-weight:700;color:#0f172a;margin:8px 0 4px;}
#especContainer{display:flex;flex-direction:column;gap:8px;}
.espec-group{display:grid;grid-template-columns:1fr 2fr auto;gap:8px;align-items:flex-start;}
.espec-group input,.espec-group textarea{width:100%;}
.espec-group textarea{min-height:60px;resize:vertical;}
.espec-del{align-self:start;background:#f44336;color:#fff;border:none;padding:8px 10px;border-radius:6px;cursor:pointer;}
.espec-del:hover{filter:brightness(1.05);}
.loja-det-spec{border:1px solid #e5e7eb;border-radius:10px;padding:10px 12px;margin-bottom:10px;}
.loja-det-spec h4{margin:0 0 6px;font-size:14px;color:#0f172a;}
.loja-det-spec p{margin:0;white-space:pre-wrap;}

/* Upload de imagem no modal da Loja - preview */
.loja-img-box{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.loja-imgs-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px;}
.loja-img-slot{position:relative;border:1px dashed #cbd5e1;border-radius:10px;aspect-ratio:4/5;overflow:hidden;background:#fff;display:grid;place-items:center;}
.loja-img-slot img{width:100%;height:100%;object-fit:cover;}
.loja-img-del{position:absolute;top:6px;right:6px;background:#fff;border:1px solid #fecdd3;color:#b91c1c;border-radius:8px;padding:4px 8px;cursor:pointer;font-size:12px;}
.loja-img-del:hover{box-shadow:0 6px 14px rgba(185,28,28,.18);}

.loja-img-preview{
  position: relative;
  width:100%;
  aspect-ratio: var(--loja-card-ratio);
  border:1px dashed #d6e2f5;
  border-radius:14px;
  background: #fff;
  overflow:hidden;
  --img-x: 50%;
  --img-y: 50%;
  --img-zoom: 1;
}

.loja-img-preview::before{
  content:"Sem imagem";
  font-size:12px;
  color:#7a8fb6;
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
}

.loja-img-preview.is-on::before{
  content:"";
}

.loja-img-preview img{
  position:absolute;
  top:50%;
  left:50%;
  width:100%;
  height:100%;
  max-width:none;
  max-height:none;
  object-fit:contain;
  transform: translate(calc(-50% + var(--img-x, 50%)), calc(-50% + var(--img-y, 50%))) scale(var(--img-zoom, 1));
  transform-origin:center;
  display:none;
}

.loja-img-preview.is-on img{
  display:block;
}

/* PREVIEW do cadastro igual ao card */
#lojaProdImgPreviewWrap{
  display: none;
}

#lojaProdImgPreviewWrap.is-on{
  display: block;
}

#lojaProdImgPreview{
  pointer-events: none;
}

.loja-det-thumbs{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px;}
.loja-det-thumbs{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px;scroll-snap-type:x mandatory;overflow-x:auto;padding-bottom:4px;}
.loja-det-thumbs .loja-thumb{border:1px solid #e5e7eb;border-radius:12px;padding:4px;background:#fff;cursor:pointer;width:74px;height:74px;display:grid;place-items:center;transition:box-shadow .14s ease, border-color .14s ease, transform .12s ease; scroll-snap-align:start;}
.loja-det-thumbs .loja-thumb:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(15,23,42,.12);}
.loja-det-thumbs .loja-thumb.is-on{border-color:#3b82f6;box-shadow:0 10px 26px rgba(59,130,246,.16);}
.loja-det-thumbs img{width:100%;height:100%;object-fit:cover;border-radius:10px;}

/* Deixa a prévia da imagem menor dentro do modal de produto */
#lojaProdModal .loja-img-box{
  align-items: flex-start;
}

#lojaProdModal .loja-img-preview{
  width: 180px;
  max-width: 100%;
}

@media (max-width: 640px){
  #lojaProdModal .loja-img-preview{ width: 140px; }
}

/* CROP: garantir 1 tela e viewport limpa */
#lojaCropModal{
  max-height: 88vh;
  overflow-x: hidden;
  overflow-y: auto;
}

#lojaCropModal .loja-crop-viewport{
  width: 100%;
  aspect-ratio: var(--loja-card-ratio);
  max-height: 280px;
  min-height: 200px;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  position: relative;
}

#lojaCropModal .cropper-container{
  width: 100% !important;
  height: 100% !important;
}

/* escurece mais a área fora do recorte */
#lojaCropModal .cropper-modal{
  background-color: rgba(0,0,0,0.70) !important;
}

/* deixa o quadro do recorte mais “visível” */
#lojaCropModal .cropper-view-box{
  outline: 2px solid rgba(255,255,255,0.95);
  outline-offset: -2px;
}

#lojaCropModal .cropper-face{
  background-color: rgba(255,255,255,0.10);
}

#lojaCropModal .cropper-line,
#lojaCropModal .cropper-point{
  background-color: rgba(255,255,255,0.95);
}


/* ===== LOJA: CROP (sombra mais escura + área útil bem marcada) ===== */
body.loja-crop-open #lojaCropOverlay{
  background: rgba(0,0,0,.72) !important;
}

body.loja-crop-open .cropper-modal{
  background-color: #000 !important;
  opacity: .65 !important;
}

body.loja-crop-open .cropper-view-box{
  outline: 2px solid rgba(255,255,255,.95) !important;
  outline-offset: -2px;
  border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.55) !important;
}

body.loja-crop-open .cropper-face{
  background-color: rgba(255,255,255,.05) !important;
}

/* garante que o recorte fique limpo dentro do modal */
.loja-crop-modal{
  max-width: 760px;
}

.loja-crop-viewport{
  width: 100%;
  aspect-ratio: var(--loja-card-ratio);
  max-height: 280px;
  min-height: 200px;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  position: relative;
}
#lojaCropImg{
  position:absolute;
  top:50%;
  left:50%;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  transform: translate(calc(-50% + var(--img-x, 50%)), calc(-50% + var(--img-y, 50%))) scale(var(--img-zoom, 1));
  transform-origin: center;
  user-select: none;
  pointer-events: auto;
}







/* Ajuste de altura do card da loja */
.store-card .img { height:auto; min-height:190px; aspect-ratio: var(--loja-card-ratio); }

/* Estilos do modal de detalhe do produto (Loja) */
.loja-det-modal{
  width: min(980px, 96vw);
  max-height: 92vh;
  overflow: auto;
}

.loja-det-grid{
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 14px;
}

.loja-det-left{
  background: #f5f7ff;
  border: 1px solid #e7ebff;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
}

#lojaDetImg{
  width: 100%;
  height: 340px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}

.loja-det-nome{ font-weight: 800; font-size: 16px; margin-top: 4px; }
.loja-det-meta{ font-size: 12px; opacity: .8; margin: 6px 0 10px; }
.loja-det-preco{ font-size: 18px; font-weight: 900; margin: 8px 0 12px; }

.loja-det-label{ font-size: 12px; font-weight: 700; opacity: .85; margin-bottom: 6px; }

.loja-det-cores{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.loja-cor-dot{
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,.15);
  cursor: pointer;
  position: relative;
}

.loja-cor-dot.is-active{
  border-color: #1f4bff;
  box-shadow: 0 0 0 3px rgba(31,75,255,.15);
}

.loja-cor-dot.is-disabled{
  opacity: .35;
  pointer-events: none;
}

.loja-cor-dot.is-active::after{
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #0a1a55;
  font-weight: 900;
}

.loja-det-qty{
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}

#lojaDetQtd{
  width: 80px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #dfe6ff;
  text-align: center;
  outline: none;
}

.loja-det-desc{
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e7ebff;
}

.loja-det-desc-text{
  font-size: 13px;
  line-height: 1.5;
  opacity: .9;
  white-space: pre-wrap;
}


/* garantir detalhe acima de tudo (apenas Loja) */
#lojaDetOverlay { z-index: 5000; }
#lojaDetModal   { z-index: 5001; }



/* ---------------------- Ajustes Loja: refinamento solicitado ---------------------- */
/* Cabeçalho: título + fechar */
#lojaDetNome{
  font-size: 22px;     /* fonte um pouco maior */
  font-weight: 800;    /* peso maior */
  margin: 0 0 4px 0;   /* espaçamento menor entre título e meta */
  line-height: 1.08;
}

#lojaDetMeta{
  font-size: 13px;     /* reduzido levemente */
  opacity: .85;        /* aumentar opacidade clara */
  margin-top: 2px;
}

/* Imagem do produto: destaque maior */
.loja-det-media{
  padding: 8px; /* reduzir padding interno */
  background: linear-gradient(180deg, rgba(245,247,255,0.6) 0%, rgba(255,255,255,0.85) 70%); /* degradê suave */
  border-radius: 14px;
  display: flex;
  align-items: center; /* centralizar verticalmente */
  justify-content: center;
  min-height: 420px;
}

#lojaDetImg{
  height: 400px; /* aumentar levemente */
  width: 100%;
  max-width: 100%;
  object-fit: contain; /* manter */
  display: block;
  margin: 0 auto;
}

/* Seletor de cores (premium) */
.loja-color-dot,
.loja-cor-dot{
  width: 28px; height: 28px;             /* aumentar levemente */
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  box-shadow: 0 6px 18px rgba(2,6,23,0.08); /* sombra suave */
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease, border-color .12s ease;
  /* borda branca interna: criado com box-shadow inset */
  box-shadow: 0 6px 18px rgba(2,6,23,0.08), inset 0 0 0 2px rgba(255,255,255,0.85);
}

.loja-color-dot.is-on,
.loja-cor-dot.is-active{
  border-color: transparent; /* a cor principal fica visível por baixo */
  box-shadow: 0 6px 22px rgba(2,6,23,0.10), 0 0 0 6px rgba(31,75,255,0.12); /* anel externo azul suave */
}

.loja-color-dot.is-on::after,
.loja-cor-dot.is-active::after{
  content: "✓"; /* check centralizado */
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #07207a;
  font-weight: 800;
}

.loja-color-dot.is-off,
.loja-cor-dot.is-disabled{
  opacity: .35;           /* reduzir opacidade */
  pointer-events: none;   /* sem pointer */
  cursor: default;
}

/* Card de compra: organização e destaque */
.loja-det-buy{
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  border: 1px solid rgba(15,23,42,0.06);
  box-shadow: 0 12px 28px rgba(2,6,23,0.08); /* sombra suave no card inteiro */
}

.loja-det-buy .loja-det-preco{ display:flex; flex-direction:column; gap:6px; }
.loja-det-buy .loja-det-preco .muted{ font-size:12px; font-weight:700; }
.loja-det-buy .loja-det-preco b{ font-size:26px; } /* aumentar valor */

.loja-det-buy .loja-color-list{ margin-top:6px; }

.loja-det-buy .loja-qty-ctrl{ margin-top:6px; }

/* Botão Adicionar ao carrinho */
#btnLojaDetAdd{
  background: linear-gradient(135deg, #1d4ed8, #2563eb); /* leve gradiente */
  color: #fff;
  border: none;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(37,99,235,0.18);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

#btnLojaDetAdd:hover{
  transform: translateY(-4px); /* subir levemente */
  box-shadow: 0 16px 36px rgba(37,99,235,0.26);
}

#btnLojaDetAdd:active{
  transform: translateY(0); /* afundar levemente no clique */
  box-shadow: 0 6px 18px rgba(37,99,235,0.18);
}

/* Descrição: caixa visível sem rolar */
.loja-det-desc{
  margin: 12px 18px 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(248,250,252,0.9);
  border: 1px solid rgba(15,23,42,0.04);
}

/* Animação de abertura suave (fade + scale) */
@keyframes lojaDetIn{
  from{
    opacity: 0;
    transform: translate(-50%, -50%) translateY(10px) scale(.98);
  }
  to{
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0) scale(1);
  }
}

#lojaDetModal{
  animation: lojaDetIn .16s ease;
  will-change: transform, opacity;
}

/* Overlay mais leve e com blur */
#lojaDetOverlay{
  position: fixed;   /* garante overlay cobrindo toda a tela */
  inset: 0;
  display: none;     /* mostrado via JS quando necessário */
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2,6,23,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 5000;
}

/* centralização e posicionamento do modal de detalhe agora estão
   consolidados no bloco principal "LOJA — MODAL DETALHE". */

/* Responsividade: mobile refinado */
@media (max-width: 900px){
  .loja-det-grid{ grid-template-columns: 1fr; }
  .loja-det-media{ order: -1; min-height: 300px; }
  #lojaDetImg{ height: 260px; }
  .loja-det-buy{ width: 100%; }
  #btnLojaDetAdd{ width: 100%; }
}

/* Garantir que o início da descrição seja visível em desktop (pequeno ajuste estrutural) */
@media (min-width: 901px){
  .loja-det-modal{ max-height: 86vh; overflow: auto; }
  .loja-det-grid{ padding-bottom: 6px; }
}

/* fim do bloco de refinamento Loja */

/* Estilos de polimento visual do modal estão mantidos nos seletores
   específicos (.loja-det-inner, .loja-det-media, etc.). A base de
   posicionamento foi consolidada em um bloco único no topo do arquivo. */

/* ==========================
   LOJA — TOPO / NAV / TOOLBAR
   ========================== */

/* Header da Loja: duas linhas claras */
.store-header{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-bottom:12px;
}
.store-header .store-header-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.store-header .store-header-bottom{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:flex-start;
}

/* Padroniza o badge do carrinho */
.store-badge, #lojaCartCount{
  display:inline-grid;
  min-width:28px; height:20px; padding:0 8px;
  place-items:center;
  background: linear-gradient(180deg,#eef2ff,#e0e7ff);
  color:#1e3a8a;
  border-radius:999px;
  font-weight:700;
  font-size:12px;
  box-shadow: 0 6px 14px rgba(16,24,40,0.06);
}

/* Topnav: nav pills e estado ativo */
.loja-topnav{
  display:flex; gap:8px; flex-wrap:wrap; align-items:center;
}
.loja-topnav .store-topnav-item{ display:inline-flex; }
.loja-topnav .store-topnav-btn{
  padding:8px 12px; border-radius:999px; border:1px solid transparent; cursor:pointer;
}
.loja-topnav .store-topnav-btn.active,
.loja-topnav .loja-topitem.active{
  background: rgba(59,130,246,0.08);
  color: #1e40af;
  border-color: rgba(59,130,246,0.18);
}

/* mobile: scroll horizontal sem quebra */
@media (max-width: 980px){
  .loja-topnav{ overflow-x:auto; -webkit-overflow-scrolling:touch; white-space:nowrap; }
  .loja-topnav .store-topnav-item{ display:inline-flex; }
  .loja-topnav::-webkit-scrollbar{ display:none; }
}

/* Toolbar: inputs e botões com mesma altura e raio */
.store-toolbar{ display:flex; gap:12px; align-items:center; justify-content:space-between; margin-bottom:14px; }
.store-search-block, .store-filter-block{ display:flex; flex-direction:column; gap:6px; }
.store-search-block .ctrl, .store-filter-block .ctrl, .store-toolbar .btn{ height:40px; border-radius:10px; }
.store-search-block .ctrl{ padding:8px 12px; box-shadow: 0 6px 18px rgba(2,6,23,0.04); }
.store-filter-block .ctrl{ padding:8px 12px; }
.store-toolbar-right .btn{ height:40px; padding:8px 12px; }

/* Grid Head: reduz poluição visual */
.store-grid-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.store-grid-title{ margin:0; font-size:20px; font-weight:700; color:#0f172a; }
.store-grid-sub{ margin:2px 0 0; font-size:12px; color:#94a3b8; }

/* ==========================
   LOJA — CARDS (refinamento)
   ========================== */
.store-grid{ display:grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap:18px; }
.store-card{ background:#fff; border-radius:14px; overflow:hidden; border:1px solid rgba(15,23,42,0.02); box-shadow: 0 18px 42px rgba(15,23,42,0.08); transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease; display:flex; flex-direction:column; }
.store-card .img{
  position: relative;
  width: 100%;
  aspect-ratio: var(--loja-card-ratio);
  min-height: 190px;
  background:#fff;
  overflow:hidden;
  --img-x: 50%;
  --img-y: 50%;
  --img-zoom: 1;
}
.store-card .img img{
  position: absolute;
  top:50%;
  left:50%;
  width:100%;
  height:100%;
  max-width:none;
  max-height:none;
  object-fit: contain;
  transform: translate(calc(-50% + var(--img-x, 50%)), calc(-50% + var(--img-y, 50%))) scale(var(--img-zoom, 1));
  transform-origin: center;
}
.store-card .body{ padding:14px 16px 16px; display:flex; flex-direction:column; gap:10px; }
.store-card .title{ font-weight:600; font-size:15px; color:#0f172a; line-height:1.25; }
.store-card .meta{ display:flex; gap:10px; flex-wrap:wrap; color:#94a3b8; font-size:12px; }
.store-card .meta .pill{ margin:0; background:transparent; color:inherit; padding:0; border-radius:0; }
.store-card .price{ display:flex; align-items:baseline; gap:6px; }
.store-card .price b{ font-size:20px; color:#0f172a; font-weight:700; }
.store-card .price small{ color:#94a3b8; font-size:12px; }
.store-card .actions{ display:flex; gap:8px; margin-top:auto; }
.store-card:hover{ transform: translateY(-6px); box-shadow: 0 24px 58px rgba(15,23,42,0.12); border-color: rgba(15,23,42,0.06); }

/* Ajuste do botão principal no card */
.store-card .actions .btn-primary{ flex:1; }

/* ==========================
   LOJA — DRAWER/CART
   ========================== */
.store-drawer{ width: 420px; max-width: 96vw; right:0; top:0; bottom:0; position:fixed; background:#fff; box-shadow: -18px 0 40px rgba(2,6,23,0.08); display:flex; flex-direction:column; z-index:6000; }
.store-cart-items{ flex:1; overflow:auto; padding:12px; }
.store-cart-footer{ border-top:1px solid rgba(15,23,42,0.04); padding:12px; display:flex; flex-direction:column; gap:10px; background:#fff; }
.store-cart-footer .store-cart-total{ display:flex; justify-content:space-between; align-items:center; font-weight:800; font-size:16px; }
.store-cart-empty{ text-align:center; padding:28px; color:#64748b; }
.store-cart-item{ display:flex; gap:10px; align-items:center; padding:8px 0; border-bottom:1px dashed rgba(15,23,42,0.04); }
.store-cart-item .thumb{ width:56px; height:56px; border-radius:8px; overflow:hidden; background:#f6f9ff; display:flex; align-items:center; justify-content:center; }
.store-cart-item .thumb img{ width:100%; height:100%; object-fit:cover; }
.store-cart-item .qty-ctrl{ display:flex; gap:8px; align-items:center; }
.store-cart-item .qty-ctrl button{ width:32px; height:32px; border-radius:8px; }

/* ==========================
   LOJA — MODAIS: Produto & Crop
   ========================== */
.modal .section{ padding:12px 0; border-bottom:1px solid rgba(15,23,42,0.04); }
.modal .section h4{ margin:0 0 8px 0; font-size:14px; }
.loja-var-list .var-row{ display:flex; gap:8px; align-items:center; padding:8px 0; }

/* crop preview final (pequeno quadrado) */
.loja-crop-preview{ width:76px; height:76px; border-radius:8px; overflow:hidden; border:1px solid rgba(15,23,42,0.06); background:#fff; }

/* =========================
   HOME - TITULO NO HEADER SUPERIOR
   ========================= */
.main-header-card{
  justify-content:space-between;
  align-items:center;
  gap:16px;
}

.main-header-home-title{
  display:none;
  margin:0;
  font-family:"Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size:31px;
  line-height:1.04;
  font-weight:300;
  letter-spacing:-0.02em;
  color:#4b5563;
  text-shadow:none;
  flex:1;
}

@media (max-width: 900px){
  .main-header-card{
    align-items:flex-start;
  }

  .main-header-home-title{
    font-size:23px;
    line-height:1.06;
  }
}

/* =========================
   HOME - ajuste fino do gráfico e da lista
   ========================= */
#home #estoqueGraficoPizza{
  min-height: 350px;
}

#home .home-chart-body{
  min-height: 290px;
  align-items: stretch;
  justify-content: center;
}

#home #graficoPizzaEstoque{
  width: calc(100% - 96px) !important;
  height: 290px !important;
  max-width: none;
  max-height: none;
  margin: 0 auto;
}

#home #homeListMovimentados .home-list-item{
  gap: 12px;
  align-items: center;
}

#home #homeListMovimentados .list-item-name{
  min-width: 0;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#home #homeListMovimentados .list-item-qtd{
  flex-shrink: 0;
  white-space: nowrap;
}

/* ==========================
   LOJA — TOAST (flutuante)
   ========================== */
#lojaToast{
  position:fixed;
  top:22px;
  right:22px;
  z-index:7000;
  display:none;
}

.loja-toast{
  min-width:340px;
  max-width:430px;
  padding:16px 18px;
  border-radius:20px;
  display:flex;
  gap:12px;
  align-items:flex-start;
  justify-content:space-between;
  box-shadow:
    0 24px 60px rgba(15,23,42,.18),
    0 10px 24px rgba(15,23,42,.08);
  backdrop-filter:blur(12px);
  border:1px solid rgba(255,255,255,.35);
}

.loja-toast .toast-msg{
  flex:1;
  font-size:13px;
  line-height:1.55;
}

.loja-toast .toast-close{
  width:28px;
  height:28px;
  border:none;
  border-radius:999px;
  background:rgba(255,255,255,.45);
  color:inherit;
  cursor:pointer;
  font-size:16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:transform .16s ease, background .16s ease;
}

.loja-toast .toast-close:hover{
  transform:scale(1.04);
  background:rgba(255,255,255,.7);
}

.loja-toast--ok{
  background:linear-gradient(135deg, rgba(239,246,255,.96), rgba(219,234,254,.96));
  color:#0f3c8a;
  border-color:rgba(147,197,253,.55);
}

.loja-toast--error{
  background:linear-gradient(135deg, rgba(255,241,242,.96), rgba(254,205,211,.96));
  color:#881337;
  border-color:rgba(253,164,175,.55);
}

#lojaPedModal{
  background:linear-gradient(180deg, rgba(255,255,255,.99), rgba(248,251,255,.98));
  border:1px solid #e6edf7;
  border-radius:26px;
  box-shadow:0 34px 80px rgba(15,23,42,.18);
}

.loja-modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding-bottom:14px;
  margin-bottom:14px;
  border-bottom:1px solid #edf2f7;
}

.loja-modal-title{
  margin:0;
  font-size:24px;
  font-weight:800;
  color:#0f172a;
  letter-spacing:-0.02em;
}

.loja-modal-subtitle{
  margin:6px 0 0;
  font-size:13px;
  color:#64748b;
  line-height:1.55;
}

#btnLojaPedFechar{
  min-width:132px;
  height:40px;
  padding:0 18px;
  border-radius:12px;
  border:1px solid #dbe4ef;
  background:linear-gradient(180deg,#ffffff 0%, #f8fafc 100%);
  color:#334155;
  font-weight:700;
  box-shadow:0 8px 18px rgba(15,23,42,.04);
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

#btnLojaPedFechar:hover{
  transform:translateY(-1px);
  border-color:#cfd9e6;
  background:#ffffff;
  box-shadow:0 12px 22px rgba(15,23,42,.06);
}

#lojaPedModal{
  scrollbar-width:thin;
  scrollbar-color:#cbd5e1 transparent;
}

#lojaPedModal::-webkit-scrollbar{
  width:10px;
}

#lojaPedModal::-webkit-scrollbar-track{
  background:transparent;
}

#lojaPedModal::-webkit-scrollbar-thumb{
  background:#d4dce7;
  border-radius:999px;
  border:2px solid transparent;
  background-clip:padding-box;
}


/* O corpo do modal (rolável) */
.loja-det-body{
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0;                /* espaço interno controlado pelos elementos internos */
}

/* Garante que o header fique sempre visível */
#lojaDetModal .loja-det-head{ position: sticky; top: 0; z-index: 3; }

/* Ajustes do grid: evita que a coluna direita fique apertada */
#lojaDetModal .loja-det-grid{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px); /* coluna direita com min width */
  gap: 18px;
  align-items: start; /* evita empurrões estranhos */

  padding: 18px;
}

/* Reduz a moldura da área da imagem e aumenta ligeiramente a imagem para preencher */
#lojaDetModal .loja-det-media{
  padding: 6px; /* menor moldura */
  min-height: 220px;
  display:flex; align-items:center; justify-content:center;
  background: linear-gradient(180deg, rgba(245,247,255,0.6), rgba(255,255,255,0.9));
  border-radius: 12px;
  border: 1px solid rgba(230,235,255,0.6);
}

#lojaDetModal #lojaDetImg{
  height: 180px;       /* imagem maior para preencher, mas controlada */
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* Right column (card) garante espaçamento e largura mínima maior */
#lojaDetModal .loja-det-buy{
  min-width: 360px;
  padding: 16px;
}

/* Header: botão X como icon button circular */
#lojaDetModal #btnLojaDetFechar{
  width: 40px; height: 40px; padding: 0; border-radius: 999px;
  display:inline-grid; place-items:center; border:1px solid transparent; background: rgba(0,0,0,0.04);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

#lojaDetModal #btnLojaDetFechar:hover{
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(2,6,23,0.08);
  background: rgba(0,0,0,0.06);
}

/* Meta mais discreta */
#lojaDetModal #lojaDetMeta{ font-size:12px; opacity:.6; text-transform:uppercase; letter-spacing:.04em; }

/* Linha divisória elegante abaixo do header */
#lojaDetModal .loja-det-head{ border-bottom: 1px solid rgba(15,23,42,0.06); padding: 14px 18px; }

/* Cores: bolinhas premium com anel duplo e tooltip */
#lojaDetModal .loja-color-list{ display:flex; gap:10px; align-items:center; }

#lojaDetModal .loja-color-dot,
#lojaDetModal .loja-cor-dot{
  width: 30px; height: 30px; border-radius:50%; position:relative; cursor:pointer;
  border: 2px solid rgba(255,255,255,0.8); box-shadow: 0 6px 18px rgba(2,6,23,0.08);
}

#lojaDetModal .loja-color-dot.is-on,
#lojaDetModal .loja-cor-dot.is-active{
  outline: 3px solid rgba(31,75,255,0.12); /* anel externo */
  box-shadow: 0 8px 26px rgba(31,75,255,0.12), 0 0 0 4px rgba(255,255,255,0.6) inset;
}

#lojaDetModal .loja-color-dot.is-on::after,
#lojaDetModal .loja-cor-dot.is-active::after{
  content: '✓'; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:#07207a; font-weight:800; font-size:14px;
}

/* tooltip com nome da cor (se o JS adicionar title="Nome") */
#lojaDetModal .loja-color-dot[title]:hover::before,
#lojaDetModal .loja-cor-dot[title]:hover::before{
  content: attr(title);
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: rgba(15,23,42,0.9); color:#fff; padding:6px 8px; border-radius:6px; font-size:12px; white-space:nowrap; z-index:4;
}

/* Botão CTA: leve reforço visual */
#lojaDetModal #btnLojaDetAdd{
  background: linear-gradient(135deg, #1e4ff3, #1d6ef0);
  box-shadow: 0 10px 28px rgba(29,78,216,0.18);
  border-radius: 12px; padding: 12px 16px; color:#fff; border:none; font-weight:700;
}

#lojaDetModal #btnLojaDetAdd:hover{ transform: translateY(-1px); box-shadow: 0 18px 40px rgba(29,78,216,0.22); }
#lojaDetModal #btnLojaDetAdd:active{ transform: translateY(0); box-shadow: 0 6px 18px rgba(29,78,216,0.16); }

/* Descrição: leitura melhorada */
#lojaDetModal .loja-det-desc{ background: #f6f9fc; padding: 16px; margin: 12px 18px 18px; border-radius: 12px; border: 1px solid rgba(15,23,42,0.04); }
#lojaDetModal .loja-det-desc-text{ line-height:1.7; color: #0f172a; }

/* Responsivo: ajustar colunas e tamanhos */
@media (max-width: 900px){
  #lojaDetModal.loja-det-modal{ width: calc(100vw - 24px); left:50%; transform: translate(-50%, -50%); }
  #lojaDetModal .loja-det-grid{ grid-template-columns: 1fr; padding: 12px; }
  #lojaDetModal #lojaDetImg{ height: 120px; }
  #lojaDetModal .loja-det-media{ min-height: 140px; }
  #lojaDetModal .loja-det-buy{ min-width: auto; }
}


/* Grid com proporção mais premium */
#lojaDetModal .loja-det-grid{
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.75fr);
  gap: 18px;
}

/* Área da imagem mais “galeria” */
#lojaDetModal .loja-det-media{
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,0.06);
  box-shadow: 0 18px 42px rgba(15,23,42,0.08);
  background: #f8fafc;
}

/* Imagem maior e bem centralizada (sobrescreve outras declarações) */
#lojaDetModal #lojaDetImg{
  height: 420px;
  object-fit: contain;
}

/* Chips de tamanho: mais consistentes e com estado forte */
#lojaDetModal .loja-size-list{
  gap: 10px;
}

#lojaDetModal .loja-size-pill{
  border-radius: 12px;
  padding: 9px 14px;
  min-width: 54px;
  letter-spacing: .02em;
}

#lojaDetModal .loja-size-pill:hover{
  transform: translateY(-1px);
}

#lojaDetModal .loja-size-pill.is-on{
  box-shadow: 0 10px 24px rgba(29,78,216,0.18);
}

/* Accordion mais sofisticado: hover + ativo + ícone girando */
#lojaDetModal .loja-acc-item{
  transition: background .14s ease, transform .14s ease;
}

#lojaDetModal .loja-acc-item:hover{
  background: rgba(29,78,216,0.04);
}

#lojaDetModal .loja-acc-item.is-open{
  background: rgba(29,78,216,0.06);
}

#lojaDetModal .loja-acc-item .acc-ico{
  transition: transform .16s ease;
}

#lojaDetModal .loja-acc-item.is-open .acc-ico{
  transform: rotate(180deg);
}

/* Focus ring no botão Adicionar ao carrinho (acessibilidade premium) */
#btnLojaDetAdd:focus{
  outline: none;
  box-shadow: 0 0 0 4px rgba(29,78,216,0.22), 0 16px 36px rgba(37,99,235,0.18);
}

/* Overlay do detalhe (somente Loja) */
#lojaDetOverlay.modal-overlay{
  background: rgba(2,6,23,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Base de posicionamento e scroll do modal consolidada em
   "LOJA — MODAL DETALHE" no início do arquivo. Evita regras
   conflitantes espalhadas pelo CSS. */

/* Imagem responsiva por breakpoint (sobrescreve regras anteriores) */
#lojaDetModal #lojaDetImg,
.loja-det-modal #lojaDetImg{
  height: 420px;
  object-fit: contain;
}

@media (max-width: 1200px){
  #lojaDetModal #lojaDetImg,
  .loja-det-modal #lojaDetImg{
    height: 320px;
  }
}

@media (max-width: 900px){
  #lojaDetModal #lojaDetImg,
  .loja-det-modal #lojaDetImg{
    height: 180px;
  }
}

/* Modal */
#lojaDetModal.loja-det-modal{
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,.08);
  box-shadow: 0 30px 70px rgba(2,6,23,.22);
  overflow: hidden; /* mantém cantos arredondados no scroll */
}

/* Cabeçalho (título + fechar) */
#lojaDetModal .loja-det-head{
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(15,23,42,.08);
}

/* Corrige o “Fechar” esticado */
#lojaDetModal #btnLojaDetFechar.btn{
  width: auto;
  min-width: 44px;
  padding: 10px 12px;
  border-radius: 12px;
}

/* Título/meta */
#lojaDetModal #lojaDetNome{ font-size: 20px; line-height: 1.15; }
#lojaDetModal #lojaDetMeta{ font-size: 12px; opacity: .75; }

/* Grid (imagem + compra) */
#lojaDetModal .loja-det-grid{
  padding: 16px 18px 6px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: 16px;
  align-items: start;
}

/* Coluna da imagem (HTML usa .loja-det-media) */
#lojaDetModal .loja-det-media{
  background: linear-gradient(180deg, #f5f7ff 0%, #ffffff 70%);
  border: 1px solid #e7ebff;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
}

#lojaDetModal #lojaDetImg{
  height: 380px; /* um pouco maior que o atual */
  width: 100%;
  max-width: 100%;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
}

/* Card de compra */
#lojaDetModal .loja-det-buy{
  background: #fff;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 10px 25px rgba(2,6,23,.10);
}

#lojaDetModal .loja-det-preco b{ font-size: 22px; }
#lojaDetModal .loja-det-preco .muted{ font-size: 12px; }

/* Lista de cores */
#lojaDetModal .loja-color-list{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* Suporta os 2 nomes que podem existir no seu JS (loja-color-dot e loja-cor-dot) */
#lojaDetModal .loja-color-dot,
#lojaDetModal .loja-cor-dot{
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,.15);
  cursor: pointer;
  position: relative;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, opacity .12s ease;
}

#lojaDetModal .loja-color-dot:hover,
#lojaDetModal .loja-cor-dot:hover{ transform: scale(1.05); }

#lojaDetModal .loja-color-dot.is-on,
#lojaDetModal .loja-cor-dot.is-active{
  border-color: #1f4bff;
  box-shadow: 0 0 0 4px rgba(31,75,255,.15);
}

#lojaDetModal .loja-color-dot.is-off,
#lojaDetModal .loja-cor-dot.is-disabled{
  opacity: .35;
  pointer-events: none;
}

/* Quantidade */
#lojaDetModal .loja-qty-ctrl{
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

#lojaDetModal #lojaDetQtd.ctrl{
  width: 72px;
  text-align: center;
}

/* Descrição */
#lojaDetModal .loja-det-desc{
  margin: 10px 18px 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid rgba(15,23,42,.06);
}

#lojaDetModal .loja-det-desc-text{
  font-size: 14px;
  line-height: 1.6;
  color: #0f172a;
}

/* Responsivo */
@media (max-width: 900px){
  #lojaDetModal .loja-det-grid{ grid-template-columns: 1fr; }
  #lojaDetModal .loja-det-media{ min-height: 340px; }
  #lojaDetModal #lojaDetImg{ height: 300px; }
}


/* =========================================================
   LOJA UI v2 — Design System + Grid/Cards padrão e-commerce
   (Somente Loja: tudo deve estar dentro de #loja ...)
   ========================================================= */
#loja{
  --loja-primary: #1d4ed8;
  --loja-bg: linear-gradient(180deg, #f4f7fb 0%, #eef3fb 100%);
  --loja-surface: #ffffff;
  --loja-surface-2: #f2f6ff;
  --loja-border: #e2e8f0;
  --loja-border-strong: #cbd5e1;
  --loja-text: #0f172a;
  --loja-muted: #475569;
  --loja-radius: 14px;
  --loja-radius-sm: 10px;
  --loja-shadow: 0 10px 28px rgba(15,23,42,0.06);
  --loja-shadow-hover: 0 18px 42px rgba(15,23,42,0.12);
  background: var(--loja-bg);
  color: var(--loja-text);
}

/* Toolbar alinhada e com ring azul no foco */
#loja .store-toolbar{
  display:grid;
  grid-template-columns: 0.6fr 0.3fr 0.1fr;
  gap:12px;
  align-items:end;
  margin:10px 0 16px;
}
@media (max-width:1080px){ #loja .store-toolbar{ grid-template-columns: 1fr 1fr; } }
@media (max-width:820px){ #loja .store-toolbar{ grid-template-columns: 1fr; } }
#loja .store-search-block,
#loja .store-filter-block{ display:flex; flex-direction:column; gap:6px; }
#loja .store-toolbar .ctrl,
#loja .store-toolbar input,
#loja .store-toolbar select,
#loja .store-toolbar .btn{
  height:44px;
  border-radius:12px;
  border:1px solid var(--loja-border);
  background: var(--loja-surface);
  transition: box-shadow .16s ease, border-color .16s ease, transform .12s ease;
}
#loja .store-toolbar .ctrl:focus,
#loja .store-toolbar input:focus,
#loja .store-toolbar select:focus,
#loja .store-toolbar .btn:focus-visible{
  outline:none;
  border-color: color-mix(in srgb, var(--loja-primary) 38%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--loja-primary) 18%, transparent);
}
#loja .store-toolbar .btn{ padding:0 14px; display:inline-flex; align-items:center; justify-content:center; gap:6px; font-weight:700; }
#loja .store-toolbar-actions{ display:flex; flex-direction:column; gap:6px; align-items:flex-end; }
#loja .store-toolbar-actions-main{ display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; align-items:center; }
#loja .store-toolbar-actions-main .btn{ height:38px; padding:0 12px; }
#loja .store-toolbar-toggles{ display:flex; flex-wrap:wrap; gap:6px; justify-content:flex-end; }
#loja .store-toolbar-toggles .pill{ background:#f8fafc; border:1px solid var(--loja-border); padding:4px 10px; font-weight:600; }

/* Loja: grid com cards padronizados (não estica quando tem 1 item) */
#loja .store-grid{
  display: grid;
  gap: 16px;

  /* min = 260px | max = 340px (não vira 100% da tela) */
  grid-template-columns: repeat(auto-fill, minmax(260px, 340px));

  /* escolha 1: start (fica alinhado à esquerda) */
  justify-content: start;

  /* escolha 2: center (fica centralizado quando tem 1 item) */
  /* justify-content: center; */
}

/* segurança extra (opcional) */
#loja .store-card{
  width: 100%;
  max-width: 340px;
}

/* Cards padrão e-commerce */
#loja .store-card{
  background: var(--loja-surface);
  border:1px solid var(--loja-border);
  border-radius: var(--loja-radius);
  box-shadow: var(--loja-shadow);
  display:flex;
  flex-direction:column;
  min-height:100%;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
#loja .store-card:hover{
  transform: translateY(-4px);
  box-shadow: var(--loja-shadow-hover);
  border-color: color-mix(in srgb, var(--loja-primary) 24%, var(--loja-border));
}
#loja .store-card .img{
  height:180px;
  aspect-ratio: 4 / 3;
  background: var(--loja-surface-2);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:12px;
}
#loja .store-card .img img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}
#loja .store-card .body{
  padding:12px 14px 14px;
  display:flex;
  flex-direction:column;
  gap:10px;
  flex:1;
}
#loja .store-card .title{
  font-weight:800;
  color: var(--loja-text);
  line-height:1.25;
  display:-webkit-box;
  line-clamp:2;
  -webkit-line-clamp:2;
  -webkit-box-orient: vertical;
  overflow:hidden;
}
#loja .store-card .meta{ display:flex; flex-wrap:wrap; gap:6px; color: var(--loja-muted); font-size:12px; }
#loja .store-card .price{ display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
#loja .store-card .price b{ font-size:18px; color: var(--loja-text); letter-spacing:-0.02em; }
#loja .store-card .price .muted{ color: var(--loja-muted); font-size:12px; }
#loja .store-card .actions{ display:flex; gap:8px; margin-top:auto; }
#loja .store-card .actions .btn{ flex:1; height:44px; }

/* Modal de cadastro/edição (grid 2 col) */
#lojaProdModal .loja-prod-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap:12px;
}
#lojaProdModal .loja-prod-desc{ display:flex; flex-direction:column; gap:10px; margin-top:12px; }
#lojaProdModal .loja-prod-footer{ display:flex; gap:10px; justify-content:flex-end; margin-top:14px; border-top:1px solid var(--loja-border); padding-top:12px; }
#lojaProdModal .loja-var-wrap{ margin-top:12px; display:flex; flex-direction:column; gap:10px; }
#lojaProdModal .loja-var-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
#lojaProdModal .loja-var-list{ display:flex; flex-direction:column; gap:10px; }
#lojaProdModal .loja-var-row{
  display:grid;
  grid-template-columns:
    minmax(160px, 1.2fr)
    90px
    minmax(120px, .9fr)
    minmax(110px, .8fr)
    100px
    minmax(220px, 1fr)
    auto;
  gap:10px;
  align-items:center;
  border:1px solid var(--loja-border);
  border-radius:12px;
  padding:10px;
  background: #f8fafc;
}
#lojaProdModal .loja-var-img{ display:flex; flex-direction:column; gap:6px; }
#lojaProdModal .loja-var-preview{ width:64px; height:64px; border:1px dashed var(--loja-border); border-radius:12px; display:flex; align-items:center; justify-content:center; overflow:hidden; background:#fff; }
#lojaProdModal .loja-var-preview.is-on{ border-style:solid; }
#lojaProdModal .loja-var-preview img{ width:100%; height:100%; object-fit:contain; display:block; }
@media (max-width:840px){
  #lojaProdModal .loja-var-row{ grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}

/* LOJA — Modal de edição maior (sem scroll lateral) */
#lojaProdModal.loja-prod-modal-xl{
  width: min(1180px, 96vw);
  max-height: 92vh;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Mobile/pequenas telas: vira praticamente tela cheia */
@media (max-width: 820px){
  #lojaProdModal.loja-prod-modal-xl{
    width: 96vw;
    max-height: calc(100vh - 24px);
    top: 12px;
    transform: translate(-50%, 0);
  }
}
@media (max-width: 560px){
  #lojaProdModal.loja-prod-modal-xl{
    inset: 0;
    left: 0;
    top: 0;
    transform: none;
    width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }
}

/* Importantíssimo para Grid não “estourar” e criar scroll horizontal */
#lojaProdModal .loja-prod-grid > div,
#lojaProdModal .loja-var-row > *{
  min-width: 0;
}

/* File input costuma estourar largura */
#lojaProdModal input[type="file"]{
  max-width: 100%;
  width: 100%;
}

#lojaProdModal .loja-img-box{ grid-column: 1 / -1; }

#lojaProdModal .loja-var-color{ display:flex; align-items:center; gap:10px; }
#lojaProdModal .loja-var-dot{
  width:18px;
  height:18px;
  border-radius:999px;
  border:2px solid #fff;
  box-shadow:0 6px 18px rgba(2,6,23,0.10);
  outline:1px solid rgba(15,23,42,0.10);
}
#lojaProdModal .loja-var-color input[type="color"]{
  width:42px;
  height:38px;
  padding:0;
  border:none;
  background:transparent;
  cursor:pointer;
}
#lojaProdModal .loja-var-color input[type="color"]::-webkit-color-swatch-wrapper{ padding:0; }
#lojaProdModal .loja-var-color input[type="color"]::-webkit-color-swatch{
  border:none;
  border-radius:12px;
}

#lojaProdModal .loja-var-actions{ display:flex; gap:6px; justify-content:flex-end; }
#lojaProdModal .loja-var-actions .btn{ height:34px; padding:0 10px; }

/* Pills discretas e focadas no azul */
#loja .pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:4px 10px;
  border-radius:999px;
  background: color-mix(in srgb, var(--loja-primary) 10%, #fff);
  color: color-mix(in srgb, var(--loja-primary) 75%, #0f172a);
  border:1px solid color-mix(in srgb, var(--loja-primary) 18%, var(--loja-border));
  font-weight:700;
  font-size:12px;
}
#loja .pill--ghost{
  background: #f8fafc;
  color: var(--loja-text);
  border:1px solid var(--loja-border);
}

/* Botões com hierarquia: primário e outline para Editar */
#loja .btn{
  border-radius: var(--loja-radius-sm);
  border:1px solid transparent;
  font-weight:700;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}
#loja .btn.btn-primary{
  background:#0f2c82;
  border-color:#0f2c82;
  color:#fff;
  box-shadow: 0 12px 28px rgba(15,23,42,0.18);
}
#loja .btn.btn-primary:hover{ filter:brightness(1.03); transform: translateY(-1px); }
#loja .btn.btn-secondary{
  background: transparent;
  border:1px solid #e5e7eb;
  color: #475569;
  box-shadow: none;
}
#loja .btn.btn-secondary:hover{
  border-color: #d6dae3;
  box-shadow: 0 0 0 3px rgba(15,23,42,0.06);
  transform: translateY(-1px);
}
#loja .loja-cart-ico{ font-size:16px; line-height:1; }
#loja .loja-add-ico{ font-size:16px; line-height:1; margin-right:6px; }
.sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }
#loja .btn:focus-visible{
  outline:none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--loja-primary) 18%, transparent);
}


#loja .btn.btn--sm{ height:32px; min-width:32px; padding:0 8px; border-radius:10px; }
#loja .btn.btn--sm i{ width:16px; height:16px; stroke-width:2.2; }
#loja .loja-header{
  position:relative;
  background:#fff;
  border:1px solid #e6edf7;
  border-radius:16px;
  padding:10px 12px;
  box-shadow:0 10px 25px rgba(15,23,42,.06);
  display:flex;
  align-items:center;
  gap:12px;
}
#loja .loja-head-left h3{
  margin:0;
  font-size:22px;
  letter-spacing:-0.01em;
}
#loja .loja-head-left .store-subtitle{
  margin:2px 0 0;
  font-size:12px;
  color: color-mix(in srgb, var(--loja-muted) 72%, #94a3b8);
}
#loja .loja-head-left{ width:100%; padding-right:0; }

/* Toolbar premium: ícones compactos no canto superior direito */
#loja .loja-actions{
  position:static;
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:flex-end;
}
#loja .loja-actions .btn{
  width:36px;
  height:36px;
  min-width:36px;
  padding:0;
  border-radius:10px;
  border:1px solid #e6edf7;
  background:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#4b5a78;
  box-shadow:none;
  transition: background .16s ease, border-color .16s ease, transform .12s ease;
}
#loja .loja-actions .btn:hover{
  background:#f3f7ff;
  border-color:#c7d8ff;
  color:#1d4ed8;
  transform: translateY(-1px);
}
#loja .loja-actions .btn:active{ transform: translateY(0); }
#loja .loja-actions .btn i svg{ width:18px; height:18px; stroke-width:2; stroke:currentColor; fill:none; }

#loja #btnLojaNovoProduto,
#loja #btnLojaEscolherEditar,
#loja #btnLojaVerPedidos,
#loja #btnLojaConferencia,
#loja #btnLojaAbrirCarrinho{
  background:#fff;
  color:#4b5a78;
  border-color:#e6edf7;
}
#loja #btnLojaAbrirCarrinho{
  position:relative;
  border:1px solid #d9def0;
}
#loja #lojaCartCount{
  position:absolute;
  top:-4px;
  right:-4px;
  min-width:18px;
  height:18px;
  padding:0;
  background:#1d4ed8;
  color:#fff;
  font-weight:700;
  font-size:11px;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow:none;
}
#loja .loja-topnav .store-topnav-btn:hover{
  background: #eff5ff;
  color:#1d4ed8;
}
#loja .loja-topnav .store-topnav-btn.active,
#loja .loja-topnav .loja-topitem.active{
  background: #e7f0ff;
  color: #0f2c82;
  border-color: #cfe0ff;
  box-shadow: 0 10px 20px rgba(37,99,235,0.12);
}

/* Barra de filtros compacta, busca protagonista */
#loja .store-toolbar{
  display:flex;
  align-items:center;
  gap:10px;
  margin: 4px 0 10px;
}
#loja .store-toolbar .store-search-block{ order:1; }
#loja .store-toolbar .loja-actions{ order:2; margin-left:auto; }
#loja .store-search-block{
  position:relative;
  width:50%;
  min-width:260px;
  max-width:520px;
}
#loja .store-search-bar{
  display:flex;
  align-items:center;
  background:#fff;
  border:1px solid #e6edf7;
  border-radius:12px;
  box-shadow: 0 8px 18px rgba(15,23,42,0.05);
  overflow:hidden;
}
#loja .store-search-btn i{ width:18px; height:18px; stroke-width:2; }
#loja .store-filter-block{ display:none; }
#loja .store-search-block .ctrl{
  flex:1;
  padding:12px 14px;
  font-size:14px;
  border:none;
  background:transparent;
  color: var(--loja-text);
  outline:none;
}
#loja .store-search-block .ctrl::placeholder{ color:#94a3b8; }
#loja .store-search-btn{
  width:48px;
  height:100%;
  border-left:1px solid #e6edf7;
  border:none;
  background:#f7f9ff;
  color:#4b5a78;
  display:grid;
  place-items:center;
  font-size:18px;
  cursor:pointer;
  transition: background .12s ease, transform .12s ease, color .12s ease;
}
#loja .store-search-btn:hover{ background:#eef3ff; color:#1d4ed8; transform:translateY(-0.5px); }
#loja .store-search-btn:active{ transform:translateY(0); }
#loja .store-search-block::before{ content:none; }
#loja .store-filter-block .ctrl{
  font-size:13px;
  padding-left:12px;
  background:#fff;
}
#loja .store-hint{ display:none; }
#loja .store-label{
  font-size:12px;
  color: color-mix(in srgb, var(--loja-text) 68%, #475569);
  font-weight:700;
}
#loja .store-label--sr{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip: rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

/* Atalhos laterais leves (Meus pedidos / Conferência / Editar) */
#loja .store-toolbar-actions-main{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  justify-content:flex-end;
  width:100%;
}
#loja .store-toolbar-actions-main .btn{
  background:#fff;
  border:1px solid color-mix(in srgb, var(--loja-primary) 10%, var(--loja-border));
  border-radius:10px;
  height:34px;
  padding:0 12px;
  box-shadow: 0 8px 18px rgba(2,6,23,0.06);
  gap:6px;
}
#btnLojaVerPedidos::before,
#btnLojaConferencia::before,
#btnLojaEscolherEditar::before{
  content:none;
}
#loja .store-toolbar-actions-main .btn::before{
  content:none;
}
#loja .store-toolbar-toggles{ display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
#loja .store-toolbar-toggles .pill{
  background: #eef2ff;
  border:1px solid #d7e3ff;
  color:#1d4ed8;
  font-weight:700;
  padding:4px 10px;
}

/* Grid e cards mais hierarquizados */
#loja .store-card{
  border-radius:16px;
  border:1px solid color-mix(in srgb, var(--loja-primary) 6%, var(--loja-border));
  box-shadow: 0 14px 28px rgba(2,6,23,0.08);
}
#loja .store-card .img{
  height:210px;
  background: linear-gradient(180deg, #f6f8ff 0%, #eef3ff 100%);
  padding:12px;
}
#loja .store-card .body{
  padding:12px 14px 14px;
  gap:12px;
}
#loja .store-card-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
#loja .store-card-title-wrap .title{
  font-size:15px;
  line-height:1.25;
  min-height: 2.6em;
  display:-webkit-box;
  line-clamp:2;
  -webkit-line-clamp:2;
  -webkit-box-orient: vertical;
  overflow:hidden;
}
#loja .store-card-desc{
  font-size:12px;
  color: color-mix(in srgb, var(--loja-muted) 70%, #6b7280);
  margin-top:2px;
  display:-webkit-box;
  line-clamp:2;
  -webkit-line-clamp:2;
  -webkit-box-orient: vertical;
  overflow:hidden;
}
#loja .store-card-cat{
  background:#f3f6ff;
  border:1px solid #dbe7ff;
  color:#123072;
  font-weight:700;
}
#loja .store-card .meta-line{
  font-size:12px;
  color: color-mix(in srgb, var(--loja-muted) 72%, #6b7280);
}
#loja .store-card-colors{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}
#loja .store-card-colors::before{
  content:"Cores";
  font-size:11px;
  color: color-mix(in srgb, var(--loja-muted) 68%, #6b7280);
  margin-right:2px;
}
#loja .store-card-colors .color-dot{
  width:18px;
  height:18px;
  border-radius:999px;
  border:2px solid #fff;
  box-shadow: 0 6px 16px rgba(15,23,42,0.10), inset 0 0 0 1px rgba(15,23,42,0.06);
}
#loja .store-card-colors .color-dot--more{
  background: #e2e8f0;
  color:#0f172a;
  font-weight:800;
  font-size:11px;
  display:inline-grid;
  place-items:center;
}
#loja .store-card .price{
  align-items:center;
  gap:6px;
}
#loja .price-aux{
  font-size:12px;
  color: color-mix(in srgb, var(--loja-muted) 70%, #475569);
}
#loja .store-card-price{ font-size:20px; letter-spacing:-0.01em; }
#loja .store-card .actions .btn{
  height:40px;
  border-radius:11px;
  border:1px solid color-mix(in srgb, var(--loja-primary) 12%, transparent);
}


/* =====================================================
   Loja — detalhe do produto (refino visual)
   ===================================================== */
#lojaDetModal, .loja-det-modal{
  max-height: 90vh;
  width: min(1180px, calc(100vw - 24px));
  box-shadow: 0 26px 70px rgba(2,6,23,0.16);
}

#lojaDetModal .loja-det-inner{
  padding: 26px 28px 28px 28px !important;
  gap: 16px;
  background: radial-gradient(circle at 12% 14%, #f3f6ff 0, #ffffff 46%), #fff;
  overflow: hidden !important;
}

#lojaDetModal .loja-det-body{
  overflow: auto !important;
  overflow-x: hidden;
}

#lojaDetModal .loja-det-grid{
  display: flex;
  align-items: stretch; /* blocos com mesma altura */
  gap: 16px;
  max-height: 100%;
}

#lojaDetModal .loja-det-grid > *{ min-width:0; }

#lojaDetModal .loja-det-media,
#lojaDetModal .loja-det-buy{
  flex: 1;
  max-width: 50%;
  min-height: 320px;
  padding: 14px;
  max-height: none;
  overflow: visible;
}

@media (max-width: 1024px){
  #lojaDetModal .loja-det-grid{ flex-direction: column; }
  #lojaDetModal .loja-det-media,
  #lojaDetModal .loja-det-buy{
    max-width: 100%;
    min-height: auto;
    max-height: none;
  }
  #lojaDetModal .loja-det-buy{ position: relative; top: 0; }
}

/* Galeria: thumbs à esquerda + imagem grande à direita */
#lojaDetModal .loja-det-media{
  padding: 16px;
  border-radius: 16px;
  border: 1px solid #e6e9ef;
  background: radial-gradient(circle at 18% 20%, #f5f8ff 0, #ffffff 55%, #f8fafc 100%);
  box-shadow: 0 18px 40px rgba(2,6,23,0.10);
  display: block;
}

/* grid interno */
#lojaDetModal .loja-det-gallery{
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

/* estado com apenas 1 imagem: some thumbs e usa 1 coluna */
#lojaDetModal .loja-det-gallery.is-single{
  grid-template-columns: 1fr !important;
}

#lojaDetModal .loja-det-gallery.is-single .loja-det-thumbs{
  display: none !important;
}

/* coluna das thumbs (vertical) */
#lojaDetModal .loja-det-thumbs{
  margin-top: 0;           /* remove o espaçamento de “abaixo da imagem” */
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: visible;
  overflow-x: visible;      /* evita rolagem interna */
  padding-right: 4px;
}

/* miniaturas */
#lojaDetModal .loja-det-thumbs .loja-thumb{
  width: 76px;
  height: 76px;
  border-radius: 12px;
  border: 1px solid #e6e9ef;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15,23,42,0.10);
  flex: 0 0 auto;
}

/* área da imagem principal */
#lojaDetModal .loja-det-mainimg{
  width: 100%;
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.06);
  overflow: hidden;
}

#lojaDetModal .loja-det-mainimg img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Responsivo: thumbs abaixo em linha no mobile */
@media (max-width: 900px){
  #lojaDetModal .loja-det-gallery{
    grid-template-columns: 1fr;
  }

  #lojaDetModal .loja-det-thumbs{
    flex-direction: row;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding-right: 0;
    padding-bottom: 4px;
    order: 2;
  }

  #lojaDetModal .loja-det-mainimg{
    height: 200px;
    order: 1;
  }
}

/* Card de compra mais compacto e aderente */
#lojaDetModal .loja-det-buy{
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #e6e9ef;
  border-top: 3px solid #1d4ed8;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15,23,42,0.12);
}

#lojaDetModal .loja-det-preco{ gap: 6px; }
#lojaDetModal .loja-det-price-line{ display: flex; align-items: baseline; gap: 8px; }
#lojaDetModal .loja-price-curr{ font-size: 13px; font-weight: 700; color: #64748b; }
#lojaDetModal .loja-price-amt{ font-size: 32px; font-weight: 900; color: #0f172a; letter-spacing: -0.02em; }

/* Tamanhos em pills com estado destacado */
#lojaDetModal .loja-det-sizes{ gap: 10px; }
#lojaDetModal .loja-size-list{ display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 10px; }
#lojaDetModal .loja-size-list .loja-size-pill{
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.14);
  background: #fff;
  font-weight: 800;
}
#lojaDetModal .loja-size-list .loja-size-pill.is-on{
  background: #eaf1ff;
  border-color: #1d4ed8;
  color: #0b3a9b;
  box-shadow: 0 12px 26px rgba(37,99,235,0.16);
}

/* Controle de quantidade mais limpo */
#lojaDetModal .loja-det-qty .loja-qty-ctrl{ gap: 10px; }
#lojaDetModal .loja-qty-ctrl input{
  height: 42px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-weight: 800;
}
#lojaDetModal .loja-qty-ctrl--pill button{
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-weight: 800;
}

/* CTA mais proeminente */
#lojaDetModal .loja-det-cta{
  height: 52px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.01em;
  border: none;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 14px 30px rgba(37,99,235,0.25);
}

/* Accordion mais legível */
#lojaDetModal .loja-det-accordion{ border-radius: 14px; overflow: hidden; border: 1px solid #e6e9ef; }
#lojaDetModal .det-acc-item{ background: #fff; }
#lojaDetModal .det-acc-header{ padding: 16px 18px; font-weight: 800; color: #0f172a; }
#lojaDetModal .det-acc-body{
  padding: 0 18px 18px 18px;
  background: #fbfdff;
  color: #334155;
  line-height: 1.6;
}

/* Barra mobile mais agradável */
#lojaDetModal .loja-det-mobilebar{
  padding: 12px 16px;
  gap: 10px;
  box-shadow: 0 -8px 24px rgba(15,23,42,0.14);
}
#lojaDetModal .loja-det-mobile-price{ font-weight: 900; font-size: 18px; color: #0f172a; }

/* ===== Detalhe do produto: remover faixa branca do topo e barra inferior ===== */
#lojaDetModal { position: fixed; }

/* tira o bloco do header e deixa o X flutuando */
#lojaDetModal .loja-det-head{
  background: transparent !important;
  border-bottom: 0 !important;
  padding: 0 !important;
}

#lojaDetModal .loja-det-close{
  position: absolute !important;
  top: 12px;
  right: 12px;
  z-index: 50;
}

/* Remove a barra inferior (preço + adicionar) do detalhe por padrão */
#lojaDetMobileBar {
  display: none !important;
  box-shadow: none !important;
}

/* Se for mostrada via JS em telas pequenas */
#lojaDetMobileBar.is-on {
  display: flex !important;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.12) !important;
}


/* =========================
   PATCH PREMIUM — Vencimentos (KPIs)
   Cole no FINAL do style.css
   ========================= */
#vencimentos .venc-kpis{
  gap: 14px;
  margin: 14px 0 10px;
}

#vencimentos .kpi{
  padding: 16px 16px;
  border-radius: 16px;
  border: 1px solid rgba(226,232,240,0.95);
  box-shadow: 0 10px 22px rgba(15,23,42,0.06);
  gap: 12px;
}

#vencimentos .kpi:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15,23,42,0.10);
}

#vencimentos .kpi-icon{
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

#vencimentos .kpi-label{
  font-size: 12px;
  letter-spacing: .2px;
  color: #475569;
  margin-bottom: 2px;
}

#vencimentos .kpi-value{
  font-size: 28px;
  letter-spacing: -0.02em;
}

/* Estoque: ícones de traço (feather) alinhados */
#estoque .search-ico svg{ width:16px; height:16px; }
#estoque .icon-btn-blue svg{ width:18px; height:18px; display:block; }

/* ===== ESTOQUE: tabela premium ===== */
#estoqueConteudo .table-wrap{
  overflow:auto;
  border-radius: 14px;
  border: 1px solid #eef2f7;
}

#estoqueConteudo .table-epi{
  width:100%;
  border-collapse: separate;
  border-spacing: 0;
}

#estoqueConteudo .table-epi thead th{
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: none;
  color: #334155;
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
}

#estoqueConteudo .table-epi tbody td{
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
  color:#0f172a;
}

#estoqueConteudo .table-epi tbody tr:nth-child(even){
  background: #fcfdff;
}

#estoqueConteudo .table-epi tbody tr:hover{
  background: #f3f8ff;
}

#estoqueConteudo .table-epi td.mono{
  font-variant-numeric: tabular-nums;
}

/* Stepper de quantidade (visual premium) */
#estoqueConteudo td .btn.btn--sm{
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid #dbeafe;
  background: #ffffff;
  color: #2563eb;
  display: inline-flex;
  align-items:center;
  justify-content:center;
}

#estoqueConteudo td .btn.btn--sm:hover{
  background:#eff6ff;
}

#estoqueConteudo td input.ctrl{
  height: 30px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  text-align: center;
  font-variant-numeric: tabular-nums;
}


/* =========================================================
   SIDEBAR PREMIUM AGRUPADA + MINI HOVER
========================================================= */
:root{
  --sb-collapsed: 72px;
  --sb-expanded: 234px;
  --sb-bg: #0b1224;
  --sb-border: rgba(255,255,255,0.05);
  --sb-text: #e2e8f0;
  --sb-muted: #94a3b8;
  --sb-active: #38bdf8;
}

.sidebar{
  width: var(--sb-expanded);
  background: linear-gradient(180deg, #0b1224 0%, #0c152d 45%, #0b1224 100%);
  color: var(--sb-text);
  padding: 8px 8px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-right: 1px solid var(--sb-border);
  box-shadow: 8px 0 32px rgba(7,12,24,0.35);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar::-webkit-scrollbar{ width:0; height:0; }

.sidebar-groups{ display:flex; flex-direction:column; gap:6px; }
.sidebar-group{ padding: 2px 0; }
.sidebar-label{
  margin: 6px 12px 4px;
  font-size: 10px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--sb-muted);
  opacity: 0.78;
}
.sidebar-list{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:3px; }

.sidebar-item{
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 14px;
  border-radius: 9px;
  cursor: pointer;
  color: var(--sb-text);
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.sidebar-item:hover{ background: rgba(255,255,255,0.04); }

.sidebar-item.active{
  background: rgba(255,255,255,0.06);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.nav-ico{
  width: 28px;
  height: 26px;
  border-radius: 8px;
  display:flex;
  align-items:center;
  justify-content:center;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-item.active .nav-ico{
  background: rgba(56,189,248,0.12);
}

.nav-txt{ flex: 1; min-width: 0; }

/* Só aplica em desktop */
@media (min-width: 881px){
  .sidebar.sidebar--mini{
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: var(--sb-collapsed);
    padding: 8px 6px;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 999;
    transition: width .18s ease, box-shadow .18s ease;
  }

  .sidebar.sidebar--mini:hover{
    width: var(--sb-expanded);
    box-shadow: 0 18px 44px rgba(2,6,23,.35);
  }

  .sidebar.sidebar--mini + .main-content{
    margin-left: var(--sb-collapsed);
  }

  .sidebar.sidebar--mini .sidebar-brand{
    display:flex;
    align-items:center;
    gap:10px;
    padding: 4px 6px 8px;
    margin-bottom: 2px;
  }

  .sidebar.sidebar--mini .sidebar-brand > div{
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity .16s ease, transform .16s ease;
    pointer-events: none;
    white-space: nowrap;
  }

  .sidebar.sidebar--mini:hover .sidebar-brand > div{
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .sidebar.sidebar--mini .sidebar-label{
    opacity: 0;
    height: 0;
    margin: 0;
    transition: opacity .16s ease, height .16s ease, margin .16s ease;
  }

  .sidebar.sidebar--mini:hover .sidebar-label{
    opacity: 0.75;
    height: auto;
    margin: 0 12px 6px;
  }

  .sidebar.sidebar--mini .sidebar-item{
    justify-content: center;
    padding: 9px;
  }

  .sidebar.sidebar--mini .nav-ico{
    margin-right: 0;
    background: transparent;
  }

  /* MINI: sumir imediato ao recolher, entrada suave ao abrir (hover) */
  .sidebar.sidebar--mini:not(:hover) .nav-txt,
  .sidebar.sidebar--mini:not(:hover) .sidebar-label,
  .sidebar.sidebar--mini:not(:hover) .sidebar-brand .brand-text {
    opacity: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    transform: translateX(-6px) !important;
    transition: none !important; /* sem transição ao recolher (suma instantâneo) */
    white-space: nowrap !important;
  }

  .sidebar.sidebar--mini:hover .nav-txt,
  .sidebar.sidebar--mini:hover .sidebar-label,
  .sidebar.sidebar--mini:hover .sidebar-brand .brand-text {
    opacity: 1 !important;
    width: auto !important;
    transform: none !important;
    pointer-events: auto !important;
    transition: opacity .18s ease, transform .18s ease !important; /* fade/slide in */
    transition-delay: .06s !important; /* pequeno delay antes de aparecer */
    margin-left: -2px !important; /* micro-ajuste opcional */
  }
/* ===== HARD OVERRIDE: empurra o texto para a direita com valor fixo ===== */
/* Use transform translateX para evitar conflitos com width:0 / overflow:hidden */
.sidebar.sidebar--mini:hover .sidebar-item .nav-txt {
  transform: translateX(56px) translateY(4px) !important; /* move o texto 56px para a direita e 4px para baixo */
  margin-left: 0 !important;
  display: inline-block !important;
  width: auto !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transition: transform .16s ease, opacity .12s ease !important;
}

/* Se o HTML tiver a ordem: .nav-ico (absoluto) e depois .nav-txt, garantir espaçamento menor */
.sidebar.sidebar--mini:hover .sidebar-item > .nav-ico + .nav-txt{
    transform: translateX(25px) translateY(1.5px) !important;
  }

/* classe alternativa: quando o menu NÃO usa .sidebar--mini, também aplica um deslocamento menor */
.sidebar:not(.sidebar--mini) .sidebar-item .nav-txt{
  margin-left: 12px !important;
}

}



/* =========================================================
   OVERRIDE FINAL — MENU COMPACTO (IGUAL PRINT ESO)
   Cole no FINAL do style.css
========================================================= */

/* 1) Itens do menu mais baixos, com menos espaço */
.sidebar .sidebar-item{
  height: 34px !important;     /* ↓ compacta como ESO */
  border-radius: 8px !important;
  gap: 8px !important;         /* ícone mais perto do texto */
  padding: 0 10px !important;  /* menos “ar” */
  margin: 3px 8px !important;  /* itens mais juntinhos */
}

/* 2) Ícones menores e mais discretos */
.sidebar .nav-ico{
  width: 26px !important;      /* ↓ menor */
  height: 26px !important;
  border-radius: 7px !important;
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
}

.sidebar .nav-ico svg{
  width: 14px !important;      /* ↓ tamanho real do símbolo */
  height: 14px !important;
  stroke-width: 2 !important;
}

/* 3) Texto menor e mais “colado” */
.sidebar .nav-txt{
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
}

/* 4) Labels (Operações / Gestão / Admin) menores e com menos espaço */
.sidebar .sidebar-label{
  font-size: 10px !important;
  letter-spacing: .12em !important;
  margin: 8px 12px 4px !important;
  opacity: .75 !important;
}

/* 5) Grupos com separação bem leve (igual print) */
.sidebar .sidebar-group + .sidebar-group{
  margin-top: 6px !important;
  padding-top: 6px !important;
  border-top: 1px solid rgba(255,255,255,.05) !important;
}

/* Remover o quadrado de fundo dos ícones do menu lateral */
.sidebar .nav-ico,
.sidebar .sidebar-item.is-active .nav-ico,
.sidebar .sidebar-item.active .nav-ico,
.sidebar.sidebar--mini:not(:hover) .nav-ico{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Desativar destaque do item selecionado (sem fundo ou barra) */
.sidebar .sidebar-item.is-active,
.sidebar .sidebar-item.active{
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

.sidebar .sidebar-item.is-active .nav-txt,
.sidebar .sidebar-item.active .nav-txt,
.sidebar .sidebar-item.is-active .nav-ico,
.sidebar .sidebar-item.active .nav-ico{
  color: var(--sb-text) !important;
}

/* Compactar espaçamento entre itens do menu */
.sidebar .sidebar-item{
  margin: 4px 0 !important;
  padding: 10px 12px !important;
}

.sidebar nav,
.sidebar .sidebar-group,
.sidebar .sidebar-list{
  gap: 6px !important;
}

/* Sidebar ultra-compacta (itens quase colados) */
.sidebar nav,
.sidebar .sidebar-group,
.sidebar .sidebar-list{
  gap: 2px !important;
}

.sidebar .sidebar-item{
  height: 30px !important;
  padding: 6px 10px !important;
  margin: 1px 6px !important;
  gap: 6px !important;
}

.sidebar .nav-ico{
  width: 22px !important;
  height: 22px !important;
  border-radius: 6px !important;
}

.sidebar .nav-ico svg{
  width: 12px !important;
  height: 12px !important;
}

.sidebar .nav-txt{
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 600 !important;
}

/* Labels/minititulos mais colados */
.sidebar .sidebar-label{
  margin: 6px 10px 2px !important;
  font-size: 9px !important;
  letter-spacing: 0.12em !important;
}

/* Remove separadores extras entre grupos */
.sidebar .sidebar-group + .sidebar-group{
  margin-top: 2px !important;
  padding-top: 2px !important;
  border-top: none !important;
}

/* Ocultar títulos de grupo (Operações / Gestão / Admin) */
.sidebar .sidebar-label{
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
}

/* Sidebar estilo referencia (altura, fonte e espacamento) */
.sidebar nav,
.sidebar .sidebar-group,
.sidebar .sidebar-list{
  gap: 8px !important;
}

/* Micro-ajuste: aproxima o texto ligeiramente ao abrir o menu (uso opcional, -1px/-2px) */
/* removed: micro-ajuste duplicado; handled in the hover rule above */

.sidebar .sidebar-item{
  height: 35px !important;
  padding: 8px 6px !important;
  margin: 2px 4px !important;
  gap: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.sidebar .nav-ico{
  width: 40px !important;
  height: 40px !important;
  border: none !important;
  background: transparent !important;
  margin-right: 8px !important;
  border-radius: 10px !important;
}

.sidebar .nav-ico svg{
  width: 20px !important;
  height: 20px !important;
}

.sidebar .nav-txt{
  font-size: 14px !important;
  line-height: 1.2 !important;
  font-weight: 500 !important;
  color: #e6e6e6 !important;
}

/* Hover suave (opcional) */
.sidebar .sidebar-item:hover{
  background: rgba(255,255,255,0.06) !important;
}





/* =========================================================
   SIDEBAR MINI HOVER (FIXO): ícone NÃO muda e NÃO se move
   Cole no FINAL do style.css
========================================================= */

:root{
  --sb-mini: 52px;     /* largura colapsada */
  --sb-open: 248px;    /* largura expandida */
  --sb-ico: 20px;      /* tamanho do container do ícone */
  --sb-svg: 18px;      /* tamanho do svg/feather */
  --sb-pad-left: 14px; /* recuo fixo do item (mantém o ícone parado) */
}

/* Sidebar no mini + expandir no hover */
.sidebar.sidebar--mini{
  width: var(--sb-mini) !important;
  overflow-x: hidden !important;
}
.sidebar.sidebar--mini:hover{
  width: var(--sb-open) !important;
}

/* Item: NUNCA centraliza, NUNCA zera padding */
.sidebar.sidebar--mini:hover .sidebar-item{
  /* flex-start APENAS quando estiver aberto (hover) */
  justify-content: flex-start !important;
}


/* Ícone: tamanho FIXO sempre */
.sidebar.sidebar--mini .nav-ico{
  width: var(--sb-ico) !important;
  height: var(--sb-ico) !important;
  flex: 0 0 var(--sb-ico) !important;
  margin: 0 !important;
}

/* SVG/Feather: tamanho FIXO sempre */
.sidebar.sidebar--mini .nav-ico svg,
.sidebar.sidebar--mini .nav-ico i{
  width: var(--sb-svg) !important;
  height: var(--sb-svg) !important;
}

/* Texto: escondido no mini (sem empurrar ícone) */
.sidebar.sidebar--mini:not(:hover) .nav-txt,
.sidebar.sidebar--mini:not(:hover) .sidebar-label,
.sidebar.sidebar--mini:not(:hover) .sidebar-brand .brand-text {
  opacity: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  transform: translateX(-6px) !important;
  pointer-events: none !important;
  transition: none !important; /* sem transição ao recolher */
}

/* Texto aparece no hover (entrada suave) */
.sidebar.sidebar--mini:hover .nav-txt,
.sidebar.sidebar--mini:hover .sidebar-label,
.sidebar.sidebar--mini:hover .sidebar-brand .brand-text {
  opacity: 1 !important;
  width: auto !important;
  transform: none !important;
  pointer-events: auto !important;
  transition: opacity .18s ease, transform .18s ease !important;
  transition-delay: .06s !important;
  margin-left: -2px !important; /* micro-ajuste opcional */
}







/* =========================================================
   FIX DEFINITIVO — mini centralizado + ícone NÃO desloca ao abrir
   (cole no FINAL do style.css)
========================================================= */

:root{
  /* usa variável do seu layout se existir; senão cai no padrão */
  --sb-mini-fix: var(--sb-collapsed, 52px); /* largura do mini */
  --sb-ico-fix: 40px;        /* igual ao .sidebar .nav-ico do seu “OVERRIDE FINAL” */
  --sb-item-mx-fix: 8px;     /* igual ao margin horizontal da .sidebar-item (3px 8px) */

  /* posição do ícone no mini (central) convertida em padding-left no aberto */
  --sb-ico-left-fix: calc((var(--sb-mini-fix) - var(--sb-ico-fix)) / 2 - var(--sb-item-mx-fix));
}

/* MINI (não hover): centraliza o ícone */
.sidebar.sidebar--mini:not(:hover) .sidebar-item{
  justify-content: center !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* ABERTO (hover): mantém o ícone na MESMA coluna do mini */
.sidebar.sidebar--mini:hover .sidebar-item{
  justify-content: flex-start !important;
}

/* garante que o ícone não tenha margem que empurre */
.sidebar.sidebar--mini .nav-ico{
  margin: 0 !important;
}


/* =========================================================
   TRAVA TOTAL: ícone não mexe ao abrir (mini centralizado)
   Cole NO FINAL do style.css
========================================================= */
:root{
  --sb-mini: 52px;     /* deixe igual à sua largura real do mini */
  --sb-open: 248px;    /* deixe igual à sua largura real aberta */
  --sb-ico: 28px;      /* bate com seu padrão final do nav-ico */
}

/* largura mini / aberta */
.sidebar.sidebar--mini{ width: var(--sb-mini) !important; }
.sidebar.sidebar--mini:hover{ width: var(--sb-open) !important; }

/* IMPORTANTÍSSIMO: remover margem lateral do item no modo mini
   (senão a origem do "left" muda e parece que o ícone mexe) */
.sidebar.sidebar--mini .sidebar-item{
  position: relative !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* ÍCONE: fixo na "coluna" do mini (sempre no mesmo X) */
.sidebar.sidebar--mini .nav-ico{
  position: absolute !important;
  left: calc(var(--sb-mini) / 2) !important;
  top: 39% !important;
  transform: translate(-65%, -30%) !important;
  width: var(--sb-ico) !important;
  height: var(--sb-ico) !important;
  margin: 0px !important;
}

/* MINI: centraliza visualmente (texto escondido) */
.sidebar.sidebar--mini:not(:hover) .sidebar-item{
  padding: 8px 0 !important;
}

/* ABERTO: o texto começa depois da largura do mini */
.sidebar.sidebar--mini:hover .sidebar-item{
  padding-left: calc(var(--sb-mini) + 2px) !important;
  padding-right: 14px !important;
  justify-content: flex-start !important;
}

/* =========================================================
   AUMENTAR ÁREA CLICÁVEL + CONTORNO QUADRADO NO HOVER
   - Aplica apenas quando a sidebar está ABERTA (não afeta o modo mini)
   - Garante área maior para clique e remove borda arredondada no hover
========================================================= */
.sidebar:not(.sidebar--mini) .sidebar-item{
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 12px 16px !important; /* área clicável maior */
  margin: 4px 0 !important;
  border-radius: 0 !important;   /* sem cantos arredondados por padrão */
  transition: background .12s ease, box-shadow .12s ease !important;
}

.sidebar:not(.sidebar--mini) .sidebar-item .nav-ico{
  margin-right: 12px !important; /* mantém separação visual maior entre ícone e texto */
}

.sidebar:not(.sidebar--mini) .sidebar-item:hover{
  background: rgba(255,255,255,0.06) !important;
  border-radius: 0 !important; /* força contorno quadrado no hover */
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08) !important; /* contorno quadrado */
}

/* Pequeno cuidado: mantém comportamento do modo mini (não sobrescrever posicionamento absoluto) */
.sidebar.sidebar--mini .sidebar-item{ padding-left: 0 !important; padding-right: 0 !important; }







/* =========================
   ESTOQUE - UI IMPROVEMENTS
   ========================= */

/* Sticky header, compact cells, zebra and hover */
#estoqueConteudo .table-epi thead th{
  position: sticky;
  top: 0;
  z-index: 6;
  background: linear-gradient(180deg,#fbfdff,#ffffff);
  box-shadow: 0 6px 18px rgba(15,23,42,0.04);
  border-bottom: 1px solid #eef2f7;
  padding: 10px 14px;
}

#estoqueConteudo .table-epi tbody td{
  padding: 10px 12px;
  font-size: 13px;
  vertical-align: middle;
}

#estoqueConteudo .table-epi tbody tr:nth-child(even){ background: #fbfdff; }
#estoqueConteudo .table-epi tbody tr:hover td{ background: #f3f8ff; transition: background .12s ease; }

/* Qty stepper - uses existing markup (.qty, .qty-btn, .qty-input) */
#estoqueConteudo .td-qtd{
  text-align: center;
  white-space: nowrap;
}

#estoqueConteudo .td-qtd .qty{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: auto;
  margin: 0 auto;
}

#estoqueConteudo .td-qtd .qty-btn{
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  margin: 0;
  display: inline-grid;
  place-items: center;
  flex: 0 0 30px;
  border-radius: 8px;
  border: 1px solid #dbeafe;
  background: #ffffff;
  color: #124679;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(15,23,42,0.04);
  transition: transform .12s ease, background .12s ease;
}

#estoqueConteudo .td-qtd .qty-btn:hover{
  background: #eef6ff;
  transform: translateY(-1px);
}

#estoqueConteudo .td-qtd .qty-input{
  width: 52px;
  min-width: 52px;
  height: 30px;
  padding: 0 4px;
  margin: 0;
  flex: 0 0 52px;
  text-align: center;
  border-radius: 8px;
  border: 1px solid #e6eefc;
  background: #f9fbff;
  font-weight: 800;
}

/* remove setinhas nativas do input number */
#estoqueConteudo .td-qtd .qty-input::-webkit-outer-spin-button,
#estoqueConteudo .td-qtd .qty-input::-webkit-inner-spin-button{
  -webkit-appearance: none;
  margin: 0;
}

#estoqueConteudo .td-qtd .qty-input{
  -moz-appearance: textfield;
  appearance: textfield;
}

/* highlight modified rows */
.row-modified td{ box-shadow: inset 0 0 0 2px rgba(59,130,246,0.06); }

/* badge for low stock */
.badge-low{ display:inline-block; padding:4px 8px; border-radius:999px; font-size:12px; font-weight:700; background:#fff7ed; color:#9a3412; border:1px solid rgba(249,115,22,0.12); }

/* Small responsive adjustments */
@media (max-width:820px){
  .qty-input{ width:56px; }
  #estoqueConteudo .table-epi thead th{ font-size:12px; padding:8px 10px; }
  #estoqueConteudo .table-epi tbody td{ padding:8px 10px; font-size:13px; }
}

/* ensure table card looks tidy */
#estoqueConteudo{ border-radius:14px; padding:12px; }

/* === Ajuste: aproximar texto dos ícones (override final) === */
/* Mantém o ícone na mesma posição e aproxima apenas o texto. */
.sidebar .sidebar-item { gap: 12px !important; }
.sidebar .sidebar-item .nav-ico { margin-right: 12px !important; flex: 0 0 auto !important; }
.sidebar .nav-txt { margin-left: 4px !important; transition: opacity .18s ease, transform .18s ease; }
.sidebar.sidebar--mini:hover .sidebar-item { padding-left: 12px !important; }
.sidebar .nav-ico { position: relative; }

/* Ajuste alternativo (aumente/abaixe para 4px ou 2px conforme desejar) */
/* .sidebar .sidebar-item { gap: 4px !important; } */

/* === Override mais específico para garantir aplicação === */
/* Seletores mais longos e !important para vencer outras regras conflitantes */
.sidebar .sidebar-list .sidebar-group .sidebar-item,
.sidebar nav .sidebar-item,
.sidebar .sidebar-item {
  gap: 12px !important;
}

.sidebar .sidebar-list .sidebar-item > .nav-ico,
.sidebar nav .sidebar-item > .nav-ico,
.sidebar .sidebar-item > .nav-ico {
  margin-right: 12px !important;
  flex: 0 0 auto !important;
}

.sidebar .sidebar-list .sidebar-item > .nav-ico + .nav-txt,
.sidebar nav .sidebar-item > .nav-ico + .nav-txt,
.sidebar .sidebar-item > .nav-ico + .nav-txt {
  margin-left: 4px !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

/* Quando a sidebar está no modo mini e em hover garantir que o texto fique alinhado */
.sidebar.sidebar--mini:hover .nav-txt {
  opacity: 1 !important;
  width: auto !important;
  margin-left: 4px !important;
  transform: none !important;
  pointer-events: auto !important;
}

/* Se algo usa padding-left para alinhar o texto, garantir que não empurre o ícone */
.sidebar .sidebar-item .nav-txt {
  padding-left: 0 !important;
}

/* Dica: se ainda não ver mudanças, faça um hard refresh (Ctrl+F5) no navegador */

/* ===== FIX FINAL: garantir que texto não sobreponha o ícone ===== */
/* Aplica somente quando a sidebar estiver no modo "mini" e em hover (expandida) */
.sidebar.sidebar--mini .nav-ico { z-index: 20 !important; }
.sidebar.sidebar--mini .nav-txt { z-index: 10 !important; }

/* Força o texto começar depois da largura do mini, evitando sobreposição. */
.sidebar.sidebar--mini:hover .sidebar-item > .nav-txt,
.sidebar.sidebar--mini:hover .sidebar-item .nav-txt{
  margin-left: calc(var(--sb-mini, 52px) + 8px) !important; /* ajuste fino */
  display: inline-block !important;
  width: auto !important;
  opacity: 1 !important;
}

/* Alternativa para quando a estrutura do HTML usar ícone e texto como irmãos em container */
.sidebar.sidebar--mini:hover .sidebar-item > .nav-ico + .nav-txt{
  margin-left: 8px !important; /* garante espaçamento caso o item já tenha padding-left maior */
}

/* proteção: quando há regras que escondem o texto via width:0, garantir que no hover fique visível */
.sidebar.sidebar--mini:hover .nav-txt[style],
.sidebar.sidebar--mini:hover .nav-txt[hidden]{
  width: auto !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}








:root{
  --sb-hit-gap: 1px;
  --sb-hit-inset-x: 0px;
  --sb-hit-h: 36px;
  --sb-hit-radius: 0px;
  --sb-hover-bg: rgba(255,255,255,0.032);
  --sb-active-bg: rgba(255,255,255,0.058);
  --sb-active-ring: inset 0 1px 0 rgba(255,255,255,0.04), inset 0 -1px 0 rgba(0,0,0,0.16);
}

/* faixa contínua entre os itens */
.sidebar .sidebar-list{
  gap: 0 !important;
}

/* item continua clicável inteiro */
.sidebar .sidebar-item{
  position: relative !important;
  margin: 0 !important;
  min-height: calc(var(--sb-hit-h) + (var(--sb-hit-gap) * 2)) !important;
  height: calc(var(--sb-hit-h) + (var(--sb-hit-gap) * 2)) !important;
  border-radius: 0 !important;
  background: transparent !important;
}

/* camada visual do item */
.sidebar .sidebar-item::before{
  content: "" !important;
  position: absolute !important;
  inset: var(--sb-hit-gap) var(--sb-hit-inset-x) !important;
  border-radius: var(--sb-hit-radius) !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: background 160ms ease, box-shadow 160ms ease !important;
  pointer-events: none !important;
}

/* hover mais fluido e mais horizontal */
.sidebar .sidebar-item:hover{
  background: transparent !important;
}

.sidebar .sidebar-item:hover::before{
  background: var(--sb-hover-bg) !important;
}

/* item ativo */
.sidebar .sidebar-item.active,
.sidebar .sidebar-item.is-active{
  background: transparent !important;
  color: #ffffff !important;
}

.sidebar .sidebar-item.active::before,
.sidebar .sidebar-item.is-active::before{
  background: var(--sb-active-bg) !important;
  box-shadow: var(--sb-active-ring) !important;
}

/* conteúdo acima da faixa */
.sidebar .sidebar-item > *{
  position: relative !important;
  z-index: 1 !important;
}

/* ativo com leitura mais forte */

.sidebar .sidebar-item.active > .nav-txt,
.sidebar .sidebar-item.is-active > .nav-txt{
  color: rgba(255,255,255,0.96) !important;
  font-weight: 500 !important;
}

.sidebar .sidebar-item.active > .nav-ico,
.sidebar .sidebar-item.is-active > .nav-ico{
  color: rgba(255,255,255,0.96) !important;
}

/* ===== Estilos para Downloads (engrenagem premium) ===== */
#btnDownloadsGear {
  border: 1px solid rgba(0,0,0,0.08);
  background: #ffffff;
  transition: background .14s ease, transform .12s ease, box-shadow .14s ease;
  box-shadow: none;
  color: #0f172a;
}
#btnDownloadsGear:hover {
  background: #eef6ff; /* azul clarinho */
}
#btnDownloadsGear:active {
  transform: translateY(1px);
}

#downloadsGearWrap { display:inline-flex; align-items:center; }

#downloadsGearMenu {
  min-width: 260px;
  padding: 8px;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(16,24,40,0.08), 0 2px 6px rgba(16,24,40,0.04);
}

#downloadsGearMenu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
  transition: background .12s ease;
}
#downloadsGearMenu a:hover {
  background: #eaf4ff; /* hover azul suave */
}
#downloadsGearMenu a:focus {
  outline: 3px solid rgba(59,130,246,0.18);
  outline-offset: 2px;
}

#downloadsGearMenu a i { width: 18px; height: 18px; color: rgba(17,24,39,0.9); }
#downloadsGearMenu a .dl-right { margin-left: auto; width: 16px; height: 16px; opacity: 0.9; }

@media (max-width: 720px) {
  #downloadsGearMenu { right: 0; left: auto; }
}

/* ===== Fim Downloads ===== */

/* FIX DEFINITIVO — Carrinho da LOJA
   Overlay abaixo do Drawer (senão o overlay “come” o clique) */
#lojaCartOverlay { z-index: 6000; }
#lojaCartDrawer  { z-index: 6001; }

/* ===== LOJA — Checkout / Dados de entrega (mínimo) ===== */
.loja-checkout{
  margin:10px 0;
  border:1px solid #e6e9ef;
  border-radius:12px;
  background:#fff;
  padding:10px;
}
.loja-checkout summary{
  cursor:pointer;
  font-weight:800;
  user-select:none;
}
.loja-checkout-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
  margin-top:10px;
}
.loja-checkout-grid .span2{ grid-column: 1 / -1; }
.loja-checkout label{ margin:0 0 4px; font-size:12px; font-weight:700; }

/* ===================== NOVO EPI — BLOCO FINAL CONSOLIDADO ===================== */

#novoEPI .novoepi-header{
  align-items:flex-start;
  gap:16px;
  margin-bottom:18px;
}

#listaEPIs{
  margin-top:10px;
  padding:18px 20px 20px;
  background:#ffffff;
  border:1px solid #e7edf5;
  border-radius:22px;
  box-shadow:0 18px 42px rgba(15,23,42,.05);
}

#listaEPIs .panel__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:14px;
}

#listaEPIs .panel__title{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:15px;
  font-weight:800;
  color:#0f172a;
}

#listaEPIs .panel__head .controls{
  flex:1;
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

#listaEPIs #epiSearch{
  flex:1 1 360px;
  min-width:260px;
  max-width:460px;
  height:44px;
  padding:0 16px;
  border-radius:14px;
  border:1px solid #dbe4ef;
  background:linear-gradient(180deg,#ffffff,#fbfdff);
  box-shadow:0 8px 20px rgba(15,23,42,.04);
  color:#0f172a;
}

#listaEPIs #epiSearch:focus{
  outline:none;
  border-color:#93c5fd;
  box-shadow:0 0 0 4px rgba(59,130,246,.10), 0 12px 24px rgba(15,23,42,.06);
}

#listaEPIs .filters-wrap{
  margin-bottom:0;
}

#listaEPIs #epiFiltersBtn{
  min-height:44px;
  padding:0 16px;
  border-radius:14px;
  font-size:13px;
  font-weight:700;
  border:1px solid #dbe4ef;
  background:linear-gradient(180deg,#ffffff,#f8fafc);
  color:#1d4ed8;
  box-shadow:0 8px 18px rgba(15,23,42,.04);
}

#listaEPIs .table-wrap{
  overflow:auto;
  overflow-y:visible;
  max-height:none;
  padding-right:0;
  border:1px solid #e6edf5;
  border-radius:18px;
  background:rgba(255,255,255,.92);
  box-shadow:0 14px 30px rgba(15,23,42,.04);
}

#listaEPIs .table-epi{
  width:100% !important;
  table-layout:fixed !important;
  border-collapse:separate !important;
  border-spacing:0;
}

#listaEPIs .table-epi col:nth-child(1){ width:26% !important; }
#listaEPIs .table-epi col:nth-child(2){ width:110px !important; }
#listaEPIs .table-epi col:nth-child(3){ width:150px !important; }
#listaEPIs .table-epi col:nth-child(4){ width:160px !important; }
#listaEPIs .table-epi col:nth-child(5){ width:120px !important; }
#listaEPIs .table-epi col:nth-child(6){ width:auto !important; }
#listaEPIs .table-epi col:nth-child(7){ width:160px !important; }

#listaEPIs .table-epi thead th{
  vertical-align:middle;
  background:#f8fbff;
  color:#475569;
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  padding:16px 14px;
  border-bottom:1px solid #e7eef7;
}

#listaEPIs .table-epi tbody td{
  vertical-align:middle;
  padding:16px 14px;
  border-bottom:1px solid #edf2f7;
  font-size:14px;
  color:#1e293b;
}

#listaEPIs .table-epi thead th:nth-child(1),
#listaEPIs .table-epi tbody td:nth-child(1),
#listaEPIs .table-epi thead th:nth-child(6),
#listaEPIs .table-epi tbody td:nth-child(6){
  text-align:left;
}

#listaEPIs .table-epi thead th:nth-child(2),
#listaEPIs .table-epi tbody td:nth-child(2),
#listaEPIs .table-epi thead th:nth-child(3),
#listaEPIs .table-epi tbody td:nth-child(3),
#listaEPIs .table-epi thead th:nth-child(4),
#listaEPIs .table-epi tbody td:nth-child(4),
#listaEPIs .table-epi thead th:nth-child(5),
#listaEPIs .table-epi tbody td:nth-child(5){
  text-align:center;
}

#listaEPIs .table-epi thead th:nth-child(2),
#listaEPIs .table-epi tbody td:nth-child(2),
#listaEPIs .table-epi thead th:nth-child(4),
#listaEPIs .table-epi tbody td:nth-child(4),
#listaEPIs .table-epi thead th:nth-child(5),
#listaEPIs .table-epi tbody td:nth-child(5){
  white-space:nowrap;
}

#listaEPIs .table-epi tbody tr:hover{
  background:#fbfdff;
}

#listaEPIs .table-epi thead th.col-actions,
#listaEPIs .table-epi tbody td.col-actions{
  text-align:center;
  padding-right:14px;
  padding-left:14px;
}

#listaEPIs .actions{
  display:inline-flex;
  flex-direction:row;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-width:auto;
}

#listaEPIs .actions .btn,
#listaEPIs .btn--sm{
  width:36px;
  min-width:36px;
  min-height:36px;
  padding:0;
  border-radius:12px;
  font-size:0;
  font-weight:700;
  justify-content:center;
  align-items:center;
  line-height:1;
}

#listaEPIs .btn--sm{
  padding:0;
}

#listaEPIs .btn--edit{
  background:linear-gradient(180deg,#ffffff,#f8fbff);
  border:1px solid #dbe4ef;
  color:#1d4ed8;
  box-shadow:0 6px 14px rgba(15,23,42,.04);
}

#listaEPIs .btn--del{
  background:#fff;
  border:1px solid #fecaca;
  color:#b91c1c;
  box-shadow:none;
}

#listaEPIs .btn--edit::before,
#listaEPIs .btn--del::before{
  margin-right:0;
  position:static;
  top:auto;
  line-height:1;
}

#listaEPIs .cell-desc > span{
  display:block;
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
  line-clamp:unset;
  -webkit-line-clamp:unset;
  -webkit-box-orient:initial;
}

@media (max-width: 900px){
  #listaEPIs .panel__head,
  #listaEPIs .panel__head .controls{
    align-items:stretch;
  }

  #listaEPIs #epiSearch{
    max-width:none;
  }
}

/* ===================== TREINAMENTOS — OVERRIDE PREMIUM FINAL ===================== */
#treinamentos{
  --tr-text:#0f172a;
  --tr-muted:#64748b;
  --tr-border:#e2e8f0;
  --tr-border-strong:#d5deea;
  --tr-blue:#2563eb;
  --tr-blue-dark:#1d4ed8;
  --tr-green:#059669;
  --tr-orange:#b45309;
  --tr-red:#b91c1c;
}

/* Header */
#treinamentos .train-header{
  margin-bottom:22px;
  padding:16px 18px;
  border-radius:18px;
  background:linear-gradient(180deg, rgba(255,255,255,.95), rgba(248,250,252,.95));
  border:1px solid rgba(226,232,240,.95);
  box-shadow:0 14px 34px rgba(15,23,42,.05);
}

#treinamentos .train-header-left h3{
  margin:0;
  font-size:1.55rem;
  font-weight:800;
  letter-spacing:-0.02em;
  color:var(--tr-text);
}

#treinamentos .train-subtitle{
  margin:4px 0 0 0;
  font-size:.96rem;
  color:var(--tr-muted);
}

#treinamentos .train-header-right{
  display:flex;
  align-items:center;
  gap:10px;
}

#treinamentos .train-search{
  height:44px;
  min-width:290px;
  padding:0 16px 0 42px;
  border:1px solid #d7e1ec;
  border-radius:14px;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364758b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>") no-repeat 14px center / 15px 15px,
    linear-gradient(180deg, #ffffff, #fbfdff);
  color:var(--tr-text);
  box-shadow:0 8px 18px rgba(15,23,42,.03);
  transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

#treinamentos .train-search:focus{
  outline:none;
  border-color:rgba(37,99,235,.34);
  box-shadow:0 0 0 4px rgba(37,99,235,.10), 0 10px 20px rgba(15,23,42,.04);
}

#btnNovoTreina{
  width:auto;
  height:44px;
  padding:0 18px;
  border-radius:14px;
  border:none;
  background:linear-gradient(135deg, #1d4ed8, #2563eb);
  color:#fff;
  font-size:12.5px;
  font-weight:800;
  letter-spacing:.01em;
  box-shadow:0 12px 24px rgba(37,99,235,.20);
  transition:transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

#btnNovoTreina:hover{
  transform:translateY(-1px);
  box-shadow:0 16px 28px rgba(37,99,235,.24);
  filter:brightness(1.02);
}

#treinamentos .train-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(320px, 360px));
  gap:18px;
  justify-content:flex-start;
  align-items:start;
  margin-bottom:24px;
}

#treinamentos .train-card{
  width:100%;
  max-width:360px;
  border:1px solid #e6edf5;
  border-radius:20px;
  overflow:hidden;
  background:linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow:0 14px 30px rgba(15,23,42,.06);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

#treinamentos .train-card:hover{
  transform:translateY(-3px);
  border-color:#d5e1ef;
  box-shadow:0 22px 38px rgba(15,23,42,.09);
}

#treinamentos .train-media{
  height:96px;
  background:linear-gradient(135deg, #eef5ff, #f8fbff);
}

#treinamentos .train-thumb{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

#treinamentos .train-body{
  padding:14px 14px 10px;
  display:flex;
  flex-direction:column;
  gap:8px;
}

#treinamentos .train-title{
  margin:0;
  font-size:1rem;
  font-weight:800;
  line-height:1.15;
  letter-spacing:-0.02em;
  color:var(--tr-text);
}

#treinamentos .train-submeta{
  margin:0;
  font-size:.84rem;
  line-height:1.35;
  color:var(--tr-muted);
}

#treinamentos .train-badges{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

#treinamentos .badge,
#treinamentos .chip{
  height:28px;
  padding:0 10px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:11.5px;
  font-weight:800;
}

#treinamentos .train-meta{
  font-size:.82rem;
  color:#5b6b80;
  line-height:1.35;
}

#treinamentos .train-actions{
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:flex-start;
  padding:0 14px 14px;
}

#treinamentos .train-actions .btnAbrirSala,
#treinamentos .train-actions .btnConfig{
  width:auto;
  min-width:0;
  height:38px;
  padding:0 14px;
  border-radius:11px;
  font-size:12.5px;
  font-weight:800;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

#treinamentos .train-actions .btnAbrirSala{
  background:linear-gradient(135deg, #1d4ed8, #2563eb);
  color:#fff;
  border:none;
  box-shadow:0 10px 22px rgba(37,99,235,.18);
}

#treinamentos .train-actions .btnAbrirSala:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 24px rgba(37,99,235,.24);
}

#treinamentos .train-actions .btnConfig{
  background:#fff;
  color:#0f172a;
  border:1px solid #dbe4ef;
}

#treinamentos .train-actions .btnConfig:hover{
  background:#f8fafc;
  border-color:#c7d4e3;
}

#treinamentos .train-card .btnDelTpl{
  top:12px;
  right:12px;
  width:30px;
  height:30px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.88);
  background:rgba(255,255,255,.94);
  color:#b91c1c;
  box-shadow:0 10px 22px rgba(15,23,42,.14);
}

#treinamentos .train-card .btnDelTpl:hover{
  background:#fff1f2;
  color:#991b1b;
  transform:translateY(-1px);
}

#treinamentos .train-search-empty{
  grid-column:1 / -1;
  text-align:center;
  padding:22px;
  border-radius:16px;
}

/* Bloco concluídos / dashboard */
#treinamentosConcluidosWrap{
  margin-top:10px;
}

#treinamentosConcluidosWrap .treina-topbar{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}

#treinamentosConcluidosWrap h4{
  margin:0 0 4px 0;
  font-size:1rem;
  font-weight:800;
  color:var(--tr-text);
}

#treinamentosConcluidosWrap .treina-subinfo{
  margin:0;
  font-size:.88rem;
  color:var(--tr-muted);
}

#treinamentosConcluidosWrap .treina-kpis{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:14px;
  margin:0 0 14px 0;
}

#treinamentosConcluidosWrap .treina-kpi-card{
  position:relative;
  background:linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border:1px solid #e3ebf4;
  border-radius:18px;
  padding:16px 18px;
  box-shadow:0 14px 28px rgba(15,23,42,.05);
  overflow:hidden;
}

#treinamentosConcluidosWrap .treina-kpi-card::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:4px;
  background:#cfd9e6;
}

#treinamentosConcluidosWrap .treina-kpi-card.is-total::before{
  background:#2563eb;
}

#treinamentosConcluidosWrap .treina-kpi-card.is-valid::before{
  background:#059669;
}

#treinamentosConcluidosWrap .treina-kpi-card.is-near::before{
  background:#b45309;
}

#treinamentosConcluidosWrap .treina-kpi-card.is-expired::before{
  background:#b91c1c;
}

#treinamentosConcluidosWrap .treina-kpi-label{
  font-size:10.5px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#64748b;
}

#treinamentosConcluidosWrap .treina-kpi-value{
  margin-top:10px;
  font-size:2rem;
  line-height:1;
  font-weight:900;
  letter-spacing:-0.04em;
  color:#0f172a;
}

#treinamentosConcluidosWrap .treina-kpi-card.is-valid .treina-kpi-value{
  color:#059669;
}

#treinamentosConcluidosWrap .treina-kpi-card.is-near .treina-kpi-value{
  color:#b45309;
}

#treinamentosConcluidosWrap .treina-kpi-card.is-expired .treina-kpi-value{
  color:#b91c1c;
}

/* filtros */
#treinamentosConcluidosWrap .treina-summary{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:0 0 14px 0;
  padding:6px;
  border:1px solid #e3ebf4;
  border-radius:16px;
  background:rgba(255,255,255,.78);
  box-shadow:0 10px 22px rgba(15,23,42,.04);
}

#treinamentosConcluidosWrap .summary-filter{
  width:auto;
  flex:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:34px;
  padding:0 14px;
  border-radius:10px;
  border:1px solid transparent;
  background:transparent;
  color:#475569;
  font-size:12.5px;
  font-weight:800;
  line-height:1;
  box-shadow:none;
  transition:transform .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease, border-color .16s ease;
}

#treinamentosConcluidosWrap .summary-filter:hover{
  transform:translateY(-1px);
  background:#f8fbff;
  border-color:#d7e3f0;
  color:#1e293b;
  box-shadow:0 8px 16px rgba(15,23,42,.04);
}

#treinamentosConcluidosWrap .summary-filter.active{
  background:linear-gradient(135deg, #1d4ed8, #2563eb);
  color:#fff;
  border-color:transparent;
  box-shadow:0 12px 22px rgba(37,99,235,.18);
}

#treinamentosConcluidosWrap .summary-filter.active::after{
  display:none;
}

/* tabela */
#treinamentosConcluidosWrap .table-wrap{
  background:#fff;
  border:1px solid var(--tr-border);
  border-radius:18px;
  padding:12px 14px;
  box-shadow:0 14px 32px rgba(15,23,42,.05);
}

#treinamentosConcluidosWrap .table-epi{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
}

#treinamentosConcluidosWrap .table-epi thead th{
  background:#f8fafc;
  color:#64748b;
  font-size:12px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  padding:12px 14px;
  border-bottom:1px solid #e8eef5;
}

#treinamentosConcluidosWrap .table-epi tbody td{
  padding:14px;
  vertical-align:middle;
  color:#334155;
  border-bottom:1px solid #eef2f7;
}

#treinamentosConcluidosWrap .table-epi tbody tr:hover{
  background:#fbfdff;
}

#treinamentosConcluidosWrap .table-epi tbody td:first-child{
  font-weight:700;
  color:#0f172a;
}

#treinamentosConcluidosWrap .table-epi tbody td:nth-child(3){
  color:#475569;
}

#treinamentosConcluidosWrap .table-epi tbody td.date-cell{
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}

#treinamentosConcluidosWrap .status-badge{
  margin-left:6px;
  font-size:12px;
}

#treinamentos .btnCertTreina{
  height:38px;
  min-width:132px;
  padding:0 16px;
  border:none;
  border-radius:12px;
  background:linear-gradient(135deg, #10b981, #059669);
  color:#fff;
  font-size:13px;
  font-weight:800;
  box-shadow:0 12px 24px rgba(5,150,105,.18);
  transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

#treinamentos .btnCertTreina:hover{
  transform:translateY(-1px);
  box-shadow:0 16px 28px rgba(5,150,105,.24);
  filter:brightness(1.02);
}

/* responsivo */
@media (max-width: 980px){
  #treinamentos .train-search{
    min-width:240px;
  }

  #treinamentosConcluidosWrap .treina-kpis{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px){
  #treinamentos .train-header{
    flex-direction:column;
    align-items:stretch;
  }

  #treinamentos .train-header-right{
    flex-direction:column;
    align-items:stretch;
  }

  #treinamentos .train-search{
    width:100%;
    min-width:0;
  }

  #btnNovoTreina{
    width:100%;
  }

  #treinamentos .train-grid{
    grid-template-columns:1fr;
  }

  #treinamentosConcluidosWrap .treina-kpis{
    grid-template-columns:1fr;
  }

  #treinamentos .train-actions{
    flex-direction:column;
    align-items:stretch;
  }

  #treinamentos .train-actions .btnAbrirSala,
  #treinamentos .train-actions .btnConfig,
  #treinamentos .btnCertTreina{
    width:100%;
  }

  #treinamentos .train-card{
    max-width:none;
  }

  #treinamentosConcluidosWrap .treina-summary{
    padding:4px;
  }
}

/* ===================== HEADER SUPERIOR — REMOVER BLOCO "PAINEL GERAL" ===================== */

.main-header-card{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  padding:0;
  min-height:0;
  background:transparent !important;
  border:none !important;
  box-shadow:none !important;
}

.main-header-left{
  display:none !important;
}

.main-header-right{
  width:auto !important;
  margin-left:auto;
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:12px;
  padding:0;
}

/* ===== Alertas premium refinados da aba Funcionários ===== */
body.func-dialog-lock{
  overflow:hidden;
}

#funcDialogOverlay{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(15,23,42,.46);
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
  z-index:12000;
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}

#funcDialogOverlay.show{
  opacity:1;
  pointer-events:auto;
}

#funcDialogModal{
  width:min(430px, calc(100vw - 28px));
  display:grid;
  grid-template-columns:52px 1fr;
  gap:14px;
  background:linear-gradient(180deg,#ffffff 0%, #f8fbff 100%);
  border:1px solid #dbeafe;
  border-radius:24px;
  padding:18px 18px 16px;
  box-shadow:
    0 30px 70px rgba(2,6,23,.20),
    0 12px 28px rgba(37,99,235,.08);
  color:#0f172a;
  transform:translateY(10px) scale(.985);
  transition:transform .18s ease;
}

#funcDialogOverlay.show #funcDialogModal{
  transform:translateY(0) scale(1);
}

#funcDialogModal.func-dialog--danger{
  border-color:#fecaca;
  box-shadow:
    0 30px 70px rgba(2,6,23,.18),
    0 12px 28px rgba(239,68,68,.08);
}

#funcDialogModal.func-dialog--success{
  border-color:#bbf7d0;
  box-shadow:
    0 30px 70px rgba(2,6,23,.18),
    0 12px 28px rgba(16,185,129,.08);
}

#funcDialogIcon{
  width:52px;
  height:52px;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg,#eef4ff 0%, #e6efff 100%);
  color:#2563eb;
  border:1px solid #d7e5ff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 8px 18px rgba(37,99,235,.08);
}

#funcDialogIcon svg{
  width:22px;
  height:22px;
  display:block;
}

#funcDialogModal.func-dialog--danger #funcDialogIcon{
  background:linear-gradient(180deg,#fff3f3 0%, #fff0f1 100%);
  color:#dc2626;
  border-color:#fecdd3;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 8px 18px rgba(220,38,38,.08);
}

#funcDialogModal.func-dialog--success #funcDialogIcon{
  background:linear-gradient(180deg,#effdf5 0%, #ebfbf3 100%);
  color:#059669;
  border-color:#a7f3d0;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 8px 18px rgba(5,150,105,.08);
}

.func-dialog__main{
  min-width:0;
  align-self:center;
}

.func-dialog__title{
  margin:1px 0 5px 0;
  font-size:18px;
  font-weight:800;
  line-height:1.15;
  letter-spacing:-.02em;
  color:#0f172a;
}

.func-dialog__text{
  margin:0;
  font-size:14px;
  line-height:1.55;
  color:#475569;
  white-space:pre-line;
}

.func-dialog__actions{
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:4px;
}

.func-dialog__btn{
  width:100%;
  height:42px;
  border-radius:14px;
  padding:0 16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}

.func-dialog__btn:hover{
  transform:translateY(-1px);
}

.func-dialog__btn:focus-visible{
  outline:none;
  box-shadow:0 0 0 4px rgba(59,130,246,.18);
}

.func-dialog__btn--ghost{
  background:linear-gradient(180deg,#ffffff 0%, #f8fafc 100%);
  color:#334155;
  border:1px solid #dbe3ee;
  box-shadow:0 6px 14px rgba(15,23,42,.04);
}

.func-dialog__btn--ghost:hover{
  border-color:#cbd5e1;
  background:#f8fafc;
}

.func-dialog__btn--primary{
  color:#fff;
  border:1px solid transparent;
  background:linear-gradient(180deg,#3b82f6 0%, #2563eb 100%);
  box-shadow:0 12px 22px rgba(37,99,235,.24);
}

.func-dialog__btn--danger{
  color:#fff;
  border:1px solid transparent;
  background:linear-gradient(180deg,#ef4444 0%, #dc2626 100%);
  box-shadow:0 12px 22px rgba(220,38,38,.22);
}

.func-dialog__btn--success{
  color:#fff;
  border:1px solid transparent;
  background:linear-gradient(180deg,#10b981 0%, #059669 100%);
  box-shadow:0 12px 22px rgba(5,150,105,.22);
}

/* ===== Histórico premium da aba Funcionários ===== */
#histFuncOverlay{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:26px;
  background:rgba(15,23,42,.50);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .18s ease, visibility .18s ease;
  z-index:11980;
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}

#histFuncOverlay.show{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

#histFuncModal{
  width:min(1180px, 96vw);
  max-height:min(88vh, 920px);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  background:linear-gradient(180deg,#ffffff 0%, #f8fbff 100%);
  border:1px solid #dbeafe;
  border-radius:26px;
  box-shadow:
    0 34px 80px rgba(2,6,23,.20),
    0 14px 36px rgba(37,99,235,.07);
  transform:translateY(12px) scale(.988);
  transition:transform .18s ease;
}

#histFuncOverlay.show #histFuncModal{
  transform:translateY(0) scale(1);
}

.hist-func-modal__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding:22px 24px 18px;
  border-bottom:1px solid #e9eef7;
  background:linear-gradient(180deg,#ffffff 0%, #fbfdff 100%);
}

.hist-func-modal__title{
  margin:0;
  font-size:28px;
  line-height:1.04;
  letter-spacing:-.03em;
  font-weight:800;
  color:#0f172a;
}

.hist-func-modal__subtitle{
  margin:8px 0 0 0;
  font-size:14px;
  line-height:1.55;
  color:#64748b;
}

.hist-func-modal__header-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-shrink:0;
}

.hist-func-count{
  height:38px;
  padding:0 14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  border:1px solid #dbeafe;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:13px;
  font-weight:700;
  white-space:nowrap;
}

.hist-func-close{
  width:40px;
  height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  border:1px solid #dbe3ee;
  background:linear-gradient(180deg,#ffffff 0%, #f8fafc 100%);
  color:#334155;
  cursor:pointer;
  transition:transform .16s ease, border-color .16s ease, background .16s ease;
  box-shadow:0 8px 16px rgba(15,23,42,.04);
}

.hist-func-close:hover{
  transform:translateY(-1px);
  border-color:#cbd5e1;
  background:#f8fafc;
}

.hist-func-close svg{
  width:18px;
  height:18px;
  display:block;
}

.hist-func-toolbar{
  display:flex;
  align-items:center;
  gap:12px;
  padding:16px 24px 18px;
}

.hist-func-search{
  position:relative;
  flex:1;
  display:flex;
  align-items:center;
}

.hist-func-search svg{
  position:absolute;
  left:16px;
  width:18px;
  height:18px;
  color:#94a3b8;
  pointer-events:none;
}

.hist-func-search input{
  width:100%;
  height:48px;
  padding:0 16px 0 46px;
  border-radius:15px;
  border:1px solid #dbe3ee;
  background:linear-gradient(180deg,#ffffff 0%, #f8fbff 100%);
  color:#0f172a;
  font-size:14px;
  outline:none;
  transition:border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.hist-func-search input::placeholder{
  color:#94a3b8;
}

.hist-func-search input:focus{
  border-color:#93c5fd;
  box-shadow:0 0 0 4px rgba(59,130,246,.12);
  background:#fff;
}

.hist-func-content{
  min-height:220px;
  padding:0 24px 24px;
  overflow:auto;
}

.hist-func-table-wrap{
  border:1px solid #e6edf7;
  border-radius:22px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 16px 34px rgba(15,23,42,.05);
}

.hist-func-table{
  width:100%;
  table-layout:fixed;
  border-collapse:separate;
  border-spacing:0;
}

.hist-func-table thead th{
  padding:16px 18px;
  text-align:left;
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#334155;
  background:linear-gradient(180deg,#f8fbff 0%, #f1f6fd 100%);
  border-bottom:1px solid #e6edf7;
}

.hist-func-table tbody td{
  padding:16px 18px;
  vertical-align:top;
  border-bottom:1px solid #edf2f8;
  background:#fff;
}

.hist-func-table tbody tr:last-child td{
  border-bottom:none;
}

.hist-func-table tbody tr:hover td{
  background:#fbfdff;
}

.hist-func-table thead th:nth-child(1),
.hist-func-table tbody td:nth-child(1){
  width:14%;
}

.hist-func-table thead th:nth-child(2),
.hist-func-table tbody td:nth-child(2){
  width:16%;
}

.hist-func-table thead th:nth-child(3),
.hist-func-table tbody td:nth-child(3){
  width:16%;
}

.hist-func-table thead th:nth-child(4),
.hist-func-table tbody td:nth-child(4){
  width:16%;
}

.hist-func-table thead th:nth-child(5),
.hist-func-table tbody td:nth-child(5){
  width:18%;
}

.hist-func-date{
  display:grid;
  gap:4px;
}

.hist-func-date__day{
  font-size:14px;
  font-weight:700;
  color:#0f172a;
  line-height:1.3;
}

.hist-func-date__time{
  font-size:12px;
  color:#64748b;
  line-height:1.3;
}

.hist-func-person{
  display:grid;
  gap:4px;
  min-width:0;
}

.hist-func-person__name{
  font-size:14px;
  font-weight:700;
  color:#0f172a;
  line-height:1.35;
  word-break:break-word;
}

.hist-func-person__sub{
  font-size:12px;
  color:#64748b;
  line-height:1.45;
  word-break:break-word;
}

.hist-func-reason{
  font-size:13px;
  line-height:1.55;
  color:#475569;
  word-break:break-word;
  white-space:pre-line;
}

.hist-func-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:0 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  line-height:1;
  border:1px solid transparent;
  white-space:nowrap;
}

.hist-func-badge--blue{
  background:#eff6ff;
  color:#1d4ed8;
  border-color:#dbeafe;
}

.hist-func-badge--green{
  background:#ecfdf5;
  color:#047857;
  border-color:#bbf7d0;
}

.hist-func-badge--red{
  background:#fff1f2;
  color:#dc2626;
  border-color:#fecdd3;
}

.hist-func-badge--amber{
  background:#fffbeb;
  color:#b45309;
  border-color:#fde68a;
}

.hist-func-badge--violet{
  background:#f5f3ff;
  color:#6d28d9;
  border-color:#ddd6fe;
}

.hist-func-badge--slate{
  background:#f8fafc;
  color:#475569;
  border-color:#e2e8f0;
}

.hist-func-empty{
  min-height:220px;
  display:grid;
  place-items:center;
  padding:18px;
}

.hist-func-empty__card{
  width:min(460px,100%);
  text-align:center;
  padding:28px 24px;
  border-radius:22px;
  border:1px solid #e6edf7;
  background:linear-gradient(180deg,#ffffff 0%, #f8fbff 100%);
  box-shadow:0 16px 34px rgba(15,23,42,.05);
}

.hist-func-empty__icon{
  width:56px;
  height:56px;
  margin:0 auto 14px;
  border-radius:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#eff6ff;
  color:#2563eb;
  border:1px solid #dbeafe;
}

.hist-func-empty--danger .hist-func-empty__icon{
  background:#fff1f2;
  color:#dc2626;
  border-color:#fecdd3;
}

.hist-func-empty__icon svg{
  width:24px;
  height:24px;
  display:block;
}

.hist-func-empty__title{
  margin:0 0 6px 0;
  font-size:18px;
  font-weight:800;
  color:#0f172a;
}

.hist-func-empty__text{
  margin:0;
  font-size:14px;
  line-height:1.6;
  color:#64748b;
}

.hist-func-skeleton{
  height:58px;
  border-radius:16px;
  margin-bottom:12px;
  background:linear-gradient(90deg,#f3f7fd 0%, #eef4fb 50%, #f3f7fd 100%);
  background-size:200% 100%;
  animation:histFuncShimmer 1.1s linear infinite;
  border:1px solid #e8eef7;
}

.hist-func-skeleton--short{
  width:72%;
}

@keyframes histFuncShimmer{
  from{ background-position:200% 0; }
  to{ background-position:-200% 0; }
}

@media (max-width: 980px){
  #histFuncOverlay{
    padding:16px;
  }

  #histFuncModal{
    width:min(100%, 1000px);
    max-height:90vh;
    border-radius:22px;
  }

  .hist-func-modal__header{
    flex-direction:column;
    align-items:flex-start;
  }

  .hist-func-modal__header-actions{
    width:100%;
    justify-content:space-between;
  }

  .hist-func-toolbar{
    padding:14px 18px 16px;
  }

  .hist-func-content{
    padding:0 18px 18px;
  }

  .hist-func-table-wrap{
    overflow:auto;
  }

  .hist-func-table{
    min-width:980px;
  }
}

@media (max-width: 640px){
  .hist-func-modal__title{
    font-size:24px;
  }

  .hist-func-modal__subtitle{
    font-size:13px;
  }

  .hist-func-count{
    font-size:12px;
    padding:0 12px;
  }

  .hist-func-search input{
    height:44px;
  }
}

/* =========================================================
   PRÉ-PEDIDO PREMIUM — BLOCO FINAL
   Colar no final do style.css
========================================================= */

body #preOverlay{
  background: rgba(2, 8, 23, 0.58);
  backdrop-filter: blur(10px);
}

body #preModal{
  width: min(1180px, 94vw);
  max-height: 88vh;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-top: 4px solid #2563eb;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.99) 0%, rgba(248,250,252,0.98) 100%);
  box-shadow:
    0 30px 90px rgba(2, 8, 23, 0.34),
    0 10px 24px rgba(15, 23, 42, 0.10);
  overflow: hidden;
}

body #preModal .pre-head{
  padding: 22px 24px 16px 24px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  background:
    linear-gradient(180deg, rgba(248,250,252,0.98) 0%, rgba(255,255,255,0.96) 100%);
  backdrop-filter: blur(8px);
  align-items: flex-start;
}

body #preModal .pre-head-left{
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 0;
}

body #preModal .pre-title{
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

body #preModal .pre-sub{
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

body #preContent{
  padding: 18px 24px 16px 24px;
  background: transparent;
}

body #preContent .table-wrap{
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.65),
    0 10px 30px rgba(15, 23, 42, 0.05);
  overflow: auto;
}

body #preModal .pre-foot{
  padding: 16px 24px;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94) 0%, rgba(248,250,252,0.98) 100%);
  backdrop-filter: blur(8px);
}

body #preModal .pre-foot .muted{
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

body #preModal .pre-actions{
  display: flex;
  gap: 12px;
  align-items: center;
}

body #preModal .btn{
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

body #preModal .btn:hover{
  transform: translateY(-1px);
}

body #preModal .btn--ghost{
  background: #ffffff;
  border: 1px solid #dbe3ee;
  color: #0f172a;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

body #preModal .btn--ghost:hover{
  background: #f8fafc;
  border-color: #cbd5e1;
}

body #preModal .btn--primary{
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 52%, #3b82f6 100%);
  color: #ffffff;
  border: 1px solid transparent;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.30);
}

body #preModal .btn--primary:hover{
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.36);
}

body #preModal .btn--primary:disabled{
  opacity: .6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

body #preModal #preFechar{
  min-width: 108px;
}

body #preModal #tablePrePedido{
  width: 100%;
  min-width: 940px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

body #preModal #tablePrePedido thead th{
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fbff;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid #e2e8f0;
  padding: 14px 14px;
}

body #preModal #tablePrePedido th,
body #preModal #tablePrePedido td{
  padding: 16px 14px;
  vertical-align: middle;
  border-bottom: 1px solid #eef2f7;
}

body #preModal #tablePrePedido tbody tr{
  background: transparent;
  transition: background .16s ease, box-shadow .16s ease;
}

body #preModal #tablePrePedido tbody tr:nth-child(even){
  background: rgba(248, 250, 252, 0.55);
}

body #preModal #tablePrePedido tbody tr:hover{
  background: #f8fbff;
  box-shadow: inset 3px 0 0 #3b82f6;
}

body #preModal #tablePrePedido td:nth-child(1){
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
  color: #0f172a;
}

body #preModal #tablePrePedido td:nth-child(2){
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: #64748b;
  font-weight: 700;
}

body #preModal #tablePrePedido td:nth-child(3),
body #preModal #tablePrePedido td:nth-child(4),
body #preModal #tablePrePedido td:nth-child(5),
body #preModal #tablePrePedido td:nth-child(6),
body #preModal #tablePrePedido td:nth-child(7){
  text-align: center;
  font-variant-numeric: tabular-nums;
}

body #preModal #tablePrePedido .neg,
body #preModal #tablePrePedido .pos,
body #preModal #tablePrePedido .neu{
  min-width: 48px;
  padding: 5px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  border: 1px solid transparent;
}

body #preModal #tablePrePedido .neg{
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}

body #preModal #tablePrePedido .pos{
  color: #065f46;
  background: #ecfdf5;
  border-color: #bbf7d0;
}

body #preModal #tablePrePedido .neu{
  color: #334155;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

body #preModal #tablePrePedido input[data-pre-qtd]{
  width: 94px !important;
  height: 42px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid #dbe3ee;
  background: #ffffff;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

body #preModal #tablePrePedido input[data-pre-qtd]:hover{
  border-color: #bfdbfe;
  background: #f8fbff;
}

body #preModal #tablePrePedido input[data-pre-qtd]:focus{
  outline: none;
  border-color: #3b82f6;
  background: #ffffff;
  box-shadow:
    0 0 0 4px rgba(59, 130, 246, 0.14),
    inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

body #preModal #tablePrePedido tfoot .pre-total-row{
  background: linear-gradient(180deg, #f8fbff 0%, #f1f5f9 100%);
}

body #preModal #tablePrePedido tfoot td{
  border-bottom: 0;
  border-top: 1px solid #dbe3ee;
  padding-top: 16px;
  padding-bottom: 16px;
}

body #preModal #tablePrePedido .pre-total-label{
  text-align: right;
  padding-right: 16px;
  font-size: 13px;
  font-weight: 800;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: .04em;
}

body #preModal #preTotal.pre-total-value{
  display: inline-flex;
  min-width: 52px;
  justify-content: center;
  align-items: center;
  padding: 8px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
  font-size: 18px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
}

/* responsivo */
@media (max-width: 780px){
  body #preModal{
    width: min(96vw, 96vw);
    max-height: 90vh;
    border-radius: 20px;
  }

  body #preModal .pre-head{
    padding: 18px 16px 14px 16px;
    align-items: flex-start;
  }

  body #preModal .pre-title{
    font-size: 20px;
  }

  body #preContent{
    padding: 14px 16px;
  }

  body #preModal .pre-foot{
    padding: 14px 16px;
  }

  body #preModal .pre-actions{
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  body #preModal .pre-actions .btn{
    min-width: 148px;
  }
}

  /* ===== Loja: filtros, orçamento, timeline e totais ===== */
  .loja-ped-filtros{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin:14px 0 12px;
    padding:10px;
    border:1px solid #e7edf6;
    border-radius:18px;
    background:linear-gradient(180deg,#ffffff 0%, #f8fbff 100%);
  }

  .loja-ped-filter{
    border:1px solid #dbe7f7;
    background:#fff;
    color:#334155;
    border-radius:999px;
    padding:8px 11px;
    font-size:12px;
    font-weight:800;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    gap:7px;
    transition:.16s ease;
  }

  .loja-ped-filter:hover{
    border-color:#93c5fd;
    color:#1d4ed8;
  }

  .loja-ped-filter.is-active{
    background:#17328c;
    border-color:#17328c;
    color:#fff;
    box-shadow:0 10px 22px rgba(23,50,140,.18);
  }

  .loja-ped-filter span{
    min-width:20px;
    height:20px;
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:#eef4ff;
    color:#1d4ed8;
    font-size:11px;
  }

  .loja-ped-filter.is-active span{
    background:rgba(255,255,255,.18);
    color:#fff;
  }

  .store-order-badge.is-orcamento{
    background:#f5f3ff;
    color:#6d28d9;
    border-color:#ddd6fe;
  }

  .store-order-summary--finance{
    grid-template-columns:repeat(4, minmax(0,1fr));
  }

  .store-order-summary-card--total{
    border-color:#bfdbfe;
    background:linear-gradient(180deg,#eff6ff 0%, #ffffff 100%);
  }

  .loja-order-timeline{
    margin-top:14px;
    padding:12px 14px;
    border:1px solid #e8eef5;
    border-radius:16px;
    background:#fbfdff;
    display:grid;
    gap:10px;
  }

  .loja-order-step{
    display:grid;
    grid-template-columns:14px 1fr;
    gap:10px;
    align-items:start;
    color:#334155;
  }

  .loja-order-dot{
    width:10px;
    height:10px;
    margin-top:4px;
    border-radius:999px;
    background:#1d4ed8;
    box-shadow:0 0 0 4px rgba(29,78,216,.10);
  }

  .loja-order-step strong{
    display:block;
    font-size:13px;
    color:#0f172a;
  }

  .loja-order-step small{
    display:block;
    margin-top:2px;
    font-size:11px;
    color:#64748b;
  }

  .loja-client-actions{
    margin-top:14px;
    display:flex;
    justify-content:flex-end;
    gap:10px;
    flex-wrap:wrap;
  }

  @media (max-width: 760px){
    .store-order-summary--finance{
      grid-template-columns:repeat(2, minmax(0,1fr));
    }
  }

/* =========================================================
   LOJA — PEDIDOS PROFISSIONAL + FRETE AUTOMÁTICO
   ========================================================= */

/* Corrige o bug visual dos filtros virarem barras gigantes */
#lojaPedModal .loja-ped-filtros,
.loja-ped-filtros.loja-ped-filtros--chips{
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:8px !important;
  width:100% !important;
  margin:14px 0 16px !important;
  padding:10px !important;
  border:1px solid #e5edf8 !important;
  border-radius:18px !important;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%) !important;
  box-shadow:0 10px 24px rgba(15,23,42,.045) !important;
}

#lojaPedModal .loja-ped-filter,
.loja-ped-filtros--chips .loja-ped-filter{
  width:auto !important;
  min-width:0 !important;
  height:36px !important;
  padding:0 12px !important;
  border-radius:999px !important;
  border:1px solid #d9e5f6 !important;
  background:#ffffff !important;
  color:#334155 !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:7px !important;
  font-size:12px !important;
  font-weight:850 !important;
  line-height:1 !important;
  box-shadow:none !important;
  cursor:pointer !important;
  transition:background .16s ease, color .16s ease, border-color .16s ease, transform .14s ease, box-shadow .16s ease !important;
}

#lojaPedModal .loja-ped-filter:hover,
.loja-ped-filtros--chips .loja-ped-filter:hover{
  background:#f4f8ff !important;
  border-color:#b8d2ff !important;
  color:#1d4ed8 !important;
  transform:translateY(-1px) !important;
}

#lojaPedModal .loja-ped-filter.is-active,
.loja-ped-filtros--chips .loja-ped-filter.is-active{
  background:#17328c !important;
  border-color:#17328c !important;
  color:#ffffff !important;
  box-shadow:0 10px 22px rgba(23,50,140,.18) !important;
}

#lojaPedModal .loja-ped-filter span,
.loja-ped-filtros--chips .loja-ped-filter span{
  min-width:20px !important;
  height:20px !important;
  padding:0 6px !important;
  border-radius:999px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:#eef4ff !important;
  color:#1d4ed8 !important;
  font-size:11px !important;
  font-weight:900 !important;
}

#lojaPedModal .loja-ped-filter.is-active span,
.loja-ped-filtros--chips .loja-ped-filter.is-active span{
  background:rgba(255,255,255,.18) !important;
  color:#ffffff !important;
}

/* Modal de frete */
.loja-frete-modal{
  border-radius:22px !important;
  overflow:hidden;
}

.loja-frete-box{
  margin-top:14px;
  border:1px solid #e5edf8;
  border-radius:18px;
  padding:16px;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
}

.loja-switch-line{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border:1px solid #e5edf8;
  border-radius:14px;
  background:#fff;
  margin:0 0 14px;
  font-weight:850;
  color:#0f172a;
}

.loja-switch-line input[type="checkbox"]{
  width:18px;
  height:18px;
  margin:0;
  padding:0;
}

.loja-frete-grid{
  gap:14px;
}

.loja-frete-grid label{
  font-size:12px;
  font-weight:850;
  color:#334155;
  margin-bottom:6px;
}

.loja-frete-grid small{
  display:block;
  margin-top:6px;
  color:#64748b;
  font-size:11px;
  line-height:1.35;
}

.loja-frete-preview{
  margin-top:14px;
  padding:12px 14px;
  border-radius:14px;
  background:#eef6ff;
  color:#1e3a8a;
  font-size:12px;
  line-height:1.45;
  border:1px solid #d9eafe;
}

.loja-frete-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:16px;
}

/* Resumo do carrinho com subtotal/frete/total */
.loja-cart-resumo{
  border:1px solid #e5edf8;
  border-radius:16px;
  padding:12px;
  background:#ffffff;
  display:grid;
  gap:8px;
}

.loja-cart-money-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  color:#475569;
  font-size:13px;
}

.loja-cart-money-row b{
  color:#0f172a;
  font-size:14px;
}

.loja-cart-money-row--total{
  padding-top:8px;
  margin-top:4px;
  border-top:1px solid #e5edf8;
}

.loja-cart-money-row--total span,
.loja-cart-money-row--total b{
  color:#0f2c82;
  font-size:16px;
  font-weight:900;
}

.loja-cart-frete-msg{
  margin-top:4px;
  border-radius:12px;
  background:#f0f7ff;
  color:#1d4ed8;
  font-size:12px;
  font-weight:750;
  padding:8px 10px;
}

/* Ações administrativas dos pedidos */
.loja-admin-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
}

.loja-admin-actions .btn{
  width:auto !important;
  min-width:120px;
}

.loja-order-finalizado{
  margin-top:12px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid #dbeafe;
  background:#eff6ff;
  color:#1e3a8a;
  display:grid;
  gap:3px;
}

.loja-order-finalizado strong{
  font-size:13px;
}

.loja-order-finalizado span{
  font-size:12px;
  color:#475569;
}

.loja-order-finalizado--wait{
  background:#fff7ed;
  border-color:#fed7aa;
  color:#9a3412;
}

.loja-admin-logistica summary{
  color:#0f172a;
}

.loja-admin-logistica-grid input:disabled{
  background:#f8fafc;
  color:#94a3b8;
  cursor:not-allowed;
}

@media (max-width:760px){
  #lojaPedModal .loja-ped-filtros,
  .loja-ped-filtros.loja-ped-filtros--chips{
    overflow-x:auto !important;
    flex-wrap:nowrap !important;
    justify-content:flex-start !important;
    -webkit-overflow-scrolling:touch;
  }

  #lojaPedModal .loja-ped-filter,
  .loja-ped-filtros--chips .loja-ped-filter{
    flex:0 0 auto !important;
  }

  .loja-frete-actions{
    flex-direction:column;
  }

  .loja-frete-actions .btn{
    width:100%;
  }
}

/* =========================================================
   LOJA — STATUS DO PEDIDO + PREVISÃO FORA DO BADGE
   ========================================================= */

.store-order-statusbox{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:flex-start;
  gap:5px;
  text-align:right;
}

.store-order-statusbox .store-order-badge{
  min-height:32px;
  padding:0 13px;
  white-space:nowrap;
}

.store-order-status-sub{
  display:block;
  font-size:11px;
  font-weight:800;
  line-height:1.2;
  color:#94a3b8;
  letter-spacing:.01em;
  white-space:nowrap;
}

.store-order-status-sub--previsao{
  color:#94a3b8;
  font-weight:750;
}

.store-order-badge.is-enviado{
  background:#ecfeff;
  color:#0f766e;
  border-color:#a5f3fc;
}

.store-order-badge.is-aprovado{
  background:#eff6ff;
  color:#1d4ed8;
  border-color:#bfdbfe;
}

/* neutraliza o estilo antigo caso ainda exista no final do CSS */
.store-order-badge--stack{
  flex-direction:row !important;
  gap:0 !important;
}

.store-order-badge--stack small{
  display:none !important;
}

