/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Crisdu brand — imutável */
  --vermelho:       #C8181E;
  --vermelho-dark:  #A81218;
  --azul-marca:     #1B2A6B;
  --azul-dark:      #111E50;
  --verde:          #10B981;
  --amarelo:        #F59E0B;

  /* TEMA DARK (padrão) */
  --bg:             #0F1621;
  --bg-card:        #1A2332;
  --bg-input:       #111927;
  --borda:          #2A3548;
  --texto:          #F0F4FF;
  --texto-sub:      #7A8BA8;
  --texto-muted:    #4A5568;
  --vermelho-light: #2A1518;
  --verde-light:    #0A2E22;
  --amarelo-light:  #2A2008;
  --sombra:         0 2px 8px rgba(0,0,0,.4);
  --sombra-md:      0 8px 24px rgba(0,0,0,.5);
  --radius:         12px;
  --radius-sm:      8px;
  --font: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

/* TEMA LIGHT */
[data-tema="light"] {
  --bg:             #F0F2F5;
  --bg-card:        #FFFFFF;
  --bg-input:       #F5F7FA;
  --borda:          #DDE1E9;
  --texto:          #111827;
  --texto-sub:      #4B5563;
  --texto-muted:    #9CA3AF;
  --vermelho-light: #FEE2E2;
  --verde-light:    #D1FAE5;
  --amarelo-light:  #FEF3C7;
  --sombra:         0 2px 8px rgba(0,0,0,.08);
  --sombra-md:      0 8px 24px rgba(0,0,0,.12);
}

/* Ajustes visuais específicos do light */
[data-tema="light"] .login-wrap {
  background: linear-gradient(160deg, #1B3A8F 0%, #152D7A 55%, #0F2266 100%);
}
[data-tema="light"] thead { background: #F0F2F5; }
[data-tema="light"] tr:hover td { background: #F5F7FA; }
[data-tema="light"] .splash-loading { background: #F0F2F5; }
[data-tema="light"] .cons-tabela-header { background: #E8EBF0; }
[data-tema="light"] .mot-hist-tabela-header { background: #E8EBF0; }
[data-tema="light"] .login-selecionado { background: rgba(200,24,30,.06); }
[data-tema="light"] input:-webkit-autofill,
[data-tema="light"] input:-webkit-autofill:hover,
[data-tema="light"] input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px #F5F7FA inset !important;
  -webkit-text-fill-color: #111827 !important;
}

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--texto);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  transition: background .25s, color .25s;
}


/* ===== TELAS ===== */
.tela { display: none; min-height: 100vh; }
.tela.ativa { display: block; }

/* ===== LOGIN ===== */
.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: linear-gradient(160deg, #0D1117 0%, #0A0D14 55%, #060810 100%);
  position: relative;
  overflow: hidden;
}

/* Decoração geométrica */
.login-wrap::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,24,30,.15) 0%, transparent 70%);
  pointer-events: none;
}
.login-wrap::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -100px;
  width: 350px; height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(27,42,107,.35) 0%, transparent 70%);
  pointer-events: none;
}

/* Caminhão animado */
.truck-dvd {
  position: absolute;
  width: 90px; height: 52px;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}

.login-logo img {
  height: 72px; width: 72px;
  display: block;
  margin: 0 auto 16px;
  background: #fff;
  border-radius: 50%;
  padding: 10px;
  object-fit: contain;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}

.login-logo h1 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
}

.login-wrap .card {
  background: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 32px 28px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* Barra decorativa topo do card */
.login-wrap .card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--vermelho) 50%, var(--azul-marca) 50%);
  border-radius: 0;
}

