/* Sparkie — MIDNIGHT design rendszer.
   Grafit alap, borostyán/arany akcent — prémium éjszakai műszerfal, letisztulva. */
:root {
  --bg: #131418;
  --bg2: #17181c;
  --panel: #1b1d22;
  --panel2: #20232a;
  --line: #2c2f36;
  --txt: #f2efe9;
  --muted: #8f929a;
  --neon: #f5a623;
  --neon-soft: rgba(245, 166, 35, .1);
  --purple: #ff7a00;
  --danger: #ff4d5e;
  --ok: #3ddc84;
  --warn: #ffb020;
  --grad: linear-gradient(100deg, #f5a623, #ff7a00);
  --radius: 14px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .8);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: Inter, system-ui, sans-serif;
  background: var(--bg); color: var(--txt); line-height: 1.55; overflow-x: hidden;
  /* Sticky footer: a main kitölti a maradékot, így a lábléc mindig az aljára kerül. */
  min-height: 100vh; display: flex; flex-direction: column;
}
body > main { flex: 1 0 auto; }
body > .foot { flex: none; }
/* Flex-elemként a `margin: 0 auto` NEM nyújtja ki az elemet, hanem tartalom-szélességűre
   zsugorítja — és ha a tartalomnak nagy a belső mérete (pl. a 3D vászon width attribútuma),
   akkor túl is lóghat a képernyőn. Ezért kell a kifejezett teljes szélesség; a max-width
   és az auto margó ettől még középre igazít nagy kijelzőn. */
body > .nav, body > .flash, body > main { width: 100%; box-sizing: border-box; }
h1, h2, h3, .brand, .tile-num, .step-n, .pstat-num, .car-km { font-family: Rajdhani, sans-serif; letter-spacing: .3px; }
a { color: var(--neon); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Háttér: éjszakai város-fény + finom speed-line-ok */
.bg-fx {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 480px at 80% -10%, rgba(255, 122, 0, .13), transparent 60%),
    radial-gradient(760px 460px at 5% 0%, rgba(245, 166, 35, .09), transparent 55%),
    var(--bg);
}
.bg-fx::after {
  content: ""; position: absolute; inset: 0; opacity: .045;
  background: repeating-linear-gradient(115deg, transparent 0 46px, var(--neon) 46px 47px, transparent 47px 120px);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 60%);
          mask-image: linear-gradient(180deg, #000 0%, transparent 60%);
}

/* ===== NAV ===== */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1140px; margin: 0 auto; padding: 18px 22px; }
/* Márkajel: szikra + egyben olvasható név. A .brand-mark SVG-t a logo.ejs adja. */
.brand { color: var(--txt); display: inline-flex; align-items: center; gap: 9px; }
.brand:hover { text-decoration: none; }
.brand-mark { flex: none; color: var(--txt); filter: drop-shadow(0 0 10px rgba(245, 166, 35, .35)); transition: filter .2s; }
.brand:hover .brand-mark { filter: drop-shadow(0 0 14px rgba(255, 122, 0, .6)); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: Rajdhani, sans-serif; font-size: 26px; font-weight: 700; letter-spacing: 1.5px; }
.brand-sub { font-family: Rajdhani, sans-serif; font-size: 10.5px; font-weight: 600; letter-spacing: 5.5px;
  color: var(--neon); margin-top: 2px; }
.brand-stacked .brand-name { font-size: 21px; }
.nav-links { display: flex; align-items: center; gap: 18px; font-weight: 500; }
.nav-links a { color: var(--muted); }
.nav-links a:hover, .nav-links a.active { color: var(--txt); text-decoration: none; }
.nav-links a.active { text-shadow: 0 0 14px rgba(245, 166, 35, .5); }
.nav-cta { color: var(--txt) !important; border: 1px solid var(--line); background: var(--panel);
  padding: 8px 16px; border-radius: 999px; }
.nav-cta:hover { border-color: var(--neon); }
.nav-muted { font-size: 14px; }
.lang-toggle { border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; font-size: 13px;
  font-weight: 600; color: var(--muted) !important; }
.lang-toggle:hover { border-color: var(--neon); color: var(--neon) !important; text-decoration: none; }

