/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --bg-deep: #0a0e1a;
  --bg-surface: #111827;
  --bg-card: #1a2235;
  --bg-card-hover: #1f2a40;
  --border: rgba(255, 255, 255, 0.07);
  --border-gold: rgba(212, 175, 55, 0.4);

  --gold: #d4af37;
  --gold-light: #f0d060;
  --gold-dim: rgba(212, 175, 55, 0.15);

  --txt-primary: #f0f4ff;
  --txt-secondary: #8a9bbf;
  --txt-muted: #4a5568;

  --success: #34d399;
  --danger: #f87171;
  --danger-hover: #ef4444;
  --info: #60a5fa;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 32px rgba(212, 175, 55, 0.12);

  --transition: 0.22s ease;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background-color: var(--bg-deep);
  color: var(--txt-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--gold);
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ============================================================
   HEADER / NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  height: 72px;
  background: rgba(10, 14, 26, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-brand .logo-icon {
  font-size: 1.6rem;
}

.navbar-brand .brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--txt-primary);
  letter-spacing: -0.02em;
}

.navbar-brand .brand-name span {
  color: var(--gold);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), #b8932a);
  color: #0a0e1a;
}

.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--txt-primary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-ghost {
  background: transparent;
  color: var(--txt-secondary);
  padding: 8px 12px;
}

.btn-ghost:hover {
  color: var(--txt-primary);
}

.btn-danger {
  background: rgba(248, 113, 113, 0.12);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.btn-danger:hover {
  background: rgba(248, 113, 113, 0.22);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.8rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  text-align: center;
  padding: clamp(4rem, 10vw, 8rem) clamp(1.5rem, 5vw, 4rem) clamp(3rem, 7vw, 6rem);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% -10%, rgba(212, 175, 55, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 80% 80%, rgba(96, 165, 250, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  background: var(--gold-dim);
  border: 1px solid var(--border-gold);
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero h1 .accent {
  color: var(--gold);
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--txt-secondary);
  max-width: 540px;
  margin: 0 auto 2.5rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--txt-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================================================
   SECTION
   ============================================================ */
.section {
  padding: clamp(3rem, 6vw, 6rem) clamp(1.5rem, 5vw, 4rem);
  max-width: 1440px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-title span {
  color: var(--gold);
}

.section-subtitle {
  color: var(--txt-secondary);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* ============================================================
   SEARCH / FILTER BAR
   ============================================================ */
.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  align-items: center;
  justify-content: space-between;
}

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

.search-wrapper .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--txt-muted);
  pointer-events: none;
  font-size: 0.95rem;
}

.search-input,
.filter-select {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--txt-primary);
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 10px 14px;
  transition: border-color var(--transition);
  outline: none;
}

.search-input {
  padding-left: 40px;
}

.search-input:focus,
.filter-select:focus {
  border-color: var(--gold);
}

.filter-select option {
  background: var(--bg-surface);
}

/* ---- View toggle buttons ---- */
.view-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  flex-shrink: 0;
}

.view-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--txt-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--transition);
}

.view-btn:hover {
  color: var(--txt-primary);
}

.view-btn.active {
  background: var(--bg-card);
  color: var(--gold);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ============================================================
   VEHICLE GRID & CARDS
   ============================================================ */
.vehicles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.vehicle-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  cursor: default;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.vehicle-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-gold);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.card-photo {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  background: var(--bg-surface);
  display: block;
}

.card-photo-placeholder {
  width: 100%;
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--txt-muted);
}

.card-body {
  padding: 1.25rem;
}

.card-model {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Mobile: grid forces 2 columns, list stays as compact row ── */
@media (max-width: 640px) {

  /* GRID: 2 columns always */
  .vehicles-grid:not(.list-view) {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }

  .vehicles-grid:not(.list-view) .card-body {
    padding: 0.65rem 0.7rem;
  }

  .vehicles-grid:not(.list-view) .card-model {
    font-size: 0.78rem;
    margin-bottom: 4px;
  }

  .vehicles-grid:not(.list-view) .badge {
    font-size: 0.62rem;
    padding: 2px 6px;
  }

  .vehicles-grid:not(.list-view) .card-meta {
    gap: 4px;
    margin-bottom: 0.6rem;
  }

  .vehicles-grid:not(.list-view) .price-label {
    font-size: 0.62rem;
  }

  .vehicles-grid:not(.list-view) .price-value {
    font-size: 0.82rem;
  }

  .vehicles-grid:not(.list-view) .price-highlight {
    font-size: 0.95rem;
  }

  .vehicles-grid:not(.list-view) .btn-whatsapp {
    font-size: 0.72rem;
    padding: 8px 10px;
    gap: 5px;
  }

  .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
  }

  /* Reset layout constraints from the main grid on mobile list view */
  .vehicles-grid.list-view {
    display: block;
    gap: 0;
  }

  /* Ensure the table cell paddings are slightly more compact on mobile to limit excessive scrolling */
  .vehicle-table th,
  .vehicle-table td {
    padding: 8px 10px;
  }
}

