:root {
  --cor-fundo: #0a0a0a;
  --cor-fundo-card: #141414;
  --cor-fundo-card-hover: #1a1a1a;
  --cor-dourado: #d4af37;
  --cor-dourado-claro: #f4d03f;
  --cor-dourado-escuro: #b8860b;
  --cor-branco: #ffffff;
  --cor-cinza-claro: #e0e0e0;
  --cor-cinza: #888888;
  --cor-borda: rgba(212, 175, 55, 0.2);
  --cor-azul-status: #60a5fa;
  --gradiente-dourado: linear-gradient(135deg, #d4af37 0%, #f4d03f 50%, #d4af37 100%);
  --gradiente-fundo: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 100%);
  --sombra-dourada: 0 0 30px rgba(212, 175, 55, 0.15);
  --sombra-card: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Mantém Bootstrap, mas aplica o "skin" do valet */
.sv-ui {
  background: var(--gradiente-fundo);
  color: var(--cor-cinza-claro);
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

.sv-ui .container,
.sv-ui .container-fluid {
  position: relative;
  z-index: 1;
}

/* Partículas animadas no fundo */
.bg-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.bg-particles::before,
.bg-particles::after {
  content: '';
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.12) 0%, transparent 70%);
  animation: svFloat 15s infinite ease-in-out;
}

.bg-particles::before {
  top: -210px;
  right: -210px;
}

.bg-particles::after {
  bottom: -210px;
  left: -210px;
  animation-delay: -7s;
}

@keyframes svFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-50px, 50px) scale(1.1);
  }
}

/* Navbar */
.sv-navbar {
  background: rgba(20, 20, 20, 0.82) !important;
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--cor-borda) !important;
  position: sticky;
  top: 0;
  z-index: 100;
  animation: svSlideDown 0.8s ease-out;
}

@keyframes svSlideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.sv-navbar .navbar-brand {
  font-weight: 800;
  font-size: 1.35rem;
  background: var(--gradiente-dourado);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  text-shadow: 0 0 30px rgba(212, 175, 55, 0.25);
}

.sv-navbar #userName {
  color: var(--cor-dourado);
}

/* Cards */
.sv-ui .card {
  background: var(--cor-fundo-card) !important;
  border-radius: 18px !important;
  border: 1px solid var(--cor-borda) !important;
  box-shadow: var(--sombra-card);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  color: #e0e0e0;
}

.sv-ui .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradiente-dourado);
  transform: scaleX(0);
  transition: transform 0.35s ease;
}

.sv-ui .card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.42) !important;
  box-shadow: var(--sombra-dourada), var(--sombra-card);
}

.sv-ui .card:hover::before {
  transform: scaleX(1);
}

.sv-ui h5,
.sv-ui h4,
.sv-ui h1 {
  color: var(--cor-branco);
  font-weight: 650;
}

/* Inputs */
.sv-ui .form-label {
  color: var(--cor-cinza);
  font-weight: 500;
}

.sv-ui .form-control,
.sv-ui .form-select {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  color: var(--cor-branco) !important;
}

.sv-ui .form-control::placeholder {
  color: var(--cor-cinza) !important;
}

.sv-ui .form-control:focus,
.sv-ui .form-select:focus {
  border-color: var(--cor-dourado) !important;
  box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.15) !important;
}

.sv-ui .text-muted {
  color: rgba(224, 224, 224, 0.62) !important;
}

/* Botões */
.sv-ui .btn-primary {
  background: var(--gradiente-dourado) !important;
  border: none !important;
  color: var(--cor-fundo) !important;
  font-weight: 650;
  border-radius: 12px !important;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.sv-ui .btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  left: -120%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.sv-ui .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.35);
}

.sv-ui .btn-primary:hover::before {
  left: 120%;
}

.sv-ui .btn-outline-secondary,
.sv-ui .btn-outline-primary {
  border-radius: 10px !important;
  border-color: var(--cor-dourado) !important;
  color: var(--cor-dourado) !important;
  background: transparent !important;
  transition: all 0.25s ease;
}

.sv-ui .btn-outline-secondary:hover,
.sv-ui .btn-outline-primary:hover {
  background: var(--cor-dourado) !important;
  color: var(--cor-fundo) !important;
  box-shadow: var(--sombra-dourada);
  transform: translateY(-1px);
}

/* Tabela (Bootstrap) */
.sv-ui .table-responsive {
  border-radius: 16px;
  border: 1px solid var(--cor-borda);
  overflow: hidden;
}

.sv-ui table.table {
  margin: 0;
  color: var(--cor-cinza-claro);
}