.login-titulo {
  font-size: 20px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.login-subtitulo {
  font-size: 13px;
  color: #6B7280;
  margin-bottom: 8px;
}

/* Dark mode — dropdown escuro */
[data-tema="dark"] .login-dropdown {
  background: #1A2332;
  border-color: #2A3548;
}
[data-tema="dark"] .login-dropdown-item { border-bottom-color: #2A3548; }
[data-tema="dark"] .login-dropdown-item:hover { background: rgba(200,24,30,.1); }
[data-tema="dark"] .login-dropdown-item-nome { color: #F0F4FF; }
[data-tema="dark"] .login-dropdown-item-cpf  { color: #4A5568; }
[data-tema="dark"] .login-dropdown-vazio,
[data-tema="dark"] .login-dropdown-loading   { color: #4A5568; }

/* Dark mode — card escuro */
[data-tema="dark"] .login-wrap .card {
  background: #1A2332;
  border: 1px solid #2A3548;
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
}
[data-tema="dark"] .login-wrap .card .login-titulo { color: #F0F4FF; }
[data-tema="dark"] .login-wrap .card .login-subtitulo { color: #7A8BA8; }
[data-tema="dark"] .login-wrap .card input {
  background: #111927;
  border-color: #2A3548;
  color: #F0F4FF;
}
[data-tema="dark"] .login-wrap .card input::placeholder { color: #4A5568; }
[data-tema="dark"] .login-selecionado {
  background: rgba(200,24,30,.1);
  color: #F0F4FF;
}
[data-tema="dark"] .login-logo img {
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  height: 64px;
  width: auto;
}

/* Inputs no card de login sempre claros */
.login-wrap .card input {
  background: #F5F7FA;
  border-color: #DDE1E9;
  color: #111827;
}
.login-wrap .card input:focus { border-color: var(--vermelho); }
.login-wrap .card input::placeholder { color: #9CA3AF; }

.login-erro {
  font-size: 13px;
  color: #FF6B6B;
  background: rgba(200,24,30,.12);
  border: 1px solid rgba(200,24,30,.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  text-align: center;
  min-height: 0;
}

.link-consultoria {
  margin-top: 16px;
  color: var(--texto-sub);
  font-size: 13px;
  text-decoration: none;
  position: relative;
  z-index: 1;
  transition: color .15s;
}
.link-consultoria:hover { color: var(--texto); }

/* ===== DROPDOWN CPF LOGIN ===== */
.login-dropdown-wrap {
  position: relative;
  z-index: 10;
}
.login-dropdown-wrap input { width: 100%; }

.login-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid #DDE1E9;
  border-radius: var(--radius-sm);
  box-shadow: var(--sombra-md);
  max-height: 200px;
  overflow-y: auto;
  display: none;
  z-index: 50;
}
.login-dropdown.aberto { display: block; }

.login-dropdown-item {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-bottom: 1px solid #EEF0F4;
  transition: background .12s;
}
.login-dropdown-item:last-child { border-bottom: none; }
.login-dropdown-item:hover { background: #FEF2F2; }

.login-dropdown-item-nome  { font-size: 14px; font-weight: 700; color: #111827; }
.login-dropdown-item-cpf   { font-size: 11px; color: #9CA3AF; }

.login-dropdown-vazio, .login-dropdown-loading {
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: #9CA3AF;
}

/* Motorista selecionado */
.login-selecionado {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FEF2F2;
  border: 1px solid rgba(200,24,30,.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  margin-top: 4px;
}
.btn-trocar {
  background: none;
  border: none;
  color: var(--texto-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
  transition: color .15s;
}
.btn-trocar:hover { color: var(--vermelho); }

.btn-tema {
  background: none;
  border: 1px solid var(--borda);
  color: var(--texto-sub);
  border-radius: var(--radius-sm);
  padding: 5px 9px;
  font-size: 15px;
  cursor: pointer;
  transition: all .15s;
  line-height: 1;
}
.btn-tema:hover { background: var(--borda); }

/* ===== HEADER ===== */
.header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--borda);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--sombra);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 56px;
  max-width: 900px;
  margin: 0 auto;
}

.header-title {
  font-weight: 800;
  font-size: 16px;
  color: var(--texto);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.2px;
}

.header-logo {
  height: 28px;
  width: auto;
}

.badge-admin {
  background: var(--vermelho);
  color: #fff;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-user {
  font-size: 13px;
  color: var(--texto-sub);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== BOTÕES ===== */
.btn-primary {
  background: var(--vermelho);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .1s;
  width: 100%;
  letter-spacing: 0.2px;
}
.btn-primary:hover { background: var(--vermelho-dark); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.btn-secondary {
  background: transparent;
  color: var(--texto-sub);
  border: 1px solid var(--borda);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  width: 100%;
}
.btn-secondary:hover { background: var(--borda); color: var(--texto); }

.btn-sm { padding: 8px 14px; font-size: 13px; width: auto; }

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--texto-sub);
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: background .15s;
}
.btn-icon:hover { background: var(--borda); color: var(--texto); }

.btn-voltar {
  font-size: 13px;
  color: var(--texto-sub);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all .15s;
}
.btn-voltar:hover { background: var(--borda); color: var(--texto); }

/* ===== INPUTS ===== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="tel"],
select {
  width: 100%;
  border: 1.5px solid var(--borda);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 15px;
  font-family: var(--font);
  color: var(--texto);
  background: var(--bg-input);
  outline: none;
  transition: border-color .15s;
  -webkit-appearance: none;
}
input:focus, select:focus { border-color: var(--vermelho); }
input::placeholder { color: var(--texto-muted); }
select option { background: var(--bg-card); }

/* Fix autocomplete/autofill background no Chrome/Edge */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px var(--bg-input) inset !important;
  -webkit-text-fill-color: var(--texto) !important;
  border-color: var(--vermelho) !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* ===== TELA MOTORISTA MOBILE ===== */
.mot-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--borda);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--sombra);
}

.mot-header-inner {
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: 52px;
  gap: 10px;
}

.mot-logo { height: 24px; width: auto; }

.mot-nome {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  color: var(--texto);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mot-btn-sair {
  background: none;
  border: 1px solid var(--borda);
  color: var(--texto-muted);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.mot-btn-sair:hover { border-color: var(--vermelho); color: var(--vermelho); }

/* Nav tabs */
.mot-nav {
  display: flex;
  background: var(--bg-card);
  border-bottom: 1px solid var(--borda);
  position: sticky;
  top: 52px;
  z-index: 99;
}

.mot-nav-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--texto-muted);
  font-size: 14px;
  font-weight: 600;
  padding: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-bottom: 2px solid transparent;
  transition: all .15s;
}
.mot-nav-btn.ativo {
  color: var(--vermelho);
  border-bottom-color: var(--vermelho);
}

/* Tabs */
.mot-tab { display: none; }
.mot-tab.ativa { display: block; }

/* Aba lançar */
.mot-lancamento-wrap {
  padding: 20px 16px 40px;
  max-width: 520px;
  margin: 0 auto;
}

.mot-lancamento-titulo {
  margin-bottom: 20px;
}

.mot-lancamento-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--vermelho);
  display: block;
  margin-bottom: 4px;
}

.mot-lancamento-titulo h2 {
  font-size: 22px;
  font-weight: 900;
  color: var(--texto);
  letter-spacing: -0.3px;
}

/* Form */
.mot-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mot-campo label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--texto-sub);
  margin-bottom: 6px;
}

/* Upload foto */
.mot-upload-area {
  position: relative;
  border: 2px dashed var(--borda);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s;
  background: var(--bg-input);
  min-height: 120px;
}
.mot-upload-area:hover { border-color: var(--vermelho); }

.mot-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.mot-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 28px 16px;
  pointer-events: none;
}

.mot-upload-icon  { font-size: 36px; }
.mot-upload-texto { font-size: 15px; font-weight: 600; color: var(--texto-sub); }
.mot-upload-sub   { font-size: 12px; color: var(--texto-muted); }

.mot-preview-foto {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  display: block;
  background: var(--bg-input);
}

/* Botão salvar grande */
.mot-btn-salvar {
  width: 100%;
  background: var(--vermelho);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 18px;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  transition: all .15s;
  box-shadow: 0 4px 20px rgba(200,24,30,.3);
  margin-top: 4px;
  letter-spacing: 0.2px;
}
.mot-btn-salvar:hover  { background: var(--vermelho-dark); transform: translateY(-1px); }
.mot-btn-salvar:active { transform: translateY(0); }
.mot-btn-salvar:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* Aba histórico */
.mot-historico-wrap {
  padding: 12px 0 60px;
}

.mot-hist-info {
  padding: 8px 16px 10px;
  font-size: 13px;
  color: var(--texto-muted);
  font-weight: 500;
}
.mot-hist-info strong { color: var(--vermelho); font-weight: 800; }

.mot-hist-tabela-header {
  display: grid;
  grid-template-columns: 100px 1fr 80px 70px;
  padding: 7px 16px;
  gap: 8px;
  background: var(--bg-input);
  border-top: 1px solid var(--borda);
  border-bottom: 1px solid var(--borda);
}

.mot-hist-col {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--texto-muted);
}

.mot-hist-lista { display: flex; flex-direction: column; gap: 0; }

.mot-hist-row {
  display: grid;
  grid-template-columns: 100px 1fr 80px 70px;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--borda);
  cursor: pointer;
  transition: background .12s;
  border-left: 3px solid var(--vermelho);
}
.mot-hist-row:hover  { background: rgba(255,255,255,.03); }
.mot-hist-row:active { background: rgba(200,24,30,.06); }

.mot-hist-nf {
  font-size: 13px;
  font-weight: 800;
  color: var(--texto);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mot-hist-destino {
  font-size: 12px;
  color: var(--texto-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mot-hist-data {
  font-size: 12px;
  color: var(--texto-muted);
  white-space: nowrap;
}

.mot-hist-foto-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #4A6FD4;
  text-decoration: none;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(74,111,212,.3);
  background: rgba(74,111,212,.08);
  white-space: nowrap;
  transition: all .15s;
}
.mot-hist-foto-btn:hover { background: rgba(74,111,212,.18); border-color: rgba(74,111,212,.5); }

.mot-hist-sem-foto {
  font-size: 13px;
  color: var(--texto-muted);
  text-align: center;
}

/* ===== LISTA CANHOTOS ===== */
.lista-canhotos { display: flex; flex-direction: column; gap: 10px; }

.canhoto-card {
  background: var(--bg-card);
  border: 1px solid var(--borda);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--sombra);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  border-left: 4px solid var(--vermelho);
}
.canhoto-card:hover { border-color: var(--vermelho); box-shadow: var(--sombra-md); }

.canhoto-info { flex: 1; }

.canhoto-nf {
  font-size: 16px;
  font-weight: 700;
  color: var(--texto);
}

.canhoto-nf span {
  font-size: 12px;
  font-weight: 500;
  color: var(--texto-muted);
  margin-left: 4px;
}

.canhoto-destino {
  font-size: 13px;
  color: var(--texto-sub);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.canhoto-datas {
  font-size: 11px;
  color: var(--texto-muted);
  margin-top: 5px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.canhoto-foto-thumb {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  margin-left: 12px;
  flex-shrink: 0;
  border: 1px solid var(--borda);
}

.sem-foto {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--borda);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-left: 12px;
  flex-shrink: 0;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.modal-overlay.hidden { display: none; }

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--borda);
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 -8px 40px rgba(0,0,0,.5);
  animation: slideUp .2s ease-out;
}

.modal-box-view { border-radius: var(--radius); margin: 20px; max-height: 88vh; }

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--borda);
}

