/* =============================================================================
   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) and (min-width: 769px){
  :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);
}


/* ==========================================
   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. */


/* ===================== 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;
}
