/* === MINHAS VIAGENS === */

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}

main, .login-required {
  flex: 1;
}

/* ---- TELA DE LOGIN NECESSÃƒÂRIO ---- */
.login-required {
  padding: 180px 20px 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 70vh;
}

.login-required-card {
  text-align: center;
  background: var(--bg-card);
  padding: 60px 50px;
  border-radius: 16px;
  box-shadow: var(--shadow-light-card);
  max-width: 460px;
  width: 100%;
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.lock-icon-circle {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-bg));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  font-size: 2rem;
  color: var(--gold);
  box-shadow: 0 8px 25px rgba(25, 64, 37, 0.3);
}

.login-required-card h2 {
  font-size: 1.6rem;
  color: var(--primary-dark);
  margin-bottom: 12px;
  font-weight: 700;
}

[data-theme="dark"] .login-required-card h2 {
  color: var(--gold);
}

.login-required-card p {
  color: var(--text-gray);
  line-height: 1.6;
  margin-bottom: 30px;
}

.btn-login-redirect {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-bg));
  color: var(--pure-white);
  padding: 14px 40px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(25, 64, 37, 0.25);
}

.btn-login-redirect:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(25, 64, 37, 0.35);
}

.register-hint {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-gray);
}

.register-hint a {
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: underline;
}

[data-theme="dark"] .register-hint a {
  color: var(--gold);
}

/* ---- PERFIL HEADER ---- */
.perfil-header {
  background: var(--stripe-bg-custom);
  padding: 140px 0 35px;
  color: var(--pure-white);
  position: relative;
  overflow: hidden;
}

.perfil-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(220, 167, 78, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.perfil-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.perfil-info {
  display: flex;
  align-items: center;
  gap: 20px;
}

.perfil-avatar {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--primary-dark);
  box-shadow: 0 4px 15px rgba(220, 167, 78, 0.4);
  flex-shrink: 0;
}

.perfil-avatar img {
  width: 100%;
  height: 100%;
  max-width: 70px;
  max-height: 70px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.perfil-dados h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.perfil-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-nivel {
  background: var(--gold);
  color: var(--primary-dark);
}

.badge-membro {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.perfil-saldo {
  display: flex;
  align-items: center;
  gap: 20px;
}

.saldo-box {
  text-align: right;
}

.saldo-label {
  display: block;
  font-size: 0.75rem;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.saldo-valor {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--gold);
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: var(--pure-white);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--danger);
}

/* ---- STATS CARDS ---- */
.stats-section {
  margin-top: -25px;
  margin-bottom: 30px;
  position: relative;
  z-index: 10;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 15px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 20px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-light-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-light-card);
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.stat-card:nth-child(1) .stat-icon { background: rgba(25, 64, 37, 0.1); color: var(--primary-dark); }
.stat-card:nth-child(2) .stat-icon { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.stat-card:nth-child(3) .stat-icon { background: rgba(168, 85, 247, 0.1); color: #a855f7; }
.stat-card:nth-child(4) .stat-icon { background: rgba(74, 222, 128, 0.1); color: var(--success); }
.stat-card:nth-child(5) .stat-icon { background: rgba(220, 167, 78, 0.1); color: var(--gold); }
.stat-card:nth-child(6) .stat-icon { background: rgba(220, 167, 78, 0.15); color: var(--gold); }

[data-theme="dark"] .stat-card:nth-child(1) .stat-icon { color: var(--gold); background: rgba(220, 167, 78, 0.1); }

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-gray);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---- ABAS ---- */
.tabs-section {
  margin-bottom: 25px;
  display: flex;
  justify-content: center;
}

.tabs-bar {
  display: flex;
  gap: 6px;
  background: var(--bg-card);
  border-radius: 12px;
  padding: 6px;
  width: fit-content;
  margin: 0 auto;
  box-shadow: var(--shadow-light-card);
  border: 1px solid var(--border-color);
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-gray);
  cursor: pointer;
  transition: all 0.25s ease;
}

.tab-btn i {
  font-size: 1rem;
  opacity: 0.7;
}

.tab-btn.active {
  background: var(--bg-card);
  color: var(--primary-dark);
  box-shadow: var(--shadow-light-btn);
  border-color: var(--border-color);
}

[data-theme="dark"] .tab-btn.active {
  color: var(--gold);
}

.tab-btn.active i {
  color: var(--primary-dark);
  opacity: 1;
}

[data-theme="dark"] .tab-btn.active i {
  color: var(--gold);
}

.tab-btn:hover:not(.active) {
  background: var(--bg-card);
  color: var(--primary-dark);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

[data-theme="dark"] .tab-btn:hover:not(.active) {
  color: var(--gold);
}

@media (max-width: 768px) {
  .tabs-section {
    justify-content: flex-start;
    overflow: hidden;
  }

  .tabs-bar {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
  }

  .tabs-bar::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
  }

  .tab-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* ---- GRÃƒÂFICOS (ABA ESTATÃƒÂSTICAS) ---- */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 50px;
}

.chart-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 25px 30px;
  box-shadow: var(--shadow-light-card);
}

