:root {
  --brand: #1d4ed8;
  --brand-2: #0ea5e9;
  --accent: #f97316;
  --ink: #0b1220;
  --muted: #5b6b82;
  --line: #dbe3f0;
  --card: #ffffff;
  --bg: #f4f7fb;
  --danger: #dc2626;
  --success: #16a34a;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(15, 23, 42, .10);
  --font: "DM Sans", "Segoe UI", sans-serif;
  --display: "Space Grotesk", "DM Sans", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(14,165,233,.18), transparent 55%),
    radial-gradient(800px 380px at 100% 0%, rgba(249,115,22,.14), transparent 50%),
    var(--bg);
  min-height: 100vh;
}
a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(255,255,255,.82);
  border-bottom: 1px solid rgba(219,227,240,.9);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 70px; gap: 1rem; }
.logo {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--display); font-weight: 700; font-size: 1.25rem; color: var(--ink);
}
.logo span { color: var(--brand); }
.logo-mark {
  width: 28px; height: 28px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2) 55%, var(--accent));
  box-shadow: 0 8px 18px rgba(29,78,216,.28);
}
.nav { display: flex; align-items: center; gap: .85rem; flex-wrap: wrap; }
.nav a { color: var(--muted); font-weight: 600; font-size: .92rem; }
.nav a:hover { color: var(--brand); }
.nav-toggle { display: none; border: 0; background: transparent; font-size: 1.4rem; }
.user-name { color: var(--muted); font-size: .85rem; }
.bell { position: relative; }
.badge {
  position: absolute; top: -6px; right: -10px;
  background: var(--danger); color: #fff; border-radius: 999px;
  font-size: .65rem; min-width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 4px;
}

