/* Mekinaye — one stylesheet for every page. Mobile first: the base rules are
   for a phone, and the @media blocks add room on bigger screens.

   The look, in short: the blue and white of Addis taxis. Blue marks what you
   can tap and what is picked; road yellow is kept for Sell (and Featured).
   The one bold thing is the price, drawn like an Ethiopian number plate with
   "ብር" in the blue code box. Everything else stays quiet so the photos lead:
   flat white surfaces with thin lines, shadows only on things that float
   (sheets, toasts, the plate). Icons are one line set (icons.svg). */

/* Barlow was drawn from road signs and number plates. Latin only: Amharic
   falls through to Noto Sans Ethiopic, which Android phones already have,
   so it costs no data (Nyala/Ebrima on Windows, Kefa on iPhone). */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/barlow-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/barlow-500.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/barlow-600.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/barlow-semi-condensed-700.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

*, *::before, *::after { box-sizing: border-box; }

:root {
  --brand: #1f4fb5;        /* taxi blue: main buttons, the picked tile, the plate's code box */
  --brand-hover: #1a439c;
  --brand-text: #1f4fb5;   /* links and picked words on white */
  --brand-deep: #163a86;   /* words on the light blue */
  --brand-tint: #e4ecfa;
  --signal: #f2b705;       /* road yellow: Sell and Featured only */
  --signal-hover: #dea700;
  --on-signal: #182234;
  --ink: #182234;
  --muted: #5b6577;
  --faint: #7c8596;
  --ground: #eef2f7;       /* behind everything */
  --paper: #ffffff;        /* bars, cards, sheets */
  --sunken: #f1f4f8;       /* fields and resting tiles on white */
  --line: #d7dee9;
  --line-soft: #e7ecf3;
  --field: #bfc8d6;
  --ok: #1f7a4d;   --ok-tint: #e3f2e9;   --ok-deep: #17603c;
  --warn: #b07a00; --warn-tint: #fdf1cf; --warn-deep: #6e4f00;
  --danger: #c4372d; --danger-hover: #a92e25; --danger-tint: #fcebea; --danger-deep: #9a2a22;
  --dot: #d63a2f;          /* unread numbers */
  --photo: #dfe5ee;        /* behind a photo that is still loading */
  --scrim: rgba(12, 18, 30, .5);
  --focus: rgba(31, 79, 181, .28);
  --shadow-float: 0 10px 30px -10px rgba(15, 22, 35, .4);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%235b6577' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6 -6'/%3E%3C/svg%3E");
  --r-sm: 6px;   /* badges, small chips: squared like a plate */
  --r: 10px;     /* fields, buttons, cards */
  --r-lg: 16px;  /* sheets */
  --font-ui: "Barlow", "Noto Sans Ethiopic", "Nyala", "Ebrima", "Kefa", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-tight: "Barlow Semi Condensed", "Barlow", "Noto Sans Ethiopic", "Nyala", "Ebrima", "Kefa", system-ui, sans-serif;
  --font-am: "Noto Sans Ethiopic", "Nyala", "Ebrima", "Kefa", system-ui, sans-serif;
  color-scheme: light;
}

/* Dark mode: the same names, dark colours. i18n.js sets data-theme before
   the page shows: the choice saved on the phone (Menu → Dark mode), or else
   the phone's own setting. The plate stays a white plate. */
:root[data-theme="dark"] {
  --brand: #3567d6;
  --brand-hover: #2c5bc4;
  --brand-text: #8db0f7;
  --brand-deep: #c2d4fb;
  --brand-tint: #1b2a4a;
  --signal-hover: #ffc51f;
  --ink: #e6ebf3;
  --muted: #9ba6b9;
  --faint: #737e92;
  --ground: #0d131e;
  --paper: #161e2c;
  --sunken: #1e2838;
  --line: #283347;
  --line-soft: #212b3c;
  --field: #3a475e;
  --ok: #4cc287;   --ok-tint: #15301f;   --ok-deep: #9fe0bd;
  --warn: #f2b705; --warn-tint: #33280c; --warn-deep: #f3d37e;
  --danger: #e2574c; --danger-hover: #c94a40; --danger-tint: #3a1d1b; --danger-deep: #f5aaa3;
  --dot: #e5483c;
  --photo: #222c3d;
  --scrim: rgba(0, 0, 0, .6);
  --focus: rgba(141, 176, 247, .35);
  --shadow-float: 0 12px 32px -10px rgba(0, 0, 0, .75);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%239ba6b9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6 -6'/%3E%3C/svg%3E");
  color-scheme: dark;
}

/* Amharic pages hide for the instant it takes to swap the English words
   (see i18n.js), and long texts come in both languages, one shown at a time. */
.i18n-wait body { visibility: hidden; }
html[lang="am"] [data-only="en"],
html[lang="en"] [data-only="am"] { display: none !important; }

/* Money words (fees, wallet, gift) only while payments are on: app.js puts
   .paid on <html>. Hidden until then, so a free app never flashes them. */
html:not(.paid) [data-paid],
html.paid [data-free] { display: none !important; }