.modal-header h3 { font-size: 17px; font-weight: 700; color: var(--texto); }

.btn-fechar {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--texto-muted);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.btn-fechar:hover { background: var(--borda); color: var(--texto); }

.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }

.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--borda);
  display: flex;
  gap: 10px;
}
.modal-footer .btn-secondary, .modal-footer .btn-primary { width: auto; flex: 1; }

.campo label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--texto-sub);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}


/* ===== UPLOAD FOTO ===== */
.upload-area {
  position: relative;
  border: 2px dashed var(--borda);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s;
  min-height: 100px;
  background: var(--bg-input);
}
.upload-area:hover { border-color: var(--vermelho); }
.upload-area input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; z-index: 2;
}
.upload-placeholder {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px; padding: 24px;
  color: var(--texto-muted); font-size: 14px;
}
.upload-icon { font-size: 32px; }
.preview-foto {
  width: 100%; max-height: 220px; object-fit: contain; display: block; background: var(--bg-input);
}
.modal-erro {
  font-size: 13px; color: #FF6B6B;
  background: rgba(200,24,30,.12); border: 1px solid rgba(200,24,30,.25);
  padding: 10px 14px; border-radius: var(--radius-sm);
}

/* ===== ADMIN SIDEBAR LAYOUT ===== */
#tela-admin { display: flex; height: 100vh; overflow: hidden; }