.chart-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chart-card h3 i {
  color: var(--primary-dark);
}

[data-theme="dark"] .chart-card h3 i {
  color: var(--gold);
}

/* Bar Chart */
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bar-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bar-label {
  width: 120px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-gray);
  text-align: right;
  flex-shrink: 0;
}

.bar-track {
  flex: 1;
  height: 28px;
  background: var(--border-color);
  border-radius: 6px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-dark), var(--success));
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--pure-white);
  white-space: nowrap;
  transition: width 1s ease;
}

/* Donut Chart */
.donut-chart-wrapper {
  display: flex;
  align-items: center;
  gap: 30px;
}

.donut-chart {
  position: relative;
  width: 160px;
  height: 160px;
  flex-shrink: 0;
}

.donut-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.donut-percent {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-dark);
}

.donut-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-gray);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-dark);
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ---- FILTROS ---- */
.filtros-bar {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filtro-search {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.filtro-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-gray);
  font-size: 0.85rem;
}

.filtro-search input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--bg-card);
  color: var(--text-dark);
  transition: all 0.3s ease;
}

.filtro-search input:focus {
  outline: none;
  border-color: var(--primary-dark);
  box-shadow: 0 0 0 3px rgba(25, 64, 37, 0.08);
}

.filtro-select select {
  padding: 12px 35px 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--bg-card);
  color: var(--text-dark);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23888'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: all 0.3s ease;
}

.filtro-select select:focus {
  outline: none;
  border-color: var(--primary-dark);
}

/* ---- TABELA DE VIAGENS (TEMA ESCURO) ---- */
.tabela-viagens-wrapper {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-light-card);
  margin-bottom: 50px;
}

.tabela-viagens {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  color: var(--text-dark);
  font-size: 0.85rem;
}

.tabela-viagens thead {
  background: var(--bg-light);
}

.tabela-viagens thead th {
  padding: 14px 16px;
  text-align: center;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-dark); /* Mudando para text-dark que ÃƒÂ© branco no modo dark */
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

.tabela-viagens tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background 0.2s ease;
}

.tabela-viagens tbody tr:hover {
  background: var(--bg-light);
}

.tabela-viagens tbody td {
  padding: 14px 16px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.tabela-viagens .col-icon {
  width: 70px;
  text-align: center;
}

.tabela-viagens .col-icon img,
.tabela-viagens .col-icon i {
  color: var(--gold);
  font-size: 1.2rem;
}

.tabela-viagens .col-dia {
  font-weight: 700;
  color: var(--success);
  text-align: center;
}

.tabela-viagens .col-de,
.tabela-viagens .col-para {
  font-weight: 500;
}

.tabela-viagens .col-para {
  font-weight: 700;
  color: var(--text-dark);
}

/* BotÃƒÂ£o de classificaÃƒÂ§ÃƒÂ£o na tabela (clicÃƒÂ¡vel) */
.btn-classificacao-viagem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 14px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.btn-viagem-excelente {
  background: rgba(74, 222, 128, 0.15);
  color: var(--success);
  border-color: rgba(74, 222, 128, 0.3);
}

.btn-viagem-excelente:hover {
  background: rgba(74, 222, 128, 0.3);
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.3);
}

