/* ==========================================================================
   Brotti — tema escuro automotivo
   ========================================================================== */

/* ============================================================================
   Brotti Oficina e Suspensão — paleta: #16202b (painel), #770808 (marca),
   #ffffff (texto). Tom claro do vermelho (#ff8a8a) só para texto sobre escuro.
   ========================================================================== */

:root {
  --bg: #0f161e;
  --bg-2: #131b25;
  --panel: #16202b;
  --panel-2: #1c2836;
  --border: #26333f;
  --border-soft: #1e2a36;
  --text: #ffffff;
  --muted: #a3b3c4;
  --accent: #770808;
  --accent-strong: #9d0b0b;
  --accent-2: #ff8a8a;
  --accent-ink: #ffffff;
  --ok: #4ade9f;
  --warn: #f5b544;
  --err: #ff8080;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.9);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(119, 8, 8, 0.35), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(119, 8, 8, 0.18), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 1.75rem; font-weight: 800; }
h2 { font-size: 1.12rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 .75rem; }
dl, dd, dt { margin: 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--panel-2); padding: .1rem .35rem; border-radius: 5px; }

.muted { color: var(--muted); }
.small { font-size: .82rem; }
.money { font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.preserve { white-space: pre-wrap; word-break: break-word; }

/* ---------------------------------------------------------------- layout */

.container {
  width: min(1180px, 100% - 2.5rem);
  margin-inline: auto;
}

.app-main { padding-top: 1.75rem; padding-bottom: 4rem; }

/* ---------------------------------------------------------------- header */

.topbar, .appbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 22, 30, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}

.topbar-inner, .appbar-inner {
  width: min(1180px, 100% - 2.5rem);
  margin-inline: auto;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); font-weight: 800; }
.brand:hover { text-decoration: none; }

.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: #ffffff;
  font-weight: 800;
  font-size: 1.05rem;
  border: 1px solid rgba(255, 138, 138, 0.35);
  box-shadow: 0 6px 18px -8px rgba(255, 138, 138, 0.45);
}
.logo-mark.lg { width: 48px; height: 48px; font-size: 1.4rem; border-radius: 14px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.05; font-size: 1.05rem; }
.brand-text small { font-size: .68rem; font-weight: 500; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }

.topnav, .appnav { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.topnav a, .appnav a {
  color: var(--muted);
  padding: .45rem .8rem;
  border-radius: 8px;
  font-weight: 550;
  font-size: .92rem;
}
.topnav a:hover, .appnav a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.appnav a.active { color: var(--text); background: var(--panel-2); box-shadow: inset 0 -2px 0 var(--accent-2); }

.appbar-right { display: flex; align-items: center; gap: .6rem; margin-left: .5rem; }

.user-chip { display: flex; align-items: center; gap: .55rem; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--panel-2); border: 1px solid var(--border);
  font-weight: 700; font-size: .85rem;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.1; }
.user-meta strong { font-size: .88rem; }
.user-meta small { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 9px;
  width: 38px; height: 38px;
  font-size: 1rem;
  cursor: pointer;
}

/* ---------------------------------------------------------------- flash */

.flash-wrap { width: min(1180px, 100% - 2.5rem); margin: 1rem auto 0; }