/* ---- BADGES & META ---- */

.badge-year {
  background: rgba(96, 165, 250, 0.1);
  color: var(--info);
  border: 1px solid rgba(96, 165, 250, 0.2);
}

/* Admin badge (shown when logged in) — make it clickable */
#admin-badge {
  cursor: pointer;
  transition: all var(--transition);
}

#admin-badge:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--border-gold);
  color: var(--gold);
}

.badge-cambio {
  background: rgba(52, 211, 153, 0.1);
  color: var(--success);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.badge-cor {
  background: rgba(167, 139, 250, 0.1);
  color: #a78bfa;
  border: 1px solid rgba(167, 139, 250, 0.2);
}

.badge-km {
  background: rgba(251, 191, 36, 0.08);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.18);
}

.badge-codigo {
  background: rgba(248, 113, 113, 0.1);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.2);
}

.card-prices {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.price-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.price-label {
  font-size: 0.7rem;
  color: var(--txt-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.price-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--txt-secondary);
}

.price-highlight {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold);
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--txt-muted);
  width: 100%;
}

.empty-state .empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.empty-state p {
  font-size: 1rem;
}

/* ============================================================
   LOADING SKELETON
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ============================================================
   MODAL OVERLAY
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 460px;
  padding: 2.5rem;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}

.modal-subtitle {
  font-size: 0.875rem;
  color: var(--txt-secondary);
  margin-bottom: 2rem;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 1.25rem;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--txt-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-input,
.form-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--txt-primary);
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 11px 14px;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}

.form-select option {
  background: var(--bg-surface);
}

.form-input::placeholder {
  color: var(--txt-muted);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-error {
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 4px;
  display: none;
}

.form-error.visible {
  display: block;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ============================================================
   PHOTO UPLOAD
   ============================================================ */
.photo-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.photo-upload-area:hover,
.photo-upload-area.dragover {
  border-color: var(--gold);
  background: var(--gold-dim);
}

.photo-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.photo-upload-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--txt-muted);
}

.photo-upload-text {
  font-size: 0.875rem;
  color: var(--txt-secondary);
}

.photo-upload-hint {
  font-size: 0.75rem;
  color: var(--txt-muted);
  margin-top: 4px;
}

.photo-preview-wrap {
  position: relative;
  display: none;
}

.photo-preview-wrap.visible {
  display: block;
}

.photo-preview-wrap img {
  width: 100%;
  border-radius: var(--radius-md);
  aspect-ratio: 16/10;
  object-fit: cover;
}

.photo-preview-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  font-size: 1rem;
  transition: background var(--transition);
}

.photo-preview-remove:hover {
  background: var(--danger);
}

/* ============================================================
   ADMIN PANEL (SLIDE-IN SIDEBAR)
   ============================================================ */
.admin-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(480px, 100vw);
  height: 100vh;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  box-shadow: -16px 0 60px rgba(0, 0, 0, 0.5);
  z-index: 150;
  transform: translateX(101%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-panel.open {
  transform: translateX(0);
}

.admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.admin-panel-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.admin-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1.75rem;
  scroll-behavior: smooth;
}

.admin-panel-body::-webkit-scrollbar {
  width: 6px;
}

.admin-panel-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* Admin tab bar */
.admin-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 1.5rem;
}

.admin-tab {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--txt-secondary);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.admin-tab.active {
  background: var(--bg-surface);
  color: var(--txt-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Vehicle list inside admin */
.admin-vehicle-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-vehicle-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  transition: border-color var(--transition);
}

.admin-vehicle-item:hover {
  border-color: var(--border-gold);
}

.admin-vehicle-thumb {
  width: 64px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg-deep);
  flex-shrink: 0;
}

.admin-vehicle-info {
  flex: 1;
  min-width: 0;
}

.admin-vehicle-name {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-vehicle-sub {
  font-size: 0.75rem;
  color: var(--txt-secondary);
  margin-top: 2px;
}

.admin-vehicle-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--txt-secondary);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--transition);
}

.icon-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.icon-btn.danger:hover {
  border-color: var(--danger);
  color: var(--danger);
}

/* Overlay when admin panel is open */
.admin-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 140;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.admin-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ============================================================
   VEHICLE TABLE (list mode) - MINIMALIST THEME
   ============================================================ */
.vehicles-grid.list-view {
  display: block;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background-color: #ffffff;
  /* Fundo branco no container da tabela */
  border-radius: 4px;
  /* Bordas um pouco menos arredondadas como na imagem */
  border: 1px solid #e5e7eb;
}