.admin-sidebar {
  width: 220px; min-width: 220px;
  background: var(--bg-card); border-right: 1px solid var(--borda);
  display: flex; flex-direction: column;
  transition: width .2s ease, min-width .2s ease;
  position: relative; z-index: 10; overflow: hidden;
}
.admin-sidebar.fechada { width: 60px; min-width: 60px; }

.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px; border-bottom: 1px solid var(--borda);
  white-space: nowrap; overflow: hidden;
}
.sidebar-logo-img { width: 28px; height: 28px; flex-shrink: 0; object-fit: contain; }
.sidebar-logo-txt { font-size: 15px; font-weight: 800; color: var(--texto); transition: opacity .15s; }
.admin-sidebar.fechada .sidebar-logo-txt { opacity: 0; width: 0; }

.sidebar-nav { flex: 1; padding: 12px 8px; display: flex; flex-direction: column; gap: 4px; }
.sidebar-item {
  display: flex; align-items: center; gap: 12px; padding: 10px;
  border: none; background: none; border-radius: var(--radius-sm);
  cursor: pointer; color: var(--texto-sub); font-size: 14px; font-weight: 600;
  transition: all .15s; white-space: nowrap; overflow: hidden; width: 100%; text-align: left;
}
.sidebar-item:hover { background: var(--borda); color: var(--texto); }
.sidebar-item.ativo  { background: rgba(200,24,30,.1); color: var(--vermelho); }
.sidebar-icon  { font-size: 18px; flex-shrink: 0; }
.sidebar-label { transition: opacity .15s; }
.admin-sidebar.fechada .sidebar-label { opacity: 0; width: 0; }