.alert {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem .95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--panel);
  margin-bottom: .5rem;
  font-size: .92rem;
}
.alert-success { border-color: rgba(52, 211, 153, .4); background: rgba(52, 211, 153, .08); }
.alert-error { border-color: rgba(248, 113, 113, .45); background: rgba(248, 113, 113, .09); color: #ffd9d9; }
.alert-warn { border-color: rgba(245, 181, 68, .4); background: rgba(245, 181, 68, .08); }
.alert-close { background: none; border: 0; color: inherit; font-size: 1.15rem; cursor: pointer; opacity: .7; line-height: 1; }
.alert-close:hover { opacity: 1; }

/* -------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .58rem 1.05rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 620;
  font-size: .92rem;
  cursor: pointer;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: var(--accent-ink);
  border-color: rgba(255, 138, 138, 0.35);
  box-shadow: 0 10px 24px -14px rgba(255, 138, 138, 0.6);
}
.btn-primary:hover { filter: brightness(1.14); text-decoration: none; }
.btn-ghost { background: var(--panel); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--panel-2); border-color: #2d3f52; text-decoration: none; }
.btn-danger-text { color: #ff9c9c; }
.btn-sm { padding: .38rem .72rem; font-size: .84rem; border-radius: 8px; }
.btn-lg { padding: .78rem 1.5rem; font-size: 1rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.inline-form { display: inline; margin: 0; }

/* ----------------------------------------------------------------- cards */

.card {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.15rem;
}
.card-icon { font-size: 1.5rem; margin-bottom: .5rem; }

.panel {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.panel + .panel { margin-top: 1.15rem; }
.panel-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin-bottom: .9rem; padding-bottom: .7rem;
  border-bottom: 1px solid var(--border-soft);
}
.panel-head h2 { margin: 0; }

.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap;
}
.page-head h1 { margin-bottom: .25rem; }
.crumbs { font-size: .8rem; color: var(--muted); margin-bottom: .2rem; }
.crumbs span { opacity: .5; margin: 0 .25rem; }
.head-badges { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: .35rem; }

.grid { display: grid; gap: 1rem; }
.stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stats-7 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

.stat-card { display: flex; flex-direction: column; gap: .15rem; padding: 1rem 1.1rem; }
.stat-card strong { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.stat-label { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 650; }
.stat-highlight { border-color: rgba(255, 138, 138, .5); box-shadow: 0 0 0 1px rgba(255, 138, 138, .18) inset, 0 14px 30px -22px rgba(255, 138, 138, .9); }

.features { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* ------------------------------------------------------------------ hero */

.hero {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 3rem;
  align-items: center;
  padding: 4.5rem 0 3rem;
}
.eyebrow {
  display: inline-block;
  font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-2);
  background: rgba(255, 138, 138, .1);
  border: 1px solid rgba(255, 138, 138, .3);
  padding: .32rem .7rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}
.hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.35rem); letter-spacing: -.03em; margin-bottom: 1rem; }
.hero h1 em { font-style: normal; color: var(--accent-2); }
.lead { font-size: 1.07rem; color: #b9c7d8; max-width: 56ch; }

.hero-points { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: .5rem; }
.hero-points li { position: relative; padding-left: 1.5rem; color: var(--muted); font-size: .93rem; }
.hero-points li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  color: var(--ok); font-weight: 800;
}

