@font-face { font-family: Montserrat; font-weight: 400; font-display: swap; src: url(/vendor/fonts/montserrat-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-weight: 500; font-display: swap; src: url(/vendor/fonts/montserrat-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-weight: 600; font-display: swap; src: url(/vendor/fonts/montserrat-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-weight: 700; font-display: swap; src: url(/vendor/fonts/montserrat-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-weight: 800; font-display: swap; src: url(/vendor/fonts/montserrat-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-weight: 900; font-display: swap; src: url(/vendor/fonts/montserrat-latin-900-normal.woff2) format('woff2'); }

:root {
  --lima: #DEFF00;
  --verde: #4AFF00;
  --azul: #0042FF;
  --preto: #111111;
  --off: #F7F7F2;
  --g1: #4A4A4A;
  --g2: #9A9A9A;
  --g3: #D9D9D2;
  --branco: #ffffff;
  --red: #E5372B;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(17,17,17,.04), 0 6px 24px rgba(17,17,17,.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Montserrat, system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--off);
  color: var(--preto);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--azul); }
code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ---------- botões e campos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 14px; letter-spacing: -.01em;
  border: 0; border-radius: 999px; padding: 12px 22px; cursor: pointer;
  text-decoration: none; transition: transform .08s ease, background .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: progress; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-lime { background: var(--lima); color: var(--preto); }
.btn-lime:hover { box-shadow: 0 0 0 4px rgba(222,255,0,.35); }
.btn-dark { background: var(--preto); color: var(--branco); }
.btn-dark:hover { background: #2a2a2a; }
.btn-ghost { background: transparent; color: var(--branco); border: 1px solid rgba(255,255,255,.3); }
.btn-ghost:hover { border-color: var(--lima); color: var(--lima); }
.btn-ghost-dark { background: transparent; color: var(--g1); border: 1px solid var(--g3); }
.btn-ghost-dark:hover { border-color: var(--red); color: var(--red); }
.btn-ghost-dark.confirm { background: var(--red); color: #fff; border-color: var(--red); }
.btn-red { background: var(--red); color: #fff; }
.link-btn { background: none; border: 0; color: var(--azul); font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; padding: 0; text-decoration: underline; }

.fld { display: block; margin: 0 0 14px; border: 0; padding: 0; min-width: 0; }
.fld > span, .fld > legend { display: block; font-size: 12px; font-weight: 700; color: var(--g1); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.fld > span small { text-transform: none; font-weight: 500; letter-spacing: 0; }
input, select {
  width: 100%; font: inherit; font-size: 15px; color: var(--preto);
  background: var(--branco); border: 1.5px solid var(--g3); border-radius: 10px;
  padding: 11px 12px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { border-color: var(--preto); box-shadow: 0 0 0 3px rgba(222,255,0,.6); }
.row { display: flex; gap: 8px; align-items: center; }
.row input { flex: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 12.5px; color: var(--g1); margin: 6px 0 12px; }
.msg { min-height: 0; margin: 0 0 12px; font-size: 13.5px; font-weight: 600; }
.msg:empty { display: none; }
.msg.ok { color: #1a7a00; }
.msg.err { color: var(--red); }
.msg.warn { color: #9a6b00; }

.checks { display: flex; gap: 10px; }
.check { flex: 1; position: relative; cursor: pointer; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check span {
  display: block; text-align: center; padding: 11px; border-radius: 10px; font-weight: 700;
  border: 1.5px solid var(--g3); background: var(--branco); transition: all .15s;
}
.check input:checked + span { background: var(--preto); color: var(--lima); border-color: var(--preto); }
.check input:focus-visible + span { box-shadow: 0 0 0 3px rgba(222,255,0,.6); }

.pill {
  display: inline-block; background: var(--lima); color: var(--preto); font-weight: 800; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .06em; padding: 5px 11px; border-radius: 999px; margin-bottom: 14px;
}
.pill-red { background: var(--red); color: #fff; }
.card { background: var(--branco); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 20px; margin-bottom: 16px; }

/* ---------- login ---------- */
.login {
  min-height: 100vh; min-height: 100dvh; background: var(--preto); color: var(--branco);
  display: grid; place-items: center; padding: 24px 16px; position: relative; overflow: hidden;
}
.login-deco img { position: absolute; width: 720px; right: -220px; top: -160px; opacity: .1; animation: spin 90s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.login-card { position: relative; width: 100%; max-width: 420px; }
.login-logo { width: 260px; max-width: 80%; display: block; margin-bottom: 36px; }
.login-title { font-weight: 900; font-size: clamp(44px, 11vw, 64px); letter-spacing: -.05em; line-height: .95; color: var(--lima); margin: 8px 0 28px; }
.login .fld > span { color: var(--g2); }
.login input { background: #1d1d1d; border-color: #333; color: var(--branco); }
.login input:focus { border-color: var(--lima); box-shadow: 0 0 0 3px rgba(222,255,0,.25); }
.login .hint { color: var(--g2); }
.login .msg.err { color: #ff7a6e; }
.pw { position: relative; }
.pw input { padding-right: 56px; }
.pw-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--g2); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; padding: 6px; }
.eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--g2); margin: 0; }

/* ---------- cabeçalho ---------- */
.hero { background: var(--preto); color: var(--branco); position: relative; overflow: hidden; padding: 0 0 34px; }
.hero-deco .c1, .hero-deco .c2 { position: absolute; border-radius: 50%; }
.hero-deco .c1 { width: 420px; height: 420px; background: var(--lima); opacity: .08; right: -120px; top: -180px; }
.hero-deco .c2 { width: 260px; height: 260px; background: var(--verde); opacity: .08; right: 220px; bottom: -170px; }
.hero-deco img { position: absolute; width: 380px; right: -60px; bottom: -150px; opacity: .14; animation: spin 120s linear infinite; }
.hero-in { position: relative; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 20px 0 34px; gap: 12px; }
.logo { height: 38px; }
.user { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--g2); min-width: 0; }
.user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.title { font-weight: 900; font-size: clamp(48px, 9vw, 96px); letter-spacing: -.055em; line-height: .92; color: var(--lima); margin: 10px 0 16px; }
.lead { max-width: 620px; color: #d7d7d0; font-size: 16px; margin: 0 0 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; gap: 8px; align-items: baseline; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 7px 14px; font-size: 13px; }
.chip i { font-style: normal; color: var(--g2); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.chip b { font-weight: 700; }
.chip.closed { border-color: var(--lima); }
.chip.closed b { color: var(--lima); }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 400px 1fr; gap: 24px; margin-top: -10px; position: relative; padding-top: 28px; }
.col-form { position: relative; }
.form-card { padding: 22px; position: sticky; top: 16px; }
.form-head { display: flex; justify-content: space-between; align-items: baseline; }
.form-card.editing { box-shadow: 0 0 0 3px var(--azul), var(--shadow); }
.locked { background: var(--preto); color: var(--lima); border-radius: 10px; padding: 14px; font-weight: 600; font-size: 14px; margin-bottom: 14px; }
.privacy { font-size: 12px; color: var(--g1); background: var(--off); border-radius: 10px; padding: 10px 12px; margin: 4px 0 14px; }
.form-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.form-btns .btn-lime { flex: 1; }

.loc-box { border: 1.5px dashed var(--g3); border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.loc-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.loc-actions { margin-bottom: 12px; }
.fld-inline { margin-bottom: 0; }
.prec { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--off); color: var(--g1); text-transform: uppercase; letter-spacing: .05em; }
.prec.p-exata, .prec.p-rua { background: rgba(74,255,0,.2); color: #1a7a00; }
.prec.p-cidade { background: #ffe9e6; color: var(--red); }
.picker { height: 220px; border-radius: 10px; overflow: hidden; }
.coord-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; background: var(--off); border-radius: 8px; padding: 8px 10px; gap: 8px; }

/* ---------- indicadores ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--branco); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.stat b { display: block; font-size: 32px; font-weight: 900; letter-spacing: -.04em; line-height: 1; }
.stat span { font-size: 12px; color: var(--g1); font-weight: 600; }
.stat-hi { background: var(--preto); color: var(--lima); }
.stat-hi span { color: #cfcfc8; }

.tabs { display: flex; gap: 6px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tab { font: inherit; font-weight: 700; font-size: 14px; background: transparent; border: 1.5px solid var(--g3); color: var(--g1); padding: 9px 16px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.tab.active { background: var(--preto); border-color: var(--preto); color: var(--lima); }

.map-card { overflow: hidden; margin-bottom: 16px; background: #0d0d0d; }
.map { height: 460px; background: #0d0d0d; }
.map-legend { margin: 0; padding: 10px 14px; font-size: 12px; color: var(--g2); background: var(--preto); }
.tiles-dark { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9) saturate(.35); }
.leaflet-container { font-family: Montserrat, system-ui, sans-serif; }
.leaflet-popup-content-wrapper { border-radius: 10px; }
.leaflet-popup-content { margin: 10px 14px; font-size: 13px; }
.pastus-pin { background: var(--lima); color: var(--preto); font-weight: 900; font-size: 12px; border-radius: 999px; padding: 6px 12px; white-space: nowrap; box-shadow: 0 0 0 6px rgba(222,255,0,.25), 0 4px 16px rgba(0,0,0,.5); transform: translate(-50%, -50%); display: inline-block; }
.car-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 12px; color: var(--preto); border: 2px solid var(--preto); box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.home-pin { width: 22px; height: 22px; border-radius: 50%; background: var(--lima); border: 3px solid var(--preto); box-shadow: 0 0 0 4px rgba(222,255,0,.35); }

.summary { font-size: 14px; color: var(--g1); margin: 0 0 14px; }
.summary b { color: var(--preto); }
.cars { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin-bottom: 18px; }
.car { background: var(--branco); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 16px 14px; border-top: 6px solid var(--c); position: relative; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.car:hover { transform: translateY(-2px); }
.car.mine { box-shadow: 0 0 0 3px var(--azul), var(--shadow); }
.car.sel { box-shadow: 0 0 0 3px var(--preto), var(--shadow); }
.car.white-top { border-top-color: var(--preto); }
.car-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.car-badge { width: 30px; height: 30px; border-radius: 50%; background: var(--c); display: grid; place-items: center; font-weight: 900; color: var(--preto); border: 2px solid var(--preto); flex: none; }
.car-head h3 { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.tag { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; }
.tag-mine { background: var(--azul); color: #fff; }
.tag-late { background: var(--preto); color: var(--lima); }
.car-meta { font-size: 13px; color: var(--g1); margin: 0 0 10px; }
.car ol { margin: 0 0 10px; padding: 0; list-style: none; counter-reset: p; }
.car li { counter-increment: p; position: relative; padding: 7px 0 7px 30px; border-top: 1px solid #efefe9; font-size: 13.5px; }
.car li::before { content: counter(p); position: absolute; left: 0; top: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--off); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.car li.you::before { background: var(--azul); color: #fff; }
.car li .addr { display: block; font-size: 12px; color: var(--g1); }
.car li .det { color: #9a6b00; font-size: 12px; font-weight: 600; }
.uber { font-size: 12.5px; background: var(--off); border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; }
.car-links { display: flex; flex-wrap: wrap; gap: 6px; }
.car-links .btn { padding: 8px 12px; font-size: 12.5px; }
.btn-wa { background: #25D366; color: #08341b; }
.volta-block h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; margin: 6px 0 10px; display: flex; gap: 10px; align-items: center; }
.empty { padding: 30px; text-align: center; color: var(--g1); }

.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--g1); padding: 10px; border-bottom: 2px solid var(--preto); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid #efefe9; vertical-align: middle; }
.tbl tr.you td { background: rgba(0,66,255,.06); }
.you-tag { font-size: 10.5px; font-weight: 800; background: var(--azul); color: #fff; border-radius: 999px; padding: 2px 7px; margin-left: 6px; }
.cfg { max-width: 560px; }
.org-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.danger .row input { max-width: 200px; }

.foot { padding: 30px 20px 50px; display: flex; gap: 30px; align-items: flex-end; color: var(--g1); font-size: 12.5px; }
.foot p { margin: 0; max-width: 820px; }
.foot-logo { height: 26px; opacity: .55; margin-left: auto; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 120px); background: var(--preto); color: var(--lima); padding: 12px 20px; border-radius: 999px; font-weight: 700; font-size: 14px; transition: transform .25s ease; z-index: 2000; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .form-card { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .map { height: 380px; }
  .foot { flex-direction: column; align-items: flex-start; }
  .foot-logo { margin-left: 0; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .grid2 { grid-template-columns: 1fr; gap: 0; }
  .user span { display: none; }
  .cars { grid-template-columns: 1fr; }
  .map { height: 320px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- correções de layout ---------- */
.layout > *, .stats > *, .grid2 > * { min-width: 0; }
.row input { min-width: 0; }
body { overflow-x: hidden; }
.toast { opacity: 0; visibility: hidden; transition: transform .25s ease, opacity .25s, visibility .25s; }
.toast.show { opacity: 1; visibility: visible; }
@media (max-width: 600px) {
  .hero-deco img { width: 260px; right: -110px; bottom: -120px; opacity: .1; }
  .hero-deco .c1 { width: 260px; height: 260px; right: -120px; top: -120px; }
  .hero-deco .c2 { display: none; }
  .logo { height: 32px; }
}
