* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.9);
  --surface: rgba(30, 41, 59, 0.96);
  --surface-2: rgba(15, 23, 42, 0.98);
  --border: rgba(148, 163, 184, 0.16);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --blue: #3b82f6;
  --green: #22c55e;
  --shadow: 0 24px 50px rgba(2, 6, 23, 0.4);
}

body.light-mode {
  --text: #0f172a;
  --muted: #475569;
}

body {
  font-family: Arial, sans-serif;
  background:
    radial-gradient(circle at top, rgba(59, 130, 246, 0.16), transparent 34%),
    linear-gradient(180deg, #0f172a 0%, #020617 100%);
  color: var(--text);
  padding: 10px;
  min-height: 100vh;
}

body.light-mode {
  background: linear-gradient(180deg, #e2e8f0 0%, #f8fafc 100%);
}

button,
label,
.day,
.mes-header,
.card {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}


.app-header {
  position: sticky;
  top: 8px;
  z-index: 5;
  max-width: 520px;
  margin: 0 auto 10px;
}

.header-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.route-menu {
  position: relative;
}

.route-menu-toggle {
  min-width: 112px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.92);
  color: #e2e8f0;
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}

.route-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 150px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.45);
  display: none;
  padding: 6px;
}

.route-menu-list.aberto {
  display: grid;
  gap: 4px;
}

.route-option {
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #cbd5e1;
  text-align: left;
  padding: 9px 10px;
  cursor: pointer;
}

.route-option.ativo {
  border-color: rgba(96, 165, 250, 0.55);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.3), rgba(29, 78, 216, 0.5));
  color: #dbeafe;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.95));
  backdrop-filter: blur(8px);
}

.brand-logo {
  width: min(100%, 260px);
  height: 36px;
  object-fit: contain;
  object-position: left center;
}

.brand-fallback {
  display: none;
  font-size: 20px;
  margin: 0;
  color: #f8fafc;
}

.header-inner .btn-config {
  margin-left: auto;
  flex-shrink: 0;
}

.app {
  max-width: 520px;
  width: 100%;
  margin: auto;
  padding: 16px 10px 26px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.8), rgba(2, 6, 23, 0.9));
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: var(--shadow);
}

body.light-mode .header-inner,
body.light-mode .app,
body.light-mode .viagens-shell,
body.light-mode .settings-dialog {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(148, 163, 184, 0.3);
}

body.light-mode .route-tab {
  background: #e2e8f0;
  color: #1e293b;
}

body.light-mode .route-tab.ativo {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(29, 78, 216, 0.35));
}

body.light-mode .hero-subtitle,
body.light-mode .viagens-topo p,
body.light-mode .settings-desc {
  color: #475569;
}


.hero {
  text-align: center;
  margin-bottom: 14px;
}

.hero-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-config {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 1));
  color: #f8fafc;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.26);
}

.btn-config:hover {
  transform: translateY(-1px);
}

h1 {
  font-size: clamp(1.9rem, 6vw, 2.35rem);
  line-height: 1.05;
  margin-bottom: 4px;
}

.hero-subtitle {
  color: var(--muted);
  font-size: 13px;
}

.route-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.route-tab {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  color: #cbd5e1;
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
}

.route-tab.ativo {
  border-color: rgba(96, 165, 250, 0.85);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.32), rgba(29, 78, 216, 0.5));
  color: #dbeafe;
}

.page-section {
  display: none;
}

.page-section.ativo {
  display: block;
}

.export-shell {
  margin: 14px 0;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.72);
}

.export-topo h3 {
  font-size: 15px;
  margin-bottom: 4px;
}

.export-topo p {
  color: var(--muted);
  font-size: 12px;
}

.export-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.export-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.export-grid input {
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.52);
  color: var(--text);
  padding: 9px 10px;
}

.btn-export-pdf {
  margin-top: 12px;
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(14, 116, 144, 0.42);
  border-radius: 12px;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #f8fafc;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
}

.btn-export-pdf svg {
  width: 18px;
  height: 18px;
}

body.light-mode .export-shell {
  background: #f8fafc;
  border-color: rgba(148, 163, 184, 0.35);
}

body.light-mode .export-grid input {
  background: #ffffff;
  color: #0f172a;
}

.quick-actions {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.btn-google,
.upload {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  padding: 15px 16px;
  border-radius: 18px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.btn-google {
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
  color: #f8fafc;
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.2);
}

.btn-google img {
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 999px;
  padding: 2px;
  flex-shrink: 0;
}

.btn-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
}

.btn-google small {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

.upload {
  justify-content: flex-start;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 34px rgba(34, 197, 94, 0.22);
  cursor: pointer;
}

.upload::after {
  content: "Selecionar";
  margin-left: auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.18);
  font-size: 11px;
  font-weight: 700;
}