.sv-ui table.table thead {
  background: rgba(212, 175, 55, 0.1);
}

.sv-ui table.table thead th {
  color: var(--cor-dourado);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--cor-borda) !important;
}

.sv-ui table.table tbody tr {
  background: var(--cor-fundo-card);
  transition: all 0.25s ease;
}

.sv-ui table.table tbody tr:hover {
  background: var(--cor-fundo-card-hover);
  transform: scale(1.005);
}

.sv-ui table.table td,
.sv-ui table.table th {
  border-color: rgba(255, 255, 255, 0.06) !important;
  vertical-align: middle;
}

/* Modal */
.sv-ui .modal-content {
  background: var(--cor-fundo-card) !important;
  color: var(--cor-cinza-claro) !important;
  border: 1px solid var(--cor-borda) !important;
  border-radius: 18px !important;
}

.sv-ui .modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.sv-ui .btn-close {
  filter: invert(1) grayscale(1);
  opacity: 0.75;
}

/* Scrollbar personalizada */
.sv-ui ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.sv-ui ::-webkit-scrollbar-track {
  background: var(--cor-fundo);
}

.sv-ui ::-webkit-scrollbar-thumb {
  background: var(--cor-dourado);
  border-radius: 4px;
}

.sv-ui ::-webkit-scrollbar-thumb:hover {
  background: var(--cor-dourado-claro);
}

/* Preferência do usuário */
@media (prefers-reduced-motion: reduce) {
  .bg-particles::before,
  .bg-particles::after,
  .sv-navbar,
  .sv-ui .card,
  .sv-ui .btn-primary {
    animation: none !important;
    transition: none !important;
  }
}

/* ===== Valet table template (Garagem & Afazeres) ===== */
.tabela-container {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--cor-borda);
}

.tabela-moderna {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
}

.tabela-moderna thead {
  background: rgba(212, 175, 55, 0.1);
}

.tabela-moderna th {
  padding: 18px 20px;
  text-align: left;
  font-weight: 600;
  color: var(--cor-dourado);
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--cor-borda);
}