/* ---------- base ---------- */

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: .9375rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--ground);
  -webkit-tap-highlight-color: transparent;
}
/* Ethiopic letters carry more detail: a touch bigger, a touch more air. */
html[lang="am"] body { font-size: 1rem; line-height: 1.6; }
img { display: block; max-width: 100%; }
a { color: var(--brand-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; }
h1 { font-family: var(--font-tight); font-size: 1.5rem; font-weight: 700; letter-spacing: .005em; }
h2 { font-size: 1.0625rem; font-weight: 600; margin-top: 1.25rem; }
h3 { font-size: .9375rem; font-weight: 600; }
b, strong { font-weight: 600; }
p { margin: 0 0 .75rem; }
input, select, textarea, button { font: inherit; color: inherit; }
/* Typing boxes stay at 16px: below that, iPhones zoom the page in on every tap. */
input, select, textarea { font-size: 16px; }
[hidden] { display: none !important; }
::selection { background: var(--brand-tint); color: var(--ink); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 680px; }
main { min-height: 60vh; padding-bottom: 32px; }
main.wrap { padding-top: 20px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.hint { color: var(--muted); font-size: .875rem; margin: 6px 0; }
.loading { color: var(--muted); padding: 32px 0; text-align: center; }
/* Kept in the page (not display:none) so tapping a label still opens the
   photo picker on every phone, older iPhones included. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Line icons from icons.svg: they take the colour of the words around them. */
.ico {
  width: 1.25em; height: 1.25em; flex: none; vertical-align: -.27em;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}

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

.topbar { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); transition: border-color .15s; }
/* On the home page the search row belongs to the header; the line shows once the page scrolls. */
.page-home .topbar { border-bottom-color: transparent; }
.page-home.scrolled .topbar { border-bottom-color: var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 56px; }
.top-left { display: flex; align-items: center; gap: 4px; min-width: 0; }

/* The logo: the car mark and the word "mekinaye" (icons.svg #logo and #wordmark). */
.logo { display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 4px 2px; border-radius: var(--r-sm); color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo-mark { display: block; width: 30px; height: 30px; }
.logo-word { display: block; width: 89px; height: 20px; fill: currentColor; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a:not(.btn):not(.bell) { padding: 8px 10px; border-radius: var(--r-sm); color: var(--ink); font-weight: 500; white-space: nowrap; }
.nav a:not(.btn):not(.bell):hover { background: var(--sunken); text-decoration: none; }
.nav .btn { margin-left: 6px; }
.nav .count-badge { margin-left: 2px; vertical-align: 1px; }
.menu-btn, .bell {
  position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer;
}
.menu-btn:hover, .bell:hover { background: var(--sunken); text-decoration: none; }
.menu-btn .ico, .bell .ico { width: 24px; height: 24px; vertical-align: 0; }
.bell-badge { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 4px; font-size: .68rem; box-shadow: 0 0 0 2px var(--paper); }
/* written in the language it switches TO, so it can be found by someone who cannot read this one */
.lang-btn {
  min-height: 32px; padding: 3px 9px; margin-left: 4px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); color: var(--ink);
  font-size: .85rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.lang-btn:hover { background: var(--sunken); }
.lang-choice { background: var(--brand-tint); color: var(--brand-deep); }
.lang-choice-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; padding-top: 10px; padding-bottom: 10px; font-weight: 600; }
.lang-choice-inner > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.lang-choice .btns { display: flex; gap: 8px; }
@media (max-width: 420px) {
  .nav .nav-extra { display: none; }
}

/* the bar at the bottom of a phone screen: Home · My cars · Sell · Messages · Account */
.bottom-nav { display: none; }
@media (max-width: 720px) {
  .nav .nav-main { display: none; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line);
  }
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
}
.bn-item {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 2px 2px 0;
  color: var(--muted); font-size: .72rem; font-weight: 500; line-height: 1.25; text-align: center;
}
.bn-item > span:not(.count-badge):not(.bn-disc) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bn-item:hover { color: var(--ink); text-decoration: none; }
.bn-item.active { color: var(--brand-text); font-weight: 600; }
.bn-item .ico { width: 24px; height: 24px; vertical-align: 0; }
/* Sell: a yellow disc that sits up out of the bar, ringed in white */
.bn-sell .bn-disc {
  display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: -16px 0 -2px;
  border-radius: 50%; background: var(--signal); color: var(--on-signal); box-shadow: 0 0 0 4px var(--paper);
}
.bn-sell .bn-disc .ico { stroke-width: 2.25; }
.bn-sell.active { color: var(--ink); }
.bn-badge { position: absolute; top: -2px; left: 50%; margin-left: 4px; box-shadow: 0 0 0 2px var(--paper); }

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

.footer { margin-top: 24px; padding: 24px 0 28px; background: var(--paper); border-top: 1px solid var(--line); font-size: .875rem; color: var(--muted); }
.footer-inner { display: grid; gap: 10px; }
.footer-inner > div:first-child { color: var(--ink); }
.footer nav { display: flex; gap: 6px 18px; flex-wrap: wrap; }
.footer nav a { color: var(--ink); font-weight: 500; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; padding: 9px 16px;
  border: 1px solid transparent; border-radius: var(--r);
  background: var(--brand); color: #fff;
  font-size: .9375rem; font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer;
  transition: background-color .12s, border-color .12s;
}
.btn:hover { background: var(--brand-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn .ico { width: 18px; height: 18px; vertical-align: 0; }
.btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--sunken); border-color: var(--field); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: var(--danger-hover); }
.btn-sell { background: var(--signal); color: var(--on-signal); }
.btn-sell:hover { background: var(--signal-hover); }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: .875rem; gap: 6px; }
.btn-sm .ico { width: 16px; height: 16px; }
.btn-big { min-height: 48px; padding: 12px 20px; font-size: 1rem; }
.btn-block { display: flex; width: 100%; }
/* soft buttons: View and Edit in blue, Sold in amber, Delete in red */
.btn-soft { background: var(--sunken); color: var(--ink); }
.btn-soft-blue { background: var(--brand-tint); color: var(--brand-deep); }
.btn-soft-orange { background: var(--warn-tint); color: var(--warn-deep); }
.btn-soft-red { background: var(--danger-tint); color: var(--danger-deep); }
.btn-soft:hover, .btn-soft-blue:hover, .btn-soft-orange:hover, .btn-soft-red:hover { filter: brightness(.96); }
.btn-soft:hover { background: var(--sunken); }
.btn-soft-blue:hover { background: var(--brand-tint); }
.btn-soft-orange:hover { background: var(--warn-tint); }
.btn-soft-red:hover { background: var(--danger-tint); }
.btn-light { background: var(--paper); color: var(--brand-text); border-color: var(--line); }
.btn-light:hover { background: var(--brand-tint); }
.btn-band { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-band:hover { background: var(--sunken); }
.link-btn { padding: 8px; border: 0; background: none; color: var(--brand-text); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.copy-btn {
  margin-left: 6px; padding: 1px 8px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--paper); color: var(--brand-text); font-size: .75rem; font-weight: 600; cursor: pointer;
}
.copy-btn:hover { background: var(--brand-tint); border-color: var(--brand-tint); }

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

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; margin-bottom: 6px; font-size: .875rem; font-weight: 600; }
.field input, .field select, .field textarea,
.filters input, .filters select {
  width: 100%; min-height: 46px; padding: 11px 12px;
  border: 1px solid var(--field); border-radius: var(--r); background: var(--paper); color: var(--ink);
}
select {
  -webkit-appearance: none; appearance: none;
  background-image: var(--chevron); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px;
}
.field select, .filters select { padding-right: 36px; }
.field textarea { resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--faint); opacity: 1; }
input:disabled, select:disabled, textarea:disabled { background-color: var(--sunken); color: var(--muted); }
.field input:focus, .field select:focus, .field textarea:focus,
.filters input:focus, .filters select:focus,
.queue-actions select:focus, .queue-actions input:focus, .search-inline input:focus, .chat-form textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--focus);
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
@media (max-width: 380px) { .row2 { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0 0 14px; font-weight: 500; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand); }
.row2 .check { margin-top: 28px; }
.form h2 { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.form > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.form-error { margin: 12px 0; padding: 10px 12px; border-radius: var(--r); background: var(--danger-tint); color: var(--danger-deep); }

/* the eye button inside password boxes */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 46px; }
.pw-eye {
  position: absolute; top: 50%; right: 4px; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); cursor: pointer;
}
.pw-eye:hover { color: var(--ink); background: var(--sunken); }
.pw-eye .ico { width: 22px; height: 22px; vertical-align: 0; }

/* an on/off switch, made from a checkbox */
.switch { position: relative; flex: 0 0 44px; width: 44px; height: 26px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--field); transition: background .15s; pointer-events: none; }
.switch span::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(15, 22, 35, .3); transition: transform .15s;
}
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- notices & badges ---------- */

.notice { margin-bottom: 16px; padding: 11px 14px; border-radius: var(--r); background: var(--brand-tint); color: var(--brand-deep); font-size: .9rem; }
.notice a:not(.btn) { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.notice .ico { width: 18px; height: 18px; vertical-align: -.25em; }
.notice-ok { background: var(--ok-tint); color: var(--ok-deep); }
.notice-warn { background: var(--warn-tint); color: var(--warn-deep); }
.notice-error { background: var(--danger-tint); color: var(--danger-deep); }
.notice.small { margin: 6px 0 0; padding: 8px 10px; font-size: .875rem; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: var(--r-sm);
  background: var(--brand-tint); color: var(--brand-deep);
  font-size: .75rem; font-weight: 600; line-height: 1.45; vertical-align: middle; white-space: nowrap;
}
.badge .ico { width: 14px; height: 14px; vertical-align: 0; }
.badge-sold { background: var(--ink); color: var(--paper); }
.badge-pending { background: var(--warn-tint); color: var(--warn-deep); }
.badge-rejected { background: var(--danger-tint); color: var(--danger-deep); }
.badge-expired { background: var(--sunken); color: var(--muted); }
.badge-new { background: var(--brand); color: #fff; }
.badge-featured { background: var(--signal); color: var(--on-signal); }
.badge-rent { background: var(--brand-tint); color: var(--brand-deep); }
.badge-ok { background: var(--ok-tint); color: var(--ok-deep); }
/* red unread numbers */
.count-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--dot); color: #fff; font-size: .72rem; font-weight: 600; font-variant-numeric: tabular-nums;
}

