/* Public pages (landing, login, setup) and the settings screen.
   Same palette and variables as the console's style.css, but these pages
   scroll and centre their content instead of filling the viewport. */

:root {
  --bg: #0b0f14;
  --panel: #121821;
  --panel-2: #172030;
  --line: #1f2a38;
  --text: #e8eef6;
  --muted: #8496ab;
  --accent: #34d399;
  --accent-dim: #1b7a5a;
  --warn: #fbbf24;
  --alert: #f87171;
  --blue: #60a5fa;
  --radius: 12px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.spacer { flex: 1; }

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 22px; }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 20; background: rgba(11, 15, 20, .88);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 14px; height: 60px; }
.wordmark { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: .2px; color: var(--text); }
.wordmark:hover { text-decoration: none; }
.wordmark .mark { font-size: 20px; }
.wordmark img { height: 26px; max-width: 120px; object-fit: contain; display: block; }
.top nav { display: flex; align-items: center; gap: 8px; }

/* ---------- buttons and fields ---------- */
.btn {
  display: inline-block; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); cursor: pointer; font-size: 14px; font-weight: 560;
  transition: background .15s ease, border-color .15s ease; text-decoration: none;
}
.btn:hover { background: #1d2838; border-color: #2b3a4f; text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #04150e; }
.btn-primary:hover { background: #4ade9f; border-color: #4ade9f; }
.btn-danger { color: var(--alert); border-color: #4a2020; background: transparent; }
.btn-danger:hover { background: #2a1414; }
.btn-sm { padding: 6px 11px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-block { display: block; width: 100%; text-align: center; }

label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 5px; }
.field, select.field {
  width: 100%; padding: 10px 12px; border-radius: 10px; background: #0d131b;
  border: 1px solid var(--line); outline: none;
}
.field:focus { border-color: var(--accent-dim); }
.field::placeholder { color: #5b6b7f; }
input[type="color"].field { padding: 3px; height: 42px; cursor: pointer; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 0; }
.note { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.msg { margin: 14px 0 0; padding: 10px 13px; border-radius: 10px; font-size: 13.5px; }
.msg.err { background: #2a1414; border: 1px solid #5b2626; color: #fca5a5; }
.msg.ok { background: #0e2a20; border: 1px solid var(--accent-dim); color: #86efac; }

/* ---------- landing ---------- */
.hero { padding: 74px 0 46px; }
.hero h1 { font-size: 44px; line-height: 1.15; margin: 0 0 16px; letter-spacing: -.6px; }
.hero h1 .hl { color: var(--accent); }
.hero p.lead { font-size: 18px; color: #b9c7d6; max-width: 620px; margin: 0 0 26px; }
.hero .cta { display: flex; gap: 10px; flex-wrap: wrap; }
.kicker {
  display: inline-block; font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent-dim); border-radius: 999px;
  padding: 4px 12px; margin-bottom: 18px;
}

section { padding: 40px 0; }
section h2 { font-size: 26px; margin: 0 0 8px; letter-spacing: -.3px; }
section .sub { color: var(--muted); margin: 0 0 26px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 14px; }
.feature {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
}
.feature .ico { font-size: 22px; display: block; margin-bottom: 10px; }
.feature h3 { margin: 0 0 6px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 13.5px; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.plan {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column;
}
.plan h3 { margin: 0; font-size: 18px; }
.plan .badge {
  align-self: flex-start; font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--warn); border: 1px solid #6b5312; background: #241d08;
  border-radius: 999px; padding: 2px 9px; margin-bottom: 10px;
}
.plan .price { font-size: 30px; font-weight: 680; margin: 10px 0 2px; letter-spacing: -.5px; }
.plan .price small { font-size: 13px; font-weight: 400; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 14px 0 18px; }
.plan li { padding: 5px 0 5px 22px; position: relative; font-size: 13.5px; color: #c4d1de; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); }
.plan .btn { margin-top: auto; }

.strip {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; font-size: 14px; color: var(--muted);
}
footer.site { border-top: 1px solid var(--line); margin-top: 30px; padding: 24px 0 40px; color: var(--muted); font-size: 13px; }

/* ---------- auth cards ---------- */
.auth { max-width: 430px; margin: 60px auto 80px; }
.card-panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
}
.card-panel h1 { font-size: 22px; margin: 0 0 6px; }
.card-panel .sub { color: var(--muted); font-size: 14px; margin: 0 0 6px; }

/* ---------- settings ---------- */
.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; padding-bottom: 60px; }
.settings .card-panel h2 { font-size: 17px; margin: 0 0 4px; }
.settings .full { grid-column: 1 / -1; }
#base-map { height: 300px; border-radius: 10px; border: 1px solid var(--line); margin-top: 10px; }
.leaflet-container { background: #0d1117; font: inherit; }
.leaflet-tile-pane { filter: invert(1) hue-rotate(185deg) brightness(.96) contrast(.86) saturate(.55); }

.opt { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border: 1px solid var(--line);
       border-radius: 10px; background: var(--panel-2); margin-top: 8px; cursor: pointer; }
.opt input { margin-top: 3px; accent-color: var(--accent); }
.opt.is-on { border-color: var(--accent-dim); }
.opt b { display: block; font-size: 14px; }
.opt span { color: var(--muted); font-size: 12.5px; }

.truck-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line);
}
.truck-row:last-child { border-bottom: 0; }
.truck-ico { width: 52px; height: 22px; flex: none; color: var(--accent); }
.truck-banner { width: 132px; height: 50px; flex: none; color: var(--accent); display: block; }
.truck-banner svg { display: block; width: 100%; height: 100%; }
.truck-row .who { flex: 1; min-width: 0; }
.truck-row .who b { display: block; font-size: 14px; }
.truck-row .who span { display: block; color: var(--muted); font-size: 12.5px; }

/* ---------- banner picker (Unidades) ----------
   Nine drawings, tinted with the org accent, and a click is the answer. A
   grid rather than a <select>, because "¿cuál se parece a mi camión?" is a
   question an operator answers by looking, not by reading nine names. */
.banner-picker {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px; margin-top: 12px;
}
.banner-opt {
  display: block; width: 100%; text-align: left; cursor: pointer; padding: 8px 10px 9px;
  background: #0d131b; border: 1px solid var(--line); border-radius: 12px; color: var(--accent);
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.banner-opt:hover { border-color: #2b3a4f; background: #111a24; }
.banner-opt.is-on { border-color: var(--accent); background: #0f1c19; box-shadow: 0 0 0 1px var(--accent-dim) inset; }
.banner-art { display: block; width: 100%; height: 62px; }
.banner-art svg { display: block; width: 100%; height: 100%; }
.banner-name {
  display: block; margin-top: 4px; font-size: 11.5px; line-height: 1.35; color: var(--muted);
}
.banner-opt.is-on .banner-name { color: var(--text); }
.logo-preview {
  margin-top: 10px; padding: 12px; border: 1px dashed var(--line); border-radius: 10px;
  display: flex; align-items: center; gap: 12px; background: #0d131b;
}
.logo-preview img { max-height: 44px; max-width: 160px; object-fit: contain; }

/* ---------- landing: the fleet strip ----------
   Two of the console's own banners, in the brand accent. Decoration, so it
   collapses to one on a narrow screen instead of shrinking to a smear. */
.fleet-strip {
  display: flex; gap: 26px; align-items: center; justify-content: center;
  margin: 6px 0 12px; color: var(--accent);
}
.fleet-art { display: block; flex: 1; max-width: 380px; }
.fleet-art svg { display: block; width: 100%; height: auto; }
@media (max-width: 700px) { .fleet-strip .fleet-art + .fleet-art { display: none; } }

/* ---------- billing ---------- */
.plan-banner {
  background: #2a1f08; border: 1px solid #6b5312; color: #fcd34d;
  border-radius: var(--radius); padding: 14px 18px; font-size: 14px; margin-bottom: 18px;
}
.kv { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-of-type { border-bottom: 0; }
.kv span { color: var(--muted); flex: 1; }
.ok-text { color: #86efac; }
.warn-text { color: var(--warn); }
.meter { height: 7px; border-radius: 999px; background: #0d131b; border: 1px solid var(--line); margin: 12px 0 4px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); }
.plan.is-current { border-color: var(--accent-dim); }

@media (max-width: 620px) {
  .hero { padding: 46px 0 30px; }
  .hero h1 { font-size: 32px; }
}