.sidebar-toggle {
  background: none; border: none; border-top: 1px solid var(--borda);
  color: var(--texto-muted); cursor: pointer; padding: 12px;
  font-size: 20px; text-align: center; transition: all .15s; width: 100%;
}
.sidebar-toggle:hover { color: var(--texto); background: var(--borda); }
.admin-sidebar.fechada .sidebar-toggle { transform: rotate(180deg); }

.sidebar-open-btn {
  background: none; border: none; color: var(--texto-sub);
  cursor: pointer; font-size: 20px; padding: 4px 8px;
  border-radius: var(--radius-sm); transition: all .15s;
}
.sidebar-open-btn:hover { background: var(--borda); color: var(--texto); }

.admin-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: 56px;
  background: var(--bg-card); border-bottom: 1px solid var(--borda);
  flex-shrink: 0; box-shadow: var(--sombra);
}
.admin-header-esq { display: flex; align-items: center; gap: 12px; }
.admin-secao-nome  { font-size: 17px; font-weight: 800; color: var(--texto); letter-spacing: -0.2px; }
.admin-header-dir  { display: flex; align-items: center; gap: 6px; }

.admin-secao { display: none; flex: 1; overflow-y: auto; }
.admin-secao.ativa { display: block; }

.admin-content {
  padding: 20px 24px 60px;
  display: flex; flex-direction: column; gap: 24px;
}

.admin-secao-titulo {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--texto-muted);
}

.admin-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.admin-card {
  background: var(--bg-card); border: 1px solid var(--borda); border-radius: var(--radius);
  padding: 20px 16px; box-shadow: var(--sombra); display: flex; flex-direction: column;
  gap: 6px; text-align: center; transition: box-shadow .15s, border-color .15s;
}
.admin-card:hover { box-shadow: var(--sombra-md); border-color: rgba(200,24,30,.3); }
.admin-card-valor { font-size: 36px; font-weight: 900; color: var(--vermelho); line-height: 1; }
.admin-card-label { font-size: 11px; color: var(--texto-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }

.admin-filtros {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: var(--bg-card); border: 1px solid var(--borda);
  border-radius: var(--radius); padding: 14px 16px;
}
.admin-filtros input, .admin-filtros select { width: auto; flex: 1; min-width: 130px; }
.admin-filtros input[type="date"] { color-scheme: dark; }
[data-tema="light"] .admin-filtros input[type="date"] { color-scheme: light; }

/* ===== TABELA ADMIN ===== */
.tabela-admin { overflow-x: auto; }
table {
  width: 100%; border-collapse: collapse; background: var(--bg-card);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--sombra);
  font-size: 14px; border: 1px solid var(--borda);
}
thead { background: var(--bg-input); }
th {
  text-align: left; padding: 12px 14px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px; color: var(--texto-muted);
  border-bottom: 1px solid var(--borda); white-space: nowrap;
}
td { padding: 12px 14px; border-bottom: 1px solid var(--borda); color: var(--texto); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.03); }
.td-nf { font-weight: 700; }
.btn-ver {
  background: rgba(200,24,30,.15); color: var(--vermelho);
  border: 1px solid rgba(200,24,30,.3); border-radius: var(--radius-sm);
  padding: 5px 10px; font-size: 12px; font-weight: 700; cursor: pointer; transition: background .15s; white-space: nowrap;
}
.btn-ver:hover { background: rgba(200,24,30,.25); }