.upload-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  font-size: 18px;
  flex-shrink: 0;
}

.upload-text {
  font-size: 15px;
}

.upload small {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.84);
}

.calendar-shell {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.97), rgba(15, 23, 42, 0.84));
  border-radius: 22px;
  border: 1px solid var(--border);
  padding: 14px 8px 12px;
  margin-bottom: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.mes-controle {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.mes-controle button,
.btn-hoje {
  border: none;
  color: white;
}

.mes-controle button {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 1));
  border: 1px solid rgba(71, 85, 105, 0.8);
  padding: 10px 0;
  border-radius: 14px;
  font-weight: bold;
  font-size: 18px;
}

#mesAtual {
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  color: #f8fafc;
}

.week-header {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 8px;
}

.week-header div {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #64748b;
}

#calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.empty-day,
.day {
  min-height: 92px;
}

.day {
  border-radius: 16px;
  padding: 9px 5px 7px;
  position: relative;
  border: 1px solid transparent;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.day:active,
.btn-google:active,
.upload:active,
.mes-controle button:active,
.btn-hoje:active,
.btn-config:active,
.settings-close:active,
.btn-salvar-config:active {
  transform: scale(0.98);
}

.work-day {
  background: rgba(34, 197, 94, 0.18);
  box-shadow: inset 0 -1px 0 rgba(34, 197, 94, 0.08);
}

.off-day {
  background: rgba(51, 65, 85, 0.52);
  box-shadow: inset 0 -1px 0 rgba(148, 163, 184, 0.06);
}

.none-day {
  background: rgba(30, 41, 59, 0.92);
  box-shadow: inset 0 -1px 0 rgba(148, 163, 184, 0.04);
}

.day.today {
  border-color: rgba(96, 165, 250, 0.9);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.day-topo {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.day-num {
  font-weight: 700;
  font-size: 14px;
}

.dot {
  width: 7px;
  height: 7px;
  margin-top: 4px;
  background: linear-gradient(135deg, #60a5fa, #22c55e);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.day-info {
  margin-top: 16px;
  font-size: 10px;
  line-height: 1.35;
  color: #cbd5e1;
  word-break: break-word;
}

.btn-hoje {
  width: 100%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  padding: 13px;
  border-radius: 16px;
  margin-bottom: 10px;
  font-weight: 700;
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.22);
}

.btn-google:hover,
.upload:hover,
.mes-controle button:hover,
.btn-hoje:hover {
  transform: translateY(-1px);
}

/* LISTA */
#lista {
  margin-top: 18px;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.28);
}

.lista-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.lista-titulo {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
}

.lista-subtitulo {
  margin-top: 4px;
  font-size: 12px;
  color: #94a3b8;
}

.lista-badge {
  flex-shrink: 0;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.lista-vazia {
  padding: 18px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px dashed rgba(148, 163, 184, 0.22);
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
}

.lista-filtros {
  margin: 8px 0 14px;
}

.filtro-passados {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #cbd5e1;
}

.filtro-passados input,
.toggle-retroativa input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.75);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  margin-top: 1px;
}

.filtro-passados input::after,
.toggle-retroativa input::after {
  content: "";
  width: 10px;
  height: 10px;
  transform: scale(0);
  transition: transform 0.15s ease;
  clip-path: polygon(14% 44%, 0 65%, 44% 100%, 100% 18%, 80% 0, 43% 62%);
  background: #fff;
}

.filtro-passados input:checked,
.toggle-retroativa input:checked {
  border-color: rgba(96, 165, 250, 0.9);
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}

.filtro-passados input:checked::after,
.toggle-retroativa input:checked::after {
  transform: scale(1);
}

.filtro-passados input:focus-visible,
.toggle-retroativa input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.35);
}

.escala-hoje {
  margin-bottom: 14px;
  border-radius: 16px;
  border: 1px solid rgba(59, 130, 246, 0.38);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.18), rgba(15, 23, 42, 0.95));
  padding: 12px;
}

.escala-hoje.sem-registro {
  border-color: rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.75);
}

.escala-hoje-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.escala-hoje-titulo {
  font-size: 15px;
  font-weight: 700;
  color: #dbeafe;
}

.escala-hoje-linha {
  font-size: 12px;
  color: #cbd5e1;
}

.escala-hoje-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ano-bloco + .ano-bloco {
  margin-top: 18px;
}

.ano-header {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #f8fafc;
}

.ano-header::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e, #3b82f6);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.mes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 700;
  margin-top: 8px;
  border: 1px solid rgba(51, 65, 85, 0.95);
  color: #e2e8f0;
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08);
}

.mes-header::after {
  content: "▾";
  color: #60a5fa;
  font-size: 14px;
  transition: transform 0.2s ease;
}