/* ===== Flash ===== */
.flash { max-width: 1140px; margin: 0 auto 8px; padding: 10px 18px; border-radius: 10px; font-weight: 500; }
.flash-ok { background: rgba(61, 220, 132, .1); border: 1px solid rgba(61, 220, 132, .35); color: var(--ok); }
.flash-err { background: rgba(255, 77, 94, .1); border: 1px solid rgba(255, 77, 94, .35); color: var(--danger); }
.flash-warn { background: rgba(255, 176, 32, .1); border: 1px solid rgba(255, 176, 32, .35); color: var(--warn); }

/* ===== Gombok ===== */
.btn { display: inline-block; padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 15px;
  border: 1px solid var(--line); background: var(--panel); color: var(--txt); cursor: pointer;
  font-family: Inter, sans-serif; transition: transform .12s ease, box-shadow .2s ease, border-color .2s ease; }
.btn:hover { border-color: var(--neon); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #1a1206; border: none; box-shadow: 0 8px 26px -10px rgba(245, 166, 35, .55); }
.btn-primary:hover { box-shadow: 0 12px 34px -8px rgba(245, 166, 35, .75); transform: translateY(-1px); }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); }
.btn-lg { padding: 14px 26px; font-size: 17px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-mini { padding: 4px 10px; font-size: 13px; border-radius: 8px; }

/* ===== Landing ===== */
.hero { max-width: 1140px; margin: 0 auto; padding: 46px 22px 24px; text-align: center; }
.hero-badge { display: inline-block; font-size: 13px; font-weight: 600; color: var(--neon);
  border: 1px solid rgba(245, 166, 35, .35); background: var(--neon-soft);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 20px; }
.hero-h1 { font-size: clamp(42px, 8vw, 84px); line-height: .96; margin: 0 0 16px; font-weight: 700; text-transform: uppercase; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px rgba(245, 166, 35, .35)); }
.lead { max-width: 640px; margin: 0 auto 28px; color: var(--muted); font-size: 18px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 44px; }