.btn-viagem-excelente { background: #f59e0b; color: #000; border-color: #d97706; }
.btn-viagem-excelente:hover { background: #d97706; transform: scale(1.05); box-shadow: 0 0 12px rgba(245, 158, 11, 0.4); }

.btn-viagem-bom { background: #3b82f6; color: #000; border-color: #2563eb; }
.btn-viagem-bom:hover { background: #2563eb; transform: scale(1.05); box-shadow: 0 0 12px rgba(59, 130, 246, 0.4); }

.btn-viagem-satisfatorio { background: #84cc16; color: #000; border-color: #65a30d; }
.btn-viagem-satisfatorio:hover { background: #65a30d; transform: scale(1.05); box-shadow: 0 0 12px rgba(132, 204, 22, 0.4); }

.btn-viagem-aceitavel { background: #94a3b8; color: #000; border-color: #64748b; }
.btn-viagem-aceitavel:hover { background: #64748b; transform: scale(1.05); box-shadow: 0 0 12px rgba(100, 116, 139, 0.4); }

.btn-viagem-atrasado { background: #ef4444; color: #000; border-color: #dc2626; }
.btn-viagem-atrasado:hover { background: #dc2626; transform: scale(1.05); box-shadow: 0 0 12px rgba(220, 38, 38, 0.4); }

.btn-viagem-danos { background: #f97316; color: #000; border-color: #ea580c; }
.btn-viagem-danos:hover { background: #ea580c; transform: scale(1.05); box-shadow: 0 0 12px rgba(234, 88, 12, 0.4); }

.btn-viagem-falha { background: #cbd5e1; color: #000; border-color: #94a3b8; }
.btn-viagem-falha:hover { background: #94a3b8; transform: scale(1.05); box-shadow: 0 0 12px rgba(51, 65, 85, 0.4); }

/* Theme-specific Overrides for Dark Mode */
[data-theme="dark"] .btn-viagem-excelente { background: #b87a2a; color: #fff; border-color: #b87a2a; }
[data-theme="dark"] .btn-viagem-excelente:hover { background: #f59e0b; }

[data-theme="dark"] .btn-viagem-bom { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }
[data-theme="dark"] .btn-viagem-bom:hover { background: #3b82f6; }

[data-theme="dark"] .btn-viagem-satisfatorio { background: #4d7c0f; color: #fff; border-color: #4d7c0f; }
[data-theme="dark"] .btn-viagem-satisfatorio:hover { background: #84cc16; }

[data-theme="dark"] .btn-viagem-aceitavel { background: #475569; color: #fff; border-color: #475569; }
[data-theme="dark"] .btn-viagem-aceitavel:hover { background: #64748b; }

[data-theme="dark"] .btn-viagem-atrasado { background: #991b1b; color: #fff; border-color: #991b1b; }
[data-theme="dark"] .btn-viagem-atrasado:hover { background: #ef4444; }

[data-theme="dark"] .btn-viagem-danos { background: #9a3412; color: #fff; border-color: #9a3412; }
[data-theme="dark"] .btn-viagem-danos:hover { background: #f97316; }

[data-theme="dark"] .btn-viagem-falha { background: #334155; color: #fff; border-color: #334155; }
[data-theme="dark"] .btn-viagem-falha:hover { background: #475569; }

.tabela-viagens .col-renda {
  font-weight: 700;
  color: var(--success);
}

.tabela-viagens .col-exp {
  font-weight: 600;
  color: var(--gold);
}

/* ---- MODAL VIAGEM CONCLUÃƒÂDA (Estilo ETS2) ---- */
.mv-overlay {
  display: none;
  position: fixed;
  z-index: 3000;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.mv-overlay.active {
  display: flex;
}

.mv-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 35px 40px;
  max-width: 560px;
  width: 100%;
  box-shadow: var(--shadow-light-card);
  animation: modalIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.mv-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-gray);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mv-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--danger);
}

.mv-header {
  margin-bottom: 16px;
}

.mv-titulo {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text-gray);
  text-transform: uppercase;
}

.mv-stars {
  font-size: 1.4rem;
  color: var(--gold);
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 6px;
  filter: drop-shadow(0 0 8px rgba(220, 167, 78, 0.5));
}

.mv-classificacao-badge {
  display: inline-block;
  padding: 8px 30px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.mv-excelente {
  background: linear-gradient(135deg, #b87a2a, var(--gold));
  color: var(--pure-white);
  box-shadow: 0 4px 20px rgba(220, 167, 78, 0.4);
}

.mv-bom {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  color: var(--pure-white);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

.mv-satisfatorio {
  background: linear-gradient(135deg, #4d7c0f, #84cc16);
  color: var(--pure-white);
  box-shadow: 0 4px 20px rgba(132, 204, 22, 0.4);
}

.mv-aceitavel {
  background: linear-gradient(135deg, #334155, #64748b);
  color: var(--pure-white);
  box-shadow: 0 4px 20px rgba(100, 116, 139, 0.4);
}

.mv-atrasado {
  background: linear-gradient(135deg, #991b1b, #ef4444);
  color: var(--pure-white);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

.mv-danos {
  background: linear-gradient(135deg, #9a3412, #f97316);
  color: var(--pure-white);
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.4);
}

.mv-falha {
  background: linear-gradient(135deg, #0f172a, #334155);
  color: var(--pure-white);
  box-shadow: 0 4px 20px rgba(51, 65, 85, 0.4);
}

.mv-desc {
  color: var(--text-gray);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 20px;
  font-style: italic;
}

/* Tabela de info rÃƒÂ¡pida */
.mv-info-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 0.88rem;
}

.mv-info-table tr {
  border-bottom: 1px solid var(--border-color);
}

.mv-info-table tr:first-child {
  border-top: 1px solid var(--border-color);
}

.mv-info-table td {
  padding: 11px 14px;
  text-align: left;
  color: var(--text-gray);
}

.mv-info-table td:first-child {
  font-weight: 500;
}

.mv-val-highlight {
  text-align: right !important;
  font-weight: 700 !important;
  color: var(--gold) !important;
}

/* Tabela de recompensas */
.mv-rewards-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 4px;
}

.mv-rewards-table thead tr {
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-color);
}

.mv-rewards-table thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.78rem;
  color: var(--text-gray);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mv-rewards-table thead th:not(:first-child) {
  text-align: right;
}

.mv-rewards-table tbody tr {
  border-bottom: 1px solid var(--border-color);
}

.mv-rewards-table tbody td {
  padding: 11px 14px;
  color: var(--text-gray);
}

.mv-rewards-table tbody td:not(:first-child) {
  text-align: right;
}

.mv-val-green {
  color: var(--success) !important;
  font-weight: 700;
}

.mv-rewards-table tfoot tr {
  border-top: 2px solid var(--border-color);
  background: var(--bg-card);
}

.mv-rewards-table tfoot td {
  padding: 13px 14px;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.95rem;
}

.mv-rewards-table tfoot td:not(:first-child) {
  text-align: right;
}

.mv-val-total-green {
  color: var(--success) !important;
  font-size: 0.95rem;
}


.modal-perfil {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-perfil.active {
  display: flex;
}

.modal-perfil-content {
  background: var(--bg-card);
  width: 100%;
  max-width: 480px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-light-card);
  animation: modalIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-perfil-header {
  background: var(--primary-dark);
  padding: 20px 25px;
  color: var(--pure-white);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-perfil-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-close-modal {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s;
}

.btn-close-modal:hover {
  color: var(--pure-white);
}

.modal-perfil-body {
  padding: 30px 25px;
}

.edit-avatar-preview {
  text-align: center;
  margin-bottom: 25px;
}

.avatar-preview-box {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--bg-light);
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--primary-dark);
  border: 4px solid var(--border-color);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  overflow: hidden;
}

.avatar-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.edit-avatar-preview p {
  font-size: 0.8rem;
  color: var(--text-gray);
  font-weight: 500;
}

.form-group-perfil {
  margin-bottom: 20px;
}

.form-group-perfil label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.form-group-perfil input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--bg-card);
  color: var(--text-dark);
}

.form-group-perfil input:focus {
  outline: none;
  border-color: var(--primary-dark);
  box-shadow: 0 0 0 3px rgba(25, 64, 37, 0.08);
}

.avatar-gallery {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.avatar-gallery::-webkit-scrollbar {
  height: 6px;
}

.avatar-gallery::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.avatar-option {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.avatar-option:hover {
  transform: scale(1.1);
  border-color: var(--primary-dark);
}

.avatar-option.selected {
  border-color: var(--success);
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.4);
}

.file-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-upload-file {
  display: inline-block;
  padding: 12px 20px;
  background: var(--bg-light);
  color: var(--primary-dark);
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  transition: all 0.3s;
}

.btn-upload-file:hover {
  background: var(--bg-light);
  border-color: var(--primary-dark);
}

.file-name-display {
  font-size: 0.8rem;
  color: var(--text-gray);
  font-style: italic;
}

.form-group-perfil small {
  display: block;
  margin-top: 5px;
  font-size: 0.75rem;
  color: var(--text-gray);
  line-height: 1.4;
}

.modal-perfil-footer {
  padding: 0 25px 30px;
  display: flex;
  gap: 12px;
}

.btn-cancel-perfil, .btn-save-perfil {
  flex: 1;
  padding: 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.btn-cancel-perfil {
  background: var(--bg-light);
  color: var(--text-gray);
}

/* Ajuste removido por duplicidade */

/* ---- CUSTOM ALERT MODAL ---- */
.custom-alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.custom-alert-overlay.active {
  display: flex;
}

.custom-alert-card {
  background: var(--bg-card);
  border: 1px solid rgba(220, 167, 78, 0.2);
  width: 100%;
  max-width: 400px;
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: 0 25px 50px rgba(0,0,0,0.5);
  animation: alertPop 0.3s cubic-bezier(0.17, 0.89, 0.32, 1.49);
}

@keyframes alertPop {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.custom-alert-icon {
  width: 70px;
  height: 70px;
  background: rgba(220, 167, 78, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
  color: var(--gold);
}

.custom-alert-card h3 {
  color: var(--text-dark);
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.custom-alert-card p {
  color: var(--text-gray);
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 30px;
}

.custom-alert-footer {
  display: flex;
  gap: 15px;
}

.btn-alert-cancel, .btn-alert-confirm {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}

.btn-alert-cancel {
  background: var(--bg-light);
  color: var(--text-dark);
  border: 1px solid var(--border-color);
}

.btn-alert-cancel:hover {
  background: var(--border-color);
}

.btn-alert-confirm {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-bg));
  color: var(--pure-white);
  box-shadow: 0 4px 15px rgba(25, 64, 37, 0.3);
}

.btn-alert-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(25, 64, 37, 0.4);
}

/* Loading State */
.custom-alert-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.spinner-custom {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(220, 167, 78, 0.1);
  border-left-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.custom-alert-loading p {
  margin-bottom: 0;
  color: var(--gold);
  font-weight: 600;
}

.btn-cancel-perfil:hover {
  background: var(--border-color);
  color: var(--text-dark);
}

.btn-save-perfil {
  background: var(--primary-dark);
  color: var(--pure-white);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-save-perfil:hover {
  background: var(--primary-bg);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(25, 64, 37, 0.3);
}

/* ---- RESPONSIVIDADE ---- */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

  .perfil-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .perfil-saldo {
    width: 100%;
    justify-content: space-between;
  }

  .saldo-box {
    text-align: left;
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tabs-bar {
    width: 100%;
  }

  .tab-btn {
    flex: 1;
    justify-content: center;
    padding: 12px 16px;
    font-size: 0.82rem;
  }

  .tabela-viagens-wrapper {
    overflow-x: auto;
  }

  .donut-chart-wrapper {
    flex-direction: column;
    align-items: flex-start;
  }

  .login-required-card {
    padding: 40px 30px;
  }

  .perfil-header {
    padding: 120px 0 25px;
  }
}

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

  .filtros-bar {
    flex-direction: column;
  }

  .perfil-info {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---- DOWNLOADS GRID ---- */
.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  padding: 20px 0 50px;
}

.download-card {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-light-card);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.download-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(25, 64, 37, 0.2);
}

.download-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.download-card-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.download-card-content h3 {
  font-size: 1.1rem;
  color: var(--primary-dark);
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.btn-download-mod {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--success), var(--primary-dark));
  color: var(--pure-white);
  padding: 12px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.btn-download-mod:hover {
  background: linear-gradient(135deg, var(--gold), #b68b3e);
  color: var(--primary-dark);
}

/* ---- CNH VIRTUAL PREMIUM (REDESIGN) ---- */
.cnh-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0;
  perspective: 1000px;
}

.cnh-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  justify-content: center;
  width: 100%;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.cnh-card {
  width: 500px;
  height: 310px;
  background: var(--bg-light);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(25, 64, 37, 0.1);
  display: flex;
  flex-direction: column;
}

/* Fundo com Ondas Corporativas */
.cnh-bg-waves {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.15;
  background: 
    radial-gradient(circle at 100% 100%, var(--gold) 0%, transparent 50%),
    linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-bg) 100%);
  
}

.cnh-card.back .cnh-bg-waves {
  transform: scaleX(-1);
}

.cnh-header, .cnh-body, .cnh-footer-bar, .cnh-back-content {
  position: relative;
  z-index: 2;
}

/* CabeÃƒÂ§alho */
.cnh-header {
  padding: 15px 20px;
  background: linear-gradient(90deg, rgba(25, 64, 37, 0.9), rgba(46, 102, 69, 0.8));
  color: var(--pure-white);
  border-bottom: 3px solid var(--gold);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cnh-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cnh-logo i {
  font-size: 1.8rem;
  color: var(--gold);
}

.cnh-logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  flex: 1;
}

.vbe-main {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.vbe-sub {
  font-size: 0.6rem;
  font-weight: 500;
  opacity: 0.8;
  letter-spacing: 0.5px;
}

/* Corpo da CNH */
.cnh-body {
  flex: 1;
  display: flex;
  padding: 15px 20px;
  gap: 20px;
}

/* Coluna da Foto */
.cnh-photo-column {
  width: 130px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cnh-photo {
  width: 130px;
  height: 173px; /* ProporÃƒÂ§ÃƒÂ£o 3x4 */
  background: var(--bg-light);
  border: 3px solid var(--pure-white);
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cnh-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cnh-photo i {
  font-size: 3rem;
  color: var(--text-gray);
}

.cnh-category-box {
  background: var(--primary-dark);
  color: var(--gold);
  padding: 5px;
  border-radius: 6px;
  text-align: center;
}

.cnh-category-box label {
  display: block;
  font-size: 0.55rem;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
}

.cnh-category-box span {
  font-weight: 800;
  font-size: 1rem;
}

/* Coluna de InformaÃƒÂ§ÃƒÂµes */
.cnh-info-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cnh-field label {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--primary-dark);
  opacity: 0.7;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.cnh-field span {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-dark);
  border-bottom: 1.5px solid var(--gold);
  padding-bottom: 2px;
}

.cnh-row {
  display: flex;
  gap: 15px;
}

.cnh-row .cnh-field {
  flex: 1;
}

/* Assinatura */
.cnh-signature-box {
  margin-top: auto;
  padding-top: 5px;
  border-top: 1px dashed rgba(25, 64, 37, 0.2);
}

.cnh-signature {
  font-family: 'Dancing Script', cursive;
  font-size: 1.4rem;
  color: var(--primary-dark);
  padding: 5px 0;
}

/* RodapÃƒÂ© das Cartas */
.cnh-footer-bar {
  background: var(--gold);
  color: var(--primary-dark);
  text-align: center;
  padding: 4px 0;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* VERSO */
.cnh-back-content {
  flex: 1;
  display: flex;
  padding: 25px;
  gap: 25px;
}

.cnh-back-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cnh-obs {
  font-size: 0.65rem;
  line-height: 1.4;
  color: var(--text-gray);
  background: rgba(255, 255, 255, 0.6);
  padding: 10px;
  border-radius: 6px;
  border: 1px solid rgba(25, 64, 37, 0.1);
}

.cnh-security-info {
  margin-top: auto;
}

.cnh-barcode-area {
  margin-top: 10px;
}

.cnh-barcode-sim {
  height: 35px;
  background: repeating-linear-gradient(90deg, #333 0, #333 2px, transparent 2px, transparent 4px);
  margin-bottom: 4px;
}

.barcode-num {
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
  color: var(--text-gray);
}

.cnh-back-right {
  width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.cnh-qr-code-box {
  background: var(--bg-card);
  padding: 8px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  text-align: center;
}

.qr-sim {
  font-size: 4.5rem;
  color: var(--primary-dark);
}

.qr-label {
  display: block;
  font-size: 0.5rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-top: 5px;
}

.cnh-seal {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--gold);
  opacity: 0.6;
}

.cnh-seal i {
  font-size: 2rem;
}

.cnh-seal span {
  font-size: 0.5rem;
  font-weight: 800;
}

/* AÃƒâ€¡Ãƒâ€¢ES */
.cnh-actions {
  margin-top: 30px;
  text-align: center;
  animation: fadeInUp 1s ease both;
}

.btn-print-cnh {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-bg));
  color: var(--pure-white);
  border: none;
  padding: 12px 30px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s;
  box-shadow: 0 5px 15px rgba(25, 64, 37, 0.3);
}

.btn-print-cnh:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(25, 64, 37, 0.4);
}

.cnh-actions p {
  margin-top: 15px;
  color: var(--text-gray);
  font-size: 0.85rem;
}

/* IMPRESSÃO */
@media print {
  .header, .perfil-header, .stats-section, .tabs-section, .filtros-bar, .tabela-viagens-wrapper, .site-footer, .cnh-actions, .perfil-saldo, .perfil-dados, .perfil-avatar, .btn-logout, .login-required {
    display: none !important;
  }
  
  body, main {
    background: white !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .viagens-main {
      padding: 0 !important;
  }

  .cnh-container {
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
  }

  .cnh-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 40px !important;
    align-items: center !important;
  }

  .cnh-card, 
  .cnh-bg-waves, 
  .cnh-footer-bar, 
  .cnh-category-box,
  .cnh-header,
  .cnh-logo i,
  .cnh-signature,
  .qr-sim i,
  .badge-card,
  .badge-strap,
  .badge-clip,
  .badge-clip::after,
  .badge-photo-wrapper,
  .badge-content,
  .badge-watermark {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .badge-lanyard {
    display: none !important;
  }
}

/* MOBILE */
@media (max-width: 1100px) {
  .cnh-wrapper {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 600px) {
  .cnh-card {
    width: 95vw;
    height: auto;
    min-height: 310px;
  }
  .cnh-body {
      flex-direction: column;
      align-items: center;
  }
  .cnh-photo-column {
      width: 100%;
      align-items: center;
  }
  .cnh-info-column {
      width: 100%;
  }
}

/* Estilos Adicionais CNH */
.cnh-header-img-logo {
  height: 35px;
  width: auto;
}
.cnh-header-bus-icon {
  font-size: 1.8rem;
  color: var(--gold);
}
/* Marca d'água CNH */
.cnh-watermark {
  position: absolute;
  bottom: 25px;
  right: 20px;
  opacity: 0.15;
  pointer-events: none;
  z-index: 1;
}
.cnh-watermark img {
  height: 120px;
  width: auto;
}
.cnh-wm-light { display: none; }
.cnh-wm-dark { display: block; }
html[data-theme='light'] .cnh-wm-light { display: block; }
html[data-theme='light'] .cnh-wm-dark { display: none; }

/* ---- CRACHÁ VIRTUAL ---- */
.badge-card {
  width: 400px;
  height: 250px;
  background: linear-gradient(135deg, #1b3d26 0%, #112618 100%);
  border-radius: 12px;
  position: relative;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  margin-top: 50px;
}

.badge-card::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 6px;
  background: var(--primary-bg, #1a1a1a);
  border-radius: 10px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.8);
  z-index: 10;
}

.badge-lanyard {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.badge-strap {
  width: 40px;
  height: 50px;
  background: repeating-linear-gradient(to right, #0d5427, #0d5427 4px, #083c1b 4px, #083c1b 8px);
  border-radius: 4px 4px 0 0;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.badge-clip {
  width: 50px;
  height: 35px;
  background: linear-gradient(to bottom, #dcdcdc, #8f8f8f);
  border-radius: 6px;
  box-shadow: 0 5px 10px rgba(0,0,0,0.3), inset 0 2px 2px rgba(255,255,255,0.8);
  position: relative;
  margin-top: -10px;
  display: flex;
  justify-content: center;
}

.badge-clip::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 15px;
  height: 4px;
  background: #333;
  border-radius: 10px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.8);
}


.badge-content {
  position: relative;
  z-index: 2;
  padding: 15px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.badge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.badge-logo {
  height: 25px;
}

.badge-title {
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  flex: 1;
  text-align: center;
  letter-spacing: 0.5px;
}

.badge-icon {
  color: var(--gold);
  font-size: 1.2rem;
}

.badge-divider {
  height: 3px;
  background: var(--gold);
  width: 100%;
  margin-bottom: 15px;
}

.badge-body {
  display: flex;
  gap: 20px;
  flex: 1;
  align-items: center;
}

.badge-photo-wrapper {
  width: 100px;
  height: 130px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  background: #333;
}

.badge-photo {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2a2a2a;
}

.badge-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge-photo i {
  font-size: 3rem;
  color: #666;
}

.badge-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.badge-name {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 5px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 5px;
}

.badge-role {
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 25px;
}
.cnh-header-bus-icon {
  font-size: 1.8rem;
  color: var(--gold);
}
/* Marca d'água CNH */
.cnh-watermark {
  position: absolute;
  bottom: 25px;
  right: 20px;
  opacity: 0.15;
  pointer-events: none;
  z-index: 1;
}
.cnh-watermark img {
  height: 120px;
  width: auto;
}
.cnh-wm-light { display: none; }
.cnh-wm-dark { display: block; }
html[data-theme='light'] .cnh-wm-light { display: block; }
html[data-theme='light'] .cnh-wm-dark { display: none; }

/* ---- CRACHÁ VIRTUAL ---- */
.badge-card {
  width: 400px;
  height: 250px;
  background: linear-gradient(135deg, #1b3d26 0%, #112618 100%);
  border-radius: 12px;
  position: relative;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  margin-top: 50px;
}

.badge-card::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 6px;
  background: var(--primary-bg, #1a1a1a);
  border-radius: 10px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.8);
  z-index: 10;
}

.badge-lanyard {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.badge-strap {
  width: 40px;
  height: 50px;
  background: repeating-linear-gradient(to right, #0d5427, #0d5427 4px, #083c1b 4px, #083c1b 8px);
  border-radius: 4px 4px 0 0;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.badge-clip {
  width: 50px;
  height: 35px;
  background: linear-gradient(to bottom, #dcdcdc, #8f8f8f);
  border-radius: 6px;
  box-shadow: 0 5px 10px rgba(0,0,0,0.3), inset 0 2px 2px rgba(255,255,255,0.8);
  position: relative;
  margin-top: -10px;
  display: flex;
  justify-content: center;
}

.badge-clip::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 15px;
  height: 4px;
  background: #333;
  border-radius: 10px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.8);
}


.badge-content {
  position: relative;
  z-index: 2;
  padding: 15px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.badge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.badge-logo {
  height: 25px;
}

.badge-title {
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  flex: 1;
  text-align: center;
  letter-spacing: 0.5px;
}

.badge-icon {
  color: var(--gold);
  font-size: 1.2rem;
}

.badge-divider {
  height: 3px;
  background: var(--gold);
  width: 100%;
  margin-bottom: 15px;
}

.badge-body {
  display: flex;
  gap: 20px;
  flex: 1;
  align-items: center;
}

.badge-photo-wrapper {
  width: 100px;
  height: 130px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  background: #333;
}

.badge-photo {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2a2a2a;
}

.badge-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge-photo i {
  font-size: 3rem;
  color: #666;
}

.badge-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.badge-name {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 5px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 5px;
}

.badge-role {
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 25px;
}

.badge-id {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  font-family: monospace;
}

.badge-watermark {
  position: absolute;
  bottom: -20px;
  right: -20px;
  height: 150px;
  opacity: 0.05;
  pointer-events: none;
}

.badge-watermark.wm-light { display: none; }
.badge-watermark.wm-dark { display: block; }

/* ---- BOTÃO CARREGAR SKIN 3D ---- */
.btn-skin-upload {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(25, 64, 37, 0.8), rgba(15, 38, 22, 0.8));
  color: var(--gold, #d4af37);
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
  position: relative;
}

.btn-skin-upload i {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.btn-skin-upload:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-bg));
  border-color: var(--gold, #d4af37);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.2);
  transform: translateY(-2px);
  color: #fff;
}

.btn-skin-upload:hover i {
  transform: translateY(-3px);
}

.btn-skin-upload:active {
  transform: translateY(1px);
}

.skin-upload-wrapper {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  background: rgba(0, 0, 0, 0.2);
  padding: 15px 20px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  margin-bottom: 25px;
  transition: border-color 0.3s ease;
}

.skin-upload-wrapper:hover {
  border-color: rgba(212, 175, 55, 0.4);
}

.skin-file-name {
  color: var(--text-gray, #aaa);
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.skin-file-name i {
  color: #64748b;
}

/* ---- PAINEL LATERAL DE VEÍCULOS NO VISUALIZADOR 3D ---- */
.painel-lateral-veiculos {
  position: absolute;
  top: 16px;
  right: 16px;
  bottom: 80px;
  width: 230px;
  max-width: calc(100% - 32px);
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: rgba(18, 18, 18, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  padding: 12px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  overflow: hidden;
  pointer-events: auto;
}

.painel-lateral-veiculos.recolhido {
  transform: translateX(calc(100% + 24px));
  opacity: 0;
  pointer-events: none;
}

/* Botão flutuante para reabrir quando recolhido */
#btnReabrirPainelVeiculos {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 49;
  background: rgba(18, 18, 18, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #39b8fd;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  transition: all 0.2s ease;
}
#btnReabrirPainelVeiculos:hover {
  background: #252525;
  color: #fff;
  transform: scale(1.06);
}

.painel-lateral-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.painel-lateral-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #efefef;
  text-transform: uppercase;
}

.btn-toggle-painel {
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 13px;
  transition: color 0.2s, background-color 0.2s;
}
.btn-toggle-painel:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
}

.container-veiculos-lateral {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  padding-right: 2px;
}

/* Custom Scrollbar moderna para a lista */
.container-veiculos-lateral::-webkit-scrollbar {
  width: 5px;
}
.container-veiculos-lateral::-webkit-scrollbar-track {
  background: transparent;
}
.container-veiculos-lateral::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}
.container-veiculos-lateral::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Card individual do veículo na coluna vertical */
.btn-veiculo-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background-color: rgba(30, 30, 30, 0.85);
  color: #e0e0e0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.btn-veiculo-card:hover {
  background-color: rgba(50, 50, 50, 0.95);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateX(-2px);
}

.btn-veiculo-card.ativo,
.btn-veiculo-card[style*="var(--primary-bg"],
.btn-veiculo-card[style*="#4caf50"],
.btn-veiculo-card[style*="#39b8fd"] {
  background-color: #39b8fd !important;
  color: #000000 !important;
  border-color: #39b8fd !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(57, 184, 253, 0.45) !important;
}

/* Botão Tutorial no App Card (Card escuro) */
.btn-app-tutorial {
  background: #444 !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}
.btn-app-tutorial:hover {
  background: #555 !important;
  color: #fff !important;
}