.tabela-moderna td {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.tabela-moderna tbody tr {
  background: var(--cor-fundo-card);
  transition: all 0.3s ease;
  animation: fadeIn 0.5s ease-out both;
}

.tabela-moderna tbody tr:nth-child(1) {
  animation-delay: 0.1s;
}

.tabela-moderna tbody tr:nth-child(2) {
  animation-delay: 0.15s;
}

.tabela-moderna tbody tr:nth-child(3) {
  animation-delay: 0.2s;
}

.tabela-moderna tbody tr:nth-child(4) {
  animation-delay: 0.25s;
}

.tabela-moderna tbody tr:nth-child(5) {
  animation-delay: 0.3s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.tabela-moderna tbody tr:hover {
  background: var(--cor-fundo-card-hover);
  transform: scale(1.01);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.tabela-moderna tbody tr:hover td {
  color: var(--cor-branco);
}

/* Status badges */
.status {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.status-solicitado {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-estacionado {
  background: rgba(234, 179, 8, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.status-entregue {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Botões de ação */
.acoes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-acao {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.8em;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
  border: none;
}

.btn-timeline {
  background: transparent;
  border: 1px solid var(--cor-azul-status);
  color: var(--cor-azul-status);
}

.btn-timeline:hover {
  background: var(--cor-azul-status);
  color: white;
  transform: translateY(-2px);
}

.btn-reenviar {
  background: transparent;
  border: 1px solid var(--cor-cinza);
  color: var(--cor-cinza);
}

.btn-reenviar:hover {
  background: var(--cor-cinza);
  color: var(--cor-fundo);
  transform: translateY(-2px);
}

.btn-assumir {
  background: var(--gradiente-dourado);
  color: var(--cor-fundo);
}

.btn-assumir:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(212, 175, 55, 0.3);
}

/* Placa estilizada */
.placa {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  color: var(--cor-branco);
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 6px;
  letter-spacing: 1px;
}

.placa-erro {
  color: #f87171;
  font-size: 0.75em;
  display: block;
  margin-top: 4px;
}

/* Mapear elementos gerados pelo staff.js para o visual do valet */
.sv-ui .tabela-moderna .btn,
.sv-ui .tabela-moderna button {
  padding: 8px 14px;
  font-size: 0.78rem;
  border-radius: 10px;
  border: 1px solid var(--cor-borda) !important;
  background: rgba(212, 175, 55, 0.08);
  color: var(--cor-dourado);
  transition: all 0.25s ease;
}

.sv-ui .tabela-moderna .btn:hover,
.sv-ui .tabela-moderna button:hover {
  background: var(--gradiente-dourado);
  color: var(--cor-fundo);
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.18);
}

/* Se o JS usar <span class="badge bg-..."> para status */
.sv-ui .tabela-moderna .badge {
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.2px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  background: rgba(212, 175, 55, 0.1) !important;
  color: var(--cor-dourado) !important;
}

.sv-ui .tabela-moderna .btn-more {
  background: rgba(255, 255, 255, 0.06);
  color: var(--cor-branco);
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.sv-ui .tabela-moderna .btn-more:hover {
  background: rgba(255, 255, 255, 0.18);
  color: var(--cor-branco);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.12);
}

.sv-modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 8, 8, 0.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 2100;
}

.sv-modal-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.sv-modal {
  width: min(640px, 100%);
  background: rgba(18, 18, 18, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  color: var(--cor-branco);
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
}

.sv-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sv-modal__subtitle {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.sv-modal__close {
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--cor-branco);
  border-radius: 999px;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sv-modal__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sv-modal__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.sv-modal__plate {
  font-family: 'Courier New', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  letter-spacing: 1px;
}

.sv-modal__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.sv-modal__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.6);
}

.sv-modal__value {
  font-size: 0.95rem;
  font-weight: 500;
}

.sv-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sv-modal__actions-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 600px) {
  .sv-modal {
    padding: 20px;
  }

  .sv-modal__summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .sv-modal__actions-group {
    width: 100%;
  }
}

#toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: min(90vw, 360px);
}

.sv-toast {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(17, 17, 17, 0.95);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.sv-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.sv-toast.hide {
  opacity: 0;
  transform: translateY(-10px);
}

.sv-toast__message {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.35;
}

.sv-toast__close {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  margin-top: -2px;
}

.sv-toast-success {
  border-color: rgba(40, 167, 69, 0.6);
}

.sv-toast-warning {
  border-color: rgba(255, 193, 7, 0.7);
}

.sv-toast-danger {
  border-color: rgba(220, 53, 69, 0.6);
}

/* ===== Home clientes (SeuVallet) ===== */
.sv-home {
  background: #0f0f0f;
  color: #ffffff;
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  min-height: 100vh;
}

.sv-container {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 24px;
}

.sv-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.sv-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
}

.sv-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.sv-topbar {
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 3;
  padding: 24px 0;
}

.sv-topbar__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sv-brand {
  font-weight: 800;
  letter-spacing: 2px;
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--cor-dourado);
  text-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

.sv-hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
}

.sv-hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  color: var(--cor-dourado);
  text-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

.sv-hero__subtitle {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 600;
}

.sv-hero__lead {
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 640px;
  color: #d1d1d1;
}

.sv-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.sv-hero__stats strong {
  font-weight: 700;
}

.sv-hero__divider {
  color: var(--cor-dourado);
}

.sv-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.sv-button--primary {
  background: var(--gradiente-dourado);
  color: #0f0f0f;
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.sv-button--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(212, 175, 55, 0.4);
}

.sv-button--ghost {
  border: 1px solid rgba(212, 175, 55, 0.7);
  color: var(--cor-dourado);
  background: transparent;
}

.sv-button--ghost:hover {
  background: rgba(212, 175, 55, 0.15);
}

.sv-section {
  padding: 80px 0;
}

.sv-section--dark {
  background: #000000;
}

.sv-section__title {
  text-align: center;
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 48px;
}

.sv-benefits,
.sv-steps,
.sv-testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}

.sv-benefit {
  text-align: center;
}

.sv-benefit h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.sv-benefit p {
  color: #9ca3af;
}

.sv-icon {
  width: 48px;
  height: 48px;
  color: var(--cor-dourado);
  margin-bottom: 16px;
}

.sv-card {
  background: #141414;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
}

.sv-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.15), 0 10px 40px rgba(0, 0, 0, 0.5);
}

.sv-card--center {
  text-align: center;
}

.sv-card__emoji {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.sv-testimonial__header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.sv-testimonial__header img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
}

.sv-testimonial__header h4 {
  font-size: 1.1rem;
  font-weight: 700;
}

.sv-partners {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 32px;
  align-items: center;
  justify-items: center;
}

.sv-partners img {
  max-width: 160px;
  width: 100%;
  max-height: 48px;
  object-fit: contain;
  filter: grayscale(1);
  transition: filter 0.3s ease;
}

.sv-partners img:hover {
  filter: grayscale(0);
}

@media (max-width: 768px) {
  .sv-hero__stats {
    flex-direction: column;
  }

  .sv-hero__divider {
    display: none;
  }

  .sv-topbar__content {
    flex-direction: column;
    gap: 16px;
  }
}