/* ===== PAINEL MOTORISTAS ===== */
.painel-motoristas { display: flex; flex-direction: column; gap: 10px; }
.motorista-row {
  background: var(--bg-card); border: 1px solid var(--borda); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--sombra); display: flex;
  align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.motorista-row-nome { font-weight: 700; font-size: 15px; color: var(--texto); }
.motorista-row-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.motorista-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.motorista-stat-val { font-size: 18px; font-weight: 800; color: var(--vermelho); }
.motorista-stat-label { font-size: 11px; color: var(--texto-muted); font-weight: 600; letter-spacing: 0.3px; }
.badge-alerta {
  background: rgba(245,158,11,.15); color: var(--amarelo);
  border: 1px solid rgba(245,158,11,.3); font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 20px;
}

/* ===== CADASTRO MOTORISTA ===== */
.cadastro-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.cadastro-form input { flex: 1; min-width: 160px; }
.cadastro-form .btn-primary { width: auto; flex-shrink: 0; }
.cadastro-msg { font-size: 13px; margin-top: 10px; padding: 10px 14px; border-radius: var(--radius-sm); }
.cadastro-msg.sucesso { background: var(--verde-light); color: var(--verde); border: 1px solid rgba(16,185,129,.3); }
.cadastro-msg.erro    { background: rgba(200,24,30,.12); color: #FF6B6B; border: 1px solid rgba(200,24,30,.25); }

/* ===== CONSULTORIA ===== */
.header-inner-full { max-width: 100%; padding: 0 24px; }

.main-consultoria {
  padding: 16px 24px 60px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Filtros */
.cons-filtros-wrap {
  background: var(--bg-card);
  border: 1px solid var(--borda);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--sombra);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cons-busca-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.cons-busca-input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.cons-busca-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  pointer-events: none;
  opacity: 0.4;
}

.cons-busca-input-wrap input { padding-left: 36px; width: 100%; }

.cons-filtro-periodo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cons-filtro-periodo input[type="date"] {
  width: auto; flex: 1; min-width: 130px; color-scheme: dark;
}

.cons-sep { font-size: 13px; color: var(--texto-muted); white-space: nowrap; }

/* Lista wrap */
.cons-lista-wrap { display: flex; flex-direction: column; gap: 8px; }

.cons-lista-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.cons-resultado-info { font-size: 13px; color: var(--texto-muted); font-weight: 500; }
.cons-resultado-info strong { color: var(--vermelho); font-weight: 800; }
.cons-por-pagina-label { font-size: 13px; color: var(--texto-muted); }
#cons-por-pagina { width: auto; padding: 5px 10px; font-size: 13px; }

/* Cabeçalho tabela */
.cons-tabela-header {
  display: grid;
  grid-template-columns: 110px 1fr 160px 110px 150px 70px;
  padding: 8px 16px;
  gap: 12px;
  background: var(--bg-input);
  border: 1px solid var(--borda);
  border-radius: var(--radius-sm);
}

.cons-col {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--texto-muted);
}

/* Lista */
.cons-lista { display: flex; flex-direction: column; gap: 3px; }

/* Linha tabela */
.cons-card {
  display: grid;
  grid-template-columns: 110px 1fr 160px 110px 150px 70px;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--borda);
  border-left: 3px solid var(--vermelho);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .12s, border-color .12s, transform .08s;
}
.cons-card:hover {
  background: rgba(255,255,255,.03);
  border-color: var(--vermelho);
  transform: translateX(2px);
}
.cons-card:active { transform: translateX(0); }