/* ---------- the number plate: every price ---------- */

/* Always a white plate with a dark rim, in dark mode too, like the real ones. */
.plate {
  display: inline-flex; align-items: stretch; max-width: 100%; height: 26px; overflow: hidden;
  border: 1.5px solid #182234; border-radius: 5px; background: #fff; color: #182234;
  font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1;
}
.plate-code { display: flex; align-items: center; flex: none; padding: 0 5px; background: #1f4fb5; color: #fff; font-family: var(--font-am); font-size: .7rem; font-weight: 700; }
.plate-num { display: flex; align-items: center; gap: 3px; min-width: 0; padding: 1px 7px 0 6px; font-family: var(--font-tight); font-size: 1.05rem; font-weight: 700; letter-spacing: .02em; }
.plate-per { font-family: var(--font-ui); font-size: .72rem; font-weight: 600; letter-spacing: 0; color: #5b6577; }
.plate.big { height: 36px; border-width: 2px; border-radius: 6px; }
.plate.big .plate-code { padding: 0 8px; font-size: .9rem; }
.plate.big .plate-num { padding: 1px 12px 0 10px; font-size: 1.55rem; }
.plate.big .plate-per { font-size: .85rem; }

/* ---------- home: search ---------- */

.hero { background: var(--paper); padding: 2px 0 12px; }
.hero h1 { margin-bottom: 4px; }
.hero p { margin: 0 0 16px; color: var(--muted); }
/* On a phone the header is an app bar with only the search. The title stays
   for screen readers and search engines. */
@media (max-width: 720px) {
  .hero p { display: none; }
  .hero h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (min-width: 721px) {
  .hero { padding: 26px 0 20px; }
  .hero h1 { font-size: 2rem; }
}
.search { display: flex; gap: 8px; }
.search-field { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.search-field .ico { position: absolute; left: 12px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search-field input {
  width: 100%; height: 44px; padding: 0 12px 0 40px; -webkit-appearance: none; appearance: none;
  border: 1px solid var(--sunken); border-radius: var(--r); background: var(--sunken); color: var(--ink);
}
.search-field input:focus { outline: none; background: var(--paper); border-color: var(--brand); box-shadow: 0 0 0 3px var(--focus); }
.search-go { display: none; }
@media (min-width: 721px) { .search-go { display: inline-flex; min-height: 44px; } }
.filter-btn {
  position: relative; display: flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: var(--r); background: var(--ink); color: var(--paper); cursor: pointer;
}
.filter-btn .ico { width: 22px; height: 22px; vertical-align: 0; }
.filter-btn[aria-expanded="true"] { background: var(--brand); color: #fff; }
/* how many filters are on: blue, not the red of unread messages */
.filter-count { position: absolute; top: -6px; right: -6px; background: var(--brand); box-shadow: 0 0 0 2px var(--paper); }
.filter-btn[aria-expanded="true"] .filter-count { background: var(--ink); color: var(--paper); }

/* The kind of vehicle = icon tiles; buy or rent = tabs (home) or a
   switch (sell form). Two looks, so they are never mixed up. */
.kind-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; }
.kind-tiles label, .deal-switch label { min-width: 0; cursor: pointer; }
.kind-tiles input, .deal-switch input, .deal-tabs input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; padding: 10px 0;
  color: var(--muted); font-size: .75rem; font-weight: 500; line-height: 1.2; text-align: center;
}
@media (max-width: 370px) { .tile { font-size: .69rem; } }
.tile-icon {
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 13px; background: var(--sunken); color: var(--ink); transition: background-color .12s, color .12s;
}
.tile-icon .ico { width: 24px; height: 24px; vertical-align: 0; }
.kind-tiles label:active .tile-icon { transform: scale(.96); }
.kind-tiles input:checked + .tile { color: var(--ink); font-weight: 600; }
.kind-tiles input:checked + .tile .tile-icon { background: var(--brand); color: #fff; }
.kind-tiles input:focus-visible + .tile .tile-icon { outline: 2px solid var(--brand); outline-offset: 2px; }
.kind-tiles-form { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 12px; }
/* editing a post that was live: the vehicle is fixed */
.kind-tiles input:disabled + .tile, .deal-switch input:disabled + span { cursor: not-allowed; }
.kind-tiles input:disabled:not(:checked) + .tile, .deal-switch input:disabled:not(:checked) + span { opacity: .45; }

/* Home: the vehicle strip right under the search, the picked one filled
   blue and underlined; then All · For sale · For rent right above the ads. */
.cat-strip { background: var(--paper); border-top: 1px solid var(--line-soft); }
.cat-strip input:checked + .tile::after {
  content: ''; position: absolute; left: 26%; right: 26%; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand);
}
.deal-bar { background: var(--paper); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line); }
.deal-tabs { display: flex; }
.deal-tabs label { flex: 1 1 0; min-width: 0; cursor: pointer; }
.deal-tabs span {
  display: block; padding: 11px 4px 10px; color: var(--muted);
  font-size: .9rem; font-weight: 500; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.deal-tabs input:checked + span { color: var(--brand-text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--brand); }
.deal-tabs input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: -2px; }
/* on a computer the tiles and tabs keep their phone size, side by side on the left */
@media (min-width: 721px) {
  .cat-strip .kind-tiles { grid-template-columns: repeat(5, 104px); justify-content: start; }
  .deal-tabs label { flex: 0 0 auto; }
  .deal-tabs span { padding: 12px 22px 11px; }
}

/* the sell form's "Sell it / Rent it out": one control, two halves */
.deal-switch { display: flex; gap: 2px; margin-top: 10px; padding: 3px; border-radius: var(--r); background: var(--sunken); }
.deal-switch label { flex: 1 1 auto; } /* as wide as their words, so a long Amharic label is never cut */
.deal-switch span {
  display: flex; align-items: center; justify-content: center; height: 100%; padding: 8px 6px; border-radius: 8px;
  color: var(--muted); font-size: .9rem; font-weight: 500; line-height: 1.2; text-align: center;
}
.deal-switch input:checked + span { background: var(--paper); color: var(--brand-text); font-weight: 600; box-shadow: 0 1px 3px rgba(15, 22, 35, .14); }
.deal-switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 1px; }
.form .deal-switch { margin: 0 0 6px; }

.filters {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
  margin-top: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper);
}
@media (min-width: 720px) { .filters { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.filters label > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: .8125rem; font-weight: 600; }
.filter-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }

.results-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 10px; padding: 14px 0 10px; }
.results-count { font-family: var(--font-tight); font-size: 1.0625rem; font-weight: 700; font-variant-numeric: tabular-nums; }
/* when the count and the tools do not fit on one line, the tools start the next line on the left */
.results-tools { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sort { position: relative; display: inline-flex; align-items: center; min-width: 0; }
.sort .ico { position: absolute; left: 8px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.sort select {
  min-width: 0; min-height: 34px; max-width: 15rem; padding: 4px 28px 4px 30px; border: 1px solid var(--line); border-radius: var(--r);
  background-color: var(--paper); background-position: right 6px center; background-size: 16px; font-size: .875rem; font-weight: 500;
}
.btn.alert-on { background: var(--brand-tint); color: var(--brand-deep); border-color: transparent; }

/* round buttons at the bottom right of the home page: calculator · where
   to pay · share the app. Quiet white discs; the page is the point. */
.fabs { position: fixed; right: 14px; bottom: 20px; z-index: 25; display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 720px) { .fabs { right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); } }
.fab {
  display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--ink); cursor: pointer;
  box-shadow: 0 6px 16px -6px rgba(15, 22, 35, .35);
}
.fab:hover { background: var(--sunken); text-decoration: none; }
.fab .ico { width: 22px; height: 22px; vertical-align: 0; }
.fab-share { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.fab-share:hover { background: var(--signal-hover); }

/* ---------- ads in a grid ---------- */

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); color: var(--ink);
}
.card:hover { border-color: var(--field); text-decoration: none; }
.card:active { border-color: var(--brand); }
/* Every picture is the same size. overflow:hidden matters: without it a
   tall photo (a screenshot, a phone held upright) stretches the card. */
