/* اتو گالری ایفل پارس‌آباد — ظاهر مشترک اپ مشتری و پنل مدیریت
   Layout: bronze shop-sign app bar over a girder strip; customer app = 2-column car grid + bottom navigation;
   admin = ledger, search/sort/status tabs and car rows; details and forms open as full-screen sheets on phones. */
:root {
  --ground: #EAEDF0;
  --panel: #FFFFFF;
  --panel-2: #F3F5F7;
  --ink: #14181D;
  --ink-2: #454E59;
  --ink-3: #636C77;
  --rule: #D7DCE2;
  --rule-strong: #B8C0C9;
  --bronze: #8A582A;
  --bronze-deep: #6E4520;
  --bronze-ink: #FFFFFF;
  --bronze-soft: #F3E9DF;
  --bronze-line: #DCC3A8;
  --ok: #2A7748;
  --ok-soft: #E0F0E6;
  --hold: #2B579C;
  --hold-soft: #E2EAF6;
  --alert: #B0302B;
  --alert-soft: #F7E3E1;
  --on-sem: #FFFFFF;
  --photo-bg: #DCE1E6;
  --stamp-bg: rgba(255, 255, 255, .9);
  --scrim: rgba(16, 20, 25, .5);
  --shadow: 0 12px 32px rgba(18, 23, 29, .16);
  --f-sign: "Lalezar", "Vazirmatn", Tahoma, sans-serif;
  --f-text: "Vazirmatn", "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif;
  --r-card: 12px;
  --r-field: 10px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0E1114; --panel: #161A1F; --panel-2: #1C2127;
    --ink: #E8EBEE; --ink-2: #AAB2BB; --ink-3: #87909A;
    --rule: #282E35; --rule-strong: #3A424C;
    --bronze: #D3955A; --bronze-deep: #6E4520; --bronze-ink: #1A1007; --bronze-soft: #2A1F15; --bronze-line: #5A4026;
    --ok: #63C18B; --ok-soft: #13281C; --hold: #82A9EC; --hold-soft: #162238;
    --alert: #EE7C74; --alert-soft: #361A19; --on-sem: #0E1114;
    --photo-bg: #21262D; --stamp-bg: rgba(14, 17, 20, .86);
    --scrim: rgba(0, 0, 0, .62); --shadow: 0 12px 32px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lock, html.lock body { overflow: hidden; }
body {
  margin: 0; min-height: 100vh; background: var(--ground); color: var(--ink);
  font-family: var(--f-text); font-size: 15px; line-height: 1.75;
  direction: rtl; text-align: right; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p, dl, dd { margin: 0; }
img { max-width: 100%; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 2px; }
.wrap { max-width: 1120px; margin-inline: auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.sx { padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.vh, .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); font-weight: 400; }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------- app bar (shop sign) ---------- */
.appbar { position: sticky; top: 0; z-index: 20; background: var(--bronze-deep); color: #FFF7EE; padding-top: env(safe-area-inset-top, 0px); }
.appbar-in { display: flex; align-items: center; gap: 8px; min-height: 60px; padding-block: 6px; }
.brand { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.tower { width: 26px; height: 37px; flex: none; color: #F2C79A; }
.brand-txt { display: grid; min-width: 0; }
.brand-name { font-family: var(--f-sign); font-weight: 400; font-size: 23px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 12px; line-height: 1.4; opacity: .82; white-space: nowrap; }
.bar-title { flex: 1; min-width: 0; font-size: 16.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-btn { width: 42px; height: 42px; flex: none; display: inline-grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: inherit; cursor: pointer; }
.bar-btn:hover { background: rgba(255, 255, 255, .12); }
.bar-btn svg { width: 23px; height: 23px; }
.girder {
  height: 8px; background: var(--bronze); opacity: .6;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M0 .6H12M0 7.4H12M0 7.4L6 .6L12 7.4' fill='none' stroke='%23000' stroke-width='1.1'/%3E%3C/svg%3E") repeat-x 0 0 / 12px 8px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M0 .6H12M0 7.4H12M0 7.4L6 .6L12 7.4' fill='none' stroke='%23000' stroke-width='1.1'/%3E%3C/svg%3E") repeat-x 0 0 / 12px 8px;
}

/* ---------- buttons & fields ---------- */
.btn {
  height: 46px; padding: 0 16px; border-radius: 11px; border: 1px solid transparent; cursor: pointer;
  font-weight: 700; font-size: 15px; line-height: 1; white-space: nowrap; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.btn svg { width: 19px; height: 19px; flex: none; }
.btn-sm { height: 38px; padding: 0 12px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--bronze); color: var(--bronze-ink); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { background: var(--panel); color: var(--ink); border-color: var(--rule-strong); }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-danger { background: var(--alert); color: var(--on-sem); }
.btn-text-danger { background: transparent; color: var(--alert); padding-inline: 4px; justify-self: start; }
.btn[disabled] { opacity: .55; cursor: default; filter: none; }
.icon-btn { width: 42px; height: 42px; flex: none; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--ink); display: inline-grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--panel-2); }
.icon-btn svg { width: 22px; height: 22px; }
.mini { height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--rule-strong); background: var(--panel); font-size: 12.5px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; text-decoration: none; }
.mini svg { width: 15px; height: 15px; }
.input {
  width: 100%; height: 48px; padding: 0 12px; border: 1px solid var(--rule-strong); border-radius: var(--r-field);
  background: var(--panel); color: var(--ink); font-size: 16px; line-height: 1.5; -webkit-appearance: none; appearance: none;
}
.input::placeholder { color: var(--ink-3); opacity: .9; }
.input:focus { outline: none; border-color: var(--bronze); box-shadow: 0 0 0 3px var(--bronze-soft); }
textarea.input { height: auto; min-height: 84px; padding: 10px 12px; line-height: 1.8; resize: vertical; }
.field { display: grid; gap: 6px; min-width: 0; }
.lbl { font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.req { color: var(--alert); font-weight: 800; }
.hint { font-size: 12.5px; line-height: 1.6; color: var(--ink-3); }
.hint:empty { display: none; }
.price-hint { font-size: 14px; font-weight: 700; color: var(--bronze); }
.err { font-size: 13px; font-weight: 700; color: var(--alert); }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 360px) { .row2 { grid-template-columns: minmax(0, 1fr); } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--rule-strong); background: var(--panel); color: var(--ink-2); font-size: 14px; font-weight: 500; }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--panel); font-weight: 700; }
.chip input:focus-visible + span { outline: 2px solid var(--bronze); outline-offset: 2px; }
.with-sw { position: relative; display: block; }
.with-sw .input { padding-right: 42px; }
.sw { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--sw, transparent); box-shadow: 0 0 0 1px var(--rule-strong); }
.sw.lg { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; }
.sw.lg.none { box-shadow: none; border: 1.5px dashed var(--rule-strong); }
.input-price { font-size: 18px; font-weight: 700; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 700; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { position: relative; width: 46px; height: 28px; border-radius: 999px; background: var(--rule-strong); transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--panel); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch input:checked + .track { background: var(--ok); }
.switch input:checked + .track::after { transform: translateX(-18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--bronze); outline-offset: 2px; }

/* ---------- tags, stamps, photos ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; white-space: nowrap; border-radius: 999px; font-size: 12px; line-height: 1; background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--rule); }
.tag.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.tag.bad { background: var(--alert-soft); color: var(--alert); border-color: transparent; }
.tag.hold { background: var(--hold-soft); color: var(--hold); border-color: transparent; }
.tag.new { background: var(--bronze); color: var(--bronze-ink); border-color: transparent; font-weight: 700; }
.tag.outline { background: transparent; border-style: dashed; border-color: var(--rule-strong); }
.stamp {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-12deg);
  font-family: var(--f-sign); font-size: 16px; line-height: 1; white-space: nowrap; pointer-events: none;
  padding: 6px 9px 4px; border: 2px solid currentColor; border-radius: 5px;
  background: var(--stamp-bg); box-shadow: 0 0 0 2px var(--stamp-bg), 0 0 0 3px currentColor;
}
.stamp.sold { color: var(--alert); }
.stamp.hold { color: var(--hold); }
.ph { width: 64%; max-width: 120px; height: auto; color: var(--ink-3); opacity: .55; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.ph-tile, .ph-add { position: relative; aspect-ratio: 1; max-width: 100%; border-radius: 10px; overflow: hidden; background: var(--photo-bg); }
.ph-tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph-busy { position: absolute; inset: 0; display: grid; place-items: center; background: var(--stamp-bg); }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--rule-strong); border-top-color: var(--bronze); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ph-cover, .ph-make { position: absolute; bottom: 5px; right: 5px; padding: 4px 7px; border-radius: 999px; font-size: 11px; line-height: 1; font-weight: 700; }
.ph-cover { background: var(--bronze); color: var(--bronze-ink); }
.ph-make { border: 0; background: var(--stamp-bg); color: var(--ink); cursor: pointer; }
.ph-del { position: absolute; top: 5px; left: 5px; width: 28px; height: 28px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--stamp-bg); color: var(--ink); cursor: pointer; }
.ph-del svg { width: 16px; height: 16px; }
.ph-add { display: grid; place-items: center; align-content: center; gap: 4px; text-align: center; cursor: pointer; border: 1.5px dashed var(--rule-strong); background: var(--panel-2); color: var(--ink-2); font-size: 12.5px; font-weight: 700; }
.ph-add svg { width: 24px; height: 24px; }
.ph-add:focus-within { outline: 2px solid var(--bronze); outline-offset: 2px; }
.price { font-family: var(--f-sign); font-size: 19px; line-height: 1.25; color: var(--bronze); }
.price small { font-family: var(--f-text); font-size: 12px; color: var(--ink-3); margin-inline-start: 1px; }
.nego { font-family: var(--f-text); font-size: 14px; font-weight: 700; color: var(--ink-2); }

/* ---------- customer app ---------- */
.page { padding-block: 12px calc(96px + env(safe-area-inset-bottom, 0px)); }
.page.with-actions { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
.hello { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-block: 4px 10px; }
.hello h1 { font-family: var(--f-sign); font-weight: 400; font-size: 22px; line-height: 1.3; }
.hello .count { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.finder { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.search { position: relative; display: block; min-width: 0; }
.search svg { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--ink-3); pointer-events: none; }
.search .input { padding-right: 40px; }
.sortbox { position: relative; display: block; }
.sortbox select { width: 132px; padding: 0 12px 0 32px; cursor: pointer; font-size: 15px; }
.sortbox svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); pointer-events: none; }
.filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-block: 10px 12px; }
.filters::-webkit-scrollbar { display: none; }
.pill { flex: none; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--rule-strong); background: var(--panel); color: var(--ink-2); font-weight: 700; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.pill .n { font-weight: 500; font-size: 12.5px; color: var(--ink-3); }
.pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--panel); }
.pill[aria-pressed="true"] .n { color: inherit; opacity: .75; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; } }
.ccard {
  position: relative; display: grid; grid-template-rows: auto 1fr; min-width: 0; padding: 0; text-align: right; color: var(--ink);
  background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r-card); overflow: hidden; cursor: pointer; text-decoration: none;
}
.ccard:hover { border-color: var(--rule-strong); }
.ccard-photo { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; max-width: 100%; background: var(--photo-bg); }
.ccard-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ccard-photo .tag.new { position: absolute; top: 7px; right: 7px; }
.ccard-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 9px 10px 11px; }
.ccard-title { font-weight: 800; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ccard-meta { font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.ccard .price { margin-top: auto; padding-top: 3px; font-size: 18px; }
.empty-state { grid-column: 1 / -1; display: grid; justify-items: center; gap: 10px; padding: 40px 16px; text-align: center; color: var(--ink-2); }
.empty-state .tower { width: 50px; height: 72px; color: var(--bronze); }
.empty-state h2 { font-family: var(--f-sign); font-weight: 400; font-size: 22px; line-height: 1.35; color: var(--ink); }
.empty-state p { max-width: 36ch; }
.skeleton { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.skeleton i { display: block; aspect-ratio: 3 / 4; border-radius: var(--r-card); background: var(--panel); border: 1px solid var(--rule); }

.gallery { position: relative; background: var(--photo-bg); }
.g-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.g-track::-webkit-scrollbar { display: none; }
.g-track img { display: block; flex: 0 0 100%; width: 100%; max-width: 100%; aspect-ratio: 4 / 3; max-height: 62vh; object-fit: contain; scroll-snap-align: center; scroll-snap-stop: always; }
.g-count { position: absolute; bottom: 10px; left: 10px; padding: 3px 9px; border-radius: 999px; font-size: 12.5px; background: var(--stamp-bg); color: var(--ink); }
.g-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--stamp-bg); color: var(--ink); display: none; place-items: center; cursor: pointer; }
.g-prev { right: 10px; }
.g-next { left: 10px; }
@media (hover: hover) { .g-nav { display: grid; } }
.gallery.empty { display: grid; justify-items: center; gap: 6px; padding: 26px 16px; font-size: 13.5px; color: var(--ink-3); }
.gallery.empty .ph { width: 120px; }
.detail-head { display: grid; gap: 6px; padding-block: 16px 14px; background: var(--panel); border-bottom: 1px solid var(--rule); }
.d-title { font-size: 21px; font-weight: 800; line-height: 1.45; text-wrap: balance; overflow-wrap: anywhere; }
.d-price { font-family: var(--f-sign); font-size: 31px; line-height: 1.25; color: var(--bronze); }
.d-price small { font-family: var(--f-text); font-size: 14px; color: var(--ink-2); margin-inline-start: 2px; }
.d-meta { font-size: 14.5px; color: var(--ink-2); }
.d-sec { display: grid; gap: 12px; padding-block: 16px; }
.d-sec + .d-sec { border-top: 1px solid var(--rule); }
.h3 { font-family: var(--f-sign); font-weight: 400; font-size: 19px; line-height: 1.3; color: var(--ink); }
.h3 .muted { font-family: var(--f-text); font-size: 13px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.note { padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.note.hold { background: var(--hold-soft); color: var(--hold); }
.note.sold { background: var(--alert-soft); color: var(--alert); }
.note.soft { background: var(--bronze-soft); color: var(--ink); border: 1px solid var(--bronze-line); }
.desc { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); }
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.specs > div { min-width: 0; padding: 9px 12px; background: var(--panel); }
.specs > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.specs dt { font-size: 12.5px; color: var(--ink-3); }
.specs dd { font-weight: 700; overflow-wrap: anywhere; }
.specs dd.ok { color: var(--ok); }
.specs dd.bad { color: var(--alert); }
.cta-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border-radius: var(--r-card); background: var(--bronze-soft); border: 1px solid var(--bronze-line); }
.cta-card b { display: block; font-size: 15.5px; }
.cta-card span { font-size: 13px; color: var(--ink-2); }
.actionbar {
  position: fixed; z-index: 25; left: 0; right: 0; bottom: 0; display: flex; gap: 8px;
  padding-top: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
  background: var(--panel); border-top: 1px solid var(--rule); box-shadow: 0 -6px 20px rgba(0, 0, 0, .06);
}
.actionbar .btn { flex: 1; height: 50px; }
.bottomnav {
  position: fixed; z-index: 25; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr);
  padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px);
  background: var(--panel); border-top: 1px solid var(--rule);
}
.bottomnav a { display: grid; justify-items: center; gap: 2px; padding: 8px 4px 9px; color: var(--ink-3); text-decoration: none; font-size: 12px; font-weight: 700; }
.bottomnav svg { width: 24px; height: 24px; }
.bottomnav a[aria-current="page"] { color: var(--bronze); }
.form-card { display: grid; gap: 14px; padding: 16px; border-radius: var(--r-card); background: var(--panel); border: 1px solid var(--rule); }
.form-intro { display: grid; gap: 4px; padding-block: 4px 12px; }
.form-intro h1 { font-family: var(--f-sign); font-weight: 400; font-size: 23px; line-height: 1.35; }
.form-intro p { color: var(--ink-2); }
.carline { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px; border-radius: var(--r-card); background: var(--panel); border: 1px solid var(--rule); }
.carline .thumb { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--photo-bg); }
.carline .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.carline .thumb .ph { width: 80%; }
.carline b { display: block; line-height: 1.5; overflow-wrap: anywhere; }
.trap { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; clip: rect(0 0 0 0); white-space: nowrap; pointer-events: none; }
.thanks { display: grid; justify-items: center; gap: 12px; padding: 48px 16px; text-align: center; }
.thanks .check { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.thanks .check svg { width: 34px; height: 34px; }
.thanks h1 { font-family: var(--f-sign); font-weight: 400; font-size: 24px; line-height: 1.35; }
.thanks p { max-width: 36ch; color: var(--ink-2); }
.contact-card { display: grid; justify-items: center; gap: 6px; padding: 22px 16px; text-align: center; border-radius: var(--r-card); background: var(--bronze-deep); color: #FFF7EE; }
.contact-card .tower { width: 40px; height: 57px; }
.contact-card h1 { font-family: var(--f-sign); font-weight: 400; font-size: 25px; line-height: 1.3; }
.contact-card p { opacity: .85; font-size: 14px; }
.rows { display: grid; border-radius: var(--r-card); background: var(--panel); border: 1px solid var(--rule); overflow: hidden; }
.rowlink { display: flex; align-items: center; gap: 12px; padding: 13px 14px; color: var(--ink); text-decoration: none; border: 0; background: transparent; text-align: right; width: 100%; cursor: pointer; }
.rowlink + .rowlink { border-top: 1px solid var(--rule); }
.rowlink .ic { width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--bronze-soft); color: var(--bronze); }
.rowlink .ic svg { width: 21px; height: 21px; }
.rowlink .tx { flex: 1; min-width: 0; display: grid; }
.rowlink .tx b { font-weight: 700; line-height: 1.5; }
.rowlink .tx span { font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.rowlink .go { color: var(--ink-3); width: 18px; height: 18px; flex: none; }
.stack { display: grid; gap: 12px; }
.narrow { max-width: 640px; margin-inline: auto; }
.pad-y { padding-block: 14px 18px; }
.detail { max-width: 760px; margin-inline: auto; padding-top: 0; }
.detail .d-sec { background: transparent; }
@media (min-width: 760px) { .detail { padding-top: 16px; } .detail .gallery { border-radius: var(--r-card) var(--r-card) 0 0; overflow: hidden; } }

/* ---------- sheets & toast ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 40; display: flex; align-items: stretch; justify-content: center; background: var(--scrim); }
.sheet-wrap.bottom { align-items: flex-end; }
#formWrap { z-index: 45; }
#setWrap { z-index: 46; }
.sheet {
  position: relative; display: flex; flex-direction: column; width: 100%; max-width: 720px; height: 100%;
  margin: 0; border: 0; background: var(--panel); color: var(--ink);
  padding-top: env(safe-area-inset-top, 0px); animation: rise .22s ease-out;
}
.sheet:focus { outline: none; }
.sheet-wrap.bottom .sheet { height: auto; max-height: 80vh; border-radius: 18px 18px 0 0; padding-top: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
@keyframes rise { from { transform: translateY(24px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet-head {
  flex: none; display: flex; align-items: center; gap: 8px; min-height: 58px; padding-block: 7px;
  padding-left: max(10px, env(safe-area-inset-left, 0px)); padding-right: max(10px, env(safe-area-inset-right, 0px));
  border-bottom: 1px solid var(--rule); background: var(--panel);
}
.sheet-title { flex: 1; min-width: 0; font-size: 17px; font-weight: 800; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-kicker { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sheet-foot {
  flex: none; border-top: 1px solid var(--rule); background: var(--panel);
  padding-block: 10px calc(10px + env(safe-area-inset-bottom, 0px)); padding-left: var(--gutter-l); padding-right: var(--gutter-r);
}
@media (min-width: 760px) {
  .sheet-wrap { align-items: center; padding: 28px; }
  .sheet-wrap.bottom { align-items: center; }
  .sheet { height: auto; max-height: min(100%, 920px); padding-top: 0; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
  .sheet-wrap.bottom .sheet { border-radius: 16px; }
  .sheet-sm { max-width: 520px; }
}
.toast {
  position: fixed; z-index: 70; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  width: max-content; max-width: min(92vw, 460px); padding: 11px 16px; border-radius: 12px; text-align: center;
  background: var(--ink); color: var(--panel); font-size: 14px; line-height: 1.6; box-shadow: var(--shadow);
}

/* ---------- admin ---------- */
.adm-top { position: sticky; top: 0; z-index: 20; background: var(--bronze-deep); color: #FFF7EE; padding-top: env(safe-area-inset-top, 0px); }
.adm-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-block: 0 8px; }
.adm-tabs::-webkit-scrollbar { display: none; }
.adm-tab { flex: none; height: 38px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: #F6E6D6; font-weight: 700; font-size: 14.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.adm-tab[aria-current="page"] { background: #FFF7EE; color: var(--bronze-deep); }
.badge { min-width: 21px; height: 21px; padding: 0 6px; border-radius: 999px; background: #D8412F; color: #FFFFFF; font-size: 12px; line-height: 21px; text-align: center; font-weight: 800; }
.ledger { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 6px 24px; padding-block: 18px 6px; }
.ledger-main { display: grid; min-width: 0; }
.ledger .k { font-size: 13px; color: var(--ink-2); }
.ledger .v { font-family: var(--f-sign); font-size: 30px; line-height: 1.3; color: var(--ink); text-wrap: balance; }
.ledger .v small { font-family: var(--f-text); font-size: 13px; color: var(--ink-2); margin-inline-start: 2px; }
.ledger-counts { display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: 14px; color: var(--ink-2); padding-bottom: 4px; }
.ledger-counts b { color: var(--ink); font-size: 16px; font-weight: 800; margin-inline-end: 3px; }
.controls { display: flex; flex-wrap: wrap; gap: 10px; padding-block: 10px 6px; }
.controls .search { flex: 1 1 180px; }
.tabs { flex: 1 1 100%; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-block: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.cars { display: grid; gap: 10px; padding-block: 6px 112px; }
.car {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 124px; grid-template-areas: "info photo";
  width: 100%; padding: 0; text-align: right; color: var(--ink); cursor: pointer;
  background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r-card); overflow: hidden; transition: border-color .15s ease;
}
.car:hover { border-color: var(--rule-strong); }
.car-photo { grid-area: photo; position: relative; display: grid; place-items: center; min-height: 118px; background: var(--photo-bg); }
.car-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.car-info { grid-area: info; display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 10px 12px; }
.car-title { font-weight: 800; font-size: 15.5px; line-height: 1.5; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.car-meta { font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.car-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; padding-top: 2px; }
.age { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.age svg { width: 14px; height: 14px; }
.age.long { color: var(--alert); }
.car.is-sold .price { color: var(--ink-2); }
.car.is-sold .car-photo img { filter: grayscale(.85); opacity: .75; }
.car.is-hidden .car-photo img { opacity: .55; }
.car.is-new { animation: flash 1.8s ease-out; }
@keyframes flash { from { box-shadow: 0 0 0 3px var(--bronze); } to { box-shadow: 0 0 0 0 transparent; } }
.pcount { position: absolute; bottom: 6px; left: 6px; font-size: 11.5px; line-height: 1; padding: 4px 7px; border-radius: 999px; background: var(--stamp-bg); color: var(--ink); }
@media (min-width: 700px) {
  .cars { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
  .car { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "photo" "info"; }
  .car-photo { aspect-ratio: 4 / 3; min-height: 0; max-width: 100%; }
  .car-info { padding: 12px 14px 14px; }
  .car .price { font-size: 22px; }
  .car .stamp { font-size: 22px; padding: 8px 14px 6px; }
}
.state { grid-column: 1 / -1; display: grid; justify-items: center; gap: 10px; padding: 44px 16px; text-align: center; color: var(--ink-2); }
.state .tower { width: 52px; height: 74px; color: var(--bronze); }
.state h3 { font-family: var(--f-sign); font-weight: 400; font-size: 23px; line-height: 1.3; color: var(--ink); }
.state p { max-width: 40ch; }
.fab {
  position: fixed; z-index: 25; left: calc(16px + env(safe-area-inset-left, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  height: 54px; padding: 0 18px 0 22px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--bronze); color: var(--bronze-ink); font-weight: 800; font-size: 16px; box-shadow: var(--shadow);
  display: inline-flex; align-items: center; gap: 8px;
}
.fab svg { width: 22px; height: 22px; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--rule); }
.seg button { height: 42px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--ink-2); font-weight: 700; cursor: pointer; }
.seg button:hover { background: var(--panel); }
.seg button[aria-pressed="true"][data-st="available"] { background: var(--ok); color: var(--on-sem); }
.seg button[aria-pressed="true"][data-st="reserved"] { background: var(--hold); color: var(--on-sem); }
.seg button[aria-pressed="true"][data-st="sold"] { background: var(--alert); color: var(--on-sem); }
.seg button.pending { background: var(--panel); color: var(--ink); border: 1px dashed var(--ink-3); }
.draft { display: grid; gap: 12px; padding: 12px; border-radius: 12px; background: var(--panel-2); border: 1px dashed var(--rule-strong); }
.draft-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ad-text { width: 100%; padding: 12px; border: 1px solid var(--rule); border-radius: 10px; resize: vertical; background: var(--panel-2); color: var(--ink); font-size: 14.5px; line-height: 1.85; }
.internal { display: grid; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); border: 1px dashed var(--rule-strong); }
.kv { display: grid; }
.kv > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 7px; border-bottom: 1px solid var(--rule); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { flex: none; font-size: 14px; color: var(--ink-2); }
.kv dd { min-width: 0; display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 8px; font-weight: 700; text-align: left; overflow-wrap: anywhere; }
.kv .ok { color: var(--ok); }
.kv .bad { color: var(--alert); }
.sel { user-select: all; -webkit-user-select: all; direction: ltr; unicode-bidi: isolate; }
.notes { padding-top: 8px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.confirm { display: grid; gap: 10px; padding: 12px; border-radius: 12px; background: var(--alert-soft); }
.confirm p { color: var(--alert); font-weight: 700; }
fieldset.grp { min-width: 0; margin: 0; border: 0; padding-block: 16px; border-bottom: 1px solid var(--rule); }
fieldset.grp:last-child { border-bottom: 0; }
.grp-title { padding: 0; margin: 0 0 10px; font-family: var(--f-sign); font-weight: 400; font-size: 19px; line-height: 1.3; color: var(--ink); }
.grp-body { display: grid; gap: 14px; }
.reqs { display: grid; gap: 10px; padding-block: 12px 40px; }
.req-card { display: grid; gap: 10px; padding: 14px; border-radius: var(--r-card); background: var(--panel); border: 1px solid var(--rule); }
.req-card.is-new { border-color: var(--bronze-line); box-shadow: inset -4px 0 0 var(--bronze); }
.req-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.req-head b { display: block; font-size: 15.5px; line-height: 1.5; }
.req-head span { font-size: 12.5px; color: var(--ink-3); }
.req-body { display: grid; gap: 4px; font-size: 14px; color: var(--ink-2); }
.req-body .row { display: flex; gap: 6px; flex-wrap: wrap; }
.req-body .row b { color: var(--ink); font-weight: 700; }
.req-photos { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.req-photos a { flex: none; width: 84px; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--photo-bg); }
.req-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.req-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.settings { display: grid; gap: 14px; padding-block: 14px 48px; }
.panel { display: grid; gap: 14px; padding: 16px; border-radius: var(--r-card); background: var(--panel); border: 1px solid var(--rule); }
.panel-title { font-family: var(--f-sign); font-weight: 400; font-size: 20px; line-height: 1.3; }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 400px; display: grid; gap: 14px; padding: 24px 20px; border-radius: 16px; background: var(--panel); border: 1px solid var(--rule); box-shadow: var(--shadow); }
.auth-card .tower { width: 38px; height: 54px; color: var(--bronze); justify-self: center; }
.auth-card h1 { font-family: var(--f-sign); font-weight: 400; font-size: 24px; text-align: center; line-height: 1.3; }
.auth-card p { text-align: center; color: var(--ink-2); font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important; }
}
