/* 💎 premium · estoque (02/11/2026, pedido do master: "melhora a aparência do
   sistema e deixa mais lindo e premium").
   Telas: Estoque da Câmara, Entradas e Saídas (movimentações), Materiais e
   Insumos, Fechamento do Estoque, Fechamento de Caixa, Temperatura e
   Relatórios do Dia. Segue a linguagem do premium.css (tokens --ink,
   --primary-ink, --shadow-*, --r-*). Só aparência: nenhum texto, botão ou
   regra muda. O celular (até 768px) já tem o seu desenho em
   celular-estoque.css: quase tudo aqui vale só no computador. */

@media (min-width: 769px) {

  /* aviso "o estoque ainda NÃO foi conferido": continua amarelo e à vista,
     com a faixa lateral e a sombra dos cartões */
  .est-aviso {
    padding: 14px 18px !important; border-radius: var(--r-lg) !important;
    border-left: 4px solid #f59e0b !important;
    background: linear-gradient(90deg, #fff6df 0%, #fffbeb 55%) !important;
    box-shadow: 0 1px 2px rgba(146, 64, 14, .06), 0 10px 24px -16px rgba(217, 119, 6, .45);
  }

  /* cabeçalho: botões da mesma altura, com o ícone alinhado ao texto */
  .est-acoes { gap: 8px !important; align-items: center; }
  .est-acoes > .btn { min-height: 34px; }
  .est-acoes > .btn svg { flex: none; }

  /* barra de busca com a mesma sombra dos cartões */
  .filters-bar.est-filtros, .filters-bar.hist-filtros { box-shadow: var(--shadow-sm); border-radius: var(--r-lg); }

  /* ═══ PEÇAS COMUNS DAS TELAS DO DIA ═════════════════════════════════════
     Fechamento do Estoque, Fechamento de Caixa, Temperatura, Relatórios do
     Dia e Materiais usam a mesma navegação de data, as mesmas abas e os
     mesmos cartões de número. Um acabamento só para todas. */

  /* ‹ 02/11/2026 › : setas do tamanho certo e a data numa pílula */
  .est-navdia { gap: 8px !important; }
  .est-navdia > .btn-outline {
    width: 38px; height: 38px; padding: 0 !important; justify-content: center;
    font-size: 19px !important; line-height: 1; border-radius: 11px; color: var(--text-2);
  }
  .est-navdia > span {
    display: inline-flex; align-items: center; height: 38px; padding: 0 16px;
    background: #fff; border: 1px solid var(--border); border-radius: 11px; box-shadow: var(--shadow-xs);
    color: var(--ink) !important; font-variant-numeric: tabular-nums; letter-spacing: .2px;
  }
  .est-navdia > .btn-primary { height: 38px; padding: 0 16px; border-radius: 11px; }
  /* tablet: o mobile.css pede alvo de 40px; a seta e a data acompanham */
  @media (max-width: 1024px) {
    .est-navdia > .btn-outline { width: 42px; height: 42px; }
    .est-navdia > span { height: 42px; }
  }

  /* abas: controle segmentado (trilho suave, a aba ligada em destaque) */
  .est-abas {
    display: inline-flex !important; flex-wrap: wrap; gap: 4px !important; max-width: 100%;
    padding: 4px !important; background: #e9eef4; border: 1px solid var(--border) !important;
    border-radius: 14px;
  }
  .est-abas > .btn { min-height: 34px; padding: 7px 14px; border-radius: 10px !important; font-weight: 700; }
  .est-abas > .btn-outline { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
  .est-abas > .btn-outline:hover { background: rgba(255, 255, 255, .8); border-color: transparent; color: var(--ink); box-shadow: var(--shadow-xs); }
  .est-abas > .btn-primary { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 1px 2px rgba(13, 127, 121, .25), 0 4px 10px -4px rgba(13, 127, 121, .5); }

  /* cartões de número: borda neutra, a cor fica só na faixa da esquerda e no
     número; rótulo pequeno em caixa alta, número grande e tabular */
  .est-kpis { gap: 12px !important; }
  .est-kpis > div {
    border-top-color: var(--border) !important; border-right-color: var(--border) !important; border-bottom-color: var(--border) !important;
    border-left-width: 3px !important; border-radius: var(--r-lg) !important;
    padding: 14px 16px !important; box-shadow: var(--shadow-sm);
    min-width: max-content !important; /* número grande nunca vaza do cartão: ele cresce e a fileira quebra */
  }
  .est-kpis > div > div:first-child {
    font-size: 10.5px !important; font-weight: 700 !important; letter-spacing: .7px;
    text-transform: uppercase; color: var(--text-3) !important; line-height: 1.3;
  }
  .est-kpis > div > div:nth-child(2) {
    margin-top: 5px; font-size: 23px !important; font-weight: 800 !important; line-height: 1.1;
    letter-spacing: -.4px; font-variant-numeric: tabular-nums;
  }
  .est-kpis > div > div:nth-child(3) { margin-top: 4px; }
  /* "6 (+1 devolvida(s) depois)": o número manda, o complemento fica menor ao lado */
  .est-kpis .est-kpi-extra { font-size: 13px; font-weight: 700; letter-spacing: 0; opacity: .85; }

  /* linhas de movimento (entradas, retiradas, pagamentos…) */
  .est-mov { padding: 9px 4px !important; border-bottom-color: #eef2f6 !important; }
  .est-mov:last-child { border-bottom: none !important; }
  .est-mov > .est-mv-hora { color: var(--text-3); }
  .est-mov > .est-mv-nome { color: var(--ink); }
  .est-linha { border-bottom-color: #eef2f6 !important; }

  /* ═══ FECHAMENTO DO ESTOQUE ═════════════════════════════════════════════ */
  /* "Fechamento deste dia: NÃO registrado" continua vermelho e à vista; o
     fechado e conferido fica verde. Faixa lateral + sombra no lugar da borda
     grossa de 2px. */
  .fe-conf { padding: 16px 20px !important; border-radius: var(--r-lg) !important; }
  .cx-status { padding: 13px 18px !important; border-radius: var(--r-lg) !important; }
  .fe-conf.fe-alerta, .cx-status.fe-alerta {
    border: 1px solid #f5b5b5 !important; border-left: 4px solid #dc2626 !important;
    background: linear-gradient(90deg, #fdecec 0%, #fef5f5 60%) !important;
    box-shadow: 0 1px 2px rgba(153, 27, 27, .06), 0 12px 26px -18px rgba(220, 38, 38, .45);
  }
  .fe-conf.fe-ok, .cx-status.fe-ok {
    border: 1px solid #a7e3cc !important; border-left: 4px solid #059669 !important;
    background: linear-gradient(90deg, #e6f8f0 0%, #f2fbf7 60%) !important;
    box-shadow: 0 1px 2px rgba(6, 95, 70, .05), 0 12px 26px -18px rgba(5, 150, 105, .4);
  }
  .fe-conf .btn-block.btn-lg { border-radius: 13px; }
  /* aba Avisos: "VAI FALTAR" (vermelho), "cobre a agenda" (verde) e "doses sem
     baixa" (amarelo) com a mesma faixa lateral dos outros avisos */
  .card.fe-aviso.fe-alerta { border: 1px solid #f5b5b5 !important; border-left: 4px solid #dc2626 !important; box-shadow: 0 12px 26px -18px rgba(220, 38, 38, .45), var(--shadow-xs); }
  .card.fe-aviso.fe-ok { border: 1px solid #a7e3cc !important; border-left: 4px solid #059669 !important; }
  .card.fe-aviso.fe-atencao { border: 1px solid #f7d779 !important; border-left: 4px solid #f59e0b !important; box-shadow: 0 12px 26px -18px rgba(217, 119, 6, .45), var(--shadow-xs); }
  /* 📄 relatório em PDF e 📄 enviar no WhatsApp: o verde da casa em degradê,
     como os outros botões (era verde chapado) */
  .btn.est-btn-verde {
    background: linear-gradient(180deg, #0a9a6c 0%, #047857 100%) !important; border-color: transparent !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 6px 14px -6px rgba(4, 120, 87, .5);
  }
  .btn.est-btn-verde:hover { filter: brightness(1.06); }
  /* cartão do vídeo da conferência: contorno lilás fino e sombra (era 2px) */
  .card.fe-video {
    border: 1px solid #c7c8f7 !important; border-left: 4px solid #6366f1 !important;
    box-shadow: 0 1px 2px rgba(55, 48, 163, .06), 0 14px 30px -20px rgba(99, 102, 241, .5);
  }
  .card.fe-video video { border-radius: 12px !important; box-shadow: var(--shadow-sm); }
  .fe-filtro { box-shadow: var(--shadow-sm); }
  .fe-dia { transition: background .15s ease; }

  /* ═══ FECHAMENTO DE CAIXA ═══════════════════════════════════════════════ */
  /* "Conferência do dia" segue com o contorno verde-azulado (é o que a
     equipe precisa olhar), só mais fino e com brilho suave */
  .card.cx-conf {
    border: 1.5px solid #7fd3cc !important;
    box-shadow: 0 0 0 4px rgba(43, 188, 179, .07), var(--shadow-sm);
  }
  .cx-passos {
    border: 1px solid #c9ddfb !important; border-left: 4px solid #3b82f6 !important;
    background: linear-gradient(90deg, #edf4ff 0%, #f5f9ff 60%) !important; border-radius: 12px !important;
  }
  .cx-linha { border-radius: 11px !important; transition: box-shadow .15s ease; }
  .cx-c-nome > .mono { white-space: nowrap; } /* "[VIT-026]" inteiro, sem quebrar no hífen */
  .cx-linha:hover { box-shadow: var(--shadow-xs); }
  .cx-avulso { border-top-color: var(--border-strong) !important; }

  /* ═══ TEMPERATURA ═══════════════════════════════════════════════════════ */
  /* cartão de cada leitura: borda fina na cor da situação, faixa lateral */
  .tp-hoje { gap: 12px !important; }
  .tp-leitura {
    border-width: 1px !important; border-left-width: 4px !important;
    border-radius: var(--r-lg) !important; padding: 14px 16px !important; box-shadow: var(--shadow-xs);
  }
  .tp-leitura > div:first-child { letter-spacing: .8px !important; }
  /* avisos: "falta a leitura" (amarelo) e "excursão sem parecer" (vermelho)
     continuam saltando aos olhos, com a faixa de cor na lateral */
  .tp-falta {
    border: 1px solid #f7d779 !important; border-left: 4px solid #f59e0b !important;
    border-radius: 12px !important; padding: 12px 16px !important;
    box-shadow: 0 10px 22px -16px rgba(217, 119, 6, .45);
  }
  .tp-exc {
    border: 1px solid #f5b5b5 !important; border-left: 4px solid #dc2626 !important;
    border-radius: 12px !important; padding: 12px 16px !important;
    box-shadow: 0 10px 22px -16px rgba(220, 38, 38, .45);
  }
  .tp-grafico { border-radius: 14px !important; border-color: var(--border) !important; background: linear-gradient(180deg, #fbfcfe, #f5f8fb) !important; }
  /* o mapa do mês era uma tabela sem acabamento (cabeçalho solto, dias
     colados): ganha o desenho das outras tabelas do sistema */
  .table.tp-mapa, .table.mi-movs {
    width: 100%; border-collapse: separate; border-spacing: 0; background: #fff;
    border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-xs);
  }
  .tp-mapa thead th, .mi-movs thead th {
    padding: 11px 16px; text-align: left; white-space: nowrap;
    background: linear-gradient(180deg, #f9fbfd 0%, #f3f6fa 100%); border-bottom: 1px solid var(--border);
    color: #5a6a80; font-size: 10.5px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase;
  }
  .tp-mapa td, .mi-movs td {
    padding: 9px 16px; border-bottom: 1px solid #eef2f6; color: var(--text-2);
    vertical-align: middle; font-variant-numeric: tabular-nums;
  }
  .tp-mapa tbody tr:last-child td, .mi-movs tbody tr:last-child td { border-bottom: none; }
  .tp-mapa .tp-c-dia { color: var(--ink); font-weight: 600; }

  /* ═══ RELATÓRIOS DO DIA ═════════════════════════════════════════════════ */
  .rd-grade { gap: 14px !important; }
  .card.rd-card { border-left-width: 3px !important; padding: 18px 20px; }
  .card.rd-card > div:first-child { font-size: 14px !important; color: var(--ink) !important; margin-bottom: 8px !important; letter-spacing: -.1px; }
  .card.rd-card > div + div { line-height: 1.45; }
  .cx-rd-acoes > .btn { justify-content: center; min-height: 40px; }

  /* ═══ MATERIAIS E INSUMOS ═══════════════════════════════════════════════ */
  .card.mi-faixa { box-shadow: var(--shadow-sm); }
  /* área de bipar: o verde-azulado da marca, mais leve (era borda de 2px) */
  .mi-bipar {
    border: 1.5px solid #8fd8d2 !important; border-radius: var(--r-lg) !important;
    background: linear-gradient(180deg, #f1fbfa 0%, #e8f8f6 100%) !important;
    box-shadow: inset 0 1px 0 #fff, 0 10px 24px -18px rgba(13, 127, 121, .5);
  }
  .mi-bipar .scanner-input { border-radius: 12px; }
  .mi-grade { gap: 12px !important; }
  /* cartão de cada material: a cor da situação continua (zerado/abaixo do
     ideal), com os cantos e a sombra dos outros cartões */
  .mi-card { padding: 12px !important; border-radius: 14px !important; box-shadow: var(--shadow-xs); transition: box-shadow .18s ease; }
  .mi-card:hover { box-shadow: var(--shadow-sm); }
  .mi-card-acoes { gap: 5px !important; }
  .mi-card-acoes > .btn { min-height: 28px; padding: 4px 7px !important; border-radius: 8px; font-size: 11px; }
  .mi-pedido { border-radius: 14px !important; box-shadow: var(--shadow-xs); }
  .mi-total { border-radius: 12px !important; }
}

/* As duas tabelas (lotes e movimentações) só a partir de 1025px: até 1024 o
   mobile.css já transforma cada linha num cartão, e aqui nada deve mexer nele. */
@media (min-width: 1025px) {

  /* ═══ ESTOQUE DA CÂMARA: a tabela dos lotes ════════════════════════════
     Antes: o LOTE quebrava letra por letra ("SEM-/LOTE-/2809-16") e a coluna
     AÇÕES saía cortada pela direita (6 botões numa fileira de 336px). Agora o
     lote fica inteiro, os botões se arrumam em duas fileiras compactas e, se a
     tela for estreita demais, a tabela rola DENTRO do cartão (nada se esconde). */
  .table-wrap.est-tabela { overflow-x: auto; overscroll-behavior-x: contain; }
  .est-tabela th, .est-tabela td { padding-left: 9px; padding-right: 9px; }
  /* cabeçalho um tico mais justo: é ele que dita a largura mínima das colunas */
  .est-tabela th, .hist-lista th { letter-spacing: .5px; }
  .est-tabela td { vertical-align: middle; line-height: 1.35; }
  .est-tabela .est-td-vac { min-width: 120px; color: var(--ink); }
  .est-tabela .est-td-vac > .text-sm { margin-top: 3px; font-size: 11.5px; font-weight: 500; letter-spacing: .1px; overflow-wrap: anywhere; }
  .est-tabela .est-td-lote { white-space: nowrap; font-size: 11px; color: var(--text-2); }
  /* "🏷️ sem código" na letra da casa (a mono deixava o aviso duro) */
  .est-tabela .est-td-lote > div { margin-top: 4px; font-family: var(--font); letter-spacing: .1px; }
  /* barra + "22/26" numa linha; o "(19 doses · cx aberta…)" desce para a de
     baixo, legível (era 9px num lilás claro) */
  .est-tabela .est-td-qtd .stock-bar { flex-wrap: wrap; row-gap: 3px; min-width: 96px; }
  .est-tabela .est-td-qtd .stock-bar-track { width: 46px; }
  .est-tabela .est-td-qtd .stock-bar > span:not(.mono) { flex: 1 0 100%; margin-left: 0 !important; font-size: 10.5px !important; color: #6d28d9 !important; line-height: 1.3; }
  .est-tabela .est-td-qtd .stock-bar .mono { color: var(--ink); }
  .est-tabela .est-td-val .badge, .est-tabela .est-td-st .badge { white-space: nowrap; }
  .est-tabela .est-td-val > .text-sm { margin-top: 4px; padding-left: 3px; font-size: 11px; }
  .est-tabela .est-td-local { min-width: 80px; color: var(--text-3); }
  .est-tabela .est-td-custo { white-space: nowrap; }

  /* ações: botões quadradinhos do mesmo tamanho, em até duas fileiras */
  .est-tabela td.est-td-acoes { white-space: normal !important; line-height: 1; padding-right: 12px; }
  /* 3 + 3: 🏷️ ⚖ Ajustar 💔 em cima, 🔎 ✏️ 🗑 embaixo */
  .est-tabela td.est-td-acoes:has(> .btn:nth-child(4)) { width: 154px; min-width: 154px; }
  .est-tabela .est-td-acoes > .btn {
    height: 28px; min-width: 28px; padding: 0 6px; margin: 2px 3px 2px 0 !important;
    justify-content: center; vertical-align: middle; font-size: 12px; line-height: 1; border-radius: 8px;
  }
  /* 🗑 em vermelho sólido em toda linha gritava na tabela inteira: vira
     contorno vermelho e só acende ao passar o mouse */
  .est-tabela .est-td-acoes > .btn-red,
  .hist-lista .hist-acoes > .btn-red {
    background: #fff; color: #b91c1c; border: 1px solid #f1c4c4; box-shadow: var(--shadow-xs);
  }
  .est-tabela .est-td-acoes > .btn-red:hover,
  .hist-lista .hist-acoes > .btn-red:hover {
    background: #fef2f2; border-color: #e04040; color: #b91c1c; filter: none;
    box-shadow: 0 1px 2px rgba(15, 35, 60, .05), 0 4px 12px -6px rgba(196, 36, 36, .35);
  }

  /* tela estreita (1366, 1280 ou janela menor): a tabela rola dentro do
     cartão e a coluna AÇÕES fica presa à direita, sempre à mão */
  .est-tabela thead th:last-child, .est-tabela td.est-td-acoes,
  .hist-lista thead th:last-child, .hist-lista td.hist-acoes {
    position: sticky; right: 0; z-index: 1; background-color: #fff;
    box-shadow: -10px 0 14px -12px rgba(15, 35, 60, .22);
  }
  .est-tabela thead th:last-child, .hist-lista thead th:last-child { background-color: #f6f8fb; }
  .est-tabela tbody tr:hover > td.est-td-acoes { background-color: #f5fafb; }
  .hist-lista tbody tr.clickable:hover > td.hist-acoes { background-color: #eefaf8; }
  .est-tabela tr.est-vence > td.est-td-acoes { background-color: #fffbeb; }
  .est-tabela tr.est-vencido > td.est-td-acoes { background-color: #fef2f2; }

  /* lote que vence em 30 dias (amarelo) ou já venceu (vermelho): o fundo do
     JS continua e ganha a faixa de cor na lateral, para saltar aos olhos */
  .est-tabela tr.est-vence > td:first-child { box-shadow: inset 4px 0 0 #f59e0b; }
  .est-tabela tr.est-vencido > td:first-child { box-shadow: inset 4px 0 0 #dc2626; }

  /* ═══ ENTRADAS E SAÍDAS (movimentações) ═════════════════════════════════
     Mesmo problema: lote quebrando no hífen e o "Excluir" cortado na direita. */
  .table-wrap.hist-lista { overflow-x: auto; overscroll-behavior-x: contain; }
  .hist-lista th, .hist-lista td { padding-left: 8px; padding-right: 8px; }
  .hist-lista td { vertical-align: middle; line-height: 1.35; }
  .hist-lista .hist-id { white-space: nowrap; }
  .hist-lista .hist-vac { min-width: 110px; color: var(--ink); }
  /* lote comum fica numa linha; o provisório comprido ("SEM-LOTE-2809-16")
     quebra no máximo em 2, no hífen ("SEM-LOTE-" / "2809-16"), nunca letra a letra */
  .hist-lista .hist-lote { min-width: 84px; font-size: 11px; color: var(--text-2); }
  .hist-lista .hist-cb { white-space: nowrap; font-size: 11px; color: var(--text-3); }
  .hist-lista .hist-pac { min-width: 110px; }
  .hist-lista .hist-cli .badge { font-size: 10.5px; padding: 3px 7px; }
  .hist-lista .hist-tipo .badge, .hist-lista .hist-status .badge, .hist-lista .hist-cli .badge { white-space: nowrap; }
  .hist-lista .hist-tipo .badge + .badge { margin-top: 3px; }
  .hist-lista .hist-tipo .badge, .hist-lista .hist-status .badge { padding-left: 8px; padding-right: 8px; }
  .hist-lista .hist-data { font-size: 11.5px; color: var(--text-2); }
  .hist-lista td.hist-acoes { white-space: nowrap; padding-right: 12px; }
  .hist-lista .hist-acoes > .btn { height: 30px; padding: 0 9px; margin: 0 !important; vertical-align: middle; border-radius: 9px; }
  .hist-lista .hist-acoes > .btn + .btn { margin-left: 6px !important; }
}

/* quem pediu menos movimento não recebe transição */
@media (prefers-reduced-motion: reduce) {
  .mi-card, .cx-linha, .fe-dia { transition: none; }
}