.mini-window {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 40px 80px -50px rgba(0, 0, 0, 1);
  transform: rotate(-1.2deg);
}
.mini-window-bar {
  display: flex; align-items: center; gap: .4rem;
  padding: .65rem .85rem;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border-soft);
  font-size: .78rem; color: var(--muted);
}
.mini-window-bar i { width: 9px; height: 9px; border-radius: 50%; background: #2d3f52; }
.mini-window-bar i:nth-child(1) { background: #f87171; }
.mini-window-bar i:nth-child(2) { background: #f5b544; }
.mini-window-bar i:nth-child(3) { background: #34d399; }
.mini-window-bar span { margin-left: .5rem; }
.mini-window-body { padding: 1.1rem; display: grid; gap: .55rem; }
.mini-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: .3rem; }
.mini-line { display: flex; justify-content: space-between; font-size: .88rem; color: #c4d0de; }
.mini-line b { font-variant-numeric: tabular-nums; }
.mini-total {
  display: flex; justify-content: space-between;
  margin-top: .35rem; padding-top: .6rem;
  border-top: 1px dashed var(--border);
  font-weight: 700;
}
.mini-actions { display: flex; gap: .5rem; margin-top: .6rem; }

.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1rem 0 3.5rem;
}
.stat { background: var(--bg-2); padding: 1.2rem 1.1rem; display: flex; flex-direction: column; gap: .2rem; }
.stat strong { font-size: 1.6rem; font-weight: 800; color: var(--accent-2); letter-spacing: -.03em; }
.stat span { font-size: .85rem; color: var(--muted); }

.section { padding: 2.5rem 0; }
.section-head { margin-bottom: 1.6rem; max-width: 70ch; }
.section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -.02em; }

.quote-section {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  align-items: center;
  gap: 2rem;
  margin: 2rem 0 3rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid rgba(255, 138, 138, .38);
  border-radius: calc(var(--radius) + 4px);
  background:
    radial-gradient(circle at 90% 15%, rgba(255, 138, 138, .18), transparent 35%),
    linear-gradient(120deg, rgba(119, 8, 8, .42), rgba(119, 8, 8, .08)),
    var(--panel);
  box-shadow: 0 28px 70px -48px rgba(255, 90, 90, .9);
}
.quote-copy h2 { font-size: clamp(1.55rem, 3vw, 2.25rem); letter-spacing: -.025em; margin-bottom: .65rem; }
.quote-copy .eyebrow { margin-bottom: .85rem; }
.quote-actions { display: flex; flex-direction: column; align-items: stretch; gap: .7rem; }
.quote-actions .btn { justify-content: center; }
.quote-note { color: var(--muted); font-size: .84rem; text-align: center; }
.quote-note a { color: var(--accent-2); }
.services-process { margin-top: 2.75rem; padding-top: 2.25rem; border-top: 1px solid var(--border-soft); }

.services-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.service-card {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.15rem;
  display: flex; flex-direction: column; gap: .5rem;
  transition: border-color .15s ease, transform .12s ease;
}
.service-card:hover { border-color: rgba(255, 138, 138, .4); transform: translateY(-3px); }
.service-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.service-top h3 { font-size: .98rem; }
.price { color: var(--accent-2); font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums; }
.service-time { font-size: .78rem; color: var(--muted); }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.steps li {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.3rem 1.2rem;
  position: relative;
}
.step-num {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: rgba(255, 138, 138, .14);
  border: 1px solid rgba(255, 138, 138, .4);
  color: var(--accent-2); font-weight: 800;
  margin-bottom: .8rem;
}

.cta-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  background: linear-gradient(120deg, rgba(119, 8, 8, 0.75), rgba(119, 8, 8, 0.35));
  border: 1px solid rgba(255, 138, 138, 0.35);
  border-radius: var(--radius);
  padding: 1.8rem;
  margin: 2.5rem 0 3.5rem;
}
.cta-banner h2 { font-size: 1.4rem; }

/* ---------------------------------------------------------------- footer */

.footer { border-top: 1px solid var(--border-soft); background: var(--bg-2); padding: 2.5rem 0 1.2rem; margin-top: 2rem; }
.footer-inner {
  width: min(1180px, 100% - 2.5rem); margin-inline: auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem;
}
.footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: .7rem; }
.footer-inner > div { display: flex; flex-direction: column; gap: .4rem; }
.footer-inner a { color: var(--muted); }
.footer-inner a:hover { color: var(--text); }
.footer-bottom {
  width: min(1180px, 100% - 2.5rem); margin: 1.8rem auto 0;
  padding-top: 1.1rem; border-top: 1px solid var(--border-soft);
  font-size: .8rem; color: var(--muted);
}

/* ----------------------------------------------------------------- auth */

.auth-wrap { display: grid; place-items: center; padding: 3.5rem 0 4rem; }
.auth-card {
  width: min(460px, 100%);
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: 2rem;
  box-shadow: var(--shadow);
}
.auth-head { text-align: center; margin-bottom: 1.4rem; display: grid; justify-items: center; gap: .5rem; }
.auth-head h1 { font-size: 1.4rem; margin: .4rem 0 0; }
.auth-foot { text-align: center; margin-top: 1rem; font-size: .9rem; }
.demo-box {
  margin-top: 1.4rem; padding: .85rem .95rem;
  background: var(--panel-2); border: 1px dashed var(--border);
  border-radius: 10px;
  display: grid; gap: .2rem;
  font-size: .8rem; color: var(--muted);
}
.demo-box strong { color: var(--text); font-size: .8rem; }

/* ---------------------------------------------------------------- forms */

.form { display: grid; gap: .85rem; }
.form-wide { max-width: 860px; }
.field { display: grid; gap: .35rem; }
.field > span { font-size: .78rem; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .85rem; }
.field-row.cols-4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; }
.w-80 { max-width: 90px; }
.w-100 { max-width: 110px; }
.w-120 { max-width: 130px; }
.w-200 { max-width: 200px; }

