/* ==========================================================================
   SiyaraIQ — site stylesheet (served as-is from public/, no build step).
   RTL-first, mobile.bg-inspired: white page, narrow centred column,
   grey/blue tab bar, light-blue bordered tiles, solid blue vehicle icons.

    1. Tokens               8. Home
    2. Base                 9. Listing cards
    3. Layout helpers      10. Search results
    4. Header & tab bar    11. Detailed search (/search/{type})
    5. Buttons             12. Listing page (+ admin debug panel)
    6. Forms               13. Vehicle form
    7. Panels & messages   14. Auth
                           15. Admin
                           16. Pagination
                           17. Footer
                           18. Responsive
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
    --ink: #1c1c1c;
    --ink-2: #444;
    --muted: #7a7a7a;
    --bg: #fff;
    --panel: #fff;
    --border: #d9e6f0;
    --tile-border: #a9d2ef;
    --blue: #0b86dc;
    --blue-2: #2fa3ee;
    --blue-hover: #0a78c6;
    --search-blue: #3b95ec;
    --icon: #4aa6de;
    --icon-faint: #c3dcef;
    --tab: #5d5d5d;
    --tab-hover: #4a4a4a;
    --soft: #eef6fc;
    --ok: #0f9d58;
    --warn: #b45309;
    --danger: #d93025;
    --ribbon: #0d3b8c;
    --ribbon-text: #ffd400;
    --font: "IBM Plex Sans Arabic", Tahoma, Verdana, system-ui, sans-serif;
    --font-logo: Arial, Helvetica, sans-serif;
}

/* 2. Base ------------------------------------------------------------------ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.55; color: var(--ink); background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .6em; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
hr { border: 0; border-top: 1px solid var(--border); margin: 14px 0; }
code { font-size: .85em; background: var(--soft); padding: 1px 5px; word-break: break-all; }
[hidden] { display: none !important; }

/* 3. Layout helpers ---------------------------------------------------------- */
.arb-container { width: 100%; max-width: 1012px; margin-inline: auto; padding-inline: 16px; }
.arb-page { padding-block: 14px 40px; }
.arb-narrow { max-width: 860px; }
.arb-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.arb-muted { color: var(--muted); }
.arb-small { font-size: .85em; }
.arb-center { text-align: center; }
.arb-empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--tile-border); }
.arb-section { margin-block: 24px; }
.arb-section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.arb-section-head h1, .arb-section-head h2 { margin: 0; }
.arb-section-title { font-size: 1.15rem; font-weight: 500; padding-bottom: 5px; border-bottom: 2px solid var(--blue); margin-bottom: 12px; }
.arb-vicon { display: block; color: var(--icon); }
.arb-glyph { width: 11px; height: 11px; }