.cons-card-nf {
  font-size: 14px;
  font-weight: 800;
  color: var(--texto);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cons-card-destino {
  font-size: 13px;
  color: var(--texto-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cons-card-motorista {
  font-size: 13px;
  color: var(--texto-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cons-card-entrega {
  font-size: 13px;
  color: var(--texto-sub);
  white-space: nowrap;
}

.cons-card-lancado {
  font-size: 12px;
  color: var(--texto-muted);
  white-space: nowrap;
}

.cons-card-foto-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cons-card-thumb {
  width: 44px;
  height: 36px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid var(--borda);
  transition: transform .15s, box-shadow .15s;
}
.cons-card:hover .cons-card-thumb {
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}

.cons-card-sem-foto {
  width: 44px;
  height: 36px;
  border-radius: 4px;
  background: var(--bg-input);
  border: 1px solid var(--borda);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--texto-muted);
}

/* Paginação */
.cons-paginacao {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 10px 0;
}

.pag-btn {
  background: var(--bg-card);
  border: 1px solid var(--borda);
  color: var(--texto-sub);
  border-radius: var(--radius-sm);
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .12s;
  min-width: 34px;
  text-align: center;
}
.pag-btn:hover:not([disabled]) { background: var(--borda); color: var(--texto); }
.pag-btn.ativo { background: var(--vermelho); color: #fff; border-color: var(--vermelho); }
.pag-btn[disabled] { opacity: .3; cursor: not-allowed; }
.pag-ellipsis { color: var(--texto-muted); font-size: 13px; padding: 0 2px; }

.cons-btn-foto {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #4A6FD4;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(74,111,212,.3);
  background: rgba(74,111,212,.08);
  transition: all .15s;
  white-space: nowrap;
}
.cons-btn-foto:hover {
  background: rgba(74,111,212,.18);
  border-color: rgba(74,111,212,.5);
  color: #6B8FE8;
}

.cons-sem-foto {
  font-size: 13px;
  color: var(--texto-muted);
  padding-left: 4px;
}

.consultoria-erro { font-size: 13px; color: #FF6B6B; margin-top: 4px; }

@media (max-width: 768px) {
  .cons-tabela-header { display: none; }
  .cons-card {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
  }
  .cons-card-nf      { grid-column: 1; grid-row: 1; }
  .cons-card-destino { grid-column: 1; grid-row: 2; }
  .cons-card-motorista, .cons-card-entrega, .cons-card-lancado { grid-column: 1; grid-row: 3; font-size: 11px; }
  .cons-card-foto-wrap { grid-column: 2; grid-row: 1 / 4; }
  .cons-card-motorista ~ .cons-card-entrega,
  .cons-card-motorista ~ .cons-card-lancado { display: none; }
}

/* ===== PAINEL LATERAL ===== */
.painel-lateral {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  justify-content: flex-end;
}
.painel-lateral.hidden { display: none; }

.painel-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  cursor: pointer;
}

.painel-conteudo {
  position: relative;
  width: 480px;
  max-width: 95vw;
  height: 100%;
  background: var(--bg-card);
  border-left: 1px solid var(--borda);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(0,0,0,.5);
  animation: slideInRight .22s ease-out;
  overflow: hidden;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.painel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--borda);
  flex-shrink: 0;
}

.painel-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--vermelho);
  margin-bottom: 4px;
}

.painel-titulo {
  font-size: 22px;
  font-weight: 900;
  color: var(--texto);
  letter-spacing: -0.3px;
}

.painel-fechar { margin-top: 2px; flex-shrink: 0; }

.painel-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.painel-secao { display: flex; flex-direction: column; gap: 14px; }

.painel-secao-titulo {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--texto-muted);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--borda);
}

.painel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.painel-campo label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--texto-muted);
  margin-bottom: 4px;
}

.painel-campo span { font-size: 15px; font-weight: 700; color: var(--texto); }

.painel-foto-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--borda);
  background: var(--bg-input);
}
.painel-foto-wrap img { width: 100%; display: block; cursor: zoom-in; transition: transform .3s; }
.painel-foto-wrap img:hover { transform: scale(1.02); }

.painel-btn-foto {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #4A6FD4;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(74,111,212,.3);
  background: rgba(74,111,212,.08);
  transition: all .15s;
  width: 100%;
}
.painel-btn-foto:hover { background: rgba(74,111,212,.18); border-color: rgba(74,111,212,.5); }

.painel-sem-foto {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  color: var(--texto-muted);
  font-size: 14px;
  gap: 8px;
  border: 1px dashed var(--borda);
  border-radius: var(--radius);
}

