:root {
  --jt-red: #E31E24;
  --jt-red-dark: #B5181D;
  --bg: #0f1115;
  --bg-card: #171a21;
  --sidebar-w: 240px;
  --sidebar-bg: #1c1c2e;
  --sidebar-txt: #c8c8d8;
  --border: rgba(255,255,255,.08);
  --text-dim: rgba(255,255,255,.55);
  /* O Bootstrap 5.3 define --bs-secondary-color pensando em fundo claro (fica
     quase preto) — sobrescrevemos pra .text-muted continuar legível no nosso
     tema escuro em vez de "sumir" no fundo. */
  --bs-secondary-color: rgba(255,255,255,.55);
}

/* O Bootstrap 5.3 redefine --bs-table-bg/--bs-table-color DENTRO da própria
   classe .table (pensando em fundo claro) — por isso não bastava sobrescrever
   essas variáveis no :root, precisa mirar direto em .table pra vencer. Sem
   isso, as tabelas do modal de detalhe saíam com fundo branco e texto escuro
   (rótulos com cor clara própria ficavam invisíveis). */
.table {
  --bs-table-bg: transparent;
  --bs-table-color: #fff;
  --bs-table-border-color: var(--border);
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: #f1f1f1;
  background:
    radial-gradient(ellipse at 15% 20%, rgba(227,30,36,.45) 0%, transparent 45%),
    radial-gradient(ellipse at 85% 75%, rgba(120,0,20,.35)  0%, transparent 45%),
    radial-gradient(ellipse at 50% 50%, rgba(40,0,60,.25)   0%, transparent 70%),
    linear-gradient(135deg, #0d0507 0%, #1e0a0f 35%, #100818 70%, #08080f 100%);
  background-attachment: fixed;
  margin: 0;
}

/* ── Login ── */
.login-page {
  min-height: 100vh;
  background-color: #100b0d;
  background-image:
    linear-gradient(90deg, rgba(8, 6, 8, .10) 0%, rgba(8, 6, 8, .035) 48%, rgba(8, 6, 8, .08) 100%),
    linear-gradient(0deg, rgba(8, 8, 10, .08), rgba(8, 8, 10, .025)),
    url('/static/images/login/jnt-login-background-1920.webp');
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
}
.login-wrapper {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 2.5rem clamp(1.25rem, 16vw, 18.75rem);
}
.login-card {
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(25, 23, 26, .91), rgba(10, 11, 15, .92));
  border: 1px solid rgba(255,255,255,.17);
  border-left-color: rgba(245,31,42,.92);
  border-bottom-color: rgba(227,30,36,.42);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0,0,0,.52), 0 12px 38px rgba(153,0,18,.13), inset 0 1px 0 rgba(255,255,255,.07);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 2.1rem 2.85rem 2.25rem;
  width: 100%;
  max-width: 520px;
  position: relative;
}
.login-card::before,
.login-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.login-card::before {
  background:
    radial-gradient(ellipse at 0 0, rgba(255,20,34,.34), transparent 47%),
    linear-gradient(135deg, rgba(239,12,27,.48) 0%, rgba(132,0,19,.35) 15%, rgba(54,8,15,.16) 28%, transparent 49%);
  clip-path: polygon(0 0, 82% 0, 67% 9%, 48% 19%, 0 47%);
}
.login-card::after {
  background:
    linear-gradient(90deg, rgba(238,24,37,.22), transparent 5%),
    linear-gradient(0deg, rgba(203,12,28,.16), transparent 12%),
    radial-gradient(ellipse at 0 100%, rgba(227,30,36,.17), transparent 48%);
}
.login-card > * { position: relative; z-index: 1; }
.login-lang-btn {
  position: absolute; top: 1.35rem; right: 1.35rem;
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 36px; padding: .35rem .6rem;
  color: rgba(255,255,255,.9); border-color: rgba(255,255,255,.3);
  background: rgba(255,255,255,.04); border-radius: 8px;
}
.login-lang-btn:hover { color: #fff; border-color: rgba(255,255,255,.6); background: rgba(255,255,255,.1); }
.login-lang-btn .bi-chevron-down { font-size: .68rem; }
.login-brand {
  display: block; width: min(210px, 48%); height: auto; object-fit: contain;
  margin: 0 0 2rem; filter: brightness(0) invert(1);
}
.login-product {
  display: flex; align-items: center; gap: 1.2rem;
  margin: 0 0 2rem;
}
.login-product-icon {
  flex: 0 0 72px; width: 72px; height: 72px;
  display: grid; place-items: center; color: #ff3038;
  border: 2px solid #ed1c24; border-radius: 13px;
  background: linear-gradient(145deg, rgba(227,30,36,.28), rgba(227,30,36,.08));
  box-shadow: 0 0 22px rgba(227,30,36,.14), inset 0 1px 0 rgba(255,255,255,.08);
}
.login-product-icon i { font-size: 2rem; }
.login-card h1 { margin: 0; color: #fff; font-size: 1.85rem; line-height: 1.15; font-weight: 750; letter-spacing: -.025em; }
.login-card .subtitle { color: rgba(255,255,255,.76); font-size: 1rem; line-height: 1.35; margin: .35rem 0 0; }
.login-feishu-btn {
  width: 100%; min-height: 56px; display: flex; align-items: center; justify-content: center; gap: .7rem;
  position: relative; margin: 0; padding: .6rem 2.6rem;
  color: #111827; background: linear-gradient(180deg, #fff, #ededed);
  border: 1px solid rgba(255,255,255,.85); border-radius: 12px;
  font-size: 1rem; font-weight: 700; box-shadow: 0 5px 16px rgba(0,0,0,.18);
}
.login-feishu-btn:disabled { opacity: 1; cursor: not-allowed; }
.login-feishu-btn img { flex: 0 0 34px; object-fit: contain; mix-blend-mode: multiply; }
.login-feishu-btn .bi-arrow-right { position: absolute; right: 1rem; font-size: 1.1rem; }
.login-divider { display: flex; align-items: center; gap: 1rem; margin: 1.35rem 0 1.4rem; color: rgba(255,255,255,.86); font-size: .9rem; }
.login-divider span { height: 1px; flex: 1; background: rgba(255,255,255,.42); }
.login-divider em { font-style: normal; }
.login-field { margin-bottom: 1rem; }
.login-field .form-label { display: block; color: rgba(255,255,255,.94); font-size: .9rem; font-weight: 500; margin: 0 0 .35rem; }
.login-input-shell {
  min-height: 44px; display: flex; align-items: center; gap: .85rem;
  padding: 0 .85rem; color: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.25); border-radius: 10px;
  background: rgba(255,255,255,.065); transition: border-color .15s, box-shadow .15s, background .15s;
}
.login-input-shell:focus-within { border-color: rgba(255,255,255,.72); box-shadow: 0 0 0 .18rem rgba(255,255,255,.12); background: rgba(255,255,255,.09); }
.login-input-shell > i { flex: 0 0 auto; font-size: 1.15rem; }
.login-input-shell .form-control, .login-input-shell .form-select {
  min-width: 0; min-height: 42px; padding: .55rem 0; color: #fff;
  border: 0; background-color: transparent !important; box-shadow: none; font-size: .95rem;
  -webkit-text-fill-color: #fff;
}
.login-input-shell .form-control:focus, .login-input-shell .form-select:focus {
  color: #fff; background-color: transparent !important; border: 0; box-shadow: none; outline: 0;
}
.login-input-shell .form-control::placeholder { color: rgba(255,255,255,.52); }
.login-input-shell .form-select {
  padding-right: 1.65rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23f1f1f1' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-size: 16px 12px;
}
.login-input-shell .form-select option { color: #fff; background: #1b1b20; }
.login-select-shell { gap: .75rem; }
.login-select-shell .form-select { cursor: pointer; }
.login-password-shell { padding-right: 0; }
.login-password-shell .form-control { flex: 1 1 auto; }
.login-password-toggle {
  align-self: stretch; width: 48px; flex: 0 0 48px; display: grid; place-items: center;
  color: rgba(255,255,255,.72); background: rgba(0,0,0,.12);
  border: 0; border-left: 1px solid rgba(255,255,255,.12); border-radius: 0 9px 9px 0;
}
.login-password-toggle:hover, .login-password-toggle:focus-visible { color: #fff; background: rgba(255,255,255,.08); }
.login-password-toggle i { font-size: 1.2rem; }
.login-card .btn-jt {
  min-height: 58px; margin-top: .5rem; border-radius: 11px;
  font-size: 1.1rem; font-weight: 700;
  background: linear-gradient(105deg, #ee171f, #c90008);
  box-shadow: 0 7px 20px rgba(180,0,10,.25);
}
.login-card .btn-jt:hover { filter: brightness(1.08); transform: translateY(-1px); }
.login-card .btn-jt:disabled { transform: none; }
.login-card .toast-msg { margin: 0 0 1rem; }
.login-page #form-login { margin-top: .15rem; }

@media (max-width: 900px) {
  .login-page { background-image:
      linear-gradient(90deg, rgba(8,6,8,.13), rgba(8,6,8,.035)),
      linear-gradient(0deg, rgba(8,8,10,.09), rgba(8,8,10,.025)),
      url('/static/images/login/jnt-login-background-960.webp'); }
  .login-wrapper { padding-left: clamp(1.25rem, 8vw, 5rem); padding-right: clamp(1.25rem, 8vw, 5rem); }
}
@media (max-width: 575px) {
  .login-page { background-position: 43% center; background-attachment: scroll; }
  .login-wrapper { min-height: 100svh; padding: 1rem; }
  .login-card { padding: 5.25rem 1.35rem 1.55rem; border-radius: 18px; }
  .login-lang-btn { top: 1rem; right: 1rem; }
  .login-brand { position: absolute; top: 1.25rem; left: 1.35rem; width: 155px; margin: 0; }
  .login-product { gap: .85rem; margin-bottom: 1.5rem; }
  .login-product-icon { flex-basis: 58px; width: 58px; height: 58px; border-radius: 11px; }
  .login-product-icon i { font-size: 1.65rem; }
  .login-card h1 { font-size: 1.5rem; }
  .login-card .subtitle { font-size: .85rem; }
  .login-field { margin-bottom: .85rem; }
}

/* ── Layout ── */
#wrapper { display: flex; min-height: 100vh; }
#sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--sidebar-bg);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; z-index: 100;
}
.sidebar-brand {
  display: flex; align-items: center; gap: .75rem;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.brand-icon {
  width: 38px; height: 38px; background: var(--jt-red);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .8rem; color: #fff; flex-shrink: 0;
}
.brand-text { color: #fff; font-weight: 600; font-size: .85rem; line-height: 1.2; }
.brand-text small { display: block; font-weight: 400; color: var(--sidebar-txt); font-size: .72rem; }

#sidebar nav { padding: 1rem .75rem; flex: 1; display: flex; flex-direction: column; gap: .4rem; }
#sidebar nav a {
  display: flex; align-items: center; gap: .65rem;
  padding: .65rem .9rem; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  color: var(--sidebar-txt); text-decoration: none;
  font-size: .88rem; transition: all .15s;
}
#sidebar nav a:hover {
  color: #fff; background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.18);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,.35);
}
#sidebar nav a.active {
  color: #fff; background: var(--jt-red);
  border-color: var(--jt-red-dark);
  box-shadow: 0 3px 10px rgba(227,30,36,.4);
}

#main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-width: 0; }

.btn-menu-mobile {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  color: #fff;
  cursor: pointer;
  padding: 0 .25rem;
  line-height: 1;
}

#sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 99;
}
#sidebar-overlay.show { display: block; }

@media (max-width: 768px) {
  #sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  #sidebar.open { transform: translateX(0); }
  #main { margin-left: 0; }
  #content { padding: 1rem; }
}

#topbar {
  background: linear-gradient(90deg, #B5181D 0%, #E31E24 60%, #c8201f 100%);
  box-shadow: 0 3px 20px rgba(0,0,0,.5), 0 1px 0 rgba(0,0,0,.2);
  padding: .75rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.page-title { font-size: 1rem; font-weight: 700; color: #fff; margin: 0; letter-spacing: .01em; }
.user-info { font-size: .83rem; color: rgba(255,255,255,.55); margin-right: .75rem; text-align: right; line-height: 1.3; }
.user-info strong { color: #fff; display: block; }
.btn-logout {
  background: transparent; border: 1px solid rgba(255,255,255,.2); color: rgba(255,255,255,.65);
  border-radius: 6px; padding: .3rem .75rem; font-size: .8rem; cursor: pointer; transition: all .15s;
}
.btn-logout:hover { background: rgba(255,255,255,.3); color: #fff; border-color: rgba(255,255,255,.5); }

.btn-lang-toggle {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 6px;
  padding: .25rem .6rem;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  transition: all .15s;
  letter-spacing: .03em;
  margin-right: .6rem;
}
.btn-lang-toggle:hover {
  background: rgba(255,255,255,.3);
  color: #fff;
  border-color: rgba(255,255,255,.5);
}

#content { padding: 1.5rem; flex: 1; }

/* ── Cards / forms ── */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}
.section-card h6 { font-weight: 700; margin-bottom: 1.1rem; }

.form-control, .form-select, textarea {
  background: #0f1115 !important;
  border: 1px solid var(--border) !important;
  color: #fff !important;
}
.form-control:focus, .form-select:focus {
  border-color: var(--jt-red) !important;
  box-shadow: 0 0 0 3px rgba(227,30,36,.2) !important;
}
.form-label { font-size: .85rem; color: rgba(255,255,255,.8); }
.form-text { font-size: .76rem; color: var(--text-dim); }

/* Ícone do calendário nativo (input type=date) é escuro por padrão —
   fica invisível em fundo escuro. Inverte a cor e deixa maior/clicável. */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
  opacity: .75;
  padding: .2rem;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }

.btn-jt {
  background: var(--jt-red); border: none; color: #fff;
  border-radius: 9px; padding: .55rem 1.3rem; font-weight: 700; font-size: .88rem;
  cursor: pointer;
}
.btn-jt:hover { background: var(--jt-red-dark); }
.btn-jt:disabled { opacity: .6; cursor: not-allowed; }
.btn-jt-outline {
  background: transparent; border: 1px solid var(--border); color: #fff;
  border-radius: 9px; padding: .55rem 1.3rem; font-weight: 600; font-size: .88rem;
  cursor: pointer;
}
.btn-jt-outline:hover { background: rgba(255,255,255,.06); }

.toast-msg {
  display: none; padding: .65rem 1rem; border-radius: 8px;
  font-size: .85rem; margin-bottom: 1rem;
}
.toast-msg.show { display: block; }
.toast-msg.error   { background: rgba(220,38,38,.14); border: 1px solid rgba(220,38,38,.4); color: #fca5a5; }
.toast-msg.success { background: rgba(22,163,74,.14); border: 1px solid rgba(22,163,74,.4); color: #86efac; }

/* ── Foto upload ── */
.foto-slot {
  border: 1px dashed var(--border); border-radius: 10px;
  padding: 1rem; text-align: center; margin-bottom: .75rem;
}
.foto-slot.enviada { border-color: rgba(22,163,74,.5); background: rgba(22,163,74,.06); }
.foto-slot label { font-weight: 600; font-size: .85rem; display: block; margin-bottom: .5rem; }

/* ── Badges ── */
.badge-jms-ok          { background: rgba(22,163,74,.18); color: #86efac; }
.badge-jms-nao          { background: rgba(245,158,11,.18); color: #fde68a; }
.badge-jms-erro         { background: rgba(148,163,184,.18); color: #cbd5e1; }
.badge-status-pendente  { background: rgba(245,158,11,.18); color: #fde68a; }
.badge-status-ok        { background: rgba(22,163,74,.18); color: #86efac; }
.badge-status-divergente{ background: rgba(220,38,38,.18); color: #fca5a5; }
.badge-status-transferido{ background: rgba(59,130,246,.18); color: #93c5fd; }
.badge-status-bloqueado { background: rgba(107,114,128,.25); color: #d1d5db; }

.badge-situacao-normal          { background: rgba(22,163,74,.18); color: #86efac; }
.badge-situacao-atencao         { background: rgba(245,158,11,.18); color: #fde68a; }
.badge-situacao-anomalia_origem { background: rgba(245,158,11,.18); color: #fde68a; }
.badge-situacao-sla_estourado   { background: rgba(220,38,38,.18); color: #fca5a5; }
.badge-situacao-fotos_pendentes { background: rgba(245,158,11,.18); color: #fde68a; }

/* ── Modal de detalhe — alerta de divergência + títulos de seção ── */
.detalhe-alerta-divergencia {
  background: rgba(220,38,38,.18); border-left: 3px solid var(--jt-red);
  border-radius: 0 8px 8px 0; padding: .75rem .9rem; font-size: .87rem;
}
.detalhe-alerta-divergencia .k { font-weight: 700; color: #fca5a5; display: block; margin-bottom: .25rem; }
.detalhe-alerta-divergencia p { margin: 0; color: #fff; }
.detalhe-secao-titulo {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--jt-red); margin-bottom: .5rem; padding-bottom: .35rem;
  border-bottom: 1px solid var(--border);
}

/* ── Painel: KPIs e bolinha de status ── */
.kpi-card {
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  padding: 1.2rem 1.3rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.08);
  transition: box-shadow .2s ease, transform .2s ease, background .2s ease;
}
.kpi-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--jt-red) 0%, #ff5a5f 50%, var(--jt-red) 100%);
}
.kpi-card:hover {
  background: rgba(255,255,255,.09);
  box-shadow: 0 8px 28px rgba(0,0,0,.4);
  transform: translateY(-3px);
}
.kpi-card.kpi-verde::before    { background: linear-gradient(90deg, #16a34a, #4ade80, #16a34a); }
.kpi-card.kpi-vermelho::before { background: linear-gradient(90deg, #dc2626, #f87171, #dc2626); }
.kpi-label { font-size: .72rem; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.kpi-valor { font-size: 2.4rem; font-weight: 900; line-height: 1.3; letter-spacing: -.02em; }
.kpi-valor.cor-verde    { color: #4ade80; }
.kpi-valor.cor-amarelo  { color: #fbbf24; }
.kpi-valor.cor-vermelho { color: #f87171; }
.kpi-valor.cor-neutro   { color: #f1f1f1; }

.dot-status { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: .45rem; flex-shrink: 0; }
.dot-normal          { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,.6); }
.dot-atencao         { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,.6); }
.dot-anomalia_origem { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,.6); }
.dot-sla_estourado   { background: #dc2626; box-shadow: 0 0 6px rgba(220,38,38,.7); }

.last-update { font-size: .78rem; color: var(--text-dim); }

/* ── Tabela ── */
table.tabela-registros { width: 100%; font-size: .85rem; border-collapse: collapse; }
table.tabela-registros th {
  text-align: left; color: var(--text-dim); font-weight: 600; font-size: .75rem;
  text-transform: uppercase; letter-spacing: .03em;
  padding: .5rem .6rem; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg-card); z-index: 1;
}
table.tabela-registros td { padding: .6rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.tabela-registros tr:hover { background: rgba(255,255,255,.02); }

/* Rolagem vertical — mostra ~15 linhas, o resto rola por baixo do cabeçalho fixo */
.tabela-scroll { max-height: 680px; overflow-y: auto; }

.filtro-tabs { display: flex; gap: .4rem; margin-bottom: 1rem; flex-wrap: wrap; }
.filtro-tab {
  border: 1px solid var(--border); background: transparent; color: rgba(255,255,255,.6);
  border-radius: 20px; padding: .35rem 1rem; font-size: .8rem; cursor: pointer;
}
.filtro-tab.active { background: var(--jt-red); border-color: var(--jt-red); color: #fff; font-weight: 600; }

/* ── Autocomplete de placa (JMS) ── */
.placa-sugestoes {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 60;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
  margin-top: .25rem; max-height: 220px; overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.placa-sugestao-item {
  padding: .5rem .75rem; cursor: pointer; border-bottom: 1px solid var(--border);
  font-size: .82rem; display: flex; flex-direction: column; gap: .1rem;
}
.placa-sugestao-item:last-child { border-bottom: none; }
.placa-sugestao-item:hover { background: rgba(255,255,255,.06); }
.placa-sugestao-item strong { letter-spacing: .03em; }

/* ── Campos de conferência (Entrada SC) que divergem da origem ── */
.campo-divergente {
  border-color: #dc2626 !important;
  background: rgba(220,38,38,.12) !important;
  color: #fca5a5 !important;
}

/* ── Pills de carreta (mapa "Aqui Dentro" do Painel, lista de saída do Registro) ── */
@keyframes truck-pulso {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,.7); }
  50%       { box-shadow: 0 0 0 8px rgba(220,38,38,0); }
}
.pills-scroll {
  max-height: 280px; overflow-y: auto; overflow-x: hidden;
  padding: .25rem .5rem .25rem 0; margin-right: -.5rem;
  border: 1px solid rgba(255,255,255,.08); border-radius: 10px;
  background: rgba(0,0,0,.12);
}
.truck-card {
  display: inline-flex; align-items: center; gap: .4rem;
  border-radius: 20px; padding: .3rem .7rem .3rem .55rem;
  cursor: pointer; border: 1px solid transparent; white-space: nowrap;
  transition: transform .15s ease;
}
.truck-card:hover { transform: translateY(-2px); }
.truck-card i { font-size: 1rem; }
.truck-ok {
  background: #dcfce7; border-color: #86efac;
}
.truck-ok i { color: #16a34a; }
.truck-ok .truck-placa { color: #14532d; }
.truck-divergente {
  background: #dc2626; border-color: #b91c1c;
  animation: truck-pulso 1.3s ease-in-out infinite;
}
.truck-divergente i { color: #fff; }
.truck-divergente .truck-placa { color: #fff; }
.truck-pendente {
  background: #fef3c7; border-color: #fbbf24;
}
.truck-pendente i { color: #b45309; }
.truck-pendente .truck-placa { color: #78350f; }
.truck-bloqueado {
  background: #374151; border-color: #6b7280;
}
.truck-bloqueado i { color: #d1d5db; }
.truck-bloqueado .truck-placa { color: #f3f4f6; }
.truck-placa {
  font-size: .78rem; font-weight: 800; letter-spacing: .04em;
}

/* ── Filtros do Painel (busca ID/placa/base + calendário) ── */
.painel-filtros {
  display: flex; flex-wrap: wrap; gap: .75rem;
  background: transparent;
  border: 1px solid rgba(227,30,36,.3);
  border-radius: 10px;
  padding: .75rem .9rem;
}
.painel-filtro-item {
  display: flex; flex-direction: column; gap: .3rem;
  flex: 1; min-width: 160px;
}
.painel-filtro-item label {
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: rgba(255,255,255,.6); margin: 0;
}
.painel-filtro-input {
  display: flex; align-items: center; gap: .4rem;
  background: transparent;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  padding: 0 .5rem;
}
.painel-filtro-input i.bi-search,
.painel-filtro-input i.bi-calendar3,
.painel-filtro-input i.bi-funnel {
  color: var(--jt-red); font-size: .85rem; flex-shrink: 0;
}
.painel-filtro-input input,
.painel-filtro-input input.form-control,
.painel-filtro-input select {
  flex: 1; min-width: 0; background: transparent !important; border: none !important; color: #fff;
  padding: .5rem .2rem; font-size: .85rem; outline: none;
}
.painel-filtro-input select option { background: var(--bg-card); color: #fff; }
.painel-filtro-input input::placeholder { color: rgba(255,255,255,.35); }
.painel-filtro-input button {
  background: transparent; border: none; color: rgba(255,255,255,.4);
  padding: .2rem; cursor: pointer; flex-shrink: 0; display: flex;
}
.painel-filtro-input button:hover { color: var(--jt-red); }

/* O tema global dos formulários usa !important; neste layout, os campos ficam
   integrados ao contorno único da moldura de login. */
.login-page .login-input-shell .form-control,
.login-page .login-input-shell .form-select {
  background-color: transparent !important;
  border: 0 !important;
  color: #fff !important;
  box-shadow: none !important;
}
.login-page .login-input-shell .form-control:focus,
.login-page .login-input-shell .form-select:focus {
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