.card-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--photo); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img .badge { position: absolute; }
.card-img .badge-sold { top: 8px; left: 8px; }
.card-img .badge-featured { top: 8px; right: 8px; }
.card-img .badge-rent { right: 8px; bottom: 8px; }
/* the plate sits across the bottom edge of the photo */
.card > .plate { position: relative; z-index: 1; align-self: flex-start; margin: -14px 0 0 8px; box-shadow: 0 2px 6px rgba(15, 22, 35, .22); }
.card-body { display: grid; gap: 3px; min-width: 0; padding: 7px 10px 11px; }
.card-title { overflow: hidden; font-size: .9375rem; font-weight: 600; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; }
.card-place, .card-meta { display: flex; align-items: center; gap: 4px; min-width: 0; color: var(--muted); font-size: .8125rem; }
.card-place span, .card-meta span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* km, gear, fuel on one line: what does not fit drops to a hidden second line */
.card-specs { display: flex; flex-wrap: wrap; gap: 0 10px; height: 1.35rem; overflow: hidden; color: var(--muted); font-size: .78rem; line-height: 1.35rem; }
.card-specs > span, .card-place { white-space: nowrap; }
.card-specs > span { display: inline-flex; align-items: center; gap: 4px; }
.card-place .ico, .card-specs .ico, .card-meta .ico { width: 14px; height: 14px; stroke-width: 2; vertical-align: 0; }
.noimg { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--faint); background: var(--photo); }
.noimg .ico { width: 40px; height: 40px; stroke-width: 1.25; }
.price { font-family: var(--font-tight); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

.empty {
  grid-column: 1 / -1; padding: 36px 20px; border: 1px dashed var(--field); border-radius: var(--r);
  background: var(--paper); color: var(--muted); text-align: center;
}
.empty > .ico { display: block; width: 36px; height: 36px; margin: 0 auto 12px; color: var(--faint); stroke-width: 1.5; }
.empty p { max-width: 36ch; margin: 0 auto; }
.empty .btn { margin-top: 16px; }
.more { margin: 20px 0; text-align: center; }

/* ---------- car page ---------- */

.car-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.owner-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 0; }
.owner-bar .btns { display: flex; gap: 8px; }
@media (min-width: 900px) {
  .car-page { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .car-page > .owner-bar { grid-column: 1 / -1; }
  .car-side { position: sticky; top: 72px; }
}
/* Photos at a sensible size: never taller than about half the phone
   screen, at most 420px on a computer. Tap a photo for full screen. */
.gallery-main { position: relative; aspect-ratio: 4 / 3; max-height: 52vh; overflow: hidden; border-radius: var(--r); background: #0f141d; }
@media (min-width: 900px) { .gallery-main { max-height: 420px; } }
.gallery-main img { position: relative; width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
/* behind a tall photo: the same photo, blurred, instead of black bars */
.gallery-main .gal-bg { position: absolute; inset: 0; object-fit: cover; filter: blur(18px) brightness(.6); transform: scale(1.15); pointer-events: none; }
/* share, save and full screen in white discs on the photo */
.gal-tools { position: absolute; top: 10px; right: 10px; display: flex; gap: 8px; }
.gal-tool, .gal-btn {
  display: flex; align-items: center; justify-content: center; padding: 0;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .94); color: #182234; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.gal-tool { width: 38px; height: 38px; font-size: 1.1rem; line-height: 1; }
.gal-tool .ico { width: 20px; height: 20px; vertical-align: 0; }
/* saved: the heart fills in red */
[data-save].saved { color: var(--danger); }
[data-save].saved .ico { fill: currentColor; }
.gal-tool[data-save].saved { color: #c4372d; }
.gal-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; font-size: 1.5rem; line-height: 1; }
.gal-btn .ico { width: 22px; height: 22px; vertical-align: 0; }
.gal-prev { left: 10px; }
.gal-next { right: 10px; }
.gal-count { position: absolute; right: 10px; bottom: 10px; padding: 2px 8px; border-radius: var(--r-sm); background: rgba(15, 20, 29, .7); color: #fff; font-size: .8rem; font-variant-numeric: tabular-nums; }
.gallery-main .badge-sold { position: absolute; top: 12px; left: 12px; padding: 5px 12px; font-size: .95rem; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0; scrollbar-width: thin; }
.thumbs button { flex: 0 0 64px; height: 48px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 8px; background: var(--photo); cursor: pointer; }
.thumbs button.active { border-color: var(--brand); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* On a phone the photo runs edge to edge, like an app. */
@media (max-width: 720px) {
  .page-car main.wrap { padding-top: 0; }
  .page-car .gallery-main { margin: 0 -16px; border-radius: 0; }
  .page-car .thumbs { padding: 8px 0 4px; }
}

.panel, .car-info { margin-bottom: 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.car-info h1 { margin-bottom: 10px; }
.price.big { display: block; margin: 4px 0; font-size: 1.6rem; }
.car-price { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
/* the facts a buyer checks first: year, km, gear, fuel */
.car-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.car-facts li { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px 7px 10px; border-radius: var(--r-sm); background: var(--sunken); font-size: .9rem; font-weight: 600; }
.car-facts .ico { width: 18px; height: 18px; color: var(--muted); vertical-align: 0; }
.location { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 10px 0 6px; font-size: 1rem; }
.location .ico { width: 18px; height: 18px; color: var(--muted); }
.location a { font-size: .9rem; white-space: nowrap; }
.car-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: .85rem; }
.car-meta > * { display: inline-flex; align-items: center; gap: 5px; }
.car-meta .ico { width: 16px; height: 16px; vertical-align: 0; }
.seller-head { display: flex; align-items: center; gap: 12px; }
.contact .btn .ico, .car-cta .btn .ico { width: 18px; height: 18px; }
.tips h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 1rem; }
.tips h2 .ico { width: 20px; height: 20px; color: var(--ok); vertical-align: 0; }
/* On a phone, Call and Chat stay at the bottom of the screen, in place of the bottom bar. */
.car-cta { display: none; }
@media (max-width: 720px) {
  .car-cta {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; display: flex; gap: 8px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--paper);
    border-top: 1px solid var(--line); box-shadow: 0 -8px 20px -14px rgba(15, 22, 35, .35);
  }
  .car-cta .btn { flex: 1 1 0; min-width: 0; min-height: 46px; padding-inline: 10px; }
  .has-cta .bottom-nav, .has-cta .fabs { display: none; }
  .has-cta { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .has-cta .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
}
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 16px 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
@media (min-width: 600px) { .specs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.specs div { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
.specs dt { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: .8125rem; }
.specs dt .ico { width: 15px; height: 15px; }
.specs dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.desc { white-space: pre-line; overflow-wrap: anywhere; font-size: 1rem; }
.seller-name { font-size: 1.0625rem; font-weight: 600; }
.seller-badges { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.seller-badges:empty { display: none; }
.contact { display: grid; gap: 8px; margin: 14px 0 10px; }
.chat-btn { margin-bottom: 8px; }
.row-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tips ul { margin: 8px 0 0; padding-left: 20px; }
.tips li { margin-bottom: 6px; font-size: .9rem; }
.report summary { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; cursor: pointer; }
.report summary .ico { width: 18px; height: 18px; vertical-align: 0; }
.report form { margin-top: 12px; }

/* full-screen photo viewer */
.no-scroll { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: #000; touch-action: pinch-zoom; }
.viewer-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-count { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); color: #fff; font-size: .9rem; opacity: .85; font-variant-numeric: tabular-nums; }
.viewer-close, .viewer-nav {
  position: absolute; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; line-height: 1;
}
.viewer-close .ico, .viewer-nav .ico { width: 24px; height: 24px; vertical-align: 0; }
.viewer-close { top: 10px; right: 10px; width: 42px; height: 42px; font-size: 1.3rem; }
.viewer-nav { top: 50%; transform: translateY(-50%); width: 46px; height: 46px; font-size: 1.8rem; }
.viewer-prev { left: 10px; }
.viewer-next { right: 10px; }

/* ---------- sell: photos and packages ---------- */

.photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 12px 0; }
@media (min-width: 600px) { .photo-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.photo-item { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; background: var(--photo); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-item.uploading img { opacity: .45; }
.photo-item.failed { outline: 2px solid var(--danger); outline-offset: -2px; }
.photo-cover { position: absolute; top: 5px; left: 5px; padding: 1px 6px; border-radius: 4px; background: var(--signal); color: var(--on-signal); font-size: .7rem; font-weight: 600; }
.photo-state { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px; background: rgba(15, 20, 29, .7); color: #fff; font-size: .72rem; text-align: center; }
.photo-tools { position: absolute; top: 4px; right: 4px; display: flex; gap: 4px; }
.photo-tools button {
  display: flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; padding: 2px 6px;
  border: 0; border-radius: 999px; background: rgba(15, 20, 29, .7); color: #fff; font-size: .72rem; cursor: pointer;
}
.photo-tools .ico { width: 14px; height: 14px; vertical-align: 0; }
.add-photo { cursor: pointer; }
.photo-buttons { display: flex; flex-wrap: wrap; gap: 8px; }

.packages { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 12px 0; }
@media (min-width: 600px) { .packages { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.package { position: relative; display: block; padding: 14px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--paper); cursor: pointer; }
.package:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.package input { position: absolute; top: 14px; right: 14px; width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
.pkg-name { display: block; font-size: 1rem; font-weight: 600; }
.pkg-price { display: block; margin: 2px 0 6px; font-family: var(--font-tight); font-size: 1.15rem; font-weight: 700; color: var(--brand-text); font-variant-numeric: tabular-nums; }
.package ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: .875rem; }
[data-role="pay-how"] ul { margin: 6px 0 0; padding-left: 20px; }
.renew-box { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }

/* ---------- tabs & lists ---------- */

.tabs { display: flex; gap: 4px; margin-bottom: 16px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs a, .tabs button {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; border: 0; background: none;
  color: var(--muted); font-size: .9375rem; font-weight: 500; white-space: nowrap; cursor: pointer;
}
.tabs a:hover, .tabs button:hover { color: var(--ink); text-decoration: none; }
.tabs .active, .tabs .active:hover { color: var(--brand-text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--brand); }
.tabs .ico { width: 18px; height: 18px; vertical-align: 0; }

.list-row {
  display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; margin-bottom: 10px; padding: 12px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--paper);
}
@media (min-width: 600px) { .list-row { grid-template-columns: 160px minmax(0, 1fr); } }
.list-img { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; background: var(--photo); }
.list-img img { width: 100%; height: 100%; object-fit: cover; }
.list-title { font-weight: 600; color: var(--ink); }
.list-body > div { margin-top: 4px; }
.list-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
/* My cars: a coloured edge for the state of each post */
.list-row.st-live { box-shadow: inset 3px 0 0 var(--ok); }
.list-row.st-pending { box-shadow: inset 3px 0 0 var(--signal); }
.list-row.st-rejected { box-shadow: inset 3px 0 0 var(--danger); }
.list-row.st-expired { box-shadow: inset 3px 0 0 var(--field); }
.list-row.st-sold { box-shadow: inset 3px 0 0 var(--ink); }
.list-row.st-live, .list-row.st-pending, .list-row.st-rejected, .list-row.st-expired, .list-row.st-sold { padding-left: 15px; }
/* My cars: one clean card per post — the main one or two buttons on the
   card, everything else behind the three dots */
.my-row { position: relative; }
.my-row .list-title { display: block; padding-right: 30px; }
.row-more {
  position: absolute; top: 6px; right: 4px; display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer;
}
.row-more:hover { background: var(--sunken); color: var(--ink); }
.row-more .ico { width: 22px; height: 22px; vertical-align: 0; }
.row-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; color: var(--muted); font-size: .8125rem; }
.row-stats > span { display: inline-flex; align-items: center; gap: 4px; }
.row-stats .ico { width: 15px; height: 15px; vertical-align: 0; }
.row-stats b { color: var(--ink); font-weight: 600; }
.row-note { grid-column: 1 / -1; margin: 0; }
.row-actions-bar { grid-column: 1 / -1; display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.row-actions-bar .btn { flex: 1 1 0; min-width: 0; min-height: 38px; }
.row-actions-bar .ico { width: 16px; height: 16px; vertical-align: 0; }
.list-row .renew-box { grid-column: 1 / -1; }
.money-in { color: var(--ok); }
.money-out { color: var(--ink); }
.late { color: var(--danger); font-weight: 600; }

/* ---------- sheets: from the bottom; the menu from the left ---------- */

.sheet-back {
  position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; justify-content: center;
  background: var(--scrim); animation: fade-in .16s ease-out;
}
.sheet {
  width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto;
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: var(--paper); box-shadow: var(--shadow-float); animation: sheet-up .22s cubic-bezier(.2, .8, .25, 1);
}
/* the little handle on top of a sheet, like the phone's own */
.sheet-back:not(.drawer-back) .sheet::before {
  content: ''; display: block; width: 36px; height: 4px; margin: 0 auto 14px; border-radius: 2px; background: var(--field);
}
.sheet-title { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; font-size: 1.0625rem; font-weight: 600; }
.sheet-title .small { font-weight: 400; overflow-wrap: anywhere; }
.sheet .btn-block + .btn-block { margin-top: 8px; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(40px); opacity: .6; } }
@keyframes drawer-in { from { transform: translateX(-100%); } }

/* the ⋮ sheet: a plain list, Delete in red */
.sheet-menu { display: flex; flex-direction: column; margin: 0 -16px 12px; }
.sheet-menu a, .sheet-menu button {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 20px;
  border: 0; border-top: 1px solid var(--line-soft); background: none; color: var(--ink); font-size: .9375rem; text-align: left; cursor: pointer;
}
.sheet-menu a:hover, .sheet-menu button:hover { background: var(--sunken); text-decoration: none; }
.sheet-menu .ico { width: 20px; height: 20px; color: var(--muted); vertical-align: 0; }
.sheet-menu .danger, .sheet-menu .danger .ico { color: var(--danger); }

/* share, like other apps' share sheets: what you share on top, then the apps */
.share-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 10px; border-radius: 12px; background: var(--sunken); }
.share-thumb { flex: 0 0 60px; width: 60px; height: 60px; border-radius: 10px; object-fit: cover; background: var(--photo); }
.share-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.share-info b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.share-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: .84rem; line-height: 1.3; }
.share-url { overflow: hidden; color: var(--brand-text); font-size: .8rem; white-space: nowrap; text-overflow: ellipsis; }
.share-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 6px; margin-bottom: 16px; }
.share-target { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--ink); font-size: .78rem; cursor: pointer; }
.share-target:hover { text-decoration: none; }
.share-target:active .share-logo { transform: scale(.94); }
/* the apps keep their own colours: that is how people find them */
.share-logo { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; color: #fff; transition: transform .1s; }
.share-logo svg { width: 26px; height: 26px; }
.share-logo .ico { width: 26px; height: 26px; stroke-width: 1.75; }
.logo-telegram { background: #229ed9; }
.logo-whatsapp { background: #25d366; }
.logo-facebook { background: #1877f2; }
.logo-x { background: #0f1419; }
[data-theme="dark"] .logo-x { box-shadow: 0 0 0 1px var(--field); }
.logo-sms { background: #4f6bed; }
.logo-email { background: #ea4335; }
.logo-copy { background: var(--sunken); color: var(--ink); }

/* the menu: who you are on top, then everything in one list */
.drawer-back { justify-content: flex-start; align-items: stretch; }
.drawer {
  width: 84%; max-width: 320px; max-height: none; height: 100%; padding: 0 0 calc(12px + env(safe-area-inset-bottom));
  border-radius: 0 var(--r-lg) var(--r-lg) 0; animation: drawer-in .2s cubic-bezier(.2, .8, .25, 1);
}
.drawer-user { display: flex; align-items: center; gap: 12px; padding: 22px 16px 18px; border-bottom: 1px solid var(--line-soft); }
.drawer-user .btn { flex: 1; }
.drawer-user .band-sub { color: var(--muted); }
.avatar {
  display: flex; align-items: center; justify-content: center; flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%;
  background: var(--brand-tint); color: var(--brand-deep); font-family: var(--font-tight); font-size: 1.35rem; font-weight: 700;
}
.avatar-light { background: var(--brand-tint); color: var(--brand-deep); }
.drawer-links { display: flex; flex-direction: column; padding: 6px 0; }
.drawer-links a { display: flex; align-items: center; gap: 14px; padding: 11px 18px; color: var(--ink); font-size: .9375rem; }
.drawer-links a:hover { background: var(--sunken); text-decoration: none; }
.drawer-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 22px; width: 22px; height: 22px; color: var(--muted); }
.drawer-icon .ico { width: 22px; height: 22px; vertical-align: 0; }
.drawer-sep { height: 1px; margin: 6px 18px; background: var(--line-soft); }
/* the circles behind menu icons were coloured; one quiet colour now */
.ic-green, .ic-blue, .ic-purple, .ic-orange, .ic-yellow, .ic-red, .ic-grey { background: none; }

/* ---------- inner pages: a white header with the title ---------- */

.page-band { margin-bottom: 16px; padding-top: 18px; background: var(--paper); border-bottom: 1px solid var(--line); }
.page-band h1 { margin: 0; padding-bottom: 16px; }
.page-band p { margin: -10px 0 0; padding-bottom: 16px; color: var(--muted); }
.band-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 16px; }
.band-row h1 { padding-bottom: 0; }
.band-user { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; }
.band-user b { font-size: 1.0625rem; }
.band-sub { color: var(--muted); font-size: .85rem; }
.band-sub b { color: var(--ink); font-size: inherit; }
/* My cars tabs: icon over the word, so all five fit on a phone */
.band-tabs { gap: 0; margin: 0; border: 0; overflow: visible; }
.tabs.band-tabs a {
  flex: 1 1 0; min-width: 0; flex-direction: column; gap: 3px; padding: 6px 2px 9px;
  font-size: .75rem; line-height: 1.15; text-align: center; white-space: normal;
}
.tabs.band-tabs a .ico { width: 22px; height: 22px; }
.band-tabs a > span { font-size: inherit; }

/* ---------- inbox & chat ---------- */

.inbox-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); color: var(--ink);
}
.inbox-row:hover { border-color: var(--field); text-decoration: none; }
.inbox-row.unread { box-shadow: inset 3px 0 0 var(--brand); }
.inbox-pic { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 52px; width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--photo); }
.inbox-support { background: var(--brand-tint); color: var(--brand-text); }
.inbox-support .ico { width: 26px; height: 26px; vertical-align: 0; }
.inbox-text { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.inbox-top { display: flex; justify-content: space-between; gap: 8px; }
.inbox-about, .inbox-last { overflow: hidden; color: var(--muted); font-size: .86rem; white-space: nowrap; text-overflow: ellipsis; }
.inbox-row.unread .inbox-last { color: var(--ink); font-weight: 600; }

.chat-page { display: flex; flex-direction: column; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.chat-back { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; margin-left: -8px; border-radius: 50%; color: var(--ink); font-size: 1.6rem; line-height: 1; }
.chat-back:hover { background: var(--sunken); text-decoration: none; }
.chat-back .ico { width: 24px; height: 24px; vertical-align: 0; }
.chat-tip { margin: 10px 0 0; }
.chat-list { display: flex; flex-direction: column; gap: 6px; min-height: 40vh; max-height: 62vh; overflow-y: auto; padding: 12px 2px; }
.bubble { max-width: 80%; padding: 8px 12px; border-radius: 14px; overflow-wrap: anywhere; }
.bubble.mine { align-self: flex-end; border-bottom-right-radius: 4px; background: var(--brand); color: #fff; }
.bubble.theirs { align-self: flex-start; border: 1px solid var(--line); border-bottom-left-radius: 4px; background: var(--paper); }
.bubble-text { white-space: pre-line; }
.bubble-time { margin-top: 2px; font-size: .7rem; opacity: .72; text-align: right; font-variant-numeric: tabular-nums; }
.chat-form { position: sticky; bottom: 0; display: flex; align-items: flex-end; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); background: var(--ground); }
@media (max-width: 720px) { .chat-form { bottom: calc(62px + env(safe-area-inset-bottom)); } }
.chat-form textarea { flex: 1; min-height: 44px; max-height: 140px; padding: 10px 12px; border: 1px solid var(--field); border-radius: 12px; background: var(--paper); resize: none; }

/* ---------- notifications ---------- */

.note-row {
  display: flex; gap: 12px; margin-bottom: 8px; padding: 12px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); color: var(--ink);
}
a.note-row:hover { border-color: var(--field); text-decoration: none; }
.note-row.unread { box-shadow: inset 3px 0 0 var(--brand); }
.note-row.announce { border-color: var(--signal); }
.note-icon {
  display: flex; align-items: center; justify-content: center; flex: 0 0 36px; width: 36px; height: 36px;
  border-radius: 50%; background: var(--sunken); color: var(--ink);
}
.note-icon .ico { width: 20px; height: 20px; vertical-align: 0; }
.note-icon.tone-ok { background: var(--ok-tint); color: var(--ok-deep); }
.note-icon.tone-warn { background: var(--warn-tint); color: var(--warn-deep); }
.note-icon.tone-bad { background: var(--danger-tint); color: var(--danger-deep); }
.note-icon.tone-brand { background: var(--brand-tint); color: var(--brand-text); }
.announce .note-icon { background: var(--signal); color: var(--on-signal); }
.note-text { flex: 1; min-width: 0; }
.note-body { white-space: pre-line; overflow-wrap: anywhere; font-size: .9rem; }
.note-time { margin-top: 2px; color: var(--muted); font-size: .78rem; }

/* ---------- alerts (saved searches) ---------- */

.alert-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 12px; }
.alert-chips span { padding: 3px 9px; border-radius: var(--r-sm); background: var(--brand-tint); color: var(--brand-deep); font-size: .85rem; font-weight: 600; }
.alert-ways { list-style: none; margin: 0 0 14px; padding: 8px 12px; border-radius: var(--r); background: var(--sunken); }
.alert-ways li { display: flex; align-items: center; gap: 10px; padding: 5px 0; color: var(--muted); }
.alert-ways li.on { color: var(--ink); }
.alert-ways li > .ico:first-child { width: 18px; height: 18px; color: var(--faint); }
.alert-ways li.on > .ico:first-child { color: var(--ok); }
.alert-ways .ico { width: 18px; height: 18px; vertical-align: 0; }
.alert-card { display: flex; gap: 12px; margin-bottom: 10px; padding: 12px 12px 12px 15px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); box-shadow: inset 3px 0 0 var(--brand); }
.alert-card.paused { box-shadow: inset 3px 0 0 var(--field); }
.alert-card.paused .alert-chips span { background: var(--sunken); color: var(--muted); }
.alert-main { flex: 1; min-width: 0; }
.alert-main .alert-chips { margin: 0 0 6px; }
.alert-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.alert-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.alert-delete { position: static; margin-left: auto; }
.alert-what { display: flex; align-items: center; gap: 10px; min-width: 0; }

/* ---------- "How we tell you": phone notifications and SMS ---------- */

.reach-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); cursor: default; }
label.reach-row { cursor: pointer; }
.reach-text { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.reach-test { padding: 0 0 8px 34px; font-size: .875rem; }
/* asked once on the home page and in Messages */
.push-prompt { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: var(--r); background: var(--brand-tint); color: var(--brand-deep); }
.push-prompt .drawer-icon { color: var(--brand-text); }
.push-close { display: flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; }
.push-close:hover { background: rgba(31, 79, 181, .1); }
.push-close .ico { width: 18px; height: 18px; vertical-align: 0; }

/* ---------- the wallet and where to send money ---------- */

/* the balance as a bank card: blue, the number large */
.panel.wallet-balance { border-color: var(--brand); background: var(--brand); color: #fff; }
.panel.wallet-balance .muted, .panel.wallet-balance .hint { color: rgba(255, 255, 255, .82); }
.wallet-balance b { display: block; margin: 2px 0; font-family: var(--font-tight); font-size: 2rem; font-weight: 700; line-height: 1.15; color: #fff; font-variant-numeric: tabular-nums; }
.account-card { padding: 4px 0; }
.pay-to { display: grid; gap: 8px; margin: 8px 0 14px; }
.pay-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
/* Telebirr and CBE keep their own colours, so people know them at a glance */
.pay-logo { flex: none; padding: 4px 8px; border-radius: var(--r-sm); background: var(--brand); color: #fff; font-size: .75rem; font-weight: 600; }
.pay-telebirr { background: #1b87c9; }
.pay-cbe { background: #6b2c87; }
.pay-text { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.pay-number { font-family: var(--font-tight); font-size: 1.15rem; font-weight: 700; letter-spacing: .03em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.pay-copy { flex: none; gap: 4px; }

/* ---------- calculator ---------- */

/* tabs: Salary, VAT, Fuel, Calculator */
.calc-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.calc-tab {
  display: flex; flex: 1 1 0; flex-direction: column; align-items: center; gap: 3px; min-width: 0; padding: 8px 2px 7px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); color: var(--muted);
  font-size: .75rem; font-weight: 500; line-height: 1.15; cursor: pointer;
}
.calc-tab span { font-size: 1.15rem; line-height: 1; }
.calc-tab .ico { width: 22px; height: 22px; vertical-align: 0; }
.calc-tab.active { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-deep); font-weight: 600; }
.calc-pane .deal-switch { margin: 0 0 12px; }
/* the plain calculator: a screen and big keys, like a phone's */
.calc-screen { padding: 12px 14px; border-radius: var(--r); background: #182234; color: #fff; text-align: right; font-variant-numeric: tabular-nums; }
[data-theme="dark"] .calc-screen { background: #0a0f17; border: 1px solid var(--line); }
.calc-expr { min-height: 1.2em; font-size: .9rem; opacity: .7; }
.calc-display { display: block; font-family: var(--font-tight); font-size: 2.1rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.calc-keys { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.calc-key { min-height: 54px; border: 0; border-radius: 12px; background: var(--sunken); color: var(--ink); font-size: 1.3rem; font-weight: 500; cursor: pointer; }
.calc-key:active { filter: brightness(.92); }
.calc-key.fn { background: var(--line); }
.calc-key.op { background: var(--brand-tint); color: var(--brand-deep); font-size: 1.5rem; }
.calc-key.eq { background: var(--brand); color: #fff; font-size: 1.5rem; }
.calc-key.wide { grid-column: span 2; }
.calc-result { display: grid; gap: 8px; margin-top: 16px; }
.calc-line { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--sunken); font-variant-numeric: tabular-nums; }
.calc-line.main { background: var(--brand-tint); color: var(--brand-deep); font-size: 1.1rem; }
.calc-line b { white-space: nowrap; }

/* ---------- admin ---------- */

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.stat { padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.stat b { display: block; font-family: var(--font-tight); font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .85rem; }
.queue-photos { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; }
.queue-photos a { position: relative; flex: 0 0 auto; }
.queue-photos img { width: 140px; height: 105px; border-radius: 8px; object-fit: cover; }
.no-camera { position: absolute; top: 4px; left: 4px; display: flex; align-items: center; padding: 2px 5px; border-radius: var(--r-sm); background: var(--warn-tint); color: var(--warn-deep); font-weight: 600; }
.no-camera .ico { width: 15px; height: 15px; vertical-align: 0; }
.queue-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.queue-actions select, .queue-actions input { flex: 1 1 180px; min-height: 42px; padding: 0 10px; border: 1px solid var(--field); border-radius: var(--r); background-color: var(--paper); }
.queue-actions select { padding-right: 34px; }
.seller-line { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--sunken); font-size: .9rem; }
.search-inline { display: flex; gap: 8px; margin-bottom: 12px; }
.search-inline input { flex: 1; min-height: 42px; padding: 0 12px; border: 1px solid var(--field); border-radius: var(--r); background: var(--paper); }
.user-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.user-row .list-actions { margin-top: 0; }

/* ---------- help, terms, safety ---------- */

.prose { padding: 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); font-size: 1rem; }
.prose > * { max-width: 68ch; }
.prose h2 { margin-top: 1.6rem; }
.prose > h2:first-child { margin-top: 0; }
.prose li { margin-bottom: 6px; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose details { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.prose summary { font-weight: 600; cursor: pointer; }
.prose details p { margin: 8px 0 0; }
.support-contacts { display: grid; gap: 8px; margin-top: 10px; }
.support-contacts:empty { display: none; }
.id-photo img { max-width: 100%; max-height: 420px; margin: 8px 0; border-radius: 8px; }
.account-link { margin-bottom: 10px; }

/* ---------- account, lists and money rows ---------- */

/* a panel's heading with its icon */
.panel-title { display: flex; align-items: center; gap: 10px; margin-top: 0; }
.panel-title .ico { width: 22px; height: 22px; color: var(--brand-text); vertical-align: 0; }
.panel > h2:first-child { margin-top: 0; }
.list-price { margin: 6px 0 4px; }
.list-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.alert-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-tint); color: var(--brand-text); }
.alert-card.paused .alert-icon { background: var(--sunken); color: var(--muted); }
.alert-icon .ico { width: 20px; height: 20px; vertical-align: 0; }
.alert-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--muted); font-size: .875rem; }
/* wallet: what happened on the left, the money on the right */
.money-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.panel > h2 + .money-row { border-top: 0; }
.money-what, .money-state { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.money-state { align-items: flex-end; text-align: right; }
.money-row b { font-family: var(--font-tight); font-size: 1.05rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wallet-label { display: inline-flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, .86); }
.wallet-label .ico { width: 20px; height: 20px; vertical-align: 0; }
.photo-buttons .btn { flex: 1 1 150px; min-height: 48px; }
.photo-grid:empty { display: none; }

/* ---------- toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: 20px; z-index: 110; transform: translateX(-50%);
  max-width: calc(100% - 32px); padding: 11px 16px; border-radius: var(--r);
  background: #182234; color: #fff; box-shadow: var(--shadow-float); animation: toast-in .2s ease-out;
}
[data-theme="dark"] .toast { background: #e6ebf3; color: #182234; }
.toast-error, [data-theme="dark"] .toast-error { background: var(--danger); color: #fff; }
@keyframes toast-in { from { transform: translate(-50%, 12px); opacity: 0; } }

/* ---------- loading: grey shapes in place of the content ---------- */

.skel { position: relative; overflow: hidden; border-radius: 6px; background: var(--sunken); }
.skel::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent); animation: skel 1.4s ease-in-out infinite;
}
[data-theme="dark"] .skel::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .05), transparent); }
@keyframes skel { to { transform: translateX(100%); } }
.skel-card { pointer-events: none; }
.skel-card .skel-img { aspect-ratio: 4 / 3; border-radius: 0; }
.skel-body { display: grid; gap: 9px; padding: 12px 10px 14px; }
.skel-line { height: 12px; }
.skel-line.short { width: 55%; }
.skel-line.w70 { width: 70%; height: 22px; margin-bottom: 14px; }
.skel-plate { width: 112px; height: 24px; }
.skel-plate.big { width: 190px; height: 36px; margin-bottom: 16px; }
.skel-row { height: 72px; margin-bottom: 10px; border-radius: var(--r); }
.skel-gallery { aspect-ratio: 4 / 3; max-height: 52vh; margin-bottom: 16px; border-radius: var(--r); }
@media (max-width: 720px) { .page-car .skel-gallery { margin: 0 -16px 16px; border-radius: 0; } }

/* ---------- the notifications sheet ---------- */

.sheet-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sheet-head .sheet-title { margin: 0; }
.notes-list .note-row { margin-bottom: 6px; }
.notes-list .empty { border: 0; padding: 24px 8px; }
.note-time { display: block; }

/* ---------- sign-up code ---------- */

.code-input { font-family: var(--font-tight); font-size: 1.6rem !important; font-weight: 700; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.code-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.code-actions .link-btn:disabled { color: var(--muted); text-decoration: none; cursor: default; }
#way-switch { margin: 0 0 16px; }

/* ---------- cards: photos and age ---------- */

/* top left: the price plate covers the bottom of the photo */
.card-photos {
  position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px; border-radius: 999px; background: rgba(15, 20, 29, .72); color: #fff;
  font-size: .72rem; font-weight: 600; font-variant-numeric: tabular-nums;
}
.card-photos .ico { width: 13px; height: 13px; vertical-align: 0; }
.card-img .badge-sold ~ .card-photos { top: 38px; }
.card-time { margin-top: 2px; color: var(--muted); font-size: .75rem; }

/* ---------- home: recently viewed ---------- */

.recent { margin: 0 0 18px; }
.recent-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.recent-head h2 { margin: 0; font-size: 1.05rem; }
.recent-row { display: flex; gap: 10px; overflow-x: auto; padding: 8px 2px 6px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.recent-row .card { flex: 0 0 calc(50% - 5px); scroll-snap-align: start; }
@media (min-width: 720px) { .recent-row .card { flex-basis: 210px; } }

/* ---------- car page: seller link, similar vehicles ---------- */

.seller-link {
  display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); font-size: .9rem; font-weight: 500;
}
.seller-link:hover { background: var(--sunken); text-decoration: none; }
.seller-link .ico { width: 18px; height: 18px; vertical-align: 0; color: var(--brand-text); }
.seller-link .ico:last-child { margin-left: auto; color: var(--muted); }
.car-page > .similar { grid-column: 1 / -1; }
.similar h2 { margin: 8px 0 10px; font-size: 1.15rem; }
@media (min-width: 900px) { .similar .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- seller page ---------- */

.seller-top { display: flex; align-items: center; gap: 14px; padding-bottom: 6px; }
.seller-top-text { flex: 1 1 0; min-width: 0; }
.seller-top > .btn { align-self: flex-start; }
.seller-top h1 { margin: 0; padding: 0; }
.avatar-big { flex-basis: 64px; width: 64px; height: 64px; font-size: 1.8rem; }
.seller-counts { display: flex; gap: 12px; flex-wrap: wrap; margin: 4px 0 0 !important; padding-bottom: 16px; color: var(--ink) !important; }

/* ---------- sell: the kept draft ---------- */

.draft-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.draft-note span { flex: 1 1 200px; }

/* ---------- chat: photos, block, report ---------- */

.chat-who { flex: 1; min-width: 0; }
.chat-car { display: flex; flex-wrap: wrap; gap: 0 8px; }
.chat-car a { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 100%; }
.inbox-pic .ico { width: 22px; height: 22px; vertical-align: 0; }
.chat-menu {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px;
  padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer;
}
.chat-menu:hover { background: var(--sunken); }
.chat-menu .ico { width: 22px; height: 22px; vertical-align: 0; }
.chat-attach {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px;
  border: 1px solid var(--field); border-radius: 12px; background: var(--paper); color: var(--ink); cursor: pointer;
}
.chat-attach:hover { background: var(--sunken); }
.chat-attach.busy { opacity: .5; pointer-events: none; }
.chat-attach .ico { width: 22px; height: 22px; vertical-align: 0; }
.chat-blocked { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.bubble-photo { display: block; padding: 0; margin: 0 0 4px; border: 0; border-radius: 10px; overflow: hidden; background: rgba(0, 0, 0, .08); cursor: zoom-in; }
.bubble-photo img { display: block; max-width: min(240px, 100%); max-height: 260px; object-fit: cover; }
.bubble-photo.loading { width: 180px; height: 135px; }
.photo-sheet .chat-photo-big { display: block; width: 100%; max-height: 70vh; margin-bottom: 10px; object-fit: contain; border-radius: var(--r); background: #0f141d; }
.chat-report summary { list-style: none; margin-top: 8px; }
.chat-report summary::-webkit-details-marker { display: none; }
.chat-report form { margin-top: 12px; }

/* ---------- account: delete ---------- */

.danger-zone { margin-top: 16px; }
.danger-zone summary { display: flex; align-items: center; gap: 8px; color: var(--danger-deep); font-weight: 500; cursor: pointer; }
.danger-zone summary .ico { width: 18px; height: 18px; vertical-align: 0; }
.danger-zone form { margin-top: 12px; }

/* ---------- admin: chat reports ---------- */

.admin-sub { margin: 18px 0 8px; font-size: 1.1rem; }
.report-copy { margin: 8px 0; }
.report-copy summary { cursor: pointer; color: var(--brand-text); font-weight: 500; }
.report-copy ol { margin: 8px 0 0; padding-left: 20px; font-size: .9rem; }
.report-copy li { margin-bottom: 6px; padding: 4px 6px; border-radius: 6px; }
.report-copy li.reported { background: var(--danger-tint); }
.badge-bad { background: var(--danger-tint); color: var(--danger-deep); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