/* 4. Header & tab bar -------------------------------------------------------- */
.arb-site-header { padding-top: 18px; }
.arb-header-row { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; }
.arb-logo { display: block; line-height: 0; }
.arb-logo img { height: 70px; width: auto; }
.arb-auth-links { align-self: flex-end; margin-bottom: 4px; font-size: .82rem; color: var(--blue); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.arb-auth-links form { display: inline; margin: 0; }
.arb-link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); cursor: pointer; }
.arb-link-btn:hover { text-decoration: underline; }
.arb-header-icons { display: flex; align-items: center; gap: 22px; margin-inline-start: auto; }
.arb-header-icons > a:not(.arb-btn-add) { color: var(--blue); display: grid; place-items: center; }
.arb-header-icons svg { width: 30px; height: 30px; }
.arb-btn-add { background: var(--blue); color: #fff; font-weight: 700; padding: 7px 16px; border-radius: 3px; letter-spacing: .5px; white-space: nowrap; }
.arb-btn-add:hover { background: var(--blue-hover); text-decoration: none; }

.arb-tabbar { display: flex; gap: 3px; margin-top: 14px; border-bottom: 4px solid var(--blue); overflow-x: auto; scrollbar-width: none; }
.arb-tabbar::-webkit-scrollbar { display: none; }
.arb-tabbar a { flex: 0 0 auto; padding: 5px 12px 4px; background: var(--tab); color: #fff; font-weight: 500; font-size: .98rem; border-radius: 2px 2px 0 0; white-space: nowrap; }
.arb-tabbar a:hover { background: var(--tab-hover); text-decoration: none; }
.arb-tabbar a.arb-active { background: linear-gradient(var(--blue-2), var(--blue)); }
.arb-tabbar .arb-tab-end { margin-inline-start: auto; }

/* 5. Buttons ----------------------------------------------------------------- */
.arb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 14px; border-radius: 3px; border: 1px solid var(--blue); background: var(--blue); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none !important; line-height: 1.3; white-space: nowrap; }
.arb-btn:hover { background: var(--blue-hover); }
.arb-btn.arb-accent { background: var(--blue); }
.arb-btn.arb-ghost { background: #fff; color: var(--blue); border-color: var(--tile-border); }
.arb-btn.arb-ghost:hover { background: var(--soft); }
.arb-btn.arb-danger { background: #fff; color: var(--danger); border-color: #f0b8b3; }
.arb-btn.arb-danger:hover { background: #fdecea; }
.arb-btn.arb-whatsapp { background: #25d366; border-color: #25d366; }
.arb-btn.arb-sm { padding: 3px 9px; font-size: .82rem; }
.arb-btn.arb-lg { padding: 10px 20px; font-size: 1.02rem; }
.arb-btn.arb-block { display: flex; width: 100%; }
.arb-btn:disabled { opacity: .5; cursor: not-allowed; }

/* 6. Forms ------------------------------------------------------------------- */
label { display: block; font-weight: 500; color: var(--ink-2); margin-bottom: 10px; }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
    display: block; width: 100%; margin-top: 3px; padding: 7px 9px; font: inherit; color: var(--ink);
    background: #fff; border: 1px solid #b9c9d6; border-radius: 3px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(11, 134, 220, .18); }
input[type=file] { display: block; margin-top: 6px; }
/* Dependent selects (model, city…) stay visible but read as waiting until their parent is chosen. */
select:disabled { background: #f3f6f9; color: var(--muted); cursor: not-allowed; }
textarea { resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0 0 10px; }
legend { font-weight: 500; color: var(--ink-2); padding: 0; margin-bottom: 4px; }
.arb-req { color: var(--danger); font-weight: 700; }
.arb-radio-row { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.arb-radio-row legend { width: 100%; }
.arb-radio, .arb-check { display: inline-flex; align-items: center; gap: 7px; font-weight: 400; margin: 0; cursor: pointer; }
.arb-check { display: flex; padding: 2px 0; font-size: .92rem; }
.arb-radio input, .arb-check input { width: 15px; height: 15px; accent-color: var(--blue); }
.arb-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 16px; }
.arb-form-actions { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(rgba(255,255,255,0), #fff 35%); }
.arb-inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.arb-inline-form input, .arb-inline-form select { width: auto; flex: 1 1 150px; margin: 0; }
.arb-inline-form.arb-tight { margin: 0; flex-wrap: nowrap; }
.arb-inline-form.arb-tight select { flex: 0 1 auto; }
.arb-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* 7. Panels & messages ------------------------------------------------------- */
.arb-panel { background: var(--panel); border: 1px solid var(--tile-border); padding: 16px; margin-bottom: 14px; }
.arb-panel h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 2px solid var(--blue); font-size: 1.05rem; }
.arb-type-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 500; background: var(--soft); padding: 2px 10px; border-radius: 3px; color: var(--ink-2); }
.arb-type-pill .arb-vicon { width: 26px; height: 18px; color: var(--icon); }

.arb-flash { padding: 10px 14px; margin-block: 12px; border: 1px solid; }
.arb-flash ul { margin: 6px 0 0; padding-inline-start: 20px; }
.arb-flash.arb-success { background: #e8f6ee; border-color: #b8e2c8; color: #0b5d34; }
.arb-flash.arb-warning { background: #fff7e6; border-color: #fde2a8; color: #7a4a00; }
.arb-flash.arb-error { background: #fdecea; border-color: #f5c2bd; color: #8c1d15; }

.arb-status { display: inline-block; padding: 0 9px; font-size: .78rem; font-weight: 600; background: var(--soft); color: var(--ink-2); }
.arb-status.arb-published { background: #e8f6ee; color: var(--ok); }
.arb-status.arb-pending { background: #fff7e6; color: var(--warn); }
.arb-status.arb-rejected { background: #fdecea; color: var(--danger); }
.arb-status.arb-expired { background: #eceff1; color: var(--muted); }
.arb-badge { display: inline-block; padding: 0 8px; background: var(--soft); font-size: .8rem; margin-inline-end: 4px; }
.arb-tag { display: inline-block; padding: 0 8px; font-size: .75rem; font-weight: 700; }
.arb-tag.arb-featured { background: var(--ribbon); color: var(--ribbon-text); }

/* 8. Home -------------------------------------------------------------------- */
.arb-home-title { text-align: center; font-size: 1.4rem; font-weight: 700; margin: 16px 0 14px; }
/* 12-col grid: row 1 = cars (6) + trucks (3) + buses (3); then six small tiles (2 each). */
.arb-cat-grid { display: grid; grid-template-columns: repeat(16, 1fr); gap: 6px; }
.arb-cat-tile { grid-column: span 2; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; padding: 12px 6px 8px; border: 1px solid var(--tile-border); color: var(--ink-2); text-decoration: none !important; min-height: 130px; transition: border-color .12s, background .12s; }
.arb-cat-tile:hover { border-color: var(--blue); background: #f7fbfe; }
.arb-cat-tile .arb-vicon { width: 92px; height: 64px; margin-bottom: auto; }
.arb-cat-name { font-size: 1.05rem; font-weight: 500; text-align: center; }
.arb-cat-count { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; color: var(--muted); }
.arb-cat-xl { grid-column: span 8; min-height: 158px; }
.arb-cat-xl .arb-vicon { width: 140px; height: 96px; }
.arb-cat-xl .arb-cat-name { font-size: 1.3rem; font-weight: 700; }
.arb-cat-lg { grid-column: span 4; min-height: 158px; }
.arb-cat-lg .arb-vicon { width: 110px; height: 76px; }
.arb-cat-lg .arb-cat-name { font-size: 1.2rem; font-weight: 700; }
.arb-brand-strip { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: center; margin: 14px 0 0; padding: 10px 14px; background: var(--soft); font-weight: 500; }
.arb-brand-strip a { color: var(--ink-2); }
.arb-brand-strip a:hover { color: var(--blue); }
.arb-more-link { text-align: end; margin: 10px 0 0; font-weight: 600; }

/* 9. Listing cards ----------------------------------------------------------- */
.arb-grid.arb-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px 18px; }
.arb-card { display: flex; flex-direction: column; gap: 3px; color: var(--ink); text-decoration: none !important; min-width: 0; }
.arb-card:hover .arb-card-title { color: var(--blue); }
.arb-card-media { position: relative; aspect-ratio: 23 / 15; background: #eef2f6; overflow: hidden; margin-bottom: 8px; }
.arb-card-media img { width: 100%; height: 100%; object-fit: cover; }
.arb-card-placeholder { width: 100%; height: 100%; display: grid; place-items: center; }
.arb-card-placeholder .arb-vicon { width: 45%; height: auto; color: var(--icon-faint); }
/* Diagonal "BEST" corner ribbon on featured listings (mobile.bg). */
.arb-ribbon { position: absolute; top: 12px; right: -30px; width: 110px; padding: 3px 0; transform: rotate(45deg); background: var(--ribbon); color: var(--ribbon-text); font: 800 13px/1.2 var(--font-logo); text-align: center; letter-spacing: 1px; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.arb-card-title { font-size: .95rem; font-weight: 700; margin: 0; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; unicode-bidi: plaintext; text-align: right; text-transform: uppercase; }
.arb-card-price { font-size: 1.2rem; font-weight: 500; }
.arb-card-loc { font-size: .8rem; color: var(--muted); }

/* 10. Search results --------------------------------------------------------- */
.arb-search-layout { display: grid; grid-template-columns: 250px 1fr; gap: 18px; align-items: start; }
.arb-search-layout .arb-grid.arb-cards { grid-template-columns: repeat(3, 1fr); }
.arb-filters { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; padding: 0 12px 12px; }
.arb-filters-title { margin: 0 -12px 12px; padding: 7px 12px; background: linear-gradient(var(--blue-2), var(--blue)); color: #fff; font-size: 1rem; }
.arb-filters label { font-size: .85rem; margin-bottom: 8px; }
.arb-filters .arb-btn { margin-top: 6px; }
.arb-results-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; padding-bottom: 6px; border-bottom: 2px solid var(--blue); }
.arb-results-head h1 { margin: 0; font-size: 1.25rem; }
.arb-results-head select { width: auto; margin: 0; }

/* 11. Detailed search (/search/{type}) — mobile.bg "Търсене" layout ---------
   Prefix "ds-", not "adv-": ad-blocker filter lists hide .adv-top, .adv-label … */
.arb-ds-title { font-size: 1.45rem; font-weight: 700; margin: 16px 0 12px; }
.arb-ds-form { border: 1px solid var(--tile-border); padding: 18px 20px; }
.arb-ds-form label, .arb-ds-label { font-weight: 700; font-size: .85rem; color: var(--ink-2); }
.arb-ds-label { display: block; margin-bottom: 3px; }
.arb-ds-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.arb-ds-type { display: flex; align-items: flex-end; gap: 14px; flex: 1 1 320px; }
.arb-ds-type label { flex: 1; margin: 0; }
.arb-ds-type select { font-size: 1.2rem; font-weight: 700; color: var(--icon); }
.arb-ds-type .arb-vicon { width: 76px; height: 52px; flex: 0 0 auto; }
.arb-ds-states { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.arb-ds-states .arb-check { font-weight: 700; }
.arb-ds-brandrow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; align-items: start; margin-top: 14px; }
.arb-ds-pairs { display: grid; gap: 4px; }
.arb-ds-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.arb-ds-pair label { margin-bottom: 4px; }
.arb-ds-add { font-size: .82rem; font-weight: 700; text-decoration: underline; justify-self: start; }
.arb-ds-submit { font-size: 1.25rem; padding: 12px 20px; border-radius: 6px; letter-spacing: 1px; background: var(--search-blue); border-color: var(--search-blue); gap: 10px; }
.arb-ds-submit .arb-glyph { width: 22px; height: 22px; stroke-width: 2.2; }
.arb-ds-brandrow .arb-ds-submit { width: 100%; margin-top: 18px; }
.arb-ds-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px 20px; margin-top: 14px; }
.arb-ds-grid label { margin-bottom: 8px; }
.arb-ds-price { grid-column: span 2; margin-bottom: 8px; }
.arb-ds-inline { display: grid; grid-template-columns: 1fr 1fr 90px; gap: 8px; }
.arb-ds-inline input, .arb-ds-inline select { margin: 0; }
.arb-ds-engine { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 10px 0 4px; padding: 12px 16px; background: var(--soft); }
.arb-ds-engine legend { float: right; width: 100%; font-weight: 700; font-size: .85rem; color: var(--ink-2); margin-bottom: 6px; }
/* Extras: short groups share a column (see the view). */
.arb-ds-extras { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 22px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.arb-ds-extras-col h3 { font-size: .85rem; letter-spacing: .03em; margin: 0 0 8px; }
.arb-ds-extras-col h3 + .arb-tri { margin-top: 0; }
.arb-ds-extras-col .arb-tri + h3 { margin-top: 18px; }
/* Tri-state extra: 0 = ignore, 1 = must have (+), 2 = must not have (−). */
.arb-tri { display: flex; align-items: center; gap: 7px; width: 100%; padding: 2px 0; background: none; border: 0; font: inherit; font-size: .82rem; color: var(--ink-2); text-align: start; cursor: pointer; }
.arb-tri-box { flex: 0 0 auto; width: 15px; height: 15px; border: 1px solid #aab4bf; border-radius: 3px; background: #fff; display: grid; place-items: center; font: 700 13px/1 var(--font-logo); color: #fff; }
.arb-tri[data-state="1"] { color: var(--blue); font-weight: 600; }
.arb-tri[data-state="1"] .arb-tri-box { background: var(--blue); border-color: var(--blue); }
.arb-tri[data-state="1"] .arb-tri-box::after { content: "+"; }
.arb-tri[data-state="2"] { color: var(--danger); font-weight: 600; text-decoration: line-through; }
.arb-tri[data-state="2"] .arb-tri-box { background: #fff; border-color: var(--danger); color: var(--danger); border-radius: 50%; }
.arb-tri[data-state="2"] .arb-tri-box::after { content: "−"; }
.arb-ds-kind { display: flex; flex-wrap: wrap; gap: 10px 60px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.arb-ds-kind > div { display: grid; gap: 4px; }
.arb-ds-kind .arb-check, .arb-ds-kind .arb-radio { font-weight: 400; font-size: .85rem; }
.arb-ds-footer { display: flex; align-items: center; gap: 18px; margin-top: 16px; }
.arb-ds-footer .arb-ds-submit { min-width: 240px; }
.arb-ds-legend { margin-top: 18px; padding: 10px 16px 14px; border: 1px solid var(--border); border-top: 0; }
.arb-ds-legend h2 { font-size: 1.1rem; margin-bottom: 8px; }
.arb-ds-legend > div { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.arb-ds-legend .arb-tri { width: auto; cursor: default; text-decoration: none; }
.arb-ds-legend small { color: var(--muted); font-weight: 400; }

/* 12. Listing page ----------------------------------------------------------- */
.arb-crumbs { font-size: .85rem; color: var(--muted); margin: 10px 0 12px; }
/* mobile.bg listing layout: 980px, 660px main column + sidebar. In RTL "left" (the main column) sits on the right. */
.arb-listing-layout { width: 980px; max-width: 100%; margin: 20px auto 0; display: grid; grid-template-areas: 'left right'; grid-template-columns: 660px auto; grid-gap: 20px; align-items: start; }
.arb-listing-main { grid-area: left; min-width: 0; }
.arb-listing-side { grid-area: right; min-width: 0; }
.arb-listing-side .arb-sticky { position: sticky; top: 12px; }
.arb-listing-side .arb-btn.arb-ghost.arb-block { margin-top: 6px; }
.arb-listing-title { font-size: 1.3rem; unicode-bidi: plaintext; text-align: right; margin-bottom: 4px; text-transform: uppercase; }
.arb-listing-price { font-size: 1.6rem; font-weight: 700; margin-bottom: 8px; }
.arb-listing-quick { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.arb-listing-quick span { background: var(--soft); padding: 2px 9px; font-size: .85rem; }
.arb-listing-foot { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8rem; margin-bottom: 10px; }
.arb-seller { margin-block: 14px; padding-top: 14px; border-top: 1px solid var(--border); display: grid; gap: 7px; }
.arb-seller-name { font-weight: 700; font-size: 1.02rem; }
.arb-gallery { padding: 8px; }
.arb-gallery-main { aspect-ratio: 4 / 3; background: #111; overflow: hidden; }
.arb-gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.arb-gallery-thumbs { display: flex; gap: 6px; overflow-x: auto; margin-top: 8px; padding-bottom: 4px; }
.arb-gallery-thumbs button { flex: 0 0 84px; height: 63px; padding: 0; border: 2px solid transparent; overflow: hidden; cursor: pointer; background: none; }
.arb-gallery-thumbs button.arb-active { border-color: var(--blue); }
.arb-gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.arb-gallery-empty { aspect-ratio: 16 / 7; display: grid; place-items: center; align-content: center; gap: 8px; background: var(--soft); }
.arb-gallery-empty .arb-vicon { width: 160px; height: 110px; color: #bcdaf0; }
.arb-gallery-empty span { color: var(--muted); }
.arb-specs { display: grid; grid-template-columns: 1fr; margin: 0; }
.arb-specs div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dotted #cfdde8; }
.arb-specs dt { color: var(--muted); }
.arb-specs dd { margin: 0; font-weight: 600; text-align: end; }
.arb-extras-group { font-size: .9rem; color: var(--blue); margin: 12px 0 5px; }
.arb-extras-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 3px 16px; font-size: .92rem; }
.arb-extras-list li::before { content: "✓"; color: var(--blue); font-weight: 700; margin-inline-end: 7px; }
.arb-description { color: var(--ink-2); }

/* Admin debug panel — admins only, above the listing (as in ikariq). */
.arb-admin-debug-panel { border: 4px solid var(--danger); padding: 12px 14px; margin: 10px 0 16px; background: #fff; }
.arb-admin-debug-panel-title { font-weight: 700; color: var(--danger); font-size: .8rem; letter-spacing: .03em; margin-bottom: 6px; }
.arb-admin-debug-panel-subtitle { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.arb-admin-debug-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.arb-admin-debug-col { display: flex; flex-direction: column; min-width: 0; }
.arb-admin-debug-row { display: flex; justify-content: space-between; gap: 10px; font-size: .82rem; padding: 5px 8px; }
.arb-admin-debug-row:nth-child(even) { background: var(--soft); }
.arb-admin-debug-row span { color: var(--muted); flex: 0 0 auto; }
.arb-admin-debug-row strong { font-weight: 600; text-align: end; overflow-wrap: anywhere; }
.arb-admin-debug-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: .82rem; font-weight: 600; }
.arb-admin-debug-dump { margin-top: 10px; font-size: .82rem; }
.arb-admin-debug-dump summary { cursor: pointer; font-weight: 600; color: var(--blue); }
.arb-admin-debug-dump pre { max-height: 420px; overflow: auto; background: #0f172a; color: #e2e8f0; padding: 10px 12px; font-size: .78rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }

/* 13. Vehicle form ----------------------------------------------------------- */
.arb-extras-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 18px; }
.arb-extras-col .arb-extras-group { margin-top: 0; }
.arb-image-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.arb-image-list figure { margin: 0; width: 130px; display: grid; gap: 4px; }
.arb-image-list img { width: 130px; height: 98px; object-fit: cover; border: 1px solid var(--border); }
.arb-image-list figcaption { font-size: .78rem; color: var(--ok); }

/* 14. Auth ------------------------------------------------------------------- */
.arb-auth-box { max-width: 400px; margin: 24px auto; }

/* 15. Admin ------------------------------------------------------------------ */
.arb-admin-nav { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 16px; border-bottom: 3px solid var(--blue); }
.arb-admin-nav a { padding: 4px 12px; background: #e9eef2; color: var(--ink-2); font-weight: 500; }
.arb-admin-nav a.arb-active { background: var(--blue); color: #fff; }
.arb-admin-nav a:hover { text-decoration: none; background: #dce5ec; }
.arb-admin-nav a.arb-active:hover { background: var(--blue); }
.arb-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.arb-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.arb-stat { border: 1px solid var(--tile-border); padding: 14px; color: var(--ink); text-decoration: none !important; text-align: center; }
.arb-stat:hover { border-color: var(--blue); }
.arb-stat .arb-n { font-size: 1.9rem; font-weight: 700; color: var(--blue); }
.arb-stat .arb-l { color: var(--muted); }

.arb-table-wrap { overflow-x: auto; margin-bottom: 16px; }
.arb-table { width: 100%; border-collapse: collapse; padding: 0; margin: 0; }
.arb-table th, .arb-table td { padding: 8px 10px; text-align: start; border-bottom: 1px solid var(--border); vertical-align: top; }
.arb-table th { font-size: .8rem; color: #fff; font-weight: 600; background: var(--tab); }
.arb-table tr:last-child td { border-bottom: 0; }
.arb-thumb-cell img, .arb-thumb-ph { width: 72px; height: 50px; object-fit: cover; border: 1px solid var(--border); display: grid; place-items: center; background: var(--soft); }
.arb-thumb-ph .arb-vicon, .arb-icon-cell .arb-vicon { width: 46px; height: 32px; }
.arb-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.arb-actions form { margin: 0; }
.arb-mod-actions { min-width: 290px; }
.arb-reject-form { display: flex; gap: 6px; margin-top: 8px; }
.arb-reject-form input { margin: 0; padding: 4px 8px; }

.arb-plain-list { list-style: none; padding: 0; margin: 10px 0 0; max-height: 560px; overflow-y: auto; }
.arb-plain-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.arb-plain-list form { margin: 0; }

/* Importer run progress. */
.arb-progress { width: 110px; height: 6px; margin-top: 5px; background: var(--soft); overflow: hidden; }
.arb-progress span { display: block; height: 100%; background: var(--blue); }

/* 16. Pagination (Laravel's bootstrap-4 markup) ------------------------------ */
.arb-pagination { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; padding: 0; margin: 20px 0; justify-content: center; }
.arb-pagination li > * { display: block; min-width: 34px; padding: 4px 10px; text-align: center; border: 1px solid var(--tile-border); }
.arb-pagination li.arb-active > * { background: var(--blue); color: #fff; border-color: var(--blue); }
.arb-pagination li.arb-disabled > * { color: var(--muted); }

/* 17. Footer ----------------------------------------------------------------- */
.arb-site-footer { border-top: 4px solid var(--blue); background: #f4f6f8; color: var(--ink-2); padding: 22px 0; margin-top: 36px; }
.arb-footer-logo { font: 800 20px var(--font-logo); direction: ltr; text-align: end; color: #000; }
.arb-footer-row { display: grid; grid-template-columns: 1.3fr 2fr 1fr; gap: 20px; }
.arb-footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; align-content: start; }
.arb-footer-links a { color: var(--ink-2); }

/* 18. Responsive (widest breakpoint first) ----------------------------------- */
@media (max-width: 1012px) {
    /* Narrower than the 980px layout: the main column gives way, the sidebar keeps a usable width. */
    .arb-listing-layout { grid-template-columns: minmax(0, 1fr) 280px; }
}
@media (max-width: 900px) {
    .arb-grid.arb-cards { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
    .arb-two-col { grid-template-columns: 1fr; }
    .arb-search-layout { grid-template-columns: 1fr; }
    .arb-filters { position: static; max-height: none; }
    .arb-search-layout .arb-grid.arb-cards { grid-template-columns: repeat(2, 1fr); }
    .arb-listing-layout { grid-template-areas: 'right' 'left'; grid-template-columns: 1fr; }
    .arb-listing-side .arb-sticky { position: static; }
    .arb-ds-brandrow { grid-template-columns: 1fr; }
    .arb-ds-grid, .arb-ds-extras { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
    .arb-cat-grid { grid-template-columns: repeat(4, 1fr); }
    .arb-cat-tile { grid-column: span 1; min-height: 112px; }
    .arb-cat-tile .arb-vicon { width: 70px; height: 48px; }
    .arb-cat-xl { grid-column: span 4; }
    .arb-cat-lg { grid-column: span 2; }
    .arb-cat-name { font-size: .92rem; }
}
@media (max-width: 700px) {
    .arb-footer-row { grid-template-columns: 1fr; }
    .arb-footer-logo { text-align: start; }
    .arb-admin-debug-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .arb-logo img { height: 54px; }
    .arb-header-icons { gap: 14px; width: 100%; margin-inline-start: 0; }
    .arb-header-icons svg { width: 26px; height: 26px; }
    .arb-btn-add { margin-inline-start: auto; }
    .arb-grid.arb-cards { grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }
}
@media (max-width: 520px) {
    .arb-ds-form { padding: 14px 12px; }
    .arb-ds-pair, .arb-ds-grid, .arb-ds-extras { grid-template-columns: 1fr; }
    .arb-ds-price { grid-column: auto; }
}

/* Brand / model pickers on the detailed search (mobile.bg "akCustomSelect") ------------- */
.arb-combo { position: relative; margin-top: 3px; }
.arb-combo .arb-combo-input { margin: 0; padding-inline-end: 30px; cursor: pointer; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E") no-repeat left 10px center; }
.arb-combo .arb-combo-input:read-only { caret-color: transparent; }
/* With a value chosen the × replaces the arrow (mobile.bg). */
.arb-combo.arb-filled .arb-combo-input { background-image: none; }
.arb-combo-clear { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border: 0; border-radius: 50%; background: #fff; color: var(--muted); font: 700 18px/1 var(--font-logo); cursor: pointer; }
.arb-combo-clear:hover { color: var(--danger); }
.arb-combo-menu { position: absolute; inset-inline: 0; top: calc(100% + 2px); z-index: 30; max-height: 330px; overflow-y: auto; background: #fff; border: 1px solid var(--tile-border); box-shadow: 0 6px 18px rgba(15, 27, 45, .15); }
.arb-combo-head { margin: 0; padding: 5px 10px; background: #f4f6f8; color: var(--muted); font-size: .78rem; font-weight: 700; position: sticky; top: 0; }
.arb-combo-item, .arb-combo-check { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 10px; font-size: .88rem; font-weight: 500; color: var(--ink); cursor: pointer; margin: 0; }
.arb-combo-item:hover, .arb-combo-check:hover { background: var(--soft); }
.arb-combo-item.arb-active { background: var(--blue); color: #fff; }
.arb-combo-item.arb-active .arb-combo-count, .arb-combo-item.arb-active small { color: #dbeeff; }
.arb-combo-item.arb-disabled { background: #e3e3e3; color: #999; cursor: default; }
.arb-combo-name { flex: 1; direction: ltr; text-align: start; unicode-bidi: plaintext; }
.arb-combo-name small { color: var(--muted); font-weight: 400; }
.arb-combo-count { color: var(--muted); font-size: .8rem; }
.arb-combo-check input { width: 15px; height: 15px; accent-color: var(--blue); margin: 0; }
.arb-combo-none { padding: 10px; text-align: center; color: var(--blue); }
.arb-combo.arb-disabled .arb-combo-input { background-color: #f3f6f9; color: var(--muted); cursor: not-allowed; }
/* Model families in the model checklist: the family bold, its models indented under it. */
.arb-combo-family .arb-combo-name { font-weight: 700; }
.arb-combo-member { padding-inline-start: 28px; }
/* Moderation: "Approve all" sits at the far end of the status tabs. */
.arb-approve-all { margin: 0; margin-inline-start: auto; }