.mes-header.aberto::after {
  transform: rotate(180deg);
}

.mes-conteudo {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
  padding: 0 2px;
  overflow: hidden;
  transition: grid-template-rows 0.22s ease, opacity 0.18s ease, margin-top 0.18s ease;
}

.mes-inner {
  min-height: 0;
  padding-top: 4px;
}

.mes-conteudo.ativo {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 10px;
  padding-bottom: 2px;
}

.card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.96));
  padding: 14px;
  border-radius: 16px;
  margin-bottom: 10px;
  border: 1px solid rgba(71, 85, 105, 0.6);
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.18);
  transition: background 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
}

.card.flash {
  animation: flashHighlight 0.95s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes flashHighlight {
  0% {
    transform: translateY(0) scale(1);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.96));
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.18);
    border-color: rgba(71, 85, 105, 0.6);
  }
  35% {
    transform: translateY(-2px) scale(1.01);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.2), rgba(15, 23, 42, 0.96));
    box-shadow: 0 18px 34px rgba(37, 99, 235, 0.12);
    border-color: rgba(96, 165, 250, 0.34);
  }
  70% {
    transform: translateY(0) scale(1.003);
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.12), rgba(15, 23, 42, 0.96));
    box-shadow: 0 16px 30px rgba(2, 6, 23, 0.2);
    border-color: rgba(71, 85, 105, 0.68);
  }
  100% {
    transform: translateY(0) scale(1);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.96));
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.18);
    border-color: rgba(71, 85, 105, 0.6);
  }
}

.card-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.card-extra {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
  transition: grid-template-rows 0.22s ease, opacity 0.22s ease, margin-top 0.22s ease;
}

.card-extra-inner {
  min-height: 0;
}

.card.expanded {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.4);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.14);
}

.card.expanded .card-extra {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 10px;
}

.btn-editar-dia {
  width: 100%;
  border: 1px solid rgba(96, 165, 250, 0.4);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.32), rgba(29, 78, 216, 0.48));
  color: #dbeafe;
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-acao-viagem {
  min-width: 78px;
  padding: 8px 10px;
  font-size: 11px;
}

.btn-acao-viagem.excluir {
  border-color: rgba(252, 165, 165, 0.28);
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.48), rgba(185, 28, 28, 0.58));
  color: #fee2e2;
}

.btn-editar-dia:active {
  transform: scale(0.98);
}

.card-data {
  font-size: 15px;
  font-weight: 700;
}

.card-badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.card-badge.trabalho {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
}

.card-badge.folga {
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.card-linha {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.55);
  font-size: 12px;
  color: #dbeafe;
}

.card-linha strong {
  font-size: 11px;
  color: #94a3b8;
}

.card-linha.folga {
  padding: 12px;
  color: #cbd5e1;
}

.card.today {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.16), rgba(15, 23, 42, 0.96));
  border-color: rgba(74, 222, 128, 0.2);
  box-shadow: 0 16px 30px rgba(2, 6, 23, 0.2);
}

.card.today::before {
  background: linear-gradient(180deg, rgba(134, 239, 172, 0.08), transparent 38%);
}

.card.today .card-data {
  color: #dcfce7;
}

.card.today .card-badge {
  background: rgba(34, 197, 94, 0.18);
}

.settings-modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.68);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 9999;
}

.settings-modal.aberto {
  opacity: 1;
  pointer-events: auto;
}

.settings-dialog {
  width: min(500px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, rgba(15, 23, 42, 1), rgba(30, 41, 59, 0.98));
  padding: 16px;
  box-shadow: 0 20px 45px rgba(2, 6, 23, 0.5);
}

.settings-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.settings-topo h2 {
  font-size: 18px;
}

.settings-close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.75);
  color: #f8fafc;
  cursor: pointer;
}

.settings-desc {
  margin-top: 8px;
  color: #94a3b8;
  font-size: 12px;
}

.settings-grid {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.settings-row {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.6);
}

.settings-row strong {
  font-size: 12px;
  line-height: 1.35;
}

.time-inputs {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.time-inputs label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  color: #cbd5e1;
}

.time-inputs input {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.6);
  color: #f8fafc;
  padding: 10px 8px;
  font: inherit;
}

.time-inputs select {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.6);
  color: #f8fafc;
  padding: 10px 8px;
  font: inherit;
}

.single-input {
  grid-template-columns: 1fr;
}

#nomeUsuario {
  text-transform: uppercase;
}

.toggle-retroativa {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #cbd5e1;
  font-size: 12px;
}

.toggle-theme {
  margin-top: 0;
}

.toggle-theme input {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  position: relative;
  background: rgba(51, 65, 85, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.45);
}

.toggle-theme input::after {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  clip-path: none;
  transform: translateX(0);
  background: #fff;
  position: absolute;
  left: 3px;
  top: 3px;
  transition: transform 0.18s ease;
}