input, select, textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  font: inherit;
  font-size: .94rem;
  padding: .55rem .7rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(255, 138, 138, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 138, 138, 0.18);
}
input::placeholder, textarea::placeholder { color: #5f7288; }
textarea { resize: vertical; min-height: 80px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 2rem; }
label input[type="checkbox"] { width: auto; }

.form-note { font-size: .8rem; text-align: center; margin: 0; }
.form-actions { display: flex; gap: .7rem; align-items: center; padding-top: .4rem; border-top: 1px solid var(--border-soft); }
.form-section { display: grid; gap: .85rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--border-soft); }
.form-section h2 { font-size: 1rem; }

/* ------------------------------------------------------------- list rows */

.list { display: grid; }
.list-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem .5rem;
  border-bottom: 1px solid var(--border-soft);
}
.list-row:last-child { border-bottom: 0; }
.list-row > div:first-child { display: grid; gap: .1rem; }
.list-row .muted { font-size: .85rem; }
.list-row-actions { display: flex; align-items: center; gap: .6rem; }
.link-row { color: inherit; border-radius: 8px; transition: background .12s ease; }
.link-row:hover { background: rgba(255, 255, 255, .03); text-decoration: none; }
.chevron { color: var(--muted); font-size: 1.2rem; line-height: 1; }

.empty { display: grid; justify-items: center; gap: .7rem; padding: 2rem 1rem; text-align: center; }

.callout { border-color: rgba(255, 138, 138, .35); }
.callout-head h2 { color: var(--accent-2); }

/* ------------------------------------------------------------- badges/tags */

