:root{
    --ink: #14213D;
    --steel: #3A5068;
    --rust: #C1440E;
    --rust-dark: #8F3009;
    --concrete: #EAE6DD;
    --paper: #FBFAF7;
    --text: #1C1C1A;
    --text-muted: #5B5A54;
    --line: #D8D3C7;
    --ok: #2F6B3E;
    --ok-bg: #E4EFE3;
    --err: #8F3009;
    --err-bg: #FBEAE3;
  }
  *{ box-sizing: border-box; }
  html{ height:100%; }
  body{
    margin:0; background: var(--concrete); color: var(--text);
    font-family: 'Inter', sans-serif; line-height: 1.5;
    min-height:100%;
  }
  .app{ padding: 32px 20px 80px; min-height:100vh; display:flex; flex-direction:column; }

  header{
    background: var(--ink); color: #fff; padding: 14px 24px; border-radius: 10px;
    display:flex; align-items:center; gap:24px; margin-bottom: 28px;
  }
  header .brand{ display:flex; align-items:center; gap:12px; flex-shrink:0; }
  header .brand .logo-header{
    height: 42px; width:auto; display:block;
  }
  header .brand .logo-header-empilhado{ height:44px; width:auto; display:block; }
  .marca-header-titulo{ margin:0; font-family:'Oswald', sans-serif; font-weight:600; font-size:22px; letter-spacing:0.5px; white-space:nowrap; line-height:1; }
  .marca-cortes-contorno{ color: var(--rust); font-family:'Oswald', sans-serif; font-weight:600; }
  .marca-360-branco{ color:#fff; font-family:'Yellowtail', cursive; font-weight:400; font-size:1.5em; margin-left:2px; }
  .marca-header-subtitulo{ margin:0; font-size:11px; color:#fff; white-space:nowrap; }

  .rodape-app{
    display:flex; align-items:center; justify-content:center; gap:16px;
    padding:12px 16px; margin-top:auto; border-radius:10px;
    background: var(--concrete); font-size:11.5px; color: var(--text-muted);
  }
  .rodape-seguro{ display:flex; align-items:center; gap:4px; color:#1F8A5C; }
  header h1{ font-family:'Oswald', sans-serif; font-weight:600; font-size:22px; margin:0; letter-spacing: 0.5px; }
  header p{ margin:2px 0 0; font-size:12.5px; color:#B9C2D4; }

  .area-direita-cabecalho{ display:flex; align-items:center; gap:18px; flex-shrink:0; margin-left:auto; }

  .indicador-dados-atualizados{ display:flex; align-items:center; gap:8px; }
  .ponto-verde-pulsante{
    width:9px; height:9px; border-radius:50%; background:#2ECC71; flex-shrink:0;
    box-shadow:0 0 0 rgba(46,204,113,0.5); animation: pulsar-verde 2s infinite;
  }
  @keyframes pulsar-verde{
    0%{ box-shadow:0 0 0 0 rgba(46,204,113,0.5); }
    70%{ box-shadow:0 0 0 6px rgba(46,204,113,0); }
    100%{ box-shadow:0 0 0 0 rgba(46,204,113,0); }
  }
  .dados-atualizados-titulo{ margin:0; font-size:11.5px; font-weight:600; color:#fff; white-space:nowrap; }
  .dados-atualizados-hora{ margin:1px 0 0; font-size:11px; color:#B9C2D4; white-space:nowrap; }

  header .perfil-dropdown{ position:relative; }
  header .perfil-botao{
    display:flex; align-items:center; gap:10px; background:transparent; border:none; cursor:pointer;
    padding:5px 8px; border-radius:8px;
  }
  header .perfil-botao:hover{ background:#1E2C4D; }
  header .avatar-iniciais{
    width:34px; height:34px; border-radius:50%; background: var(--rust); color:#fff; font-weight:600; font-size:12.5px;
    display:flex; align-items:center; justify-content:center; flex-shrink:0;
  }
  header .perfil-texto{ display:flex; flex-direction:column; align-items:flex-start; line-height:1.25; }
  header .perfil-nome{ font-size:13px; font-weight:600; color:#fff; white-space:nowrap; }
  header .perfil-empresa{ font-size:11.5px; color:#B9C2D4; white-space:nowrap; }
  header .perfil-botao svg{ width:15px; height:15px; color:#B9C2D4; }

  /* Menu de navegação, agora dentro da própria faixa do cabeçalho (não é mais uma caixa separada). */
  .menu-superior-inline{
    display:flex; gap:2px; flex-wrap:nowrap; flex:1; justify-content:center; min-width:0;
  }
  .item-menu-superior{
    flex:0 1 auto; text-align:center; padding:7px 10px; border:none; background:none;
    border-radius:8px; cursor:pointer; color:#C7D0E3;
  }
  .item-menu-superior:hover{ background:#1E2C4D; }
  .item-menu-superior.ativo{ background: var(--rust); color:#fff; }
  .item-menu-superior svg{ width:19px; height:19px; display:block; margin:0 auto 3px; }
  .item-menu-superior span{ font-size:10px; font-weight:600; white-space:nowrap; }

  header .perfil-menu{
    position:absolute; top:calc(100% + 8px); right:0; background:#fff; border:1px solid var(--line); border-radius:10px;
    box-shadow:0 8px 24px rgba(20,33,61,0.2); min-width:190px; overflow:hidden; z-index:20;
  }
  header .perfil-menu button{
    display:block; width:100%; text-align:left; background:none; border:none; padding:11px 16px; font-size:13px;
    color: var(--text); cursor:pointer;
  }
  header .perfil-menu button:hover{ background: var(--concrete); }
  header .perfil-menu button + button{ border-top:1px solid var(--line); }

  .config-panel{
    background: var(--paper); border:1px solid var(--line); border-radius:10px;
    padding: 16px 22px; margin-bottom:20px; font-size:13px;
  }
  .config-panel label{ display:block; font-size:11.5px; text-transform:uppercase; color:var(--text-muted); margin-bottom:6px; font-weight:600; }
  .config-panel input{
    width:100%; padding:8px 12px; border:1px solid var(--line); border-radius:6px;
    font-family:'IBM Plex Mono', monospace; font-size:13px; background:#fff;
  }

  .field{ margin-bottom:14px; }
  .field label{ display:block; font-size:12px; text-transform:uppercase; color:var(--text-muted); margin-bottom:6px; font-weight:600; }
  .field input{
    width:100%; padding: 10px 13px; border:1px solid var(--line); border-radius:6px;
    font-size:14px; background:#fff; color:var(--text);
  }
  .field input:focus{ outline:2px solid var(--rust); outline-offset:1px; }
  .btn-primary{
    width:100%; padding: 11px 22px; border:none; border-radius:6px; background:var(--rust);
    color:#fff; font-weight:600; font-size:14px; cursor:pointer; margin-top:6px;
  }
  .btn-primary:hover{ background: var(--rust-dark); }
  .btn-primary:disabled{ background:#B7A99A; cursor:default; }
  .btn-secundario{
    padding: 9px 18px; border:1px solid var(--steel); border-radius:6px; background:transparent;
    color:var(--steel); font-weight:600; font-size:13px; cursor:pointer;
  }
  .btn-secundario:hover{ background:#EDF0F3; }
  .btn-atualizar{
    display:inline-flex; align-items:center; gap:6px; padding:8px 16px; border:none; border-radius:6px;
    background: var(--ink); color:#fff; font-weight:600; font-size:13px; cursor:pointer;
  }
  .btn-atualizar:hover{ background:#1E2C4D; }
  .btn-atualizar svg{ width:15px; height:15px; flex-shrink:0; }
  .btn-incluir{
    padding: 11px 22px; border:none; border-radius:6px; background: var(--ink);
    color:#fff; font-weight:600; font-size:14px; cursor:pointer; white-space:nowrap;
  }
  .btn-incluir:hover{ background:#1E2C4D; }
  .cabecalho-resultados{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
  .cabecalho-resultados h2{ font-family:'Oswald', sans-serif; font-size:16px; margin:0; color:var(--ink); }

  .grid-resumo-dashboard{
    display:grid; grid-template-columns: repeat(4, 1fr); gap:16px; margin-top:24px;
  }
  .card-resumo{
    background: var(--paper); border:1px solid var(--line); border-radius:12px; padding:16px 18px;
    display:flex; align-items:center; gap:14px;
  }
  .card-resumo-icone{
    width:44px; height:44px; border-radius:10px; display:flex; align-items:center; justify-content:center; flex-shrink:0;
  }
  .card-resumo-icone svg{ width:22px; height:22px; }
  .card-resumo-icone.azul{ background:#E8EFFC; color:#3B6FD4; }
  .card-resumo-icone.terracota{ background: var(--err-bg); color: var(--rust); }
  .card-resumo-icone.verde{ background:#E3F5EC; color:#1F8A5C; }
  .card-resumo-icone.amarelo{ background:#FDF3D9; color:#B8860B; }
  .card-resumo-icone.roxo{ background:#EDE7F6; color:#6A3FA0; }

  /* Fundo sólido (preenchido) em vez do tom claro — só nos cartões de resumo,
     pra diferenciar visualmente dos cards do menu logo abaixo (que usam o tom claro). */
  .card-resumo-icone-preenchido.azul{ background:#3B6FD4; color:#fff; }
  .card-resumo-icone-preenchido.terracota{ background: var(--rust); color:#fff; }
  .card-resumo-icone-preenchido.verde{ background:#1F8A5C; color:#fff; }
  .card-resumo-icone-preenchido.roxo{ background:#6A3FA0; color:#fff; }
  .card-resumo-numero{ margin:0; font-family:'Oswald', sans-serif; font-weight:600; font-size:24px; color: var(--ink); line-height:1.1; }
  .card-resumo-titulo{ margin:2px 0 0; font-size:12.5px; color: var(--text-muted); }

  @media (max-width: 900px){
    .grid-resumo-dashboard{ grid-template-columns: 1fr 1fr; }
  }
  @media (max-width: 560px){
    .grid-resumo-dashboard{ grid-template-columns: 1fr; }
  }

  .menu-grid{
    display:grid; grid-template-columns: 1fr 1fr 1fr 1fr 1fr; gap:18px; margin: 30px 0;
  }
  .menu-card{
    background: var(--paper); border:1px solid var(--line); border-radius:12px;
    padding: 18px 20px; text-align:left; cursor:pointer;
    display:grid; grid-template-columns: auto 1fr; column-gap:14px; row-gap:3px; align-items:start;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  }
  .menu-card:hover{ border-color: var(--rust); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(20,33,61,0.08); }
  .menu-card-icone{
    grid-row: 1 / span 3;
    width:40px; height:40px; border-radius:10px; display:flex; align-items:center; justify-content:center;
  }
  .menu-card-icone svg{ width:20px; height:20px; }
  .menu-card-icone.azul{ background:#E8EFFC; color:#3B6FD4; }
  .menu-card-icone.terracota{ background: var(--err-bg); color: var(--rust); }
  .menu-card-icone.verde{ background:#E3F5EC; color:#1F8A5C; }
  .menu-card-icone.amarelo{ background:#FDF3D9; color:#B8860B; }
  .menu-card-icone.roxo{ background:#EDE7F6; color:#6A3FA0; }
  .menu-card-icone.cinza{ background:#E7E5E0; color:#5B5A54; }
  .menu-card-titulo{
    font-family:'Oswald', sans-serif; font-weight:600; font-size:16px; color: var(--ink);
  }
  .menu-card-desc{ font-size:13px; color: var(--text-muted); line-height:1.5; flex:1; }
  .menu-card-acessar{ font-weight:600; font-size:13px; display:flex; align-items:center; gap:5px; margin-top:4px; }
  .menu-card-acessar svg{ width:14px; height:14px; transition: transform 0.15s; }
  .menu-card:hover .menu-card-acessar svg{ transform: translateX(3px); }
  .menu-card-acessar.azul{ color:#3B6FD4; }
  .menu-card-acessar.terracota{ color: var(--rust); }
  .menu-card-acessar.verde{ color:#1F8A5C; }
  .menu-card-acessar.amarelo{ color:#B8860B; }
  .menu-card-acessar.roxo{ color:#6A3FA0; }
  .menu-card-acessar.cinza{ color:#5B5A54; }

  .resultado-pesquisa-rapida-bloco{
    background:#fff; border:1px solid var(--line); border-radius:8px; padding:14px 16px; margin-bottom:10px;
  }
  .resultado-pesquisa-titulo{ margin:0; font-size:14.5px; font-weight:600; color: var(--ink); }
  .resultado-pesquisa-desc{ margin:2px 0 10px; font-size:12px; color: var(--text-muted); text-transform:uppercase; letter-spacing:0.02em; }
  .lista-acoes-pesquisa{ border-top:1px solid var(--line); }
  .linha-acao-pesquisa{
    display:flex; align-items:center; justify-content:space-between; padding:8px 0; border-bottom:1px solid var(--line);
  }
  .linha-acao-pesquisa:last-child{ border-bottom:none; }
  .linha-acao-pesquisa span{ font-size:13px; font-weight:600; color: var(--ink); }
  .resultado-pesquisa-abrir{
    background:none; border:none; color: var(--rust); font-size:13px; font-weight:600; cursor:pointer; white-space:nowrap; padding:0;
  }
  .resultado-pesquisa-abrir:hover{ text-decoration:underline; }

  @media (max-width: 900px){
    .menu-grid{ grid-template-columns: 1fr 1fr; }
  }

  .btn-voltar{
    background:transparent; border:none; color: var(--steel); font-size:13px; font-weight:600;
    cursor:pointer; padding:0; margin-bottom:18px;
  }
  .btn-voltar:hover{ color: var(--rust); }

  .col-expandir{ width:44px; text-align:center; }
  .selo-nf-wrapper{ position:relative; display:inline-block; width:34px; height:34px; }
  .btn-expandir{
    width:34px; height:34px; border-radius:50%; border:none; background: var(--ink); color:#fff;
    cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0;
  }
  .btn-expandir:hover{ background: var(--rust); }
  .btn-expandir.aberto{ box-shadow: 0 0 0 2px var(--rust-dark); }
  .btn-expandir:disabled{ background:transparent; border:1px dashed var(--line); color: var(--text-muted); cursor:default; }
  .selo-nf{
    position:absolute; top:-4px; right:-4px; background: var(--rust); color:#fff; font-size:10px; font-weight:600;
    min-width:16px; height:16px; border-radius:8px; display:flex; align-items:center; justify-content:center; padding:0 3px;
  }
  .linha-container td{ vertical-align: middle; }
  .linha-detalhe-nf td{ background: #F3F0E8; padding: 14px 16px 14px 40px; border-bottom:1px solid var(--line); }
  .linha-processo td{ vertical-align: middle; }
  .stuffing-list-titulo{
    font-family:'Oswald', sans-serif; font-weight:600; font-size:12.5px; color: var(--ink);
    text-transform:uppercase; letter-spacing:0.03em; margin:0 0 8px; text-align:left;
  }
  .tabela-nf{ width:100%; border-collapse:collapse; background:#fff; border:1px solid var(--line); border-radius:6px; overflow:hidden; }
  .tabela-nf th, .tabela-nf td{ padding:8px 12px; font-size:12.5px; border-bottom:1px solid var(--line); }
  .tabela-nf th{ background:#fff; color: var(--text-muted); font-weight:600; text-transform:uppercase; font-size:10.5px; border-bottom:2px solid var(--line); }
  .tabela-nf tr:last-child td{ border-bottom:none; }

  @media (max-width: 1000px){
    header{ flex-wrap:wrap; row-gap:10px; }
    .menu-superior-inline{ order:3; width:100%; justify-content:flex-start; overflow-x:auto; }
    .area-direita-cabecalho{ order:2; }
  }

  @media (max-width: 640px){
    .menu-grid{ grid-template-columns: 1fr; }
  }

  .search-panel{
    background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
    padding: 20px 24px; margin-bottom: 24px;
  }
  .search-panel label{ display:block; font-size:12px; text-transform:uppercase; color: var(--text-muted); margin-bottom:8px; font-weight:600; }
  .titulo-formulario{ font-family:'Oswald', sans-serif; font-size:18px; color: var(--ink); margin:0 0 20px; }
  .search-panel select{
    width:100%; padding: 10px 13px; border:1px solid var(--line); border-radius:6px;
    font-size:14px; background:#fff; color:var(--text);
  }
  /* Painel de busca da tela "Containers em Estoque" — dropdown "Buscar por", campo com
     lupa/botão de limpar, botão Consultar, e um banner informativo abaixo. */
  .painel-busca-estoque{
    background: var(--paper); border:1px solid var(--line); border-radius:10px; padding:20px 24px; margin-bottom:24px;
  }
  .linha-campos-busca-estoque{ display:flex; align-items:flex-end; gap:14px; flex-wrap:wrap; }
  .campo-busca-estoque label{
    display:block; font-size:12px; font-weight:600; color: var(--ink); margin-bottom:6px;
  }
  .campo-buscar-por{ width:200px; }
  .campo-valor-busca{ flex:1; min-width:220px; }

  .dropdown-tipo-busca{ position:relative; }
  .dropdown-exportar{ position:relative; }
  .botao-tipo-busca{
    width:100%; height:42px; display:flex; align-items:center; gap:8px; padding:0 12px;
    border:1px solid var(--line); border-radius:8px; background:#fff; color: var(--ink);
    font-size:14px; font-weight:600; cursor:pointer;
  }
  .botao-tipo-busca:hover{ border-color: var(--steel); }
  .menu-tipo-busca{
    position:absolute; top:calc(100% + 6px); left:0; right:0; background:#fff; border:1px solid var(--line);
    border-radius:8px; box-shadow:0 8px 20px rgba(20,33,61,0.15); overflow:hidden; z-index:15;
  }
  .menu-tipo-busca button{
    display:block; width:100%; text-align:left; padding:10px 14px; border:none; background:none;
    font-size:13px; font-weight:600; color: var(--text); cursor:pointer;
  }
  .menu-tipo-busca button:hover{ background: var(--concrete); }
  .menu-tipo-busca button + button{ border-top:1px solid var(--line); }

  .campo-com-lupa{
    position:relative; display:flex; align-items:center; height:42px; border:1px solid var(--line);
    border-radius:8px; background:#fff;
  }
  .icone-lupa-busca{ width:16px; height:16px; margin-left:12px; color: var(--text-muted); flex-shrink:0; }
  .campo-com-lupa input{
    flex:1; height:100%; border:none; padding:0 10px; font-size:14px; background:transparent; color: var(--text);
  }
  .botao-limpar-busca-estoque{
    background:none; border:none; color: var(--text-muted); cursor:pointer; padding:8px 12px; display:flex;
  }
  .botao-limpar-busca-estoque svg{ width:16px; height:16px; }
  .botao-limpar-busca-estoque:hover{ color: var(--rust); }

  .botao-consultar-estoque{
    height:42px; padding:0 22px; background: var(--ink); color:#fff; border:none; border-radius:8px;
    font-size:14px; font-weight:600; cursor:pointer; display:flex; align-items:center; gap:8px; white-space:nowrap;
  }
  .botao-consultar-estoque:hover{ background:#1E2C4D; }
  .botao-consultar-estoque svg{ width:16px; height:16px; }

  .banner-info-busca-estoque{
    display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:16px;
    background: var(--err-bg); border-radius:8px; padding:14px 18px;
  }
  .banner-info-texto{ display:flex; align-items:center; gap:14px; }
  .banner-info-icone{
    width:32px; height:32px; border-radius:50%; background: var(--rust); color:#fff; flex-shrink:0;
    display:flex; align-items:center; justify-content:center;
  }
  .banner-info-icone svg{ width:19px; height:19px; }
  .banner-info-titulo{ margin:0; font-size:13.5px; font-weight:700; color: var(--err); }
  .banner-info-desc{ margin:3px 0 0; font-size:12.5px; color: var(--err); }
  .banner-info-ilustracao{ width:64px; height:64px; color: var(--rust); flex-shrink:0; opacity:0.75; }

  @media (max-width: 700px){
    .linha-campos-busca-estoque{ flex-direction:column; align-items:stretch; }
    .campo-buscar-por{ width:100%; }
    .banner-info-busca-estoque{ flex-direction:column; align-items:flex-start; }
    .banner-info-ilustracao{ display:none; }
  }

  .lista-chips{ display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
  .chip-cliente{
    display:inline-flex; align-items:center; gap:6px; background: var(--concrete); border:1px solid var(--line);
    border-radius:14px; padding:5px 6px 5px 12px; font-size:12.5px; font-family:'IBM Plex Mono', monospace; color: var(--ink);
  }
  .chip-cliente button{
    background: none; border:none; color: var(--text-muted); cursor:pointer; font-size:14px; line-height:1;
    width:18px; height:18px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  }
  .chip-cliente button:hover{ background: var(--err-bg); color: var(--err); }
  .badge-status{ display:inline-block; padding:3px 10px; border-radius:12px; font-size:11.5px; font-weight:600; }
  .badge-status.ativo{ background: var(--ok-bg); color: var(--ok); }
  .badge-status.inativo{ background: var(--err-bg); color: var(--err); }
  .search-row{ display:flex; gap:10px; }
  .search-row input{
    flex:1; padding: 11px 14px; border:1px solid var(--line); border-radius:6px;
    font-family:'IBM Plex Mono', monospace; font-size:15px; background:#fff; color:var(--text);
  }
  .search-row input:focus{ outline:2px solid var(--rust); outline-offset:1px; }
  .search-row button{
    padding: 11px 22px; border:none; border-radius:6px; background:var(--rust);
    color:#fff; font-weight:600; font-size:14px; cursor:pointer; white-space:nowrap;
  }
  .search-row button:hover{ background: var(--rust-dark); }
  .search-row button:disabled{ background:#B7A99A; cursor:default; }
  .hint{ margin-top:10px; font-size:12.5px; color:var(--text-muted); }

  .loading{ display:none; align-items:center; gap:10px; padding:18px 4px; color:var(--text-muted); font-size:14px; }
  .loading.active{ display:flex; }
  .spinner{ width:16px; height:16px; border-radius:50%; border:2px solid var(--line); border-top-color:var(--rust); animation: spin 0.7s linear infinite; }
  @keyframes spin{ to{ transform: rotate(360deg); } }

  .empty, .error, .ok{ padding:14px 18px; border-radius:8px; font-size:14px; margin-bottom:20px; }
  .empty{ background:#fff; border:1px dashed var(--line); color:var(--text-muted); }
  .error{ background: var(--err-bg); border:1px solid #E8B79E; color: var(--err); }
  .ok{ background: var(--ok-bg); border:1px solid #B8D4B4; color: var(--ok); }

  table{ width:100%; border-collapse:collapse; background:var(--paper); border-radius:10px; overflow:hidden; border:1px solid var(--line); }
  .tabela-scroll{ width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; border-radius:10px; }
  .tabela-scroll table{ border-radius:0; overflow:visible; }

  /* Tabela de containers da tela "Stuffing List" — 8 colunas (ícone + 7 campos) */
  .tabela-stuffing-containers{ table-layout:fixed; width:100%; }
  .tabela-stuffing-containers th, .tabela-stuffing-containers td{
    padding:6px 7px; font-size:10.5px; word-break:normal; overflow-wrap:normal;
  }
  .tabela-stuffing-containers th{ font-size:9.5px; white-space:normal; line-height:1.25; }
  .tabela-stuffing-containers th:nth-child(1), .tabela-stuffing-containers td:nth-child(1){ width:6%; }
  .tabela-stuffing-containers th:nth-child(2), .tabela-stuffing-containers td:nth-child(2){ width:15%; }
  .tabela-stuffing-containers th:nth-child(3), .tabela-stuffing-containers td:nth-child(3){ width:9%; }
  .tabela-stuffing-containers th:nth-child(4), .tabela-stuffing-containers td:nth-child(4){ width:9%; }
  .tabela-stuffing-containers th:nth-child(5), .tabela-stuffing-containers td:nth-child(5){ width:9%; }
  .tabela-stuffing-containers th:nth-child(6), .tabela-stuffing-containers td:nth-child(6){ width:12%; }
  .tabela-stuffing-containers th:nth-child(7), .tabela-stuffing-containers td:nth-child(7){ width:13%; }
  .tabela-stuffing-containers th:nth-child(8), .tabela-stuffing-containers td:nth-child(8){ width:13%; }
  .tabela-stuffing-containers th:nth-child(9), .tabela-stuffing-containers td:nth-child(9){ width:14%; }

  /* Tabela de notas fiscais dentro do Stuffing List — 8 colunas */
  .tabela-nf-stuffing{ table-layout:fixed; width:100%; background:#fff; border-collapse:collapse; border:1px solid var(--line); border-radius:6px; overflow:hidden; }
  .tabela-nf-stuffing th, .tabela-nf-stuffing td{
    padding:6px 7px; font-size:10.5px; border-bottom:1px solid var(--line); word-break:normal; overflow-wrap:normal;
  }
  .tabela-nf-stuffing th{ background: var(--ink); color:#fff; font-weight:600; text-transform:uppercase; font-size:9.5px; letter-spacing:0.03em; white-space:normal; line-height:1.25; }
  .tabela-nf-stuffing tr:last-child td{ border-bottom:none; }
  .tabela-nf-stuffing th:nth-child(1), .tabela-nf-stuffing td:nth-child(1){ width:11%; }
  .tabela-nf-stuffing th:nth-child(2), .tabela-nf-stuffing td:nth-child(2){ width:18%; }
  .tabela-nf-stuffing th:nth-child(3), .tabela-nf-stuffing td:nth-child(3){ width:16%; }
  .tabela-nf-stuffing th:nth-child(4), .tabela-nf-stuffing td:nth-child(4){ width:10%; }
  .tabela-nf-stuffing th:nth-child(5), .tabela-nf-stuffing td:nth-child(5){ width:14%; }
  .tabela-nf-stuffing th:nth-child(6), .tabela-nf-stuffing td:nth-child(6){ width:15%; }
  .tabela-nf-stuffing th:nth-child(7), .tabela-nf-stuffing td:nth-child(7){ width:16%; }



  /* Tabelas da tela "Agendamento do processo" — muitas colunas de propósito (todos os campos pedidos),
     por isso não travo largura fixa aqui: rolam horizontalmente dentro do .tabela-scroll quando precisar. */
  .tabela-agendamento-principal, .tabela-agendamento-nf{
    background:var(--paper); border:1px solid var(--line); border-radius:10px; overflow:hidden; border-collapse:collapse;
  }
  .tabela-agendamento-principal th, .tabela-agendamento-principal td,
  .tabela-agendamento-nf th, .tabela-agendamento-nf td{
    padding:7px 9px; font-size:11px; border-bottom:1px solid var(--line); white-space:nowrap;
  }
  .tabela-agendamento-principal th, .tabela-agendamento-nf th{
    background: var(--ink); color:#fff; font-weight:600; text-transform:uppercase; font-size:10px; letter-spacing:0.03em;
  }
  .tabela-agendamento-principal tr:last-child td, .tabela-agendamento-nf tr:last-child td{ border-bottom:none; }

  /* Tela "Containers em Estoque": a tabela rola dentro da própria caixa (horizontal e vertical),
     em vez de precisar rolar a página inteira. O cabeçalho fica fixo no topo, e a coluna
     "Container" (a primeira) fica congelada à esquerda, sempre visível. */
  #wrapperTabelaContainersEstoque{
    overflow-x:auto; overflow-y:auto; max-height:65vh; border:1px solid var(--line); border-radius:10px;
  }
  #tabelaContainersEstoque{ border-collapse:separate; border-spacing:0; width:100%; overflow:visible; }
  #tabelaContainersEstoque thead th{ position:sticky; top:0; z-index:3; }
  #tabelaContainersEstoque th:first-child, #tabelaContainersEstoque td:first-child{
    position:sticky; left:0; z-index:2; box-shadow: 2px 0 4px rgba(20,33,61,0.08);
  }
  #tabelaContainersEstoque thead th:first-child{ z-index:4; background: var(--ink); }
  #tabelaContainersEstoque tbody td:first-child{ background: var(--paper); }

  /* Tela "Cargas Disponíveis" — mesmo padrão da tabela de Containers em Estoque. */
  #wrapperTabelaCargasDisponiveis{
    overflow-x:auto; overflow-y:auto; max-height:65vh; border:1px solid var(--line); border-radius:10px;
  }
  #tabelaCargasDisponiveis{ border-collapse:separate; border-spacing:0; width:100%; overflow:visible; }
  #tabelaCargasDisponiveis th, #tabelaCargasDisponiveis td{ text-align:center; }
  #tabelaCargasDisponiveis thead th{ position:sticky; top:0; z-index:3; }
  #tabelaCargasDisponiveis th:first-child, #tabelaCargasDisponiveis td:first-child{
    position:sticky; left:0; z-index:2; box-shadow: 2px 0 4px rgba(20,33,61,0.08);
  }
  #tabelaCargasDisponiveis thead th:first-child{ z-index:4; background: var(--ink); }
  #tabelaCargasDisponiveis tbody td:first-child{ background: var(--paper); }

  /* Tela "Lista de Processos" — mesmo padrão das outras. A última coluna ("Ver detalhes...")
     não é congelada, já que a congelada é sempre a primeira (OS). */
  #wrapperTabelaProcessos{
    overflow-x:auto; overflow-y:auto; max-height:65vh; border:1px solid var(--line); border-radius:10px;
  }
  #tabelaProcessos{ border-collapse:separate; border-spacing:0; width:100%; overflow:visible; }
  #tabelaProcessos th, #tabelaProcessos td{ text-align:center; }
  #tabelaProcessos thead th{ position:sticky; top:0; z-index:3; background: var(--ink); }

  /* Ícones de filtro/ordenar dentro do cabeçalho, e o dropdown de filtro tipo "Excel"
     (lista de valores únicos com checkbox, busca, e os botões Limpar/Ok/Sel. todos). */
  .icone-cabecalho-tabela{
    background:none; border:none; color:#9AA8C2; cursor:pointer; padding:2px; display:flex; align-items:center;
  }
  .icone-cabecalho-tabela:hover{ color:#fff; }
  .icone-cabecalho-tabela.filtro-ativo{ color:#4FA8E0; }

  .dropdown-filtro-coluna{
    position:fixed; background:#fff; border:1px solid var(--line); border-radius:8px;
    box-shadow:0 8px 24px rgba(20,33,61,0.2); width:210px; z-index:200; padding:8px; text-align:left;
  }
  .busca-dropdown-filtro{
    width:100%; box-sizing:border-box; padding:6px 8px; font-size:12px; text-transform:none;
    font-weight:400; border:1px solid var(--line); border-radius:5px; margin-bottom:6px;
  }
  .lista-checkbox-filtro{ max-height:180px; overflow-y:auto; margin-bottom:8px; }
  .linha-checkbox-filtro{
    display:flex; align-items:center; gap:6px; padding:4px 2px; font-size:12px; font-weight:400;
    text-transform:none; color: var(--text); cursor:pointer;
  }
  .linha-checkbox-filtro input{ margin:0; flex-shrink:0; }
  .botoes-dropdown-filtro{ display:flex; gap:4px; }
  .botoes-dropdown-filtro button{
    flex:1; padding:6px 4px; font-size:10.5px; font-weight:600; border:none; border-radius:5px;
    cursor:pointer; background:#1F8A5C; color:#fff;
  }
  .botoes-dropdown-filtro button:hover{ background:#186B47; }

  .botao-utilizacao-nf{
    background:none; border:1px solid var(--line); border-radius:6px; color: var(--rust);
    cursor:pointer; font-weight:700; font-size:13px; padding:2px 8px; line-height:1;
  }
  .botao-utilizacao-nf:hover{ background: var(--concrete); }

  .popup-utilizacao-nf{
    position:fixed; background:#fff; border:1px solid var(--line); border-radius:8px;
    box-shadow:0 8px 24px rgba(20,33,61,0.2); width:420px; z-index:200; padding:12px; text-align:left;
  }
  .popup-utilizacao-nf-titulo{ margin:0 0 8px; font-size:12.5px; font-weight:700; color: var(--ink); }
  .popup-utilizacao-nf table{ width:100%; border-collapse:collapse; }
  .popup-utilizacao-nf th, .popup-utilizacao-nf td{
    padding:6px 8px; font-size:11.5px; text-align:right; border-bottom:1px solid var(--line);
  }
  .popup-utilizacao-nf th:first-child, .popup-utilizacao-nf td:first-child{ text-align:left; }
  .popup-utilizacao-nf th{ background: var(--ink); color:#fff; font-weight:600; text-transform:uppercase; font-size:10px; }
  .popup-utilizacao-nf tr:last-child td{ border-bottom:none; }
  .popup-utilizacao-nf tfoot td{ font-weight:700; border-top:2px solid var(--ink); }

  .botao-cargosnap{
    border:none; background:none; cursor:pointer; padding:1px 2px; font-size:13px; line-height:1; flex-shrink:0;
  }
  .botao-cargosnap:hover{ opacity:0.6; }
  .popup-cargosnap{
    width:520px; max-height:calc(100vh - 40px); overflow-y:auto;
  }
  .grid-fotos-cargosnap{
    display:grid; grid-template-columns: repeat(5, 1fr); gap:6px; margin-top:8px;
  }
  .grid-fotos-cargosnap img{
    width:100%; height:70px; object-fit:cover; border-radius:6px; border:1px solid var(--line); cursor:pointer;
  }
  .grid-fotos-cargosnap .foto-com-avaria{ border-color: var(--rust); border-width:2px; }

  .rosca-total{
    position:absolute; top:50%; left:50%; transform:translate(-50%, -50%);
    text-align:center; pointer-events:none;
  }
  .rosca-total .valor{ font-family:'Oswald', sans-serif; font-size:22px; font-weight:600; color:var(--ink); display:block; }
  .rosca-total .rotulo{ font-size:11px; color:var(--text-muted); }
  .linha-total-agendamento{ font-weight:600; background:var(--concrete); }

  .controles-paginacao{
    display:flex; align-items:center; justify-content:center; gap:14px; padding:12px 0 4px; font-size:12.5px;
  }
  .controles-paginacao button{
    border:1px solid var(--line); background:#fff; border-radius:6px; padding:6px 12px; cursor:pointer; font-size:12.5px;
  }
  .controles-paginacao button:hover:not(:disabled){ border-color: var(--rust); color: var(--rust); }
  .controles-paginacao button:disabled{ opacity:0.4; cursor:default; }
  .controles-paginacao span{ color: var(--text-muted); }

  .indicador-recebimento-verde, .indicador-recebimento-vermelho{
    border:none; border-radius:20px; padding:5px 14px; font-size:11.5px; font-weight:700; cursor:pointer;
    white-space:nowrap;
  }
  .indicador-recebimento-verde{ background:#E3F5EC; color:#1F8A5C; }
  .indicador-recebimento-verde:hover{ background:#CFEEDF; }
  .indicador-recebimento-vermelho{ background: var(--err-bg); color: var(--err); }
  .indicador-recebimento-vermelho:hover{ background:#F7DCD1; }

  /* Centraliza tudo só dentro da tela "Cargas Disponíveis" (não afeta a tela de Agendamento,
     que usa essas mesmas classes de tabela). */

  .linha-agendamento-alerta td{ background: var(--err-bg); }
  .linha-agendamento-alerta td:first-child{ box-shadow: inset 3px 0 0 var(--err); }
  .selo-alerta{
    display:inline-block; background: var(--err); color:#fff; font-size:10px; font-weight:600;
    padding:2px 8px; border-radius:10px; margin-right:4px; white-space:nowrap;
  }
  .tabela-scroll table{ border-radius:0; }
  th, td{ padding:12px 16px; text-align:center; font-size:13.5px; border-bottom:1px solid var(--line); vertical-align:middle; }
  th{ background: var(--ink); color:#fff; font-weight:600; font-size:11.5px; text-transform:uppercase; letter-spacing:0.03em; white-space:nowrap; }
  .celula-data{ display:flex; flex-direction:column; align-items:center; line-height:1.3; }
  tr:last-child td{ border-bottom:none; }
  tr:hover td{ background:#F3F0E8; }
  .oculto{ display:none !important; }

  /* ===== Tela de login (simples, sem painel lateral e sem card) ===== */
  html, body{ height:100%; }
  .tela-login{
    display:flex; min-height:100vh; width:100%; font-family:'Inter', sans-serif;
    background: var(--concrete); align-items:center; justify-content:center; padding:40px 20px;
  }
  .login-conteudo{
    max-width:420px; width:100%;
    background:#fff; border-radius:16px; box-shadow:0 10px 40px rgba(20,33,61,0.12);
    padding:40px 44px;
  }

  .marca-cortes{ color: var(--rust); }
  .marca-360{ color:#004F92; font-family:'Yellowtail', cursive; font-weight:400; font-size:1.4em; margin-left:2px; }

  .login-conteudo .login-card-marca{ display:block; max-width:120px; height:auto; margin:0 auto 18px; }
  .login-conteudo h2{ font-family:'Oswald', sans-serif; font-size:22px; font-weight:600; text-align:center; margin:0 0 8px; color:var(--text); }
  .login-card-subtitulo{ text-align:center; font-size:13px; color:var(--text-muted); line-height:1.5; margin:0 0 26px; }

  .campo-com-icone{ position:relative; display:flex; align-items:center; }
  .campo-com-icone svg{
    position:absolute; left:13px; top:50%; transform:translateY(-50%);
    width:17px; height:17px; color: var(--text-muted); pointer-events:none;
  }
  .campo-com-icone input{ padding-left:40px !important; padding-right:40px; }
  .botao-olho{
    position:absolute; right:10px; top:50%; transform:translateY(-50%);
    background:none; border:none; color: var(--text-muted); cursor:pointer;
    display:flex; align-items:center; justify-content:center; padding:4px; line-height:0;
  }
  .botao-olho svg{ width:17px; height:17px; position:static; transform:none; }
  .botao-olho.ativo{ color: var(--rust); }

  .btn-entrar{
    display:flex; align-items:center; justify-content:center; gap:8px; letter-spacing:0.5px;
  }
  .icone-seta-entrar{ width:16px; height:16px; }

  .login-selo-seguranca{
    display:flex; align-items:center; gap:10px; margin-top:20px; font-size:12px; color: var(--text-muted);
  }
  .login-selo-seguranca svg{ width:15px; height:15px; flex-shrink:0; }
  .login-selo-seguranca span{ flex:1; height:1px; background: var(--line); }

  .config-panel-login{ margin-top:22px; font-size:12px; }
  .config-panel-login summary{ cursor:pointer; color: var(--text-muted); font-weight:500; }
  .config-panel-login input{
    width:100%; margin-top:8px; padding:8px 12px; border:1px solid var(--line); border-radius:6px;
    font-family:'IBM Plex Mono', monospace; font-size:12.5px; background:#fff;
  }
  .config-panel-login label{ display:block; font-size:11px; text-transform:uppercase; color:var(--text-muted); margin:10px 0 4px; font-weight:600; }

  @media (max-width: 480px){
    .login-conteudo{ padding:30px 24px; }
  }