/* Modal view (admin/motorista ainda usa) */
.view-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.view-campo label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--texto-muted); margin-bottom: 3px; }
.view-campo span  { font-size: 15px; font-weight: 700; color: var(--texto); }
.view-foto { margin-top: 8px; }
.view-foto img { width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--borda); }
.tag-atraso { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 20px; display: inline-block; margin-top: 4px; }
.tag-atraso.ok    { background: var(--verde-light);       color: var(--verde);   border: 1px solid rgba(16,185,129,.3); }
.tag-atraso.medio { background: rgba(245,158,11,.12);     color: var(--amarelo); border: 1px solid rgba(245,158,11,.3); }
.tag-atraso.alto  { background: rgba(200,24,30,.12);      color: #FF6B6B;        border: 1px solid rgba(200,24,30,.25); }

/* ===== BADGE SALVANDO ===== */
.badge-salvando {
  position: fixed; top: 64px; left: 50%; transform: translateX(-50%);
  padding: 7px 18px; border-radius: 20px; font-size: 13px; font-weight: 700;
  z-index: 150; box-shadow: var(--sombra-md); transition: all .3s; white-space: nowrap;
}
.badge-salvando.salvando { background: rgba(245,158,11,.15); color: var(--amarelo); border: 1px solid rgba(245,158,11,.3); }
.badge-salvando.salvo    { background: var(--verde-light); color: var(--verde); border: 1px solid rgba(16,185,129,.3); }
.badge-salvando.hidden   { display: none; }

/* ===== CARDS TEMPORÁRIOS ===== */
.canhoto-salvando { opacity: 0.6; border-left-color: var(--amarelo) !important; animation: pulse 1.5s infinite; }
.canhoto-falha    { border-left-color: #FF6B6B !important; cursor: pointer; }
.tag-salvando {
  font-size: 11px; font-weight: 700; color: var(--amarelo);
  background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.3);
  padding: 2px 7px; border-radius: 20px; margin-left: 6px;
}
.tag-falha {
  font-size: 11px; font-weight: 700; color: #FF6B6B;
  background: rgba(200,24,30,.12); border: 1px solid rgba(200,24,30,.25);
  padding: 2px 7px; border-radius: 20px; margin-left: 6px;
}
@keyframes pulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 0.9; } }

/* ===== SPLASH LOADING ===== */
.splash-loading {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.splash-loading.hidden { display: none; }

.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.splash-logo {
  height: 64px;
  width: auto;
  animation: splash-pulse 1.5s ease-in-out infinite;
}

@keyframes splash-pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%       { opacity: 0.7; transform: scale(0.95); }
}

.splash-spinner {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 28px;
}

.splash-bar {
  width: 5px;
  border-radius: 3px;
  background: var(--vermelho);
  animation: splash-bar 1s ease-in-out infinite;
}
.splash-bar:nth-child(1) { animation-delay: 0s;    height: 12px; }
.splash-bar:nth-child(2) { animation-delay: 0.15s; height: 20px; }
.splash-bar:nth-child(3) { animation-delay: 0.3s;  height: 28px; }
.splash-bar:nth-child(4) { animation-delay: 0.45s; height: 20px; }

@keyframes splash-bar {
  0%, 100% { transform: scaleY(0.4); opacity: 0.4; }
  50%       { transform: scaleY(1);   opacity: 1;   }
}

.splash-texto {
  font-size: 13px;
  font-weight: 600;
  color: var(--texto-muted);
  letter-spacing: 0.5px;
}

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--bg-card); border: 1px solid var(--borda); color: var(--texto);
  padding: 12px 22px; border-radius: 30px; font-size: 14px; font-weight: 600;
  z-index: 999; box-shadow: var(--sombra-md); white-space: nowrap; animation: fadeInUp .2s ease-out;
}
.toast.sucesso { background: var(--verde-light); color: var(--verde); border-color: rgba(16,185,129,.3); }
.toast.erro    { background: rgba(200,24,30,.2);  color: #FF6B6B;     border-color: rgba(200,24,30,.3); }
.toast.hidden  { display: none; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== UTILITÁRIOS ===== */
.hidden  { display: none !important; }
.loading { padding: 32px; text-align: center; color: var(--texto-muted); font-size: 14px; }
.vazio   { padding: 32px; text-align: center; color: var(--texto-muted); font-size: 14px; }
.header-consultoria { background: var(--bg-card); }

/* ===== RESPONSIVO ===== */
@media (max-width: 480px) {
  .admin-cards { grid-template-columns: 1fr 1fr; }
  .admin-cards .admin-card:last-child { grid-column: span 2; }
  .resultado-grid { grid-template-columns: 1fr; }
  .view-grid { grid-template-columns: 1fr; }
  .admin-filtros input, .admin-filtros select { min-width: 100%; }
  .modal-box-view { margin: 10px; }
}

/* ===== COLOR SCHEME POR TEMA ===== */
[data-tema="dark"]  input[type="date"] { color-scheme: dark; }
[data-tema="light"] input[type="date"] { color-scheme: light; }