.toggle-theme input:checked::after {
  transform: translateX(18px);
}

.toggle-theme span {
  line-height: 1.35;
}


.btn-salvar-config {
  width: 100%;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  padding: 11px 12px;
  font-weight: 700;
  cursor: pointer;
}

.settings-actions {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-logout-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 1px solid rgba(252, 165, 165, 0.22);
  border-radius: 12px;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  padding: 11px 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-logout-google svg {
  width: 16px;
  height: 16px;
}

.edit-dialog .btn-logout-google {
  border-color: rgba(148, 163, 184, 0.25);
  background: linear-gradient(135deg, rgba(71, 85, 105, 0.95), rgba(51, 65, 85, 0.98));
}

.btn-salvar-config:disabled {
  opacity: 0.8;
  cursor: wait;
}

.viagens-shell {
  margin-top: 10px;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.28);
}

.viagens-topo h2 {
  font-size: 17px;
}

.viagens-topo p {
  margin-top: 4px;
  font-size: 12px;
  color: #94a3b8;
}

.viagem-form {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.viagem-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.campo-observacao {
  grid-column: 1 / -1;
}

.viagem-grid label,
.viagens-filtro label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  color: #cbd5e1;
}

.viagem-grid input,
.viagens-filtro input,
.viagem-grid textarea,
.edit-dialog textarea {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.6);
  color: #f8fafc;
  padding: 10px 8px;
  font: inherit;
}

.viagens-filtro {
  margin-top: 12px;
}

.viagens-table-wrap {
  margin-top: 12px;
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
}

.viagens-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 860px;
  background: rgba(15, 23, 42, 0.78);
}

.viagens-table th,
.viagens-table td {
  text-align: left;
  padding: 10px 9px;
  border-right: 1px solid rgba(148, 163, 184, 0.15);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  font-size: 12px;
  color: #dbeafe;
}

.viagens-table td:last-child,
.viagens-table th:last-child {
  border-right: none;
}

.viagens-table tbody tr:nth-child(2n) {
  background: rgba(15, 23, 42, 0.6);
}

.viagens-table th {
  font-size: 11px;
  color: #93c5fd;
  background: rgba(15, 23, 42, 0.95);
  position: sticky;
  top: 0;
}

.viagens-acoes-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}


.btn-observacao {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(51, 65, 85, 0.55);
  color: #94a3b8;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.btn-observacao svg {
  width: 18px;
  height: 18px;
}