.dash-preview { max-width: 560px; margin: 0 auto; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; text-align: left; }
.dash-head { display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-bottom: 1px solid var(--line); background: var(--bg2); }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.r { background: #ff5f56; } .dot.y { background: #ffbd2e; } .dot.g { background: #27c93f; }
.dash-title { margin-left: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.dash-body { padding: 18px; }
.preview-car-name { font-family: Rajdhani, sans-serif; font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.preview-stats { display: flex; gap: 10px; margin-bottom: 14px; }
.pstat { flex: 1; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; }
.pstat-num { display: block; font-size: 26px; font-weight: 700; line-height: 1.1; }
.pstat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.pstat-neon { border-color: rgba(245, 166, 35, .4); }
.pstat-neon .pstat-num { color: var(--neon); text-shadow: 0 0 16px rgba(245, 166, 35, .5); }
.preview-due { font-size: 14px; color: var(--muted); }

.features, .how { max-width: 1140px; margin: 0 auto; padding: 64px 22px; }
.section-title { text-align: center; font-size: clamp(28px, 5vw, 42px); margin: 0 0 34px; font-weight: 700; text-transform: uppercase; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.feat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  transition: transform .15s ease, border-color .2s ease; }
.feat:hover { transform: translateY(-4px); border-color: rgba(245, 166, 35, .45); }
.feat-ico { font-size: 32px; margin-bottom: 10px; }
.feat h3 { margin: 0 0 6px; font-size: 21px; }
.feat p { margin: 0; color: var(--muted); font-size: 15px; }

.how { border-top: 1px solid var(--line); }
.steps { list-style: none; padding: 0; max-width: 620px; margin: 0 auto; display: grid; gap: 14px; }
.steps li { display: flex; gap: 16px; align-items: flex-start; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.step-n { flex: none; width: 42px; height: 42px; border-radius: 10px; background: var(--grad);
  color: #1a1206; font-size: 22px; font-weight: 700; display: grid; place-items: center; }
.steps b { font-size: 17px; }
.steps p { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.how-cta { text-align: center; margin-top: 32px; }

/* ===== App-oldalak ===== */
.page { max-width: 1140px; margin: 0 auto; padding: 12px 22px 60px; }
.page-narrow { max-width: 720px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 4px 0 0; font-size: clamp(28px, 5vw, 40px); text-transform: uppercase; }
.h1-sub { font-size: .55em; font-weight: 500; }
.head-actions { display: flex; gap: 8px; align-items: center; }
.head-actions form { margin: 0; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 18px; }
.panel-title { margin: 0 0 12px; font-size: 18px; }
.panel-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }

/* A magasságot a flexes body adja (body > main { flex: 1 }), ezért itt csak alsó korlát kell —
   a 68vh korábban feleslegesen görgethetővé tette a belépés-oldalt. */
.center-page { min-height: 320px; display: grid; place-items: center; padding: 24px; }
.center-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px; text-align: center; box-shadow: var(--shadow); max-width: 430px; width: 100%; }
.auth-card { text-align: left; }
.auth-title { text-align: center; margin: 0 0 18px; text-transform: uppercase; }
.big-emoji { font-size: 56px; margin-bottom: 8px; }

/* ===== Űrlapok ===== */
.stack { display: grid; gap: 12px; }
label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
input, select {
  background: var(--bg2); border: 1px solid var(--line); color: var(--txt);
  border-radius: 9px; padding: 10px 12px; font-size: 15px; font-family: Inter, sans-serif; width: 100%;
}
input:focus, select:focus { outline: none; border-color: var(--neon); box-shadow: 0 0 0 3px rgba(245, 166, 35, .15); }
input:disabled { opacity: .55; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: center; gap: 9px; font-weight: 500; color: var(--txt); font-size: 14px; }
.check input { width: auto; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.inline { display: inline; }

/* ===== Garázs ===== */
.car-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.car-card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: var(--txt); transition: transform .15s ease, border-color .2s ease, box-shadow .2s ease; }
.car-card:hover { transform: translateY(-4px); border-color: rgba(245, 166, 35, .5);
  box-shadow: 0 16px 40px -18px rgba(245, 166, 35, .35); }
.car-cover { display: block; height: 140px; background: var(--bg2); position: relative; }
.car-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.car-cover-ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 44px; opacity: .35; }
.car-card-body { padding: 16px 18px 18px; }
.car-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.car-name { font-family: Rajdhani, sans-serif; font-size: 22px; font-weight: 700; text-transform: uppercase; color: var(--txt); }
.car-name:hover { text-decoration: none; color: var(--neon); }
.quick-row { display: flex; gap: 8px; margin-top: 12px; }
.car-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin: 8px 0 14px; }
.car-km { font-size: 30px; font-weight: 700; }
.plate { display: inline-block; background: #e9ecf5; color: #0a0b10; font-family: Rajdhani, sans-serif;
  font-weight: 700; font-size: 13px; padding: 1px 8px; border-radius: 5px; border: 1.5px solid #444; letter-spacing: 1px; }
.chip { display: inline-block; background: var(--bg2); border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 10px; font-size: 12.5px; color: var(--muted); }
.chip-neon { color: var(--neon); border-color: rgba(245, 166, 35, .4); }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.todo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.todo-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.todo-list a { color: var(--txt); }

/* ===== Fotók ===== */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.photo-item { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 3; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-cover-badge { position: absolute; top: 6px; left: 6px; font-size: 11px; font-weight: 700;
  background: rgba(19, 20, 24, .8); color: var(--neon); padding: 2px 8px; border-radius: 999px; }
.photo-actions { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 5px; opacity: 0; transition: opacity .15s ease; }
.photo-item:hover .photo-actions { opacity: 1; }
.photo-actions .btn { background: rgba(19, 20, 24, .85); }
.photo-upload-tile { display: grid; place-items: center; gap: 4px; aspect-ratio: 4 / 3; border: 2px dashed var(--line);
  border-radius: 10px; cursor: pointer; color: var(--muted); text-align: center; padding: 10px;
  transition: border-color .2s ease, color .2s ease; }
.photo-upload-tile:hover { border-color: var(--neon); color: var(--neon); }
.photo-upload-ico { font-size: 30px; }
.photo-upload-tile input[type="file"] { display: none; }
.part-value { font-family: ui-monospace, Consolas, monospace; font-size: 13.5px; }
.ta-c { text-align: center; }
.parts-tbl tfoot td { border-bottom: none; border-top: 1px solid var(--line); color: var(--muted);
  font-size: 13px; text-transform: uppercase; letter-spacing: .4px; padding-top: 10px; }
.parts-tbl tfoot b { color: var(--neon); font-size: 16px; }
.parts-tbl input[type="checkbox"] { width: auto; cursor: pointer; }
.parts-tbl input[type="checkbox"]:disabled { opacity: .3; cursor: default; }
.cart-bar { position: sticky; bottom: 14px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 14px; padding: 12px 18px; background: var(--panel2); border: 1px solid rgba(245, 166, 35, .45);
  border-radius: 12px; box-shadow: 0 14px 34px -16px rgba(0, 0, 0, .8); }
.cart-label { color: var(--muted); font-size: 14px; }
.cart-label b { color: var(--txt); }
.cart-total { margin-left: auto; font-family: Rajdhani, sans-serif; font-size: 26px; font-weight: 700; color: var(--neon); }

/* ===== Idővonal ===== */
.tl-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip-filter { cursor: pointer; font-family: Inter, sans-serif; }
.chip-filter.active { color: var(--neon); border-color: rgba(245, 166, 35, .5); background: var(--neon-soft); }
.chip-sm { font-size: 11px; padding: 2px 8px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 8px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 22px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl-item { display: flex; gap: 16px; padding: 0 0 18px; position: relative; }
.tl-item.hidden { display: none; }
.tl-dot { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--panel); border: 1px solid var(--line); font-size: 14px; z-index: 1; }
.tl-service { border-color: rgba(245, 166, 35, .5); }
.tl-fuel { border-color: rgba(61, 220, 132, .4); }
.tl-dyno { border-color: rgba(255, 122, 0, .5); }
.tl-mod { border-color: rgba(255, 122, 0, .35); }
.tl-document { border-color: rgba(143, 146, 154, .4); }
.tl-body { flex: 1; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.tl-date { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.tl-title { font-weight: 600; }
.tl-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 2px; }

/* ===== Gumik ===== */
.tire-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tire-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.tire-mounted { border-color: rgba(61, 220, 132, .45); }
.tire-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.tire-name { font-family: Rajdhani, sans-serif; font-size: 19px; font-weight: 700; }
.tire-specs { margin: 10px 0; display: grid; gap: 4px; }
.tire-specs div { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.tire-specs dt { color: var(--muted); margin: 0; }
.tire-specs dd { margin: 0; font-weight: 600; }
.tire-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tire-actions form { margin: 0; }

/* ===== Üzemanyagár ===== */
.price-panel .price-row { display: flex; gap: 14px; flex-wrap: wrap; }
.price-box { flex: 1; min-width: 180px; background: var(--bg2); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; display: grid; gap: 2px; }
.price-num { font-family: Rajdhani, sans-serif; font-size: 30px; font-weight: 700; line-height: 1.1; color: var(--neon); }
.price-unit { font-size: 14px; color: var(--muted); font-weight: 500; }
.price-good { color: var(--ok); font-weight: 600; }
.price-bad { color: var(--warn); font-weight: 600; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 560px) { .row3 { grid-template-columns: 1fr; } }

/* ===== Megosztás ===== */
.share-row { display: flex; gap: 8px; align-items: center; margin: 12px 0 8px; flex-wrap: wrap; }
.share-input { flex: 1; min-width: 220px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.share-off { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ===== Eladási hirdetés ===== */
.sale-form { margin-bottom: 14px; }
.sale-form .row2 { margin-bottom: 10px; }
.sale-warn { margin: 0 0 12px; padding: 10px 14px 10px 30px; list-style: '⚠️ ';
  background: rgba(255, 176, 32, .08); border: 1px solid rgba(255, 176, 32, .3);
  border-radius: 10px; color: var(--warn); font-size: 13.5px; }
.sale-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.sale-tab.active { border-color: var(--neon); color: var(--neon); }
.sale-text { width: 100%; font-family: Inter, system-ui, sans-serif; font-size: 14px; line-height: 1.6;
  background: var(--bg2); color: var(--txt); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; resize: vertical; }
.sale-actions { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.sale-sep { border: 0; border-top: 1px solid var(--line); margin: 20px 0 14px; }

/* Publikus eladó-lap */
.sale-price { font-family: Rajdhani, sans-serif; font-size: 34px; font-weight: 700; margin-top: 10px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sale-price span { font-size: 20px; }
.sale-note-panel p { margin: 0; font-size: 16px; color: #c9cdd6; }
.sale-tiles { margin: 18px 0; }

/* ===== 3D autó-avatar ===== */
/* Az autó alatti árnyékot a 3D jelenet veti (árnyéktérkép + ShadowMaterial padló),
   nem CSS — így követi a forgást és a karosszéria formáját. */
.car3d { position: relative; display: grid; place-items: center; touch-action: pan-y; }
.car3d-canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.car3d.is-dragging .car3d-canvas { cursor: grabbing; }
/* A helyettesítő tartalom addig látszik, amíg a 3D tényleg be nem töltött. */
.car3d-fallback { font-size: 42px; opacity: .5; }
.car3d-live .car3d-fallback { display: none; }
.car3d-live .car3d-canvas { position: absolute; inset: 0; }
.car3d-sm { height: 150px; }
.car3d-md { height: 190px; }
.car3d-lg { height: 300px; }
@media (max-width: 640px) { .car3d-lg { height: 230px; } }

/* Avatar-választó az űrlapokban */
.avatar-picker { display: grid; grid-template-columns: 180px 1fr; gap: 16px; align-items: center;
  background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.avatar-preview .car3d { width: 100%; }
.avatar-label { display: block; color: var(--muted); font-size: 11.5px; text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 6px; }
.avatar-shapes { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
/* A címkék pozicionáltak, KÜLÖNBEN a rejtett rádió a legközelebbi pozicionált őshöz
   (a <dialog>-hoz) igazodna: kilógna a párbeszédablakból és véletlenül kattintható lenne. */
.avatar-shape, .avatar-color { position: relative; display: inline-flex; }
.avatar-shape input { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.avatar-shape span { display: inline-block; border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 12px; font-size: 13px; cursor: pointer; background: var(--panel); transition: all .15s; }
.avatar-shape input:checked + span { border-color: var(--neon); color: var(--neon); background: rgba(245, 166, 35, .1); }
.avatar-colors { display: flex; gap: 8px; flex-wrap: wrap; }
.avatar-color input { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.avatar-color span { display: block; width: 26px; height: 26px; border-radius: 50%; background: var(--sw);
  border: 2px solid transparent; box-shadow: 0 0 0 1px var(--line); cursor: pointer; transition: transform .15s; }
.avatar-color input:checked + span { border-color: var(--bg2); box-shadow: 0 0 0 2px var(--neon); transform: scale(1.12); }
@media (max-width: 560px) { .avatar-picker { grid-template-columns: 1fr; } }

/* Hero: 3D autó a műszerfal-előnézet mellett */
.hero-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: center;
  max-width: 1000px; margin: 40px auto 0; padding: 0 22px; }
.hero-stage .dash-preview { margin: 0; }
.hero-stage .car3d-lg { width: 100%; }
@media (max-width: 860px) {
  .hero-stage { grid-template-columns: 1fr; gap: 14px; }
  .hero-stage .car3d { order: 2; }
}

/* ===== Nyitólap: számok-sáv ===== */
.stat-strip { max-width: 900px; margin: 10px auto 0; padding: 0 22px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat-strip > div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; text-align: center; }
.stat-strip b { display: block; font-family: Rajdhani, sans-serif; font-size: 40px; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-strip span { display: block; margin-top: 6px; color: var(--muted); font-size: 13.5px; }
.stat-strip i { font-style: normal; font-size: 12.5px; }
@media (max-width: 640px) { .stat-strip { grid-template-columns: 1fr; } }

/* ===== Nyitólap: nagy funkció-blokkok ===== */
.showcase { max-width: 1060px; margin: 0 auto; padding: 70px 22px 20px; display: flex; flex-direction: column; gap: 64px; }
.show-row { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.show-rev .show-text { order: 2; }
.show-kicker { font-family: Rajdhani, sans-serif; font-size: 15px; font-weight: 700; letter-spacing: 3px; color: var(--neon); }
.show-text h2 { font-size: clamp(24px, 3.6vw, 34px); margin: 6px 0 10px; }
.show-text p { color: #b9bfcc; font-size: 16.5px; margin: 0; }
@media (max-width: 820px) {
  .show-row { grid-template-columns: 1fr; gap: 26px; }
  .show-rev .show-text { order: 0; }
  .showcase { gap: 52px; padding-top: 48px; }
}

/* Mockupok (tiszta CSS, nincs kép) */
.mock { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); }
.mock-line { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.mock-line:last-child { border-bottom: 0; }
.mock-line b { flex: 1; font-weight: 600; }
.mock-line i { font-style: normal; color: var(--muted); font-size: 13px; }
.mock-fuel-row { display: flex; align-items: baseline; gap: 8px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.mock-fuel-row b { color: var(--txt); font-size: 17px; }
.mock-big { font-family: Rajdhani, sans-serif; font-size: 46px; font-weight: 700; line-height: 1.1; margin: 8px 0 12px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mock-big small { font-size: 15px; color: var(--muted); -webkit-text-fill-color: var(--muted); }
.mock-bars { display: flex; align-items: flex-end; gap: 7px; height: 62px; }
.mock-bars i { flex: 1; background: var(--bg2); border-radius: 4px 4px 0 0; border-top: 2px solid var(--line); }
.mock-bars i.hot { background: linear-gradient(180deg, var(--neon), transparent); border-top-color: var(--neon); }
.mock-note { margin-top: 12px; color: var(--muted); font-size: 13.5px; }
.ok-txt { color: var(--ok); }
.mock-total { font-family: Rajdhani, sans-serif; font-size: 38px; font-weight: 700; line-height: 1; }
.mock-total small { font-size: 17px; color: var(--muted); }
.mock-split { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--bg2); margin: 12px 0 8px; }
.mock-split i { display: block; height: 100%; }
.mock-legend { display: flex; gap: 14px; color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.mock-years > div { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; font-size: 13px; color: var(--muted); }
.mock-years span { width: 38px; flex: none; }
.mock-years i { height: 7px; border-radius: 4px; background: var(--grad); display: block; }
.mock-build-cover { height: 96px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 38px; margin-bottom: 12px; }
.mock-build-title { font-family: Rajdhani, sans-serif; font-size: 22px; font-weight: 700; }
.mock-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.mock-chips span { background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; font-size: 12.5px; color: var(--muted); }
.mock-dyno { display: flex; gap: 8px; align-items: baseline; font-family: Rajdhani, sans-serif; font-size: 21px; color: var(--neon); }
.mock-link { margin-top: 10px; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; color: var(--muted);
  background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Hero-előnézet csempéi */
.preview-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.preview-tiles .ptile { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px;
  display: flex; flex-direction: column; gap: 2px; text-align: left;
  /* min-width: 0 nélkül a nowrap felirat min-content szélessége szétfeszítené a rácsot kis kijelzőn */
  min-width: 0; }
.preview-tiles span { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .7px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-tiles b { font-family: Rajdhani, sans-serif; font-size: 17px; }

/* ===== Nyitólap: bizalmi blokk + záró CTA ===== */
.trust { max-width: 900px; margin: 60px auto 0; padding: 0 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.trust-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.trust-ico { font-size: 26px; margin-bottom: 6px; }
.trust-card h3 { margin: 0 0 6px; font-size: 20px; }
.trust-card p { color: #b9bfcc; margin: 0 0 10px; font-size: 15px; }
@media (max-width: 760px) { .trust { grid-template-columns: 1fr; } }
.final-cta { text-align: center; padding: 74px 22px 20px; }
.final-cta h2 { font-size: clamp(24px, 4vw, 36px); margin: 0 0 20px; }

/* ===== Garázs-műszerfal ===== */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; }
.tile::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--grad); opacity: .8; }
.tile-label { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: 1.2px; }
.tile-num { font-size: 27px; font-weight: 700; line-height: 1.15; }
.tile-unit { font-size: 14px; font-weight: 500; color: var(--muted); }
.tile-foot { margin-top: 2px; }
.tile-legend { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.tile-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.tile-legend i:not(:first-child) { margin-left: 6px; }
.tile-bar { display: flex; height: 5px; border-radius: 3px; overflow: hidden; background: var(--bg2); margin-top: 6px; }
.tile-bar .seg { display: block; height: 100%; }
.seg-fuel { background: var(--neon); }
.seg-service { background: var(--neon); }
.seg-mods { background: #7a6cff; }

.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; margin-top: 18px; }
@media (max-width: 860px) { .dash-cols { grid-template-columns: 1fr; } }

/* Üzemanyagár-doboz */
.price-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.price-chip { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px;
  display: flex; flex-direction: column; line-height: 1.3; min-width: 96px; }
.price-chip b { font-size: 18px; font-family: Rajdhani, sans-serif; }
.price-compare { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* A .chart-box alap-magassága később következik a fájlban, ezért itt kell a nagyobb fajsúly. */
.chart-box.chart-box-xs { height: 140px; }

/* Esemény-folyam */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; padding-bottom: 0; }
.feed-icon { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--bg2); border: 1px solid var(--line); font-size: 15px; }
.feed-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; color: var(--txt); }
.feed-main:hover { text-decoration: none; }
.feed-main:hover b { color: var(--neon); }
.feed-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-side { flex: none; text-align: right; display: flex; flex-direction: column; line-height: 1.35; }

/* Gazdagabb autókártya */
.car-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 12px 0 0;
  padding-top: 11px; border-top: 1px solid var(--line); }
.car-stats div { display: flex; flex-direction: column; min-width: 0; }
.car-stats dt { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .8px; }
.car-stats dd { margin: 0; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.car-next { display: flex; align-items: center; gap: 7px; margin-top: 9px; font-size: 13.5px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.car-next:hover { color: var(--txt); text-decoration: none; }
.car-next .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.car-next-ico { width: 7px; font-size: 11px; display: inline-flex; justify-content: center; flex: none; opacity: .8; }
.dot-due { background: var(--danger); box-shadow: 0 0 8px rgba(255, 77, 94, .7); }
.dot-soon { background: var(--warn); box-shadow: 0 0 8px rgba(255, 176, 32, .6); }
.dot-ok { background: var(--ok); }

/* ===== Veszélyzóna (fióktörlés) ===== */
.panel-danger { border-color: rgba(239, 68, 68, .45); }
.panel-danger .panel-title { color: var(--danger); }
.panel-danger .btn-danger { border-color: rgba(239, 68, 68, .5); }
.panel-danger .btn-danger:hover { background: rgba(239, 68, 68, .12); }

/* ===== Meghívók ===== */
.invite-new { display: flex; gap: 8px; margin: 12px 0 16px; flex-wrap: wrap; }
.invite-new input { flex: 1; min-width: 200px; }
.invite-code { display: inline-block; white-space: nowrap; font-family: ui-monospace, Consolas, monospace;
  font-size: 15px; letter-spacing: 1px;
  color: var(--neon); background: var(--bg2); padding: 3px 10px; border-radius: 6px; border: 1px solid var(--line); }
.invite-input { font-family: ui-monospace, Consolas, monospace; letter-spacing: 2px; text-transform: uppercase; }

/* ===== Jogi oldalak ===== */
.legal { max-width: 820px; }
.legal h1 { font-size: clamp(26px, 5vw, 38px); margin-bottom: 6px; }
.legal h2 { font-size: 22px; margin: 30px 0 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.legal h3 { font-size: 17px; margin: 20px 0 6px; color: var(--neon); }
.legal p, .legal li { color: #c9cdd6; }
.legal ul, .legal ol { padding-left: 22px; }
.legal li { margin-bottom: 5px; }
.legal .tbl { margin: 12px 0; }
.legal-meta { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }
.legal-warn { background: rgba(255, 176, 32, .1); border: 1px solid rgba(255, 176, 32, .4);
  border-radius: 10px; padding: 12px 16px; margin-bottom: 20px; color: var(--warn); }
.legal-toc { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 20px; margin-bottom: 22px; }
.legal-toc ol { margin: 6px 0 0; }
.foot-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 10px; font-size: 13.5px; }

/* ===== Publikus build-lap ===== */
.build-page { max-width: 900px; }
.build-hero { margin-bottom: 22px; }
.build-cover { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); max-height: 420px; }
.build-cover img { width: 100%; height: 100%; max-height: 420px; object-fit: cover; display: block; }
.build-head { margin-top: 16px; }
.build-head h1 { font-size: clamp(30px, 6vw, 46px); text-transform: uppercase; margin: 0 0 8px; }
.build-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.build-mods { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.build-mods li { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  padding: 8px 0; border-bottom: 1px solid var(--line); }
.build-mods li:last-child { border-bottom: none; }
.build-mod-date { margin-left: auto; }
.build-foot { text-align: center; padding: 30px 0 10px; display: grid; gap: 12px; justify-items: center; }

/* ===== Badge-ek ===== */
.badge { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .6px;
  padding: 3px 9px; border-radius: 999px; text-transform: uppercase; }
.badge-due { background: rgba(255, 77, 94, .15); color: var(--danger); border: 1px solid rgba(255, 77, 94, .4);
  box-shadow: 0 0 12px rgba(255, 77, 94, .25); }
.badge-soon { background: rgba(255, 176, 32, .12); color: var(--warn); border: 1px solid rgba(255, 176, 32, .4); }
.badge-ok { background: rgba(61, 220, 132, .1); color: var(--ok); border: 1px solid rgba(61, 220, 132, .35); }
.badge-unknown { background: var(--bg2); color: var(--muted); border: 1px solid var(--line); }

/* ===== Fülek ===== */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab { background: none; border: none; border-bottom: 2px solid transparent; color: var(--muted);
  padding: 10px 14px; font-size: 15px; font-weight: 600; cursor: pointer; font-family: Inter, sans-serif; }
.tab:hover { color: var(--txt); }
.tab.active { color: var(--neon); border-bottom-color: var(--neon); text-shadow: 0 0 14px rgba(245, 166, 35, .4); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== Csempék ===== */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.tile-num { display: block; font-size: 32px; font-weight: 700; line-height: 1.1; }
.tile-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.tile-neon { border-color: rgba(245, 166, 35, .4); }
.tile-neon .tile-num { color: var(--neon); text-shadow: 0 0 18px rgba(245, 166, 35, .45); }
.neon-text { color: var(--neon); text-shadow: 0 0 12px rgba(245, 166, 35, .5); }
.km-quick { display: flex; gap: 6px; margin-top: 10px; }
.km-quick input { padding: 6px 10px; font-size: 13px; }

.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .chart-row { grid-template-columns: 1fr; } }
/* Chart.js-nek FIX magasságú, relatív wrapper kell — enélkül a responsive canvas
   végtelenül nyúlik (a szülő magasságához igazodna, amit épp ő maga növel). */
.chart-box { position: relative; height: 240px; width: 100%; }
.chart-box canvas { max-height: 100%; }
.chart-box-sm { height: 200px; }

/* ===== Táblázatok ===== */
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase;
  letter-spacing: .5px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:hover { background: rgba(245, 166, 35, .03); }
.ta-r { text-align: right; white-space: nowrap; }
.tbl form.inline { margin: 0; }

/* ===== Dialogok ===== */
.dlg { background: var(--panel2); color: var(--txt); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; width: min(520px, 92vw); box-shadow: var(--shadow); }
.dlg::backdrop { background: rgba(4, 5, 10, .7); backdrop-filter: blur(3px); }
.dlg h2 { margin: 0 0 6px; font-size: 22px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* ===== Lábléc =====
   A body flex-oszlop (lásd fent), a main flex:1 — így a lábléc rövid oldalon is
   az ablak aljára kerül, nem lóg be a tartalom alá félúton. */
.foot { padding: 32px 22px 38px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 36px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .25)); }
.foot-inner { max-width: 1140px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.foot-made { margin: 0; font-size: 14px; }

@media (max-width: 640px) {
  .nav { flex-wrap: wrap; }
  /* Bejelentkezve 5 elem van a menüben — kis kijelzőn tördelni kell, különben kilóg. */
  .nav-links { flex-wrap: wrap; justify-content: flex-end; gap: 10px 14px; font-size: 15px; }
  .row2 { grid-template-columns: 1fr; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .tbl { display: block; overflow-x: auto; }
}
