:root {
  --button-bc: #fcfcfc;
  --button-bc-hover: #e0e0e0;

  /* ===== presets de largura ===== */
  --w-sm: 8ch;                               /* Pequeno (Código/Pedido)   */
  --w-md-minus: clamp(120px, 14%, 180px);    /* Médio -                   */
  --w-md-plus:  clamp(160px, 20%, 260px);    /* Médio +                   */
  --w-lg:       clamp(220px, 26%, 340px);    /* Grande                    */
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f4f4f4;
  padding: 30px;
}

.container-lg {
  background-color: #fff;
  max-width: 90%;
  margin: auto;
  padding: 25px 35px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  align-items: center;
}

h1 { text-align: center; margin-bottom: 30px; }

.menu { display: flex; flex-direction: column; gap: 15px; align-items: center; }

.menu-button {
  background-color: var(--button-bc);
  color: #000;
  padding: 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 16px;
  border: none;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s ease;
  width: 300px;
}
.menu-button:hover { background-color: var(--button-bc-hover); color: #fff; }

.menu-actions { display: flex; gap: 12px; justify-content: flex-start; margin-bottom: 25px; }

.submenu-button {
  background-color: var(--button-bc);
  color: #000;
  padding: 10px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}
.submenu-button:hover { background-color: var(--button-bc-hover); color: #fff; }

.table-wrapper { overflow-x: auto; }

/* ===== rolagem local nas células marcadas ===== */
.scroll-col, .lg-scroll-col {
  max-width: none;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.scroll-col * , .lg-scroll-col * { white-space: inherit; min-width: 0; }
.scroll-col::-webkit-scrollbar, .lg-scroll-col::-webkit-scrollbar { height: 0; }
.scroll-col:hover::-webkit-scrollbar, .lg-scroll-col:hover::-webkit-scrollbar { height: 6px; }
.scroll-col:hover, .lg-scroll-col:hover { scrollbar-width: thin; }

/* =========================================================
   FORM & BUTTONS
   ========================================================= */
form {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 15px; margin-bottom: 20px;
}
form label { font-weight: bold; }
input[type="date"] { padding: 5px; }

.btn { border-style: none; }
.btn:hover { color: #fff; }
.btn-primary { background-color: var(--button-bc); color: #000; }
.btn-primary:hover { background-color: var(--button-bc-hover); color: #fff; }

.btn-grey {
  --bg: var(--button-bc);
  --bg-hover: var(--button-bc-hover);

  background-color: var(--bg);
  color: #000;
  border: 1px solid #f5f5f5;
  border-radius: .375rem;          /* mesmo raio do Bootstrap */
  padding: .375rem .75rem;         /* mesmo padding do btn */
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  cursor: pointer;

  transition:
    background-color .15s ease-in-out,
    border-color .15s ease-in-out,
    box-shadow .15s ease-in-out;
}

.btn-grey:hover {
  background-color: var(--bg-hover);
  color: #000;
}

.btn-grey:focus,
.btn-grey:active {
  background-color: var(--bg);
  box-shadow: none;
  outline: none;
}


/* =========================================================
   AJUSTES FULLCALENDAR (isolados, sem interferência)
   ========================================================= */
.fc-event.evento-prev { background-color: #ffc107 !important; border: none; color: #000; }

/* títulos quebram linha só na list view */
.fc .fc-daygrid-event .fc-event-title,
.fc .fc-timegrid-event .fc-event-title {
  white-space: normal !important;
}
.fc .fc-view-list .fc-event-title {
  white-space: pre-line !important;
}

.fc-list-day a { all: unset; font-weight: bold; }

.btn-arquivos {
  background: transparent; border: none; padding: 0; margin: 0;
  font: inherit; cursor: pointer;
}
.btn-arquivos:focus { outline: none; }

.arquivos-lista {
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border-radius: 4px;
  white-space: nowrap;
  overflow-x: auto;
  min-width: 160px;
}

/* =========================================================
   LARGURAS DINÂMICAS POR TABELA (escopadas)
   ========================================================= */

/* === Larguras fixas para funcionar bem com table-layout: fixed === */
:root{
  --w-sm: 8ch;         /* Pequeno (Código/Pedido/Informe/etc) */
  --w-md-minus: 120px; /* Médio - */
  --w-md-plus:  200px; /* Médio + */
  --w-lg:       280px; /* Grande */
}

.w-sm    { width: var(--w-sm) !important; }
.w-mdm   { width: var(--w-md-minus) !important; }
.w-mdp   { width: var(--w-md-plus) !important; }
.w-lg    { width: var(--w-lg) !important; }

/* ---------- ESTOQUE ---------- */
table.table--estoque {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
table.table--estoque th,
table.table--estoque td {
  padding: 10px;
  border-bottom: 1px solid #dee2e6;
  vertical-align: middle;
}
table.table--estoque th { background-color: #f1f3f5; font-weight: bold; }

table.table--estoque thead th:nth-child(1),
table.table--estoque tbody td:nth-child(1){
  width: var(--w-sm) !important; white-space: nowrap; /* Código */
}
table.table--estoque thead th:nth-child(2),
table.table--estoque tbody td:nth-child(2){
  width: var(--w-lg) !important; /* Descrição */
}
table.table--estoque thead th:nth-child(3),
table.table--estoque tbody td:nth-child(3){
  width: var(--w-md-minus) !important; white-space: nowrap; /* Informe */
}
table.table--estoque thead th:nth-child(4),
table.table--estoque tbody td:nth-child(4){
  width: var(--w-md-minus) !important; white-space: nowrap; /* Preço */
}
table.table--estoque thead th:nth-child(5),
table.table--estoque tbody td:nth-child(5){
  width: var(--w-md-minus) !important; white-space: nowrap; /* Custo */
}
table.table--estoque thead th:nth-child(6),
table.table--estoque tbody td:nth-child(6){
  width: var(--w-md-minus) !important; /* Categoria */
}

/* 7/8/9/10: ESTQ / RSVD / DSPN / Tabela -> sm */
table.table--estoque thead th:nth-child(7),
table.table--estoque tbody td:nth-child(7),
table.table--estoque thead th:nth-child(8),
table.table--estoque tbody td:nth-child(8),
table.table--estoque thead th:nth-child(9),
table.table--estoque tbody td:nth-child(9),
table.table--estoque thead th:nth-child(10),
table.table--estoque tbody td:nth-child(10){
  width: var(--w-sm) !important; white-space: nowrap;
}

table.table--estoque tbody td:nth-child(2){
  white-space: nowrap; overflow-x: auto; overflow-y: hidden; min-width:0;
}

/* ---------- COMPRAS ---------- */
table.table--compras {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
table.table--compras th,
table.table--compras td {
  padding: 10px;
  border-bottom: 1px solid #dee2e6;
  vertical-align: middle;
}
table.table--compras th { background-color: #f1f3f5; font-weight: bold; }

table.table--compras thead th:nth-child(1),
table.table--compras tbody td:nth-child(1){
  width: var(--w-sm) !important; white-space: nowrap;
}
table.table--compras thead th:nth-child(2),
table.table--compras tbody td:nth-child(2){
  width: var(--w-lg) !important;
}
table.table--compras thead th:nth-child(3),
table.table--compras tbody td:nth-child(3){
  width: var(--w-lg) !important;
}
table.table--compras thead th:nth-child(4),
table.table--compras tbody td:nth-child(4){
  width: var(--w-md-minus) !important; white-space: nowrap;
}
table.table--compras thead th:nth-child(5),
table.table--compras tbody td:nth-child(5){
  width: var(--w-md-minus) !important;
}
table.table--compras thead th:nth-child(6),
table.table--compras tbody td:nth-child(6){
  width: var(--w-md-plus) !important;
}
table.table--compras thead th:nth-child(7),
table.table--compras tbody td:nth-child(7){
  width: var(--w-md-minus) !important; white-space: nowrap;
}
table.table--compras tbody td:nth-child(2){
  white-space: nowrap; overflow-x: auto; overflow-y: hidden; min-width:0;
}

/* =========================================================
   MOBILE
   ========================================================= */
@media (max-width: 992px){
  :root{
    --w-sm: 7ch;
    --w-md-minus: 110px;
    --w-md-plus:  160px;
    --w-lg:       240px;
  }

  /* mantém Informe, ESTQ, RSVD, DSPN, Tabela compactos no mobile */
  table.table--estoque thead th:nth-child(3),
  table.table--estoque tbody td:nth-child(3),
  table.table--estoque thead th:nth-child(7),
  table.table--estoque tbody td:nth-child(7),
  table.table--estoque thead th:nth-child(8),
  table.table--estoque tbody td:nth-child(8),
  table.table--estoque thead th:nth-child(9),
  table.table--estoque tbody td:nth-child(9),
  table.table--estoque thead th:nth-child(10),
  table.table--estoque tbody td:nth-child(10){
    width: var(--w-sm) !important; white-space: nowrap;
  }
}

/* ===== CATEGORIAS (isolado) ===== */

/* altura e padding suaves nas linhas */
table.table--categorias tbody tr { height: 44px; }
table.table--categorias th,
table.table--categorias td { padding: 6px 10px; }

/* centralizar horizontalmente as colunas Cor/Preview */
table.table--categorias td.cell-center { text-align: center; }

/* normalizar a altura do select pequeno */
table.table--categorias .form-select.form-select-sm {
  height: 32px;
  line-height: 32px;
  padding-top: 0;
  padding-bottom: 0;
}

/* o quadradinho do preview (aparece de novo) */
table.table--categorias .swatch {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #ddd;
  display: inline-block;
  vertical-align: middle;
}

/* forms-âncora não atrapalham layout */
.anchor-forms { display: none; }

/* botão azul */
.btn-blue{
  --bs-btn-color: #fff;
  --bs-btn-bg: #0d6efd;
  --bs-btn-border-color: #0d6efd;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #0b5ed7;
  --bs-btn-hover-border-color: #0a58ca;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #0a58ca;
  --bs-btn-active-border-color: #0a53be;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: #0d6efd;
  --bs-btn-disabled-border-color: #0d6efd;
}

/* ----- indicadores do carrossel de tabelas ----- */
.tbl-indicators {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 20px;
}

.tbl-indicators .dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: #dee2e6;
  cursor: pointer;
}

.tbl-indicators .dot.active {
  background: #0d6efd;
}

.tbl-indicators .dot:focus-visible {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

/* cabeçalhos centralizados */
.table--tabela thead th { text-align: center; }

/* ===== Inputs invisíveis para Preço/Observação ===== */
.table--tabela td.col-preco input,
.table--tabela td.col-obs  input {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  width: 100%;
  min-width: 0;
  padding: 0;
  margin: 0;
  color: inherit;
  line-height: 1.4;
  border-radius: 0;
  text-align: center;
}

.table--tabela td.col-preco input:focus,
.table--tabela td.col-obs  input:focus {
  outline: none;
  box-shadow: inset 0 -2px 0 rgba(13,110,253,.25);
}

.table--tabela td.col-preco input[readonly] {
  cursor: default;
}

/* remove spinners no preço */
.table--tabela input[type="number"].no-spinners {
  appearance: textfield;
  -moz-appearance: textfield;
}
.table--tabela input[type="number"].no-spinners::-webkit-outer-spin-button,
.table--tabela input[type="number"].no-spinners::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Garante que o input use exatamente a tipografia da célula */
.table--tabela td.col-preco input,
.table--tabela td.col-obs  input {
  font: inherit;          /* família, tamanho e peso iguais ao <td> */
  font-size: inherit;     /* força herdar tamanho */
  line-height: inherit;   /* altura de linha igual à da célula */
  display: block;         /* ocupa toda a largura sem “encolher” */
  -webkit-appearance: none; /* evita ajustes visuais do Safari/Chrome */
  appearance: none;
}

/* (opcional) se o texto ainda parecer “baixo” na célula, use o line-height do td */
.table--tabela td { line-height: 1.5; }   /* ajuste fino, se necessário */

/* Remoção de Produtos na Tabela */
.table--tabela td.col-desc {
  position: relative;
  padding-right: 28px; /* mantém espaço pro clique sem encostar no texto */
}

.table--tabela .btn-del{
  position: absolute;
  right: 6px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;

  /* clique confortável sem aparecer “caixa” */
  min-width: 24px; min-height: 24px;
  padding: 0; margin: 0;

  border: 0;
  background: transparent;
  color: #d01919;          /* vermelho do "X" */
  font-size: 18px;
  line-height: 1;

  cursor: pointer;
  opacity: 0; pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}

.table--tabela tr:hover .btn-del,
.table--tabela .btn-del:focus {
  opacity: 1; pointer-events: auto;
}

/* leve feedback no hover sem “caixa” */
.table--tabela .btn-del:hover{
  transform: translateY(-50%) scale(1.12);
}

/* acessibilidade no teclado */
.table--tabela .btn-del:focus-visible{
  outline: 2px solid rgba(208,25,25,.35);
  border-radius: 4px;
}

/* Mobile: sem hover, deixar visível */
@media (max-width: 768px){
  .table--tabela .btn-del{ opacity: 1; pointer-events: auto; }
}

/* Adição de Produtos na Tabela */
.table--tabela .btn-add{
  position: absolute;
  right: 6px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; min-height: 24px;
  padding: 0; margin: 0;
  border: 0; background: transparent;
  color: #198754;               /* verde */
  font-size: 18px; line-height: 1;
  cursor: pointer;
  opacity: 0; pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}
.table--tabela tr:hover .btn-add,
.table--tabela .btn-add:focus { opacity: 1; pointer-events: auto; }
.table--tabela .btn-add:hover{ transform: translateY(-50%) scale(1.12); }
.table--tabela .btn-add:focus-visible{
  outline: 2px solid rgba(25,135,84,.35);
  border-radius: 4px;
}

/* Garante área p/ botão na célula (já usada pelo "X") */
.table--tabela td.col-desc { position: relative; padding-right: 28px; }

/* Mobile: sem hover, deixa visível */
@media (max-width: 768px){
  .table--tabela .btn-add{ opacity: 1; pointer-events: auto; }
}

/* ===== Busca com botão "x" ===== */
.search-wrap {
  position: relative;
  max-width: 420px;
  flex: 1 1 420px;
}

.search-wrap .btn-clear{
  position: absolute;
  right: 10px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;

  min-width: 28px; min-height: 28px;   /* área de clique confortável */
  padding: 0; margin: 0;
  border: 0; background: transparent;
  color: #6c757d;                       /* cinza bootstrap */
  font-size: 20px; line-height: 1;
  cursor: pointer;

  opacity: 0; pointer-events: none;     /* escondido por padrão */
  transition: opacity .15s ease, transform .15s ease, color .15s ease;
}

/* quando o wrap tiver .has-value (JS coloca), mostra o X */
.search-wrap.has-value .btn-clear{
  opacity: 1; pointer-events: auto;
}

.search-wrap .btn-clear:hover{
  transform: translateY(-50%) scale(1.08);
  color: #495057;
}

.search-wrap .btn-clear:focus-visible{
  outline: 2px solid rgba(108,117,125,.5);
  border-radius: 4px;
}

/* Modal largo + rolagem interna (versão única e sem conflitos) */
.modal-dialog.budget-modal{
  --bs-modal-width: min(1400px, 95vw);
  margin: 1.25rem auto;
}

.modal-dialog.budget-modal .modal-content{
  border-radius: 12px;
}

/* rolagem só dentro do wrapper do corpo */
.modal-dialog.budget-modal .orcamento-scroll{
  max-height: 78vh;
  overflow: auto;
  scrollbar-gutter: stable both-edges;
}

/* rolagem extra para as tabelas longas dentro do modal */
.modal-dialog.budget-modal .orcamento-table-scroll{
  max-height: 55vh;
  overflow: auto;
}

@media (min-width: 1400px){
  .modal-dialog.budget-modal .orcamento-scroll{ max-height: 82vh; }
}

/* espaço pro X e clique confortável */
.search-wrap input.form-control { padding-right: 36px; }
.search-wrap .btn-clear { z-index: 1; min-width: 28px; min-height: 28px; }

/* ===========================
   BOTÕES DE AÇÃO (+ / ×)
   =========================== */

/* tamanho/estilo base para ícones pequenos */
:root{
  --icon-btn-size: 28px;
  --icon-btn-radius: .55rem;
}

/* ---------- Tabela principal (snapshot) ---------- */
/* remover da tabela: padroniza o × como botão */
.table--tabela .btn-del{
  position: absolute;
  right: 6px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;

  width: var(--icon-btn-size);
  height: var(--icon-btn-size);
  padding: 0; margin: 0;

  border: 1px solid #dc3545;              /* vermelho padrão */
  border-radius: var(--icon-btn-radius);
  background: transparent;
  color: #dc3545;
  font-size: 16px; line-height: 1; font-weight: 700;
  cursor: pointer;

  opacity: 0; pointer-events: none;
  transition:
    opacity .15s ease,
    transform .15s ease,
    background-color .15s ease,
    color .15s ease;
}

/* aparece no hover/focus da linha (e acessível no teclado) */
.table--tabela tr:hover .btn-del,
.table--tabela .btn-del:focus { opacity: 1; pointer-events: auto; }

.table--tabela .btn-del:hover{
  background: #dc3545;
  color: #fff;
  transform: translateY(-50%) scale(1.06);
}
.table--tabela .btn-del:focus-visible{
  outline: 2px solid rgba(220,53,69,.35);
  outline-offset: 0;
}

/* deixar visível no mobile (sem hover) */
@media (max-width: 768px){
  .table--tabela .btn-del{ opacity: 1; pointer-events: auto; }
}

/* (opcional) pequeno ajuste no + da tabela para manter mesma área */
.table--tabela .btn-add{
  min-width: var(--icon-btn-size);
  min-height: var(--icon-btn-size);
  border-radius: var(--icon-btn-radius);
}

/* ---------- Orçamento (modal) ---------- */
/* + dos resultados */
.orc-add{
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--icon-btn-size); height: var(--icon-btn-size);
  padding: 0; line-height: 1; font-weight: 700;

  border: 1px solid #198754 !important;   /* verde */
  border-radius: var(--icon-btn-radius);
  background: transparent;
  color: #198754;
  text-decoration: none !important;       /* garante sem sublinhado */
  transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.orc-add:hover,
.orc-add:focus{
  background: #198754;
  color: #fff;
  transform: scale(1.04);
}

/* × para remover item do orçamento */
.orc-rem{
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--icon-btn-size); height: var(--icon-btn-size);
  padding: 0; line-height: 1; font-weight: 700;

  /* sobrescreve o btn-link do Bootstrap */
  border: 1px solid #dc3545 !important;
  border-radius: var(--icon-btn-radius);
  background: transparent !important;
  color: #dc3545 !important;
  text-decoration: none !important;

  transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.orc-rem:hover,
.orc-rem:focus{
  background: #dc3545 !important;
  color: #fff !important;
  transform: scale(1.04);
}

/* =========================================
   TABELA DE PRODUTOS (snapshot) — "×" simples
   ========================================= */
   .table--tabela td.col-desc { padding-right: 28px; } /* mantém área do botão */

   .table--tabela .btn-del{
     position: absolute;
     right: 6px; top: 50%; transform: translateY(-50%);
     display: inline-block;

     min-width: 24px; min-height: 24px;
     padding: 0; margin: 0;

     border: 0;                     /* sem borda */
     background: transparent;       /* sem pílula */
     color: #d01919;                /* vermelho do X */
     font-size: 18px; line-height: 1; font-weight: 700;
     text-decoration: none !important; /* evita sublinhado */

     cursor: pointer;
     opacity: 0; pointer-events: none;  /* só aparece no hover */
     transition: opacity .15s ease, transform .12s ease, color .12s ease;
   }

   .table--tabela tr:hover .btn-del,
   .table--tabela .btn-del:focus {
     opacity: 1; pointer-events: auto;
   }

   .table--tabela .btn-del:hover{
     transform: translateY(-50%) scale(1.12);  /* leve feedback */
   }

   .table--tabela .btn-del:focus-visible{
     outline: 2px solid rgba(208,25,25,.35);
     border-radius: 4px;
   }

   /* Mobile: sem hover, deixar visível */
   @media (max-width: 768px){
     .table--tabela .btn-del{ opacity: 1; pointer-events: auto; }
   }

   /* OBS: NÃO mexe no orçamento — .orc-rem continua com a pílula vermelha */

/* Snapshot: X simples SEM fundo no hover/focus/active */
.table--tabela .btn-del,
.table--tabela .btn-del:hover,
.table--tabela .btn-del:focus,
.table--tabela .btn-del:active {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

/* Mantém só o micro-zoom do hover (sem fundo) */
.table--tabela .btn-del:hover {
  transform: translateY(-50%) scale(1.12);
  color: #d01919; /* vermelho do X */
}

/* Acessibilidade: outline sutil apenas no focus-visible */
.table--tabela .btn-del:focus { outline: none; }
.table--tabela .btn-del:focus-visible {
  outline: 2px solid rgba(208,25,25,.35) !important;
  border-radius: 4px;
}

/* Orçamento: linha addable com hover/foco */
#orc-resultados-body tr.orc-row-addable{
  cursor: pointer;
  transition: background-color .12s ease;
}
#orc-resultados-body tr.orc-row-addable:hover{
  background: rgba(108,117,125,.12); /* cinza leve */
}
#orc-resultados-body tr.orc-row-addable:focus-within,
#orc-resultados-body tr.orc-row-addable:focus{
  outline: 2px solid rgba(108,117,125,.35);
  outline-offset: -2px;
  background: rgba(108,117,125,.16);
}

/* bônus: realça o botão + quando a linha está em hover */
#orc-resultados-body tr.orc-row-addable:hover .orc-add{
  background: #198754;
  color: #fff;
  border-color: #198754;
}

/* Orçamento: inputs de Qtd/Preço com cara de texto */
#orc-itens td input.orc-qtd,
#orc-itens td input.orc-preco{
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;

  width: 100%;
  min-width: 0;
  padding: 0;
  margin: 0;

  font: inherit;          /* mesma tipografia da célula */
  font-size: inherit;
  line-height: inherit;
  text-align: center;
  -webkit-appearance: none;
  appearance: none;
}

/* remover setinhas dos <input type="number"> */
#orc-itens input[type="number"]::-webkit-outer-spin-button,
#orc-itens input[type="number"]::-webkit-inner-spin-button{
  -webkit-appearance: none;
  margin: 0;
}
#orc-itens input[type="number"]{
  -moz-appearance: textfield; /* Firefox */
}

/* ===== Produção: linha compacta dos parâmetros ===== */
.producao-inline{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.producao-inline .lbl{ margin:0; font-size:.875rem; font-weight:600; color:#6c757d; }

/* larguras enxutas reaproveitando seu preset */
.inp-fardo{   width: var(--w-sm); }   /* ~8ch */
.inp-bobinas{ width: var(--w-sm); }
.inp-enfardadeira{ width: var(--w-sm); }

/* utilitário global: number sem “setinhas” (reuso do que vc já tem) */
input[type="number"].no-spin {
  appearance: textfield; -moz-appearance: textfield;
}
input[type="number"].no-spin::-webkit-outer-spin-button,
input[type="number"].no-spin::-webkit-inner-spin-button{
  -webkit-appearance: none; margin: 0;
}

/* Lotes sem grade (só um respiro visual) */
.lotes-table > :not(caption) > * > * { border: 0 !important; }         /* remove tudo */
.lotes-table thead th { border-bottom: 0 !important; }                 /* sem linha no cabeçalho */
.lotes-table tbody tr { border: 0 !important; }                        /* sem linhas entre linhas */
.lotes-table tbody td { padding-top: .65rem; padding-bottom: .65rem; } /* respira um pouco */

/* opcional: separador bem sutil entre blocos de card, não por linha */
.card-snapshot .collapse .px-3 { border-top: 1px solid #eef1f3; }

/* deixa o link preto e sem sublinhado em todos os estados */
.btn-arquivos,
.btn-arquivos:visited,
.btn-arquivos:hover,
.btn-arquivos:active,
.btn-arquivos:focus {
  color: #000 !important;
  text-decoration: none;
}

/* === compactação: elimina o espaço “fantasma” no rodapé do card === */
.fc .fc-daygrid-event .fc-event-main {
  padding: 0 !important;
}
.fc .fc-daygrid-event .fc-event-title,
.fc .fc-daygrid-event .fc-event-time {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.2em !important;
}
/* remove resizer (que costuma reservar área) */
.fc .fc-event-resizer { display: none !important; }

/* === cor especial para eventos AGENDADO (apenas grid e lista herdará cores básicas) === */
.fc .fc-daygrid-event.evento-agendado {
  background-color: #6583a1 !important;
  border-color: #1e7e34 !important;
  color: #fff !important;
}
.fc .fc-daygrid-event.evento-agendado a,
.fc .fc-daygrid-event.evento-agendado .fc-event-title {
  color: #fff !important;
}

/* permitir quebra de linha/palavra nos cards (dayGrid e list) */
.fc .fc-daygrid-event,
.fc .fc-daygrid-event .fc-event-main,
.fc .fc-daygrid-event .fc-event-title,
.fc .fc-list-event-title {
  white-space: normal !important;     /* pode quebrar linhas */
  overflow-wrap: anywhere !important; /* quebra palavras longas */
  word-break: break-word !important;  /* fallback */
}

/* o link do evento ocupa a largura toda para quebrar corretamente */
.fc .fc-daygrid-event a {
  display: block !important;
}

/* (mantém a compactação que já fizemos) */
.fc .fc-daygrid-event .fc-event-main { padding: 0 !important; }
.fc .fc-daygrid-event .fc-event-title,
.fc .fc-daygrid-event .fc-event-time {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.2em !important;
}

/* cor do AGENDADO (se já tiver, mantenha) */
.fc .fc-daygrid-event.evento-agendado {
  background-color: #6583a1 !important;
  border-color: #6583a1 !important;
  color: #fff !important;
}
.fc .fc-daygrid-event.evento-agendado a,
.fc .fc-daygrid-event.evento-agendado .fc-event-title {
  color: #fff !important;
}

/* deixa os spans do status em cinza escuro */
.fc .fc-daygrid-event .fc-event-main div[style*="font-size:.85em"] span {
  color: #000 !important; /* cinza escuro */
}

.user-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 12px;
  font-size: 0.95rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #444;
}

.logout-btn {
  text-decoration: none;
  color: #777;
  border: 1px solid #ddd;
  padding: 4px 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.logout-btn:hover {
  color: #c62828;
  border-color: #c62828;
  background-color: #fff5f5;
}