.badge {
  display: inline-flex; align-items: center;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .02em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-blue { background: rgba(74, 163, 255, .14); color: #7cc0ff; border-color: rgba(74, 163, 255, .35); }
.badge-amber { background: rgba(245, 181, 68, .14); color: #f7c766; border-color: rgba(245, 181, 68, .35); }
.badge-violet { background: rgba(167, 139, 250, .15); color: #c3b0ff; border-color: rgba(167, 139, 250, .35); }
.badge-cyan { background: rgba(34, 211, 238, .13); color: #77e6f7; border-color: rgba(34, 211, 238, .32); }
.badge-orange { background: rgba(251, 146, 60, .14); color: var(--accent-2); border-color: rgba(251, 146, 60, .35); }
.badge-green { background: rgba(52, 211, 153, .13); color: #6ee7c2; border-color: rgba(52, 211, 153, .34); }
.badge-slate { background: rgba(148, 163, 184, .13); color: #b6c4d6; border-color: rgba(148, 163, 184, .3); }
.badge-red { background: rgba(248, 113, 113, .14); color: #ff9c9c; border-color: rgba(248, 113, 113, .36); }

.tag {
  display: inline-block;
  padding: .12rem .5rem;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .74rem;
  color: var(--muted);
}
.tag-warn { color: var(--warn); border-color: rgba(245, 181, 68, .4); background: rgba(245, 181, 68, .1); }
.tag-admin { color: var(--accent-2); border-color: rgba(255, 138, 138, .4); }
.tag-mechanic { color: #7cc0ff; border-color: rgba(74, 163, 255, .35); }
.tag-client { color: #6ee7c2; border-color: rgba(52, 211, 153, .32); }

.plate {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  letter-spacing: .1em;
  background: #f2f4f7;
  color: #10161d;
  padding: .16rem .5rem;
  border-radius: 5px;
  font-size: .82rem;
}

/* ---------------------------------------------------------------- tables */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th {
  text-align: left;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 700;
  padding: .55rem .6rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td { padding: .65rem .6rem; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(255, 255, 255, .02); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tfoot td { border-top: 1px solid var(--border); font-weight: 700; }
.total-cell { font-size: 1.02rem; color: var(--accent-2); font-weight: 800; }

.filter-bar { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.filter-bar input { flex: 1 1 240px; }
.filter-bar select { flex: 0 1 220px; }

.filter-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.1rem; }
.chip {
  padding: .35rem .8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: .84rem;
  font-weight: 600;
}
.chip:hover { color: var(--text); text-decoration: none; border-color: #2d3f52; }
.chip.active { background: var(--accent); border-color: var(--accent-2); color: var(--accent-ink); }

/* ------------------------------------------------------------- grid/split */

.split { display: grid; grid-template-columns: 1.35fr .9fr; gap: 1.15rem; align-items: start; }
.split-2 { display: grid; grid-template-columns: 1.5fr .85fr; gap: 1.15rem; align-items: start; }
.stack { display: grid; gap: 1.15rem; }
.stack > .panel + .panel { margin-top: 0; }
.stack-list { display: grid; gap: .5rem; }

.vehicle-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.vehicle-card { display: grid; gap: .7rem; }
.vehicle-top { display: flex; justify-content: space-between; gap: .7rem; align-items: flex-start; }
.vehicle-meta { display: flex; gap: 1.2rem; font-size: .85rem; color: var(--muted); }
.vehicle-meta strong { color: var(--text); }

/* ------------------------------------------------------------------ pick */

.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .6rem; }
.pick {
  display: flex; gap: .65rem;
  padding: .75rem .85rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.pick:hover { border-color: #2d3f52; }
.pick input { width: auto; margin-top: .25rem; accent-color: var(--accent-2); }
.pick-body { display: grid; gap: .15rem; }
.pick-body strong { font-size: .9rem; }
.pick-price { font-size: .8rem; color: var(--accent-2); font-weight: 650; }
.pick:has(input:checked) { border-color: rgba(255, 138, 138, .55); background: rgba(255, 138, 138, .06); }

.pick-total {
  display: flex; justify-content: space-between; align-items: center;
  padding: .8rem 1rem;
  background: var(--panel-2);
  border: 1px dashed var(--border);
  border-radius: 10px;
  font-size: .92rem;
}
.pick-total strong { color: var(--accent-2); font-size: 1.15rem; font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------- details */

.details { display: grid; gap: .55rem; }
.details > div { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; font-size: .9rem; }
.details dt { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.details dd { text-align: right; font-weight: 600; }
.details-total { padding-top: .6rem; border-top: 1px solid var(--border-soft); }
.details-total dd { font-size: 1.15rem; color: var(--accent-2); font-weight: 800; }
.total-panel { background: linear-gradient(180deg, rgba(255, 138, 138, .1), var(--bg-2)); }

.subblock { margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--border-soft); }
.subblock h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; color: var(--accent-2); }

.hint-line {
  margin-top: .8rem;
  padding: .6rem .8rem;
  background: rgba(245, 181, 68, .09);
  border: 1px solid rgba(245, 181, 68, .3);
  border-radius: 8px;
  font-size: .87rem;
  color: #f7d692;
}

/* ------------------------------------------------------------- timeline */

.timeline { display: grid; gap: .2rem; margin-bottom: 1rem; }
.tl-item { display: grid; grid-template-columns: 16px 1fr; gap: .7rem; padding-bottom: .85rem; position: relative; }
.tl-item::before {
  content: "";
  position: absolute;
  left: 7px; top: 16px; bottom: 0;
  width: 1px; background: var(--border);
}
.tl-item:last-child::before { display: none; }
.tl-dot { width: 15px; height: 15px; border-radius: 50%; background: var(--panel-2); border: 2px solid var(--border); margin-top: .2rem; }
.tl-status .tl-dot { border-color: var(--accent-2); background: rgba(255, 138, 138, .25); }
.tl-body { background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 10px; padding: .6rem .8rem; }
.tl-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .2rem; font-size: .85rem; }
.tl-body p { margin: 0; font-size: .9rem; }
.tl-internal .tl-body { background: rgba(245, 181, 68, .05); border-color: rgba(245, 181, 68, .25); }

.msg-form { margin-top: .5rem; padding-top: .9rem; border-top: 1px solid var(--border-soft); display: flex; flex-direction: column; gap: .6rem; align-items: flex-start; }
.msg-form .field-row { width: 100%; }
.msg-form .field { width: 100%; }

.item-form { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-soft); }
.item-form h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }

.service-edit { display: grid; gap: .6rem; padding: .8rem; background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 10px; }
.service-edit.is-off { opacity: .55; }
.service-edit-actions { display: flex; align-items: center; gap: .8rem; }
.toggle-form { padding-left: .8rem; }
.row-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.inline-reset { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .3rem 0 .6rem; }
.inline-reset input { max-width: 200px; padding: .32rem .55rem; font-size: .85rem; }
.sub-row td { background: rgba(255, 255, 255, .015); padding-top: 0; }

.action-bar { justify-content: flex-end; }

.error-page { text-align: center; padding: 4.5rem 0; display: grid; justify-items: center; gap: .6rem; }
.error-code { font-size: 4.5rem; font-weight: 800; color: var(--accent-2); letter-spacing: -.05em; line-height: 1; }

/* ------------------------------------------------------------- responsive */

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 3rem; gap: 2rem; }
  .hero-card { order: -1; }
  .split, .split-2 { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .quote-section { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .nav-toggle { display: block; }
  .topnav, .appnav {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: .2rem;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    padding: .75rem 1.25rem 1rem;
    margin: 0;
  }
  .topnav.open, .appnav.open { display: flex; }
  .topnav a, .appnav a { padding: .6rem .7rem; }
  .appbar-right { margin-left: 0; }
  .user-meta { display: none; }
  .appbar-inner, .topbar-inner { gap: .6rem; }
  .page-head { flex-direction: column; align-items: stretch; }
  .action-bar { justify-content: flex-start; }
  .field-row.cols-4 { grid-template-columns: 1fr 1fr; }
  .w-80, .w-100, .w-120, .w-200 { max-width: none; }
}

@media (max-width: 520px) {
  .container, .flash-wrap, .topbar-inner, .appbar-inner, .footer-inner, .footer-bottom { width: calc(100% - 1.5rem); }
  h1 { font-size: 1.4rem; }
  .stats { grid-template-columns: 1fr 1fr; }
  .field-row, .field-row.cols-4 { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Brotti — componentes novos (painel do cliente, orçamento da oficina)
   ========================================================================== */

/* barra de progresso da OS (área do cliente) */
.stepper {
  display: flex;
  list-style: none;
  gap: .35rem;
  margin: 0 0 1.25rem;
  padding: .95rem 1.1rem;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow-x: auto;
}
.stepper li {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: 1;
  min-width: 118px;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 650;
}
.stepper li::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 .45rem;
}
.stepper li:last-child::after { display: none; }
.stepper-dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--panel-2);
  border: 1px solid var(--border);
  font-size: .72rem;
  flex-shrink: 0;
}
.stepper li.is-done { color: var(--text); }
.stepper li.is-done .stepper-dot { background: rgba(74, 222, 159, .16); border-color: rgba(74, 222, 159, .5); color: var(--ok); }
.stepper li.is-done::after { background: rgba(74, 222, 159, .4); }
.stepper li.is-current { color: var(--text); }
.stepper li.is-current .stepper-dot { background: var(--accent); border-color: var(--accent-2); color: #fff; box-shadow: 0 0 0 4px rgba(255, 138, 138, .16); }
.stepper-label { display: flex; flex-direction: column; line-height: 1.15; }
.stepper-label small { font-size: .67rem; color: var(--accent-2); font-weight: 600; }

/* cartão de boas-vindas do cliente */
.hello-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.7rem;
  margin-bottom: 1.4rem;
  border-radius: 18px;
  background: linear-gradient(120deg, rgba(119, 8, 8, .55), rgba(119, 8, 8, .12)), var(--panel);
  border: 1px solid rgba(255, 138, 138, .3);
  box-shadow: var(--shadow);
}
.hello-copy h1 { font-size: 1.9rem; margin-bottom: .35rem; }
.hello-copy .btn-row { margin-top: .9rem; }
.hello-aside {
  display: grid;
  gap: .1rem;
  text-align: right;
  min-width: 190px;
  padding: 1rem 1.2rem;
  background: rgba(0, 0, 0, .28);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
}
.hello-aside strong { font-size: 2.4rem; font-weight: 800; line-height: 1.05; }
.hello-aside-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }

/* chips de veículo */
.vehicle-chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip-static {
  font-size: .74rem;
  padding: .14rem .55rem;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
}

/* opções em rádio (modo do orçamento / origem do veículo) */
.mode-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .6rem; }
.mode-row-3 { margin-top: 1rem; }
.mode-option {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  padding: .75rem .85rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.mode-option:hover { border-color: #33475a; }
.mode-option input { width: auto; margin-top: .3rem; accent-color: var(--accent-2); flex-shrink: 0; }
.mode-option span { display: grid; gap: .1rem; }
.mode-option small { font-size: .78rem; }
.mode-option:has(input:checked),
.mode-option.is-on { border-color: rgba(255, 138, 138, .55); background: rgba(119, 8, 8, .28); }

/* seções do formulário de orçamento */
.form-section-panel { padding: 1.1rem 1.25rem; }
.picked-client {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .85rem 1rem;
  background: rgba(119, 8, 8, .3);
  border: 1px solid rgba(255, 138, 138, .3);
  border-radius: 10px;
}
.picked-client div { display: grid; gap: .15rem; }
.sub-block-title {
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent-2);
  font-weight: 700;
  margin: .35rem 0 .7rem;
}
.form-wide { max-width: 940px; }

@media (max-width: 780px) {
  .hello-aside { text-align: left; }
  .stepper { padding: .8rem; }
  .stepper li { min-width: 104px; font-size: .78rem; }
}

/* ==========================================================================
   Tema claro (mesma paleta) + componentes do site institucional
   ========================================================================== */

.theme-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background .12s ease, transform .1s ease;
}
.theme-btn:hover { background: var(--panel-2); transform: translateY(-1px); }

.nav-site-link {
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .82rem !important;
  font-weight: 650;
}
.nav-site-link:hover { border-color: var(--accent-2); color: var(--accent-2) !important; }

.check-inline {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .85rem;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.check-inline input { width: auto; accent-color: var(--accent); }

.bullets { margin: 0; padding-left: 1.15rem; display: grid; gap: .45rem; font-size: .9rem; }
.bullets strong { color: var(--text); }

.avatar-lg { width: 56px; height: 56px; font-size: 1.5rem; }
.divider { border: 0; border-top: 1px solid var(--border-soft); margin: .9rem 0; width: 100%; }

.about-split { align-items: start; }
.about-card { display: grid; gap: .45rem; justify-items: start; }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.contact-card { display: grid; gap: .4rem; justify-items: start; }
.contact-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  font-weight: 700;
}

.form-actions { flex-wrap: wrap; }
.service-edit .form { gap: .6rem; }

/* ------------------------------------------------- modo claro ---------- */

[data-theme="light"] {
  --bg: #f1f4f8;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --panel-2: #f3f6fa;
  --border: #dde3ea;
  --border-soft: #e8ecf2;
  --text: #16202b;
  --muted: #56677a;
  --accent: #770808;
  --accent-strong: #5c0606;
  --accent-2: #770808;
  --ok: #0f9b62;
  --warn: #b47407;
  --err: #c62828;
  --shadow: 0 18px 40px -30px rgba(22, 32, 43, 0.45);
}

[data-theme="light"] body {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(119, 8, 8, 0.07), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(119, 8, 8, 0.04), transparent 55%),
    var(--bg);
}
[data-theme="light"] .topbar,
[data-theme="light"] .appbar { background: rgba(255, 255, 255, 0.92); }
[data-theme="light"] .logo-mark { box-shadow: none; border-color: rgba(119, 8, 8, 0.35); }
[data-theme="light"] .eyebrow { background: rgba(119, 8, 8, 0.08); border-color: rgba(119, 8, 8, 0.3); color: var(--accent); }
[data-theme="light"] .hello-card { background: linear-gradient(120deg, rgba(119, 8, 8, .10), rgba(119, 8, 8, .03)), var(--panel); border-color: rgba(119, 8, 8, 0.25); }
[data-theme="light"] .hello-aside { background: rgba(22, 32, 43, 0.05); border-color: var(--border); }
[data-theme="light"] .cta-banner { background: linear-gradient(120deg, rgba(119, 8, 8, .12), rgba(119, 8, 8, .04)); border-color: rgba(119, 8, 8, 0.3); }
[data-theme="light"] .picked-client { background: rgba(119, 8, 8, 0.08); border-color: rgba(119, 8, 8, 0.3); }
[data-theme="light"] .total-panel { background: linear-gradient(180deg, rgba(119, 8, 8, .10), var(--bg-2)); }
[data-theme="light"] .step-num { background: rgba(119, 8, 8, 0.1); border-color: rgba(119, 8, 8, 0.35); color: var(--accent); }
[data-theme="light"] .mode-option:has(input:checked),
[data-theme="light"] .mode-option.is-on { background: rgba(119, 8, 8, 0.10); border-color: rgba(119, 8, 8, 0.45); }
[data-theme="light"] .pick:has(input:checked) { background: rgba(119, 8, 8, 0.06); border-color: rgba(119, 8, 8, 0.45); }
[data-theme="light"] .btn-primary { border-color: rgba(0, 0, 0, 0.2); box-shadow: 0 8px 20px -14px rgba(119, 8, 8, 0.9); }
[data-theme="light"] input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus { border-color: rgba(119, 8, 8, 0.55); box-shadow: 0 0 0 3px rgba(119, 8, 8, 0.14); }
[data-theme="light"] .alert-error { color: #a40000; }
[data-theme="light"] .alert-success { color: #0b5f3d; }
[data-theme="light"] .hint-line { color: #8a5a00; background: rgba(180, 116, 7, 0.12); border-color: rgba(180, 116, 7, 0.35); }
[data-theme="light"] .tl-internal .tl-body { background: rgba(180, 116, 7, 0.10); }
[data-theme="light"] .stepper li.is-current .stepper-dot { color: #fff; }
[data-theme="light"] .badge-blue { background: rgba(11, 88, 200, .10); color: #0b58c8; border-color: rgba(11, 88, 200, .3); }
[data-theme="light"] .badge-amber { background: rgba(180, 116, 7, .12); color: #8a5a00; border-color: rgba(180, 116, 7, .3); }
[data-theme="light"] .badge-violet { background: rgba(109, 71, 214, .10); color: #5b34c4; border-color: rgba(109, 71, 214, .3); }
[data-theme="light"] .badge-cyan { background: rgba(3, 120, 140, .10); color: #036b80; border-color: rgba(3, 120, 140, .3); }
[data-theme="light"] .badge-orange { background: rgba(196, 84, 10, .10); color: #b4480a; border-color: rgba(196, 84, 10, .3); }
[data-theme="light"] .badge-green { background: rgba(15, 155, 98, .10); color: #0b7a4d; border-color: rgba(15, 155, 98, .3); }
[data-theme="light"] .badge-slate { background: rgba(60, 74, 90, .08); color: #41505f; border-color: rgba(60, 74, 90, .28); }
[data-theme="light"] .badge-red { background: rgba(198, 40, 40, .10); color: #a40000; border-color: rgba(198, 40, 40, .3); }
[data-theme="light"] .tag-admin { color: var(--accent); border-color: rgba(119, 8, 8, .4); }
[data-theme="light"] .tag-mechanic { color: #0b58c8; border-color: rgba(11, 88, 200, .35); }
[data-theme="light"] .tag-client { color: #0b7a4d; border-color: rgba(15, 155, 98, .32); }
[data-theme="light"] .tag-warn { color: #8a5a00; border-color: rgba(180, 116, 7, .4); background: rgba(180, 116, 7, .1); }
[data-theme="light"] .mini-window { box-shadow: 0 30px 60px -45px rgba(22, 32, 43, 0.9); }
[data-theme="light"] .service-card:hover,
[data-theme="light"] .btn:hover { filter: none; }
[data-theme="light"] .chip.active { color: #fff; }
[data-theme="light"] .chip.active:hover { color: #fff; }

/* ------------------------------------------------- responsivo ---------- */

.table { min-width: 620px; }
.table.table-tight { min-width: 0; }

@media (max-width: 1100px) {
  .btn-new-quote { display: none; }
}

@media (max-width: 780px) {
  .appbar-right { gap: .4rem; }
  .user-chip .avatar { display: none; }
  .table { min-width: 560px; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .about-split { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .contact-grid { grid-template-columns: 1fr; }
  .hello-card { padding: 1.2rem; }
  .hello-copy h1 { font-size: 1.5rem; }
  .stat strong { font-size: 1.35rem; }
  .panel { padding: 1rem; }
  .btn { padding: .55rem .85rem; }
  .page-head .btn-row { width: 100%; }
}