.btn-observacao.ativo {
  color: #fff;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-scroll-top {
  position: fixed;
  right: 16px;
  bottom: 20px;
  z-index: 60;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.btn-scroll-top svg {
  width: 24px;
  height: 24px;
}

.btn-scroll-top.visivel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 480px) {
  body {
    padding: 8px;
  }

  .app-header {
    top: 6px;
    max-width: 100%;
  }

  .header-inner {
    padding: 8px 10px;
  }

  .brand-logo {
    max-width: 190px;
    height: 30px;
  }

  .brand-fallback {
    font-size: 17px;
  }

  .route-menu-toggle {
    min-width: 94px;
    padding: 9px 10px;
  }

  .app {
    max-width: 100%;
    padding: 16px 6px 24px;
    border-radius: 22px;
  }

  .btn-google,
  .upload {
    min-height: 60px;
    border-radius: 16px;
  }

  .upload::after {
    padding: 7px 10px;
    font-size: 10px;
  }

  .calendar-shell {
    padding-inline: 6px;
  }

  .week-header,
  #calendar {
    gap: 4px;
  }

  .empty-day,
  .day {
    min-height: 70px;
  }

  .day {
    padding: 7px 4px 6px;
    border-radius: 14px;
  }

  .day-info {
    margin-top: 12px;
    font-size: 9px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .escala-hoje-grid,
  .settings-actions,
  .viagem-grid {
    grid-template-columns: 1fr;
  }

  .lista-topo,
  .card-topo {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Tema claro refinado */
body.light-mode {
  background: linear-gradient(180deg, #cfd8e6 0%, #e7edf6 100%);
}

body.light-mode .app,
body.light-mode .header-inner,
body.light-mode #lista,
body.light-mode .calendar-shell,
body.light-mode .viagens-shell,
body.light-mode .settings-dialog,
body.light-mode .escala-hoje,
body.light-mode .card,
body.light-mode .day,
body.light-mode .empty-day {
  background: linear-gradient(180deg, #f6f9ff, #eaf1fb);
  border-color: rgba(100, 116, 139, 0.28);
  color: #0f172a;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

body.light-mode .settings-modal {
  background: rgba(30, 41, 59, 0.42);
}

body.light-mode .route-menu-toggle,
body.light-mode .route-menu-list,
body.light-mode .time-inputs input,
body.light-mode .time-inputs select,
body.light-mode .viagem-grid input,
body.light-mode .viagem-grid textarea,
body.light-mode .viagens-filtro input,
body.light-mode .upload::after {
  background: #e6edf8;
  border-color: rgba(100, 116, 139, 0.34);
  color: #0f172a;
}

body.light-mode .route-option {
  color: #334155;
}

body.light-mode .route-option.ativo,
body.light-mode .route-tab.ativo {
  color: #dbeafe;
}

body.light-mode .upload {
  background: linear-gradient(135deg, #16a34a, #15803d);
  box-shadow: 0 14px 24px rgba(34, 197, 94, 0.2);
}

body.light-mode .btn-google {
  color: #0f172a;
  background: linear-gradient(180deg, #f8fafc, #e5edf8);
  border-color: rgba(100, 116, 139, 0.32);
}

body.light-mode .btn-google small,
body.light-mode .hero-subtitle,
body.light-mode .viagens-topo p,
body.light-mode .settings-desc,
body.light-mode .lista-subtitulo,
body.light-mode .card-linha strong,
body.light-mode .toggle-retroativa,
body.light-mode .time-inputs label,
body.light-mode .viagem-grid label,
body.light-mode .viagens-filtro label,
body.light-mode .week-header div,
body.light-mode #mesAtual {
  color: #475569;
}

body.light-mode .day-number,
body.light-mode .card-data,
body.light-mode .lista-titulo,
body.light-mode .settings-topo h2,
body.light-mode .viagens-topo h2 {
  color: #0f172a;
}

body.light-mode .day-info,
body.light-mode .card-linha {
  color: #1e293b;
  background: #eef3fb;
}

body.light-mode .day.folga {
  background: linear-gradient(180deg, #f1f5f9, #e2e8f0);
}

body.light-mode .day.hoje,
body.light-mode .card.today,
body.light-mode .escala-hoje {
  background: linear-gradient(180deg, #dcfce7, #bbf7d0);
  border-color: rgba(34, 197, 94, 0.45);
}

body.light-mode .btn-hoje,
body.light-mode .mes-controle button,
body.light-mode .btn-salvar-config {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
}

body.light-mode .btn-config,
body.light-mode .settings-close {
  background: #e2e8f0;
  color: #0f172a;
  border-color: rgba(100, 116, 139, 0.36);
}

body.light-mode .viagens-table {
  background: #eef3fb;
}

body.light-mode .viagens-table th {
  background: #dbe7f8;
  color: #1d4ed8;
}

body.light-mode .viagens-table td {
  color: #0f172a;
  border-color: rgba(100, 116, 139, 0.24);
}

body.light-mode .viagens-table tbody tr:nth-child(2n) {
  background: #e3ebf8;
}

body.light-mode .lista-vazia {
  background: #e2e8f0;
  border-color: rgba(100, 116, 139, 0.3);
  color: #475569;
}

body.light-mode .btn-observacao {
  background: #e2e8f0;
  color: #475569;
  border-color: rgba(100, 116, 139, 0.35);
}

body.light-mode .btn-observacao.ativo {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff;
}

body.light-mode .btn-scroll-top {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

/* Ajuste fino de paleta no modo claro (menos contraste estourado) */
body.light-mode .brand-fallback,
body.light-mode .lista-titulo,
body.light-mode .ano-header,
body.light-mode .mes-header,
body.light-mode .mes-header::after {
  color: #1e293b;
}

body.light-mode .route-menu-toggle,
body.light-mode .route-menu-list,
body.light-mode .route-option,
body.light-mode .btn-config,
body.light-mode .settings-close {
  background: #dbe4f1;
  border-color: rgba(71, 85, 105, 0.28);
  color: #1e293b;
}

body.light-mode .route-option.ativo {
  background: #c7d5e9;
  border-color: rgba(59, 130, 246, 0.38);
  color: #1e3a5f;
}

body.light-mode .mes-controle button,
body.light-mode .btn-hoje,
body.light-mode .btn-salvar-config {
  background: #3f5f87;
  color: #f8fafc;
}

body.light-mode .mes-controle button:hover,
body.light-mode .btn-hoje:hover,
body.light-mode .btn-salvar-config:hover {
  background: #365475;
}

body.light-mode .ano-header,
body.light-mode .mes-header,
body.light-mode .settings-row,
body.light-mode .card-linha,
body.light-mode .lista-vazia {
  background: #e2e8f2;
  border-color: rgba(71, 85, 105, 0.2);
}

body.light-mode .filtro-passados input,
body.light-mode .toggle-retroativa input {
  background: #d6dfec;
  border-color: rgba(71, 85, 105, 0.35);
}

body.light-mode .filtro-passados input:checked,
body.light-mode .toggle-retroativa input:checked {
  background: #4c6a93;
  border-color: rgba(51, 65, 85, 0.45);
  box-shadow: 0 0 0 3px rgba(76, 106, 147, 0.18);
}

body.light-mode .card.today,
body.light-mode .day.hoje,
body.light-mode .escala-hoje {
  background: linear-gradient(180deg, #d9e7f7, #c9ddef);
  border-color: rgba(59, 130, 246, 0.22);
}

body.light-mode .card-badge.trabalho {
  background: rgba(59, 130, 246, 0.12);
  color: #1e3a5f;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

body.light-mode .card-badge.folga {
  background: rgba(100, 116, 139, 0.15);
  color: #334155;
}

body.light-mode .btn-editar-dia,
body.light-mode .btn-acao-viagem {
  background: #516b8e;
  border-color: rgba(51, 65, 85, 0.25);
  color: #f8fafc;
}

body.light-mode .btn-acao-viagem.excluir,
body.light-mode .btn-logout-google {
  background: #9b4a4a;
  border-color: rgba(127, 29, 29, 0.22);
  color: #fff;
}

body.light-mode .viagens-table th {
  background: #d3dfef;
  color: #334155;
}

body.light-mode .viagens-table tbody tr:nth-child(2n) {
  background: #dde7f4;
}

body.light-mode .time-inputs input,
body.light-mode .time-inputs select,
body.light-mode .viagem-grid input,
body.light-mode .viagem-grid textarea,
body.light-mode .viagens-filtro input {
  background: #eef3fa;
  color: #1e293b;
  border-color: rgba(71, 85, 105, 0.28);
}

/* === TEMA CLARO 2.0 (paleta completa e moderna) === */
body.light-mode {
  background: radial-gradient(circle at top, #f7fbff 0%, #eaf1fb 38%, #dde8f5 100%) !important;
  color: #1f2a3a !important;
}

body.light-mode .app-header,
body.light-mode .app {
  background: transparent !important;
}

body.light-mode .header-inner,
body.light-mode .app,
body.light-mode #lista,
body.light-mode .calendar-shell,
body.light-mode .viagens-shell,
body.light-mode .settings-dialog,
body.light-mode .card,
body.light-mode .escala-hoje,
body.light-mode .settings-row,
body.light-mode .card-linha,
body.light-mode .lista-vazia,
body.light-mode .viagens-table-wrap,
body.light-mode .escala-hoje-grid > div {
  background: linear-gradient(180deg, #f8fbff, #edf3fb) !important;
  border-color: #c7d6e8 !important;
  color: #1f2a3a !important;
  box-shadow: 0 8px 24px rgba(30, 52, 84, 0.08) !important;
}

body.light-mode .settings-modal {
  background: rgba(24, 38, 58, 0.35) !important;
}

body.light-mode .hero-subtitle,
body.light-mode .lista-subtitulo,
body.light-mode .settings-desc,
body.light-mode .time-inputs label,
body.light-mode .viagem-grid label,
body.light-mode .viagens-filtro label,
body.light-mode .toggle-retroativa,
body.light-mode .week-header div,
body.light-mode #mesAtual,
body.light-mode .card-linha strong,
body.light-mode .upload small,
body.light-mode .btn-google small {
  color: #5b6d84 !important;
}

body.light-mode h1,
body.light-mode h2,
body.light-mode .lista-titulo,
body.light-mode .day-number,
body.light-mode .card-data,
body.light-mode .settings-topo h2,
body.light-mode .viagens-topo h2,
body.light-mode .ano-header,
body.light-mode .mes-header,
body.light-mode .brand-fallback {
  color: #1d2a3c !important;
}

body.light-mode .route-menu-toggle,
body.light-mode .route-menu-list,
body.light-mode .route-option,
body.light-mode .btn-config,
body.light-mode .settings-close,
body.light-mode .mes-controle button,
body.light-mode .btn-hoje,
body.light-mode .btn-salvar-config,
body.light-mode .btn-editar-dia,
body.light-mode .btn-acao-viagem,
body.light-mode .btn-scroll-top {
  border-color: #9eb4cf !important;
}

body.light-mode .route-menu-toggle,
body.light-mode .route-menu-list,
body.light-mode .route-option,
body.light-mode .btn-config,
body.light-mode .settings-close {
  background: #e3edf9 !important;
  color: #1f2a3a !important;
}

body.light-mode .route-option.ativo {
  background: #cdddf1 !important;
  color: #1d3557 !important;
  border-color: #89a8ca !important;
}

body.light-mode .mes-controle button,
body.light-mode .btn-hoje,
body.light-mode .btn-salvar-config,
body.light-mode .btn-editar-dia,
body.light-mode .btn-acao-viagem,
body.light-mode .btn-scroll-top {
  background: linear-gradient(135deg, #44648e, #38577f) !important;
  color: #f8fbff !important;
}

body.light-mode .btn-acao-viagem.excluir,
body.light-mode .btn-logout-google {
  background: linear-gradient(135deg, #a35353, #8d4444) !important;
  color: #fff !important;
  border-color: #8d4444 !important;
}

body.light-mode .upload {
  background: linear-gradient(135deg, #2e8a65, #277953) !important;
  color: #fff !important;
  border-color: #277953 !important;
}

body.light-mode .upload::after {
  background: rgba(255, 255, 255, 0.24) !important;
  color: #f8fbff !important;
}

body.light-mode .btn-google {
  background: linear-gradient(180deg, #f9fcff, #e9f0f9) !important;
  border-color: #c5d4e8 !important;
  color: #1f2a3a !important;
}

body.light-mode .time-inputs input,
body.light-mode .time-inputs select,
body.light-mode .viagem-grid input,
body.light-mode .viagem-grid textarea,
body.light-mode .viagens-filtro input {
  background: #f4f8fd !important;
  color: #1f2a3a !important;
  border-color: #b8cbe1 !important;
}

body.light-mode .filtro-passados input,
body.light-mode .toggle-retroativa input,
body.light-mode .toggle-theme input {
  background: #d7e3f1 !important;
  border-color: #90a8c4 !important;
}

body.light-mode .filtro-passados input:checked,
body.light-mode .toggle-retroativa input:checked,
body.light-mode .toggle-theme input:checked {
  background: #4a688f !important;
  border-color: #3f5b7f !important;
  box-shadow: 0 0 0 3px rgba(74, 104, 143, 0.2) !important;
}

body.light-mode .day,
body.light-mode .empty-day {
  background: #f1f6fc !important;
  border-color: #c8d7e9 !important;
}

body.light-mode .day.folga {
  background: #e9eef6 !important;
}

body.light-mode .day.hoje,
body.light-mode .card.today,
body.light-mode .escala-hoje {
  background: linear-gradient(180deg, #d8e7f8, #c8dbf0) !important;
  border-color: #9cb5d2 !important;
}

body.light-mode .card-badge.trabalho {
  background: #d5e4f7 !important;
  color: #25496f !important;
  border: 1px solid #a9c2de !important;
}

body.light-mode .card-badge.folga {
  background: #e3e9f1 !important;
  color: #42566f !important;
}

body.light-mode .ano-header,
body.light-mode .mes-header {
  background: #e2ebf7 !important;
  border-color: #bfd0e5 !important;
}

body.light-mode .viagens-table {
  background: #eff5fc !important;
}

body.light-mode .viagens-table th {
  background: #d8e5f5 !important;
  color: #2d4665 !important;
  border-color: #b9cce3 !important;
}

body.light-mode .viagens-table td {
  color: #1f2a3a !important;
  border-color: #c5d4e7 !important;
}

body.light-mode .viagens-table tbody tr:nth-child(2n) {
  background: #e4edf8 !important;
}

body.light-mode .btn-observacao {
  background: #dfe8f3 !important;
  color: #4c627d !important;
  border-color: #adc1d8 !important;
}

body.light-mode .btn-observacao.ativo {
  background: linear-gradient(135deg, #2e8a65, #277953) !important;
  color: #fff !important;
  border-color: #277953 !important;
}

/* Ajustes finais de contraste/spacing no modo claro */
.btn-config svg {
  width: 18px;
  height: 18px;
  display: block;
}

.toggle-theme {
  margin-top: 10px;
}

.viagens-filtro {
  margin-top: 16px;
}

.viagens-table-wrap {
  margin-top: 16px;
}

body.light-mode .btn-config {
  box-shadow: 0 2px 8px rgba(30, 52, 84, 0.12) !important;
}

body.light-mode .btn-scroll-top {
  box-shadow: 0 4px 12px rgba(30, 52, 84, 0.16) !important;
}

body.light-mode .btn-config,
body.light-mode .settings-close,
body.light-mode .route-menu-toggle,
body.light-mode .route-option,
body.light-mode .route-menu-list,
body.light-mode .mes-header,
body.light-mode .ano-header,
body.light-mode .settings-row,
body.light-mode .card,
body.light-mode .card-linha,
body.light-mode .viagens-table,
body.light-mode .viagens-table th,
body.light-mode .viagens-table td,
body.light-mode .lista-vazia,
body.light-mode .viagens-shell,
body.light-mode #lista,
body.light-mode .calendar-shell,
body.light-mode .settings-dialog,
body.light-mode .app,
body.light-mode .header-inner {
  color: #1f2a3a !important;
}

body.light-mode .btn-hoje,
body.light-mode .mes-controle button,
body.light-mode .btn-salvar-config,
body.light-mode .btn-editar-dia,
body.light-mode .btn-acao-viagem,
body.light-mode .btn-logout-google,
body.light-mode .btn-scroll-top,
body.light-mode .upload {
  color: #f8fbff !important;
}

body.light-mode .brand-fallback,
body.light-mode .ano-header,
body.light-mode .mes-header,
body.light-mode .route-menu-toggle,
body.light-mode .route-option,
body.light-mode .settings-row strong,
body.light-mode .viagens-table th {
  color: #23364f !important;
}

body.light-mode .day-info,
body.light-mode .hero-subtitle,
body.light-mode .settings-desc,
body.light-mode .lista-subtitulo,
body.light-mode .time-inputs label,
body.light-mode .viagem-grid label,
body.light-mode .viagens-filtro label,
body.light-mode .toggle-retroativa {
  color: #566b85 !important;
}

body.light-mode .btn-config,
body.light-mode .settings-close {
  background: #d9e5f3 !important;
}

body.light-mode .btn-config svg {
  color: #2f4766 !important;
}

/* Correções pontuais finais (modo claro) */
.btn-config {
  display: grid;
  place-items: center;
  line-height: 0;
}

body.light-mode .btn-config {
  box-shadow: 0 2px 6px rgba(30, 52, 84, 0.1) !important;
}

body.light-mode .btn-hoje {
  box-shadow: 0 3px 8px rgba(30, 52, 84, 0.12) !important;
}

body.light-mode .time-inputs input,
body.light-mode .time-inputs select,
body.light-mode .viagem-grid input,
body.light-mode .viagem-grid textarea,
body.light-mode .viagens-filtro input,
body.light-mode #viagemObservacao,
body.light-mode #editViagemObservacao {
  background: #e7eef8 !important;
  color: #1f2a3a !important;
  border-color: #a9bfd8 !important;
}

body.light-mode .upload {
  box-shadow: 0 4px 10px rgba(46, 138, 101, 0.14) !important;
}

body.light-mode .upload-text,
body.light-mode .upload small,
body.light-mode .btn-copy,
body.light-mode .upload::after {
  color: #f8fbff !important;
}

body.light-mode .escala-hoje-titulo,
body.light-mode .escala-hoje-linha,
body.light-mode .escala-hoje-grid {
  color: #23364f !important;
}

body.light-mode .escala-hoje .card-badge.trabalho,
body.light-mode .escala-hoje .card-badge {
  background: #d5e4f7 !important;
  color: #25496f !important;
  border: 1px solid #a9c2de !important;
}

body.light-mode .filtro-passados,
body.light-mode .filtro-passados span,
body.light-mode .toggle-retroativa span {
  color: #3f5673 !important;
}

body.light-mode .ano-header {
  background: #e2ebf7 !important;
  border-color: #bfd0e5 !important;
}

body.light-mode .lista-badge {
  background: #cfdff1 !important;
  color: #2a4768 !important;
  border-color: #abc2db !important;
}

/* Ajustes finais solicitados */
body.light-mode .btn-google {
  background: linear-gradient(180deg, #f2f7fd, #e2ebf7) !important;
  border-color: #b8cbe1 !important;
  box-shadow: 0 6px 14px rgba(35, 54, 79, 0.08) !important;
}

body.light-mode .btn-google .btn-copy > span {
  color: #1e3553 !important;
}

body.light-mode .btn-google small {
  color: #415c7b !important;
}

body.light-mode .work-day {
  background: #dceee1 !important;
  border: 1px solid #bad8c3 !important;
  box-shadow: inset 0 -1px 0 rgba(39, 121, 83, 0.12) !important;
}

body.light-mode .off-day {
  background: #e4ebf6 !important;
  border: 1px solid #c6d4e7 !important;
  box-shadow: inset 0 -1px 0 rgba(71, 85, 105, 0.08) !important;
}

body.light-mode .none-day {
  background: #eef3fa !important;
  border: 1px solid #d5e0ee !important;
  box-shadow: none !important;
}

body.light-mode .day-num,
body.light-mode .day-info {
  color: #2b3f58 !important;
}

/* Correções de espaçamento/consistência solicitadas */
body.light-mode .day-info {
  background: transparent !important;
}

#viagensTabelaContainer .lista-vazia {
  margin-top: 16px;
}

.data-fallback-wrap {
  margin-top: 12px;
}

.data-fallback-table {
  min-width: 100%;
}

.data-fallback-table input[type="date"] {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.6);
  color: #e2e8f0;
  padding: 8px;
  font: inherit;
}

body.light-mode .data-fallback-table input[type="date"] {
  background: #fff;
  color: #0f172a;
  border-color: rgba(148, 163, 184, 0.45);
}