.main { padding: 1.5rem 0 4rem; }
.main-full { padding: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.soft-card { background: #eff6ff; box-shadow: none; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border: 0; border-radius: 14px; padding: .78rem 1.15rem; font-weight: 700; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-lg { padding: .95rem 1.35rem; font-size: 1rem; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 10px 24px rgba(29,78,216,.25); }
.btn-primary:hover { background: #1e40af; }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 10px 24px rgba(249,115,22,.28); }
.btn-secondary { background: #fff7ed; color: #c2410c; }
.btn-outline { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost-light { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.28); }
.btn-block { width: 100%; }

label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px;
  padding: .75rem .9rem; font: inherit; background: #fff; margin-bottom: .85rem;
}
textarea { min-height: 110px; resize: vertical; }
.form-row { display: grid; gap: .75rem; grid-template-columns: repeat(2, minmax(0,1fr)); }
.check-line { display: flex; align-items: center; gap: .5rem; font-weight: 600; margin: .5rem 0; }

.alert { padding: .9rem 1rem; border-radius: 12px; margin-bottom: 1rem; font-weight: 600; }
.alert-success { background: #ecfdf5; color: #047857; }
.alert-error { background: #fef2f2; color: #b91c1c; }
.alert-info { background: #eff6ff; color: #1d4ed8; }

.muted { color: var(--muted); }
.pill { display: inline-block; padding: .2rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 700; background: #e2e8f0; }
.pill-ok { background: #dcfce7; color: #166534; }
.pill-warn { background: #ffedd5; color: #9a3412; }
.pill-danger { background: #fee2e2; color: #991b1b; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 .75rem;
}

/* Landing hero */
.hero-auto {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, #0b1f4d 0%, #1d4ed8 42%, #0ea5e9 78%, #fb923c 120%);
  padding: 4.5rem 0 4rem;
}
.hero-auto__bg { position: absolute; inset: 0; pointer-events: none; }
.orb {
  position: absolute; border-radius: 50%; filter: blur(40px); opacity: .45;
  animation: float 8s ease-in-out infinite;
}
.orb-a { width: 280px; height: 280px; background: #38bdf8; top: -40px; left: 8%; }
.orb-b { width: 340px; height: 340px; background: #fb923c; bottom: -80px; right: 4%; animation-delay: -3s; }
.grid-lines {
  position: absolute; inset: 0; opacity: .12;
  background-image:
    linear-gradient(rgba(255,255,255,.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.35) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, #000 30%, transparent 75%);
}
.hero-auto__inner {
  position: relative; z-index: 1;
  display: grid; gap: 2rem; align-items: center;
  grid-template-columns: 1.15fr .85fr;
}
.hero-copy h1 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.05; margin: 0 0 1rem; font-weight: 700;
}
.hero-copy h1 span { color: #fdba74; }
.lead { color: rgba(255,255,255,.88); font-size: 1.08rem; line-height: 1.6; max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.4rem 0 1rem; }
.hero-pills { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.hero-pills li {
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px; padding: .35rem .75rem; font-size: .82rem; font-weight: 700;
}

.car-card {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(10px); border-radius: 28px; padding: 1.25rem;
  box-shadow: var(--shadow); transform: perspective(900px) rotateY(-6deg);
  animation: cardIn .9s ease both;
}
.car-card__badge {
  display: inline-block; background: #22c55e; color: #fff; font-size: .75rem; font-weight: 800;
  border-radius: 999px; padding: .3rem .7rem; margin-bottom: .9rem;
}
.car-silhouette {
  height: 150px; border-radius: 18px; margin-bottom: 1rem;
  background:
    linear-gradient(180deg, transparent 40%, rgba(0,0,0,.25)),
    radial-gradient(circle at 30% 60%, #fff 0 8px, transparent 9px),
    radial-gradient(circle at 70% 60%, #fff 0 8px, transparent 9px),
    linear-gradient(135deg, #94a3b8, #e2e8f0 40%, #64748b);
  position: relative; overflow: hidden;
}
.car-silhouette::after {
  content: ""; position: absolute; inset: 35% 18% 28%;
  background: rgba(15,23,42,.35); border-radius: 40% 40% 20% 20%;
}
.car-meta strong { display: block; margin-bottom: .25rem; }
.car-meta span { color: rgba(255,255,255,.8); font-size: .9rem; }
.car-tags { display: flex; gap: .4rem; margin-top: .85rem; flex-wrap: wrap; }
.car-tags span {
  background: rgba(255,255,255,.16); border-radius: 999px; padding: .25rem .6rem; font-size: .75rem; font-weight: 700;
}

.section { padding: 4.5rem 0; }
.section-alt { background: #fff; border-block: 1px solid var(--line); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; }
.section-head h2 { font-family: var(--display); font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 0 0 .6rem; }
.section-head p { color: var(--muted); margin: 0; line-height: 1.6; }

.steps {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.step {
  background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 1.2rem;
  text-align: center; box-shadow: 0 10px 30px rgba(15,23,42,.04);
  transition: transform .25s ease, box-shadow .25s ease;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step-num {
  width: 42px; height: 42px; border-radius: 50%; margin: 0 auto .8rem;
  display: grid; place-items: center; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.step h3 { margin: 0 0 .4rem; font-size: 1rem; }
.step p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }

.features {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.feature {
  background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 1.25rem;
  transition: transform .25s ease, border-color .25s ease;
}
.feature:hover { transform: translateY(-3px); border-color: #bfdbfe; }
.feature-icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: #eff6ff; margin-bottom: .85rem; font-size: 1.25rem;
}
.feature h3 { margin: 0 0 .4rem; }
.feature p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.5; }

.role-picker {
  display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr));
}
.role-card {
  position: relative; overflow: hidden; text-align: left; cursor: pointer;
  border: 1px solid var(--line); background: #fff; border-radius: 24px; padding: 1.4rem;
  box-shadow: 0 10px 28px rgba(15,23,42,.05);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.role-card:hover { transform: translateY(-3px); }
.role-card.is-active {
  border-color: #93c5fd; box-shadow: 0 18px 40px rgba(29,78,216,.16);
  transform: translateY(-4px) scale(1.01);
}
.role-glow {
  position: absolute; inset: auto -20% -40% -20%; height: 55%;
  background: radial-gradient(circle, rgba(14,165,233,.22), transparent 65%);
  opacity: 0; transition: opacity .3s ease;
}
.role-card.is-active .role-glow { opacity: 1; }
.role-kicker { display: block; color: var(--accent); font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .45rem; }
.role-card strong { display: block; font-family: var(--display); font-size: 1.35rem; margin-bottom: .45rem; }
.role-card p { color: var(--muted); margin: 0 0 .8rem; }
.role-card ul { margin: 0; padding-left: 1.1rem; color: var(--ink); font-size: .92rem; }
.role-cta { text-align: center; margin-top: 1.5rem; }

.cta-band {
  background: linear-gradient(120deg, #1d4ed8, #0ea5e9);
  color: #fff; padding: 3rem 0;
}
.cta-band__inner {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.cta-band h2 { font-family: var(--display); margin: 0 0 .35rem; }
.cta-band p { margin: 0; color: rgba(255,255,255,.88); }

.site-footer {
  background: #0b1220; color: #94a3b8; padding: 3rem 0 1.25rem;
}
.footer-rich {
  display: grid; gap: 1.5rem; grid-template-columns: 1.4fr 1fr 1.2fr;
  padding-bottom: 2rem; border-bottom: 1px solid rgba(148,163,184,.2);
}
.footer-brand p { line-height: 1.55; max-width: 28rem; }
.logo-light { color: #fff; }
.footer-rich h4 { color: #fff; margin: 0 0 .7rem; font-size: .95rem; }
.footer-rich a { display: block; color: #94a3b8; margin-bottom: .4rem; font-weight: 600; }
.footer-rich a:hover { color: #fff; }
.footer-rich p { margin: 0 0 .45rem; }
.footer-bottom { padding-top: 1rem; font-size: .85rem; }

.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  background: #22c55e; color: #fff; font-weight: 800;
  padding: .85rem 1rem; border-radius: 999px; box-shadow: var(--shadow);
}

.stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.stat strong { display: block; font-size: 1.5rem; }

.offer-row { display: flex; gap: 1rem; padding: .75rem; background: #f8fafc; border-radius: 12px; margin-bottom: .75rem; }
.offer-row img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; }
.chat-box { max-height: 320px; overflow: auto; background: #f8fafc; border-radius: 12px; padding: .75rem; margin-bottom: .75rem; }
.chat-msg { margin-bottom: .6rem; }
.chat-msg.mine { text-align: right; }
.chat-bubble { display: inline-block; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .5rem .75rem; max-width: 80%; }
.chat-msg.mine .chat-bubble { background: #dbeafe; }

.tabs { display: flex; gap: .5rem; background: #eef2f7; padding: .35rem; border-radius: 14px; margin-bottom: 1rem; overflow-x: auto; }
.tabs button, .tabs a {
  border: 0; background: transparent; padding: .7rem 1rem; border-radius: 10px;
  font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap;
}
.tabs .active { background: #fff; color: var(--brand); box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .75rem; border-bottom: 1px solid var(--line); font-size: .92rem; }

/* Cadastro role switch */
.auth-shell { max-width: 820px; margin: 0 auto; }
.auth-card { padding: 1.5rem; }
.auth-intro h1 { font-family: var(--display); margin: 0 0 .5rem; }
.role-switch {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: .35rem;
  background: #e8eef8; border-radius: 16px; padding: .35rem; margin: 1.2rem 0 1rem;
}
.role-switch__btn {
  position: relative; z-index: 1; border: 0; background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .85rem 1rem; border-radius: 12px; font-weight: 800; color: var(--muted);
  transition: color .2s ease;
}
.role-switch__btn.is-active { color: var(--brand); }
.role-switch__slider {
  position: absolute; top: .35rem; left: .35rem; bottom: .35rem; width: calc(50% - .35rem);
  background: #fff; border-radius: 12px; box-shadow: 0 8px 20px rgba(15,23,42,.08);
  transition: transform .28s cubic-bezier(.22,1,.36,1);
}
.role-switch[data-active="seller"] .role-switch__slider { transform: translateX(100%); }
.role-panel {
  opacity: 0; transform: translateY(10px);
  transition: opacity .28s ease, transform .28s ease;
}
.role-panel.is-visible { opacity: 1; transform: none; }
.brand-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .45rem; margin: .75rem 0 1rem; }
.brand-chip {
  display: flex; align-items: center; gap: .35rem; background: #f8fafc; border: 1px solid var(--line);
  border-radius: 10px; padding: .45rem .55rem; font-size: .82rem; font-weight: 600;
}
.auth-foot { text-align: center; margin-top: 1rem; }

[data-reveal] {
  opacity: 0; transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
}
[data-reveal].is-in { opacity: 1; transform: none; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(18px); }
}
@keyframes cardIn {
  from { opacity: 0; transform: perspective(900px) rotateY(-12deg) translateY(20px); }
  to { opacity: 1; transform: perspective(900px) rotateY(-6deg) translateY(0); }
}

@media (max-width: 900px) {
  .hero-auto__inner, .steps, .features, .role-picker, .footer-rich, .form-row, .grid-2, .grid-3, .brand-grid {
    grid-template-columns: 1fr;
  }
  .steps { grid-template-columns: 1fr 1fr; }
  .car-card { transform: none; }
  .nav-toggle { display: inline-block; }
  .nav {
    display: none; width: 100%; flex-direction: column; align-items: stretch;
    padding: .75rem 0 1rem;
  }
  .nav.open { display: flex; }
  .header-inner { flex-wrap: wrap; }
  .offer-row { flex-direction: column; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
}