.vehicle-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  /* Letra mais enxuta */
  font-family: var(--font);
}

/* CABEÇALHO ESCURO */
.vehicle-table thead tr {
  background: #1e2430;
  /* Azul escuro/preto conforme a foto de referência */
  border-bottom: none;
}

.vehicle-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #e5e7eb;
  /* Letra clara sobre fundo escuro no cabeçalho */
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  /* Separador sutil nas colunas do título */
}

/* CORPO DA TABELA - TEMA CLARO E ZEBRADO */
.vehicle-table td {
  padding: 10px 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid #f3f4f6;
  /* Borda bem fina e clara */
  border-right: 1px solid #f3f4f6;
  /* Borda lateral enxuta */
  vertical-align: middle;
  color: #374151;
  /* Texto cinza escuro/chumbo padrão */
}

/* Remover borda lateral do último elemento do thead e tbody para ficar elegante */
.vehicle-table th:last-child,
.vehicle-table td:last-child {
  border-right: none;
}

.vehicle-table tbody .vehicle-row {
  cursor: pointer;
  transition: background 0.15s ease;
  background-color: #ffffff;
  /* Fundo padrão ímpar: Branco */
}

/* ZEBRA STRIPING - Linhas Pares Cinza Claro */
.vehicle-table tbody .vehicle-row:nth-child(even) {
  background-color: #f8f9fa;
}

/* Efeito ao passar o mouse - Azul muito suave */
.vehicle-table tbody .vehicle-row:hover {
  background-color: #eef2ff;
}

/* CORES ESPECÍFICAS DAS COLUNAS (CONTRASTE PARA FUNDO CLARO) */
.vehicle-table .col-model {
  font-weight: 600;
  color: #111827;
  /* Nome do modelo quase preto */
  max-width: 280px;
}

.vehicle-table .col-preco {
  font-weight: 700;
  color: #111827;
  /* Preço bem destacado e escuro, como na imagem */
}

.vehicle-table .col-fipe {
  color: #6b7280;
  /* Fipe num cinza mais opaco */
}

.vehicle-table .col-wa {
  width: 44px;
  text-align: center;
  padding-right: 10px;
}

/* WhatsApp icon-only button (table) */
.btn-wa-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  /* Bordas quadradinhas combinam mais com tabela corporativa */
  background: #25d366;
  color: #ffffff;
  transition: transform 0.15s ease, opacity 0.15s;
  flex-shrink: 0;
}

.btn-wa-icon:hover {
  opacity: 0.85;
  transform: scale(1.05);
}



/* ============================================================
   VEHICLE DETAIL MODAL (mobile bottom-sheet)
   ============================================================ */
.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.detail-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.detail-sheet {
  position: relative;
  width: 100%;
  max-width: 540px;
  background: var(--bg-surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-overlay.active .detail-sheet {
  transform: translateY(0);
}

.detail-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-card);
  color: var(--txt-secondary);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  z-index: 1;
}

.detail-close:hover {
  background: var(--bg-card-hover);
}

.detail-photo-wrap {
  width: 100%;
}

.detail-photo {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  display: block;
}

.detail-photo-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.detail-body {
  padding: 1.25rem 1.5rem 1.75rem;
}

.detail-model {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 1.25rem;
}

.detail-prices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.detail-price-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-wa {
  width: 100%;
  justify-content: center;
  margin-top: 0.25rem;
}



/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-lg);
  object-fit: contain;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.7);
  transform: scale(0.93);
  transition: transform 0.25s ease;
}

.lightbox-overlay.active .lightbox-img {
  transform: scale(1);
}

.lightbox-caption {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  max-width: 90vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.lightbox-close:hover,
.lightbox-close:active {
  background: rgba(255, 255, 255, 0.28);
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  color: var(--txt-primary);
  font-size: 0.875rem;
  font-weight: 500;
  min-width: 220px;
  max-width: 360px;
  animation: toastIn 0.3s ease;
  transition: opacity 0.3s;
}

.toast.removing {
  opacity: 0;
}

.toast-icon {
  font-size: 1.1rem;
}

.toast-success {
  border-left: 3px solid var(--success);
}

.toast-error {
  border-left: 3px solid var(--danger);
}

.toast-info {
  border-left: 3px solid var(--info);
}

@keyframes toastIn {
  from {
    transform: translateX(40px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ============================================================
   LOADING SPINNER
   ============================================================ */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

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

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  margin-top: 6rem;
  border-top: 1px solid var(--border);
  padding: 2.5rem clamp(1.5rem, 5vw, 4rem);
  text-align: center;
  color: var(--txt-muted);
  font-size: 0.82rem;
}

footer span {
  color: var(--gold);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 1.75rem;
  }

  .admin-panel {
    width: 100vw;
  }

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