/* Komponentlar. Har bir blok o'z nomi bilan; qiymatlar faqat tokens.css dan. */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--fs-m); font-weight: 500; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; font-synthesis: none; font-kerning: normal; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
img { display: block; max-width: 100%; }

/* ---------- ilova qobig'i ---------- */
#app { max-width: 560px; min-height: 100%; margin: 0 auto; background: var(--bg); position: relative; display: flex; flex-direction: column; }
.page { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.page-body { flex: 1 1 auto; padding: var(--s6) var(--s4) calc(var(--nav-h) + var(--s6)); display: flex; flex-direction: column; gap: var(--s6); }
.page-body.no-nav { padding-bottom: var(--s6); }

/* ---------- tepa panel ---------- */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--line); padding: var(--s4); display: flex; flex-direction: column; gap: var(--s4); }
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 40px; }
.logo { font-family: var(--font-logo); font-weight: 700; font-size: var(--fs-l); letter-spacing: -0.3px; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.logo img { width: 26px; height: 26px; flex: none; }
.logo b { color: var(--accent); font-weight: 700; }
.title { margin: 0; font-size: var(--fs-l); font-weight: 800; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { height: 40px; padding: 0 var(--s3); border-radius: var(--r-pill); background: var(--bg); border: 0; color: var(--ink); font-size: var(--fs-m); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; white-space: nowrap; }
.pill .ac { color: var(--accent); display: inline-flex; }
.pill .mut { color: var(--ink-2); display: inline-flex; }
.icon-btn { width: 40px; height: 40px; flex: 0 0 40px; border-radius: var(--r-pill); border: 0; background: var(--bg); display: inline-flex; align-items: center; justify-content: center; color: var(--ink); text-decoration: none; }
.search { display: flex; align-items: center; gap: var(--s3); background: var(--bg); border-radius: var(--r-ctl); padding: 0 var(--s4); height: 48px; color: var(--ink-2); }
.search input { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; height: 46px; font-size: 16px; color: var(--ink); outline: none; }
.search input::placeholder { color: #6B746E; }
.search:focus-within { box-shadow: 0 0 0 2px var(--ink) inset; }

/* ---------- bo'limlar ---------- */
.cats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s2); }
.cat { border: 0; background: transparent; padding: 0; display: flex; flex-direction: column; align-items: center; gap: var(--s2); color: var(--ink-2); font-size: var(--fs-s); font-weight: 600; line-height: 1.2; text-align: center; }
.cat .tile { width: 64px; height: 64px; border-radius: var(--r-card); background: var(--surface); color: var(--ink); display: flex; align-items: center; justify-content: center; transition: background .15s, color .15s; }
.cat[aria-pressed="true"] { color: var(--ink); font-weight: 800; }
.cat[aria-pressed="true"] .tile { background: var(--ink); color: #fff; }

/* ---------- bo'lim sarlavhasi ---------- */
.sec-head { display: flex; justify-content: space-between; align-items: center; min-height: 24px; gap: var(--s3); }
.sec-head h2 { margin: 0; font-size: var(--fs-l); font-weight: 800; }
.sec-head span { font-size: var(--fs-s); font-weight: 600; color: var(--ink-2); }

/* ---------- e'lon kartochkasi (2 qator) ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.card { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-card); overflow: hidden; text-decoration: none; color: var(--ink); position: relative; }
.card-img { position: relative; aspect-ratio: 1 / 1; background: var(--line); }
.card-img { overflow: hidden; }
.card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-img .noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--line-2); }
.badge { position: absolute; bottom: var(--s2); height: 24px; padding: 0 var(--s2); border-radius: var(--r-pill); background: rgba(17,26,21,.72); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.badge.l { left: var(--s2); } .badge.r { right: var(--s2); }
.heart { position: absolute; top: var(--s2); right: var(--s2); width: 36px; height: 36px; border-radius: var(--r-pill); border: 0; background: rgba(255,255,255,.92); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.heart[aria-pressed="true"] { color: var(--accent); }
.heart[aria-pressed="true"] svg { fill: var(--accent); }
.card-body { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s3); }
.card-price { font-size: var(--fs-m); font-weight: 800; line-height: 1.25; }
.card-title { font-size: var(--fs-s); font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.card-meta { font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- pastki menyu ---------- */
.nav { position: fixed; bottom: 0; left: 0; right: 0; margin-inline: auto; width: 100%; max-width: 560px; z-index: 20; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; justify-items: center; }
.nav a, .nav button { width: 48px; height: 48px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; color: var(--ink-2); }
.nav [aria-current="page"] { color: var(--ink); }
.nav [aria-current="page"] svg { fill: var(--ink); }
.nav .plus { width: 56px; height: 56px; border-radius: 18px; background: var(--accent); color: #fff; }
.nav .plus:active { background: var(--accent-press); }

/* ---------- tugmalar ---------- */
.btn { height: var(--h-ctl); border-radius: var(--r-ctl); border: 0; padding: 0 var(--s6); font-size: 16px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:active { background: var(--accent-press); }
.btn-primary[disabled] { opacity: .6; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn-block { width: 100%; }
.btn-sq { width: var(--h-ctl); flex: 0 0 var(--h-ctl); padding: 0; }

/* ---------- pastdan chiqadigan oyna ---------- */
.sheet-dim { position: fixed; inset: 0; z-index: 40; background: var(--dim); border: 0; animation: fade .2s ease-out; }
.sheet { position: fixed; left: 0; right: 0; margin-inline: auto; bottom: 0; z-index: 41; width: 100%; max-width: 560px; background: var(--surface); border-radius: 24px 24px 0 0; padding: var(--s2) var(--s4) calc(var(--s6) + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: var(--s4); animation: up .28s var(--ease); max-height: 90vh; overflow-y: auto; }
.sheet .grabber { align-self: center; width: 40px; height: 4px; border-radius: var(--r-pill); background: #D9DDD7; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); }
.sheet-head strong { display: block; font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.4px; }
.sheet-head small { display: block; margin-top: var(--s1); font-size: var(--fs-s); font-weight: 600; color: var(--ok); }
.sheet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.sheet-item { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s4); border-radius: var(--r-card); background: var(--bg); color: var(--ink); text-decoration: none; min-height: 112px; }
.sheet-item:last-child:nth-child(odd) { grid-column: 1 / -1; flex-direction: row; align-items: center; min-height: 76px; }
.sheet-item .ic { width: 44px; height: 44px; border-radius: var(--r-ctl); background: var(--surface); display: flex; align-items: center; justify-content: center; flex: 0 0 44px; }
.sheet-item b { display: block; font-size: var(--fs-m); font-weight: 800; }
.sheet-item small { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-top: 2px; }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- forma ---------- */
.h1 { margin: 0; font-size: var(--fs-xl); font-weight: 800; line-height: 1.2; letter-spacing: -0.4px; }
.sub { margin: 0; font-size: var(--fs-m); font-weight: 500; line-height: 1.5; color: var(--ink-2); }
.field { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.field > label, .field > .lab { font-size: var(--fs-m); font-weight: 800; }
.field .lab small { font-weight: 600; color: var(--ink-2); }
.input { height: var(--h-ctl); border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--surface); padding: 0 var(--s4); font-size: 16px; color: var(--ink); width: 100%; min-width: 0; outline: none; }
textarea.input { height: auto; min-height: 104px; padding: var(--s3) var(--s4); resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.input[disabled] { background: var(--bg); color: var(--ink-2); }
.input::placeholder { color: #6B746E; }
.field.err .input { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.err-text { font-size: var(--fs-s); font-weight: 700; color: var(--accent); }
.row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.row-3 .field > label, .row-2 .field > label { font-size: var(--fs-s); }
.chips { display: grid; gap: var(--s2); grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
.chip { min-height: var(--h-chip); border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 800; padding: var(--s2); line-height: 1.2; }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.choice { min-height: 64px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--surface); padding: var(--s2) var(--s4); display: flex; align-items: center; justify-content: space-between; gap: var(--s3); text-align: left; width: 100%; }
.choice b { display: block; font-size: 16px; font-weight: 800; }
.choice small { display: block; font-size: var(--fs-s); font-weight: 600; color: var(--ink-2); margin-top: 2px; }
.choice .radio { flex: 0 0 20px; width: 20px; height: 20px; border-radius: var(--r-pill); border: 2px solid var(--line-2); }
.choice[aria-pressed="true"] { border: 2px solid var(--ink); }
.choice[aria-pressed="true"] .radio { border: 6px solid var(--ink); }
.check { min-height: var(--h-chip); border: 0; background: transparent; padding: 0; display: inline-flex; align-items: center; gap: var(--s3); font-size: var(--fs-m); font-weight: 700; }
.check .box { width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--line-2); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.check[aria-pressed="true"] .box { background: var(--ink); border-color: var(--ink); }
.photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); }
.photo-add { aspect-ratio: 1 / 1; border-radius: var(--r-ctl); border: 1.5px dashed var(--accent); background: var(--surface); color: var(--accent); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.photo-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-th { aspect-ratio: 1 / 1; border-radius: var(--r-ctl); overflow: hidden; position: relative; background: var(--line); }
.photo-th img { width: 100%; height: 100%; object-fit: cover; }
.photo-th button { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: var(--r-pill); border: 0; background: rgba(17,26,21,.72); color: #fff; display: flex; align-items: center; justify-content: center; }
.photo-th .first { position: absolute; left: 4px; bottom: 4px; font-size: 11px; font-weight: 800; background: var(--surface); padding: 2px 6px; border-radius: 6px; }
.note { display: flex; gap: var(--s3); align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: var(--s4); }
.note small { display: block; font-size: var(--fs-s); font-weight: 700; color: var(--ink-2); }
.note b { display: block; font-size: var(--fs-m); font-weight: 800; margin-top: 2px; }
.hint { font-size: var(--fs-s); font-weight: 600; color: var(--ink-2); display: flex; gap: var(--s2); align-items: center; }
.hint[style*="center"] { justify-content: center; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.steps span { height: 4px; border-radius: var(--r-pill); background: var(--line); transition: background .2s; }
.steps span.on { background: var(--accent); }
.footer-bar { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: var(--s3) var(--s4) calc(var(--s4) + env(safe-area-inset-bottom)); display: flex; gap: var(--s2); }

/* ---------- tumanlar ro'yxati / xarita ---------- */
.tlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.titem { height: 48px; border-radius: var(--r-ctl); background: var(--surface); border: 1px solid var(--line); padding: 0 var(--s4); display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-m); font-weight: 700; color: var(--ink); text-align: left; }
.titem[aria-pressed="true"] { border: 2px solid var(--ink); }
.divider { display: flex; align-items: center; gap: var(--s3); font-size: var(--fs-s); font-weight: 600; color: var(--ink-2); }
.divider::before, .divider::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line); }

/* ---------- e'lon sahifasi ---------- */
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: var(--ink); aspect-ratio: 4 / 3; }
.gallery::-webkit-scrollbar { display: none; }
.gallery .slide { flex: 0 0 100%; position: relative; overflow: hidden; scroll-snap-align: start; }
/* Rasm to'liq ko'rinadi (kesilmaydi), atrofidagi bo'sh joy shu rasmning xira nusxasi bilan to'ladi — qora "bo'sh" chiziq qolmaydi */
.gallery .slide::before { content: ""; position: absolute; inset: -40px; background: var(--bg) center / cover no-repeat; filter: blur(28px) saturate(1.2) brightness(.75); }
.gallery img { position: relative; width: 100%; height: 100%; object-fit: contain; }
.gallery .noimg { flex: 0 0 100%; display: flex; align-items: center; justify-content: center; color: #5A645E; }
.gal-wrap { position: relative; }
.gal-count { position: absolute; right: var(--s3); bottom: var(--s3); }
.detail-price { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.4px; }
.detail-title { margin: 0; font-size: var(--fs-l); font-weight: 700; line-height: 1.35; }
.meta-row { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); font-size: var(--fs-s); font-weight: 600; color: var(--ink-2); align-items: center; }
.meta-row span { display: inline-flex; align-items: center; gap: 4px; }
.box { background: var(--surface); border-radius: var(--r-card); padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); }
.box h2 { margin: 0; font-size: var(--fs-l); font-weight: 800; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: var(--s3) var(--s4); margin: 0; }
.dl dt { font-size: var(--fs-m); font-weight: 600; color: var(--ink-2); }
.dl dd { margin: 0; font-size: var(--fs-m); font-weight: 700; text-align: right; }
.desc { margin: 0; font-size: var(--fs-m); line-height: 1.6; white-space: pre-line; }

/* ---------- holatlar ---------- */
.empty { background: var(--surface); border-radius: var(--r-card); padding: var(--s8) var(--s6); text-align: center; display: flex; flex-direction: column; gap: var(--s2); align-items: center; }
.empty b { font-size: var(--fs-l); font-weight: 800; }
.empty-ic { width: 64px; height: 64px; border-radius: var(--r-card); background: var(--bg); color: var(--ink-2); display: flex; align-items: center; justify-content: center; margin-bottom: var(--s2); }
.empty .btn { margin-top: var(--s3); }
.empty span { font-size: var(--fs-m); color: var(--ink-2); line-height: 1.5; }
.skel { background: linear-gradient(90deg, var(--line) 0%, #EEF0EC 50%, var(--line) 100%); background-size: 200% 100%; animation: sh 1.2s linear infinite; border-radius: var(--r-card); }
@keyframes sh { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.done-ic { width: 80px; height: 80px; border-radius: var(--r-pill); background: var(--ok-soft); color: var(--ok); display: flex; align-items: center; justify-content: center; }
.center-col { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s4); padding: var(--s8) var(--s4); }
.toast { position: fixed; left: 0; right: 0; margin-inline: auto; width: max-content; bottom: calc(var(--nav-h) + var(--s4)); transform: translateY(20px); background: var(--ink); color: #fff; padding: var(--s3) var(--s4); border-radius: var(--r-ctl); font-size: var(--fs-m); font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease); z-index: 60; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: none; }

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


/* Haqiqiy xarita (Leaflet) */
.lmap { position: relative; z-index: 0; isolation: isolate; border-radius: var(--r-card); overflow: hidden; background: #E8ECE6; border: 1px solid var(--line); }
.lmap .leaflet-control-attribution { font-size: 10px; background: rgba(255,255,255,.75); }
.lmap .leaflet-control-zoom a { width: 40px; height: 40px; line-height: 40px; font-size: 20px; color: var(--ink); }
.lmap .leaflet-bar { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: none; }
.map-off { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: var(--s6); color: var(--ink-2); font-weight: 600; }
.mk-wrap { background: none; border: 0; }
.mk { position: absolute; transform: translate(-50%, -50%); height: 30px; padding: 0 10px 0 8px; border-radius: var(--r-pill); border: 1px solid #C9D3C8; background: var(--surface); color: var(--ink); font: 800 12px/1 Manrope, system-ui, sans-serif; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; box-shadow: 0 2px 6px rgba(17,26,21,.18); cursor: pointer; }
.mk::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.mk i { font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bg); color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.mk[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 4px 12px rgba(194,31,58,.4); }
.mk[aria-pressed="true"]::before { background: #fff; }
.mk[aria-pressed="true"] i { background: rgba(255,255,255,.22); color: #fff; }
.warn { margin: 0; padding: var(--s3) var(--s4); border-radius: var(--r-ctl); background: #FFF4E5; color: #6B4A12; font-size: var(--fs-s); font-weight: 600; line-height: 1.45; }

/* Profil */
.pcard { display: flex; align-items: center; gap: var(--s4); padding: var(--s4); background: var(--surface); border-radius: var(--r-card); border: 1px solid var(--line); }
.pcard b { display: block; font-size: var(--fs-l); }
.pcard small { display: block; color: var(--ink-2); font-size: var(--fs-s); line-height: 1.4; margin-top: 2px; }
.avatar { width: 56px; height: 56px; flex: none; border-radius: 50%; background: var(--bg); color: var(--ink-2); display: flex; align-items: center; justify-content: center; }
.pgroup { background: var(--surface); border-radius: var(--r-card); border: 1px solid var(--line); overflow: hidden; }
.prow { display: flex; align-items: center; gap: var(--s3); min-height: 56px; padding: 0 var(--s4); color: var(--ink); text-decoration: none; }
.prow + .prow { border-top: 1px solid var(--line); }
.prow:active { background: var(--bg); }
.prow .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--bg); display: flex; align-items: center; justify-content: center; flex: none; }
.prow-t { flex: 1 1 auto; font-weight: 700; font-size: var(--fs-m); }
.prow-v { color: var(--ink-2); font-weight: 600; font-size: var(--fs-s); }
.warn[hidden] { display: none; }

/* Kichik masshtab: maydon o'rtasida faqat nom (nuqtasiz); chegarasi yo'q tuman — nuqta bilan */
.lmap.z-low .mk:not([aria-pressed="true"]) { height: auto; padding: 0; border: 0; background: none; box-shadow: none; gap: 4px; }
.lmap.z-low .mk:not([aria-pressed="true"]):not(.pt)::before { display: none; }
.lmap.z-low .mk.pt:not([aria-pressed="true"])::before { width: 10px; height: 10px; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.lmap.z-low .mk:not([aria-pressed="true"]) b { font-size: 10.5px; color: var(--ink); text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff, 0 0 2px #fff; }
.lmap.z-low .mk:not([aria-pressed="true"]) i { display: none; }
.lmap .leaflet-interactive { cursor: pointer; }
.mk b { font-weight: 800; }
.map-gps { position: absolute; right: 10px; bottom: 26px; z-index: 500; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(17,26,21,.18); }
.map-gps:disabled { color: var(--ink-2); }
.btn:disabled { opacity: 1; background: var(--line); color: var(--ink-2); border-color: var(--line); }
.lmap.z-low .mk.pt:not([aria-pressed="true"]) { transform: translate(calc(-100% + 6px), -50%); flex-direction: row-reverse; }

/* "Tez kunda" ekrani */
.soon { margin-top: var(--s6); display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s3); }
.soon-ic { width: 80px; height: 80px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); display: flex; align-items: center; justify-content: center; margin-bottom: var(--s2); }
.soon b { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.4px; }
.soon span { color: var(--ink-2); font-size: var(--fs-m); max-width: 280px; line-height: 1.45; }

/* Uzun ro'yxat oynasi (qidiruvli) */
.chip-more { display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--ink-2); border-style: dashed; }
.sheet.pick { max-height: 86vh; display: flex; flex-direction: column; }
.pick-search { margin: 0 0 var(--s3); }
.pick-list { overflow-y: auto; flex: 1 1 auto; margin: 0 calc(var(--s4) * -1); padding: 0 var(--s4); -webkit-overflow-scrolling: touch; }
.pick-g { display: flex; flex-direction: column; }
.pick-gh { font-size: var(--fs-s); font-weight: 800; color: var(--ink-2); padding: var(--s3) 0 var(--s1); }
.pick-item { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font-size: var(--fs-m); font-weight: 700; color: var(--ink); padding: 0 var(--s1); }
.pick-item[aria-pressed="true"] { color: var(--accent); }
.pick-item[hidden], .pick-g[hidden], .pick-none[hidden] { display: none; }
.pick-none { padding: var(--s4) 0; text-align: center; }
.pick-other { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2); padding-top: var(--s3); border-top: 1px solid var(--line); margin-top: var(--s2); }

/* ================= Jonli va silliq ================= */
/* Bosilganda yengil "cho'kish" — har bir tugma javob beradi */
.card, .chip, .btn, .cat .tile, .titem, .choice, .pill, .icon-btn, .sheet-item, .prow, .nav a, .nav button, .heart, .pick-item {
  transition: transform .16s var(--ease), background-color .16s, box-shadow .2s var(--ease), color .16s, border-color .16s;
}
.card:active, .sheet-item:active { transform: scale(.975); }
.chip:active, .btn:active, .titem:active, .choice:active, .pill:active, .icon-btn:active, .heart:active, .cat:active .tile { transform: scale(.96); }
.nav a:active, .nav button:active { transform: scale(.9); }
.nav .plus { box-shadow: 0 6px 16px rgba(194, 31, 58, .32); }

/* Rasmlar sekin paydo bo'ladi (keskin "chiqib qolmaydi") */
.card-img img, .gallery img { opacity: 0; transition: opacity .4s ease; }
.card-img img.ok, .gallery img.ok { opacity: 1; }

/* Kartochkalar ketma-ket ko'tarilib chiqadi */
.grid .card { animation: rise .42s var(--ease) both; }
.grid .card:nth-child(2) { animation-delay: .04s; } .grid .card:nth-child(3) { animation-delay: .08s; }
.grid .card:nth-child(4) { animation-delay: .12s; } .grid .card:nth-child(5) { animation-delay: .16s; }
.grid .card:nth-child(6) { animation-delay: .2s; } .grid .card:nth-child(n+7) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Sahifalar orasida silliq o'tish */
::view-transition-old(root) { animation: vt-out .14s ease-in both; }
::view-transition-new(root) { animation: vt-in .24s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }
.toast { transition: opacity .22s, transform .32s cubic-bezier(.3, 1.4, .5, 1); }

/* Sichqoncha bilan (kompyuterda) — kartochka ko'tariladi */
@media (hover: hover) and (pointer: fine) {
  .card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(17, 26, 21, .10); }
  .card:hover .card-img img { transform: scale(1.03); }
  .card-img { overflow: hidden; }
  .card-img img { transition: opacity .4s ease, transform .5s var(--ease); }
  .chip:hover, .titem:hover, .choice:hover, .prow:hover { border-color: var(--line-2); }
  .btn-primary:hover { background: var(--accent-press); }
  .cat:hover .tile { background: var(--line); }
  .nav a:hover, .nav button:not(.plus):hover { color: var(--ink); }
}

/* E'lon sahifasidagi qo'ng'iroq paneli — pastda qotib turadi */
.contact-bar { position: fixed; left: 0; right: 0; bottom: 0; margin-inline: auto; width: 100%; max-width: 560px; z-index: 20; }

/* ================= Katta ekran (kompyuter, planshet, 4K) ================= */
@media (min-width: 900px) {
  :root { --nav-h: 72px; }
  #app { max-width: 1280px; }
  .topbar { padding: var(--s4) var(--s8); box-shadow: 0 0 0 100vmax var(--surface); clip-path: inset(0 -100vmax); }
  .page-body { padding: var(--s8) var(--s8) calc(var(--nav-h) + 56px); }
  .page-body:not(.wide) { max-width: 760px; width: 100%; margin-inline: auto; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--s4); }
  .cats { grid-template-columns: repeat(5, 96px); justify-content: start; gap: var(--s4); }
  .cat .tile { width: 72px; height: 72px; }
  /* pastki menyu — suzib turgan panel */
  .nav { bottom: 20px; max-width: 440px; border: 1px solid var(--line); border-radius: 24px; padding-bottom: 0; height: var(--nav-h);
         box-shadow: 0 12px 40px rgba(17, 26, 21, .14); background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
  .toast { bottom: calc(var(--nav-h) + 40px); }
  .footer-bar { padding-inline: max(var(--s4), calc((100% - 728px) / 2)); }
  .sheet { bottom: 24px; border-radius: 24px; padding-bottom: var(--s6); box-shadow: 0 24px 64px rgba(17, 26, 21, .2); }
  .detail-price { font-size: 30px; }
  .gal-wrap { width: calc(100% - 64px); max-width: 760px; margin: var(--s8) auto 0; border-radius: var(--r-card); overflow: hidden; }
  .contact-bar { max-width: 760px; bottom: 20px; border: 1px solid var(--line); border-radius: 22px; padding: var(--s3); box-shadow: 0 12px 40px rgba(17, 26, 21, .14); }
}
@media (min-width: 1600px) {
  :root { --fs-m: 16px; --fs-l: 18px; --fs-xl: 26px; }
  #app { max-width: 1520px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
@media (min-width: 2400px) {
  /* 4K ekran: hamma narsa mutanosib kattalashadi, xira bo'lmaydi (vektor ikonkalar, haqiqiy shrift) */
  html { zoom: 1.5; }
}

/* Ixtiyoriy maydon belgisi */
.opt { font-size: var(--fs-s); font-weight: 600; color: var(--ink-2); }
/* Aniq joylashuv */
.geo-ok { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-ctl); background: var(--ok-soft); color: var(--ok); }
.geo-ok .ic { flex: none; display: flex; }
.geo-ok > span:nth-child(2) { flex: 1 1 auto; min-width: 0; }
.geo-ok b { display: block; font-size: var(--fs-m); font-weight: 800; }
.geo-ok small { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.geo-ok .pill { height: 36px; background: var(--surface); flex: none; }
/* Ish vaqti: bitta qator */
.hours { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: var(--s2); font-weight: 800; color: var(--ink-2); }
.hours .input { text-align: center; font-weight: 700; }

/* ================= Qotmaslik ================= */
/* Uzun ro'yxatda ekrandan tashqaridagi kartochkalar chizilmaydi — aylantirish doim silliq */
.grid .card { content-visibility: auto; contain-intrinsic-size: auto 320px; }
.more { min-height: 48px; display: flex; justify-content: center; align-items: center; padding: var(--s4) 0; }
.more-dots { display: flex; gap: 6px; }
.more-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); animation: dot 1s ease-in-out infinite; }
.more-dots i:nth-child(2) { animation-delay: .15s; } .more-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 100% { opacity: .3; transform: scale(.8); } 50% { opacity: 1; transform: none; } }
.more-err { display: flex; flex-direction: column; align-items: center; gap: var(--s2); color: var(--ink-2); font-size: var(--fs-s); font-weight: 600; text-align: center; }
.offline { position: fixed; top: 0; left: 0; right: 0; z-index: 70; padding: calc(var(--s2) + env(safe-area-inset-top)) var(--s4) var(--s2); background: var(--ink); color: #fff; font-size: var(--fs-s); font-weight: 700; text-align: center; animation: fade .2s ease-out; }

/* Shikoyat havolasi — ko'zga tashlanmaydi, lekin topiladi */
.report-link { align-self: center; border: 0; background: none; color: var(--ink-2); font-size: var(--fs-s); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; padding: var(--s3); min-height: var(--h-touch); }
/* Admin panel */
.adm-list { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); }
.adm-row { display: flex; gap: var(--s3); background: var(--surface); border-radius: var(--r-card); padding: var(--s3); border: 1px solid var(--line); }
.adm-img { flex: 0 0 76px; height: 76px; border-radius: var(--r-ctl); overflow: hidden; background: var(--line); display: flex; align-items: center; justify-content: center; color: var(--ink-2); }
.adm-img img { width: 100%; height: 100%; object-fit: cover; }
.adm-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.adm-body b { font-size: var(--fs-m); font-weight: 800; }
.adm-body small { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.adm-body small a { color: var(--ink); }
.adm-body p { margin: 0; font-size: var(--fs-s); color: var(--ink-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.adm-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.adm-tag { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-pill); background: var(--bg); }
.adm-tag.red, .adm-hid { background: var(--accent-soft); color: var(--accent); }
.adm-hid { padding: 0 6px; border-radius: 6px; }
.adm-act { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: 4px; }
.adm-act .btn { height: 40px; padding: 0 var(--s3); font-size: var(--fs-s); }
.adm-del { color: var(--accent); }

/* Mening e'lonlarim — holat */
.st { font-size: 12px; font-weight: 700; }
.st.ok { color: var(--ok); }
.st.off { color: var(--accent); }

/* Filtr tugmasi */
.sec-head h2 span { font-size: var(--fs-s); font-weight: 600; color: var(--ink-2); }
.fbtn { height: 36px; background: var(--surface); border: 1px solid var(--line); font-size: var(--fs-s); }
.fcount { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.adm-act.two { display: grid; grid-template-columns: 1fr 1fr; }
.adm-act.two .btn { padding: 0 var(--s2); }

/* Uzun so'z (bo'shliqsiz) sahifani kengaytirib yubormasin */
.desc, .detail-title, .dl dd, .adm-body p, .adm-body b, .sheet-head small, .card-title, .card-meta, .empty span, .empty b { overflow-wrap: anywhere; }
.dl dd { min-width: 0; }
/* Namuna (placeholder) to'ldirilgan qiymatga o'xshamasin */
.input::placeholder, .search input::placeholder { color: #A9B0AB; }
/* Ikki ustunli qatorda uzun yorliq maydonni pastga surmasin */
.row-2, .row-3 { align-items: end; }
.chip { overflow-wrap: anywhere; }
.grid.no-anim .card { animation: none; }

/* ================= Audit tuzatishlari (v9) ================= */
/* Bosiladigan joy kamida 44px — ko'rinishi o'zgarmaydi, faqat bosish maydoni kengayadi */
.icon-btn, .pill, .heart, .photo-th button, .logo { position: relative; }
.heart { position: absolute; }
.photo-th button { position: absolute; }
.icon-btn::after, .pill::after, .heart::after, .photo-th button::after, .logo::after { content: ""; position: absolute; inset: -4px; }
.logo::after { inset: -9px -4px; }
.photo-th button::after { inset: -8px; }

/* Bo'lim nomi uzun bo'lsa (RU: "Недвижимость") ekran chetidan chiqib kesilmaydi */
@media (max-width: 899px) {
  /* Ustunlar matn eniga qarab: uzun nom (RU: "Недвижимость") qo'shnisiga ham, ekran chetiga ham tegmaydi */
  .cats { grid-template-columns: repeat(5, auto); justify-content: space-between; gap: var(--s1); }
}
@media (max-width: 374px) { .cat .tile { width: 56px; height: 56px; } }
.cat-l { white-space: nowrap; font-size: 12px; letter-spacing: -0.1px; }
.chip { overflow-wrap: normal; hyphens: manual; }

/* Qidiruvni bir bosishda tozalash */
.search-x { flex: none; width: 28px; height: 28px; border-radius: var(--r-pill); border: 0; background: var(--line-2); color: var(--surface); display: flex; align-items: center; justify-content: center; position: relative; }
.search-x::after { content: ""; position: absolute; inset: -8px; }
.top-act { display: flex; gap: var(--s2); }
.titem .prow-v { white-space: nowrap; font-weight: 700; }

/* Ro'yxat oxiri — bo'sh joy emas, keyingi qadam */
.feed-end { display: flex; flex-direction: column; align-items: center; gap: var(--s3); padding: var(--s6) 0 var(--s2); text-align: center; color: var(--ink-2); font-size: var(--fs-m); font-weight: 600; }
.more:has(.feed-end) { padding-top: var(--s2); }

/* Internet yo'q yozuvi tepadagi panelni yopib qo'ymaydi */
.offline { min-height: 32px; line-height: 16px; }
body:has(> .offline) #app { padding-top: 32px; }
body:has(> .offline) .topbar { top: 32px; }

/* Telefon raqam: +998 doim turadi, faqat 9 raqam yoziladi */
.phone-in { display: flex; align-items: center; gap: var(--s2); }
.phone-in span { font-weight: 700; color: var(--ink); }
.phone-in input { flex: 1 1 auto; min-width: 0; height: 100%; border: 0; background: transparent; outline: none; font-size: 16px; padding: 0; }
.phone-in:focus-within { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.phone-in input::placeholder { color: #A9B0AB; }

/* E'lon sahifasi: qo'ng'iroq tugmasidagi raqam hech qachon ikki qatorga bo'linmaydi */
.btn-call { flex: 1 1 auto; min-width: 0; white-space: nowrap; }
.btn-call span { overflow: hidden; text-overflow: ellipsis; }
.page-body.detail-body { padding-bottom: 120px; }
.adm-act .btn { white-space: nowrap; }

@media (min-width: 900px) {
  /* Bosh sahifa tepasi: logo | qidiruv | til · tuman — bitta qatorda, ekran eni to'liq ishlatiladi */
  .home-top { flex-direction: row; align-items: center; gap: var(--s6); }
  .home-top .topbar-row { display: contents; }
  .home-top .logo { order: 0; flex: none; }
  .home-top .search { order: 1; flex: 1 1 auto; max-width: 720px; margin-inline: auto; }
  .home-top .top-act { order: 2; flex: none; }
  /* Bo'limlar — butun en bo'ylab 5 ta teng kartochka */
  .cats { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s3); }
  .cat { flex-direction: row; justify-content: flex-start; gap: var(--s3); padding: var(--s2); padding-right: var(--s4); background: var(--surface); border-radius: var(--r-card); border: 1px solid var(--line); font-size: var(--fs-m); color: var(--ink); text-align: left; transition: border-color .16s, background-color .16s; }
  .cat .tile { width: 56px; height: 56px; flex: none; background: var(--bg); border-radius: var(--r-ctl); }
  .cat-l { font-size: var(--fs-m); font-weight: 800; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; }
  .cat[aria-pressed="true"] { border-color: var(--ink); }
  .cat:hover { border-color: var(--line-2); }
  .cat:hover .tile { background: var(--line); }
  /* Tepa panel chizig'i butun en bo'ylab */
  .topbar { border-bottom: 0; box-shadow: 0 0 0 100vmax var(--surface), 0 1px 0 100vmax var(--line); clip-path: inset(0 -100vmax -1px); }

  /* E'lon sahifasi — ikki ustun: chapda rasm (qotib turadi), o'ngda narx, qo'ng'iroq va ma'lumotlar */
  .detail { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s8); align-items: start; width: 100%; max-width: 1216px; margin: 0 auto; padding: var(--s8) var(--s8) 120px; }
  .detail .gal-wrap { width: 100%; max-width: none; margin: 0; position: sticky; top: 104px; }
  .detail .page-body.detail-body { padding: 0; max-width: none; margin: 0; }
  .detail .contact-bar { position: static; max-width: none; margin: 0; padding: 0; border: 0; box-shadow: none; background: transparent; }
  .detail-price { font-size: 32px; }
}
@media (min-width: 1600px) { .detail { max-width: 1456px; } }

/* Uy-joy tez tanlash qatori */
.quick { display: flex; gap: var(--s2); overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--s4)); padding: 0 var(--s4); }
.quick::-webkit-scrollbar { display: none; }
.quick .pill { flex: none; background: var(--surface); border: 1px solid var(--line); }
.quick .pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Bo'lim rasmlari: fonsiz haqiqiy suratlar */
.pic { display: block; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(17, 26, 21, .18)); transition: transform .3s var(--ease); }
.cat .tile .pic { width: 82%; height: 82%; }
.cat:active .pic { transform: scale(.94); }
@media (hover: hover) { .cat:hover .pic { transform: scale(1.08); } }
.cat[aria-pressed="true"] .tile { background: var(--surface); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ink); }
.sheet-item .ic { padding: 0; }
.sheet-item .ic .pic { width: 92%; height: 92%; }
.choice .pic { width: 44px; height: 44px; flex: none; }
.empty-ic .pic { width: 80%; height: 80%; }

/* Kirish (telefon + SMS) */
.login { max-width: 440px; margin: 0 auto; width: 100%; padding-top: var(--s6); }
.login-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s2); margin-bottom: var(--s6); }
.login-ic { width: 72px; height: 72px; border-radius: 24px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: var(--s2); }
.login-head h2 { margin: 0; font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.3px; }
.login-head p { margin: 0; color: var(--ink-2); font-size: var(--fs-m); line-height: 1.5; }
.login-form { display: flex; flex-direction: column; gap: var(--s4); }
.agree { display: flex; gap: var(--s3); align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--ink-2); cursor: pointer; }
.agree input { width: 22px; height: 22px; flex: none; margin: 1px 0 0; accent-color: var(--accent); }
.agree a { color: var(--ink); font-weight: 700; }
.code-in { text-align: center; font-size: 28px; font-weight: 800; letter-spacing: 12px; height: 64px; }
.login-links { display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.link { background: none; border: 0; padding: var(--s2) 0; min-height: var(--h-touch); color: var(--ink); font-weight: 700; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.link:disabled { color: var(--ink-2); text-decoration: none; }
.spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Huquqiy matnlar */
.legal { background: var(--surface); border-radius: var(--r-card); padding: var(--s6); max-width: 780px; margin: 0 auto; width: 100%; box-sizing: border-box; line-height: 1.65; font-size: var(--fs-m); }
.legal h1 { font-size: var(--fs-xl); margin: 0 0 var(--s1); letter-spacing: -0.3px; }
.legal h2 { font-size: var(--fs-l); margin: var(--s6) 0 var(--s2); }
.legal h3 { font-size: var(--fs-m); margin: var(--s4) 0 var(--s1); }
.legal p, .legal li { color: #2B3530; }
.legal ul { padding-left: 20px; margin: var(--s2) 0; }
.legal li { margin: 4px 0; }
.legal-upd { color: var(--ink-2); font-size: var(--fs-s); margin-top: 0; }

/* ===== Admin panel (avval kompyuter uchun) ===== */
body.adm-mode { background: #EFF1EC; }
.dash { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.dash-side { position: sticky; top: 0; height: 100vh; box-sizing: border-box; background: var(--surface); border-right: 1px solid var(--line); padding: var(--s6) var(--s4); display: flex; flex-direction: column; gap: var(--s2); }
.dash-role { font-size: 12px; font-weight: 700; color: var(--ink-2); margin: 2px 0 var(--s4) 34px; }
.dash-nav { display: flex; flex-direction: column; gap: 2px; }
.dash-nav a { display: flex; align-items: center; gap: var(--s3); height: 44px; padding: 0 var(--s3); border-radius: var(--r-ctl); color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: 14px; }
.dash-nav a:hover { background: var(--bg); color: var(--ink); }
.dash-nav a[aria-current] { background: var(--ink); color: #fff; }
.dash-nav a span { flex: 1; }
.dash-nav i { font-style: normal; font-size: 12px; min-width: 20px; text-align: center; border-radius: 10px; padding: 1px 6px; display: none; }
.dash-nav i.on { display: inline-block; background: var(--accent); color: #fff; }
.dash-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); padding-top: var(--s3); }
.dash-foot a, .dash-foot button { display: flex; align-items: center; gap: var(--s2); height: 40px; padding: 0 var(--s3); border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 700; text-decoration: none; border-radius: var(--r-ctl); cursor: pointer; }
.dash-foot a:hover, .dash-foot button:hover { background: var(--bg); color: var(--ink); }
.dash-main { padding: var(--s6) var(--s8) var(--s8); display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s2); }
.dash-head h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.5px; }
.dash-head p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
.dash-tools { display: flex; gap: var(--s2); align-items: center; }
.dash-tools .btn { height: 40px; padding: 0 var(--s3); font-size: 14px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 3px; }
.seg button { border: 0; background: none; height: 34px; padding: 0 var(--s3); border-radius: var(--r-pill); font-weight: 700; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s3); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s4); display: flex; flex-direction: column; gap: 4px; position: relative; }
.kpi-ic { position: absolute; top: var(--s4); right: var(--s4); width: 32px; height: 32px; border-radius: 10px; background: var(--bg); display: flex; align-items: center; justify-content: center; color: var(--ink-2); }
.kpi-l { font-size: 13px; font-weight: 700; color: var(--ink-2); padding-right: 40px; }
.kpi b { font-size: 30px; font-weight: 800; letter-spacing: -0.8px; line-height: 1.1; margin-top: var(--s1); }
.kpi small { font-size: 12px; color: var(--ink-2); font-weight: 600; line-height: 1.4; }
.kpi.up small { color: var(--ok); } .kpi.down small { color: var(--accent); }
.kpi.warn { border-color: #F2C9D0; } .kpi.warn .kpi-ic { background: var(--accent-soft); color: var(--accent); }
.kpi.ok .kpi-ic { background: var(--ok-soft); color: var(--ok); }
.kpis.small { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.mini { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: var(--s3) var(--s4); display: flex; flex-direction: column; gap: 2px; }
.mini span { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.mini b { font-size: 17px; font-weight: 800; }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s4) var(--s6) var(--s6); min-width: 0; }
.panel.wide { grid-column: 1 / -1; }
.panel-h { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); margin-bottom: var(--s3); flex-wrap: wrap; }
.panel-h h2 { margin: 0; font-size: var(--fs-l); font-weight: 800; }
.panel-h a { font-size: 13px; font-weight: 700; color: var(--ink); }
.muted { color: var(--ink-2); font-size: 13px; }
.legend { display: flex; gap: var(--s4); font-size: 13px; font-weight: 700; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chart { width: 100%; height: auto; display: block; }
.chart text { font-size: 11px; fill: var(--ink-2); font-family: var(--font); }
.chart .g { stroke: var(--line); stroke-width: 1; }
.hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s3); }
.hbars li { display: grid; grid-template-columns: 110px 1fr 40px; align-items: center; gap: var(--s3); font-size: 14px; font-weight: 700; }
.hbars i { height: 12px; border-radius: 6px; background: var(--bg); position: relative; overflow: hidden; }
.hbars i::after, .dt .barc i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--ink); border-radius: inherit; }
.hbars b { text-align: right; }
.err-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.err-list li { display: grid; grid-template-columns: 70px 1fr auto; gap: var(--s2); font-size: 13px; align-items: baseline; }
.err-list b { color: var(--accent); }
.err-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.err-list small { color: var(--ink-2); }
.dt { width: 100%; border-collapse: collapse; font-size: 14px; }
.dt th { text-align: left; font-size: 12px; font-weight: 700; color: var(--ink-2); padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); white-space: nowrap; }
.dt td { padding: 10px var(--s3); border-bottom: 1px solid var(--line); vertical-align: top; }
.dt tr:last-child td { border-bottom: 0; }
.dt tbody tr:hover td { background: #FAFBF9; }
.dt .n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.dt .barc { width: 30%; } .dt .barc i { display: block; height: 8px; border-radius: 4px; background: var(--bg); position: relative; overflow: hidden; margin-top: 6px; }
.dt.err pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: 12px; font-family: ui-monospace, Consolas, monospace; max-height: 160px; overflow: auto; }
@media (max-width: 1200px) { .kpis, .kpis.small { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .dash { grid-template-columns: 1fr; }
  .dash-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: var(--s3) var(--s4); }
  .dash-role, .dash-foot { display: none; }
  .dash-nav { flex-direction: row; overflow-x: auto; width: 100%; }
  .dash-nav a { flex: none; }
  .dash-main { padding: var(--s4); }
  .kpis, .kpis.small, .dash-grid { grid-template-columns: 1fr 1fr; }
  .panel { padding: var(--s4); overflow-x: auto; }
}
body.adm-mode #app { max-width: none; background: #EFF1EC; }
.kpi { padding-top: var(--s3); }
.kpi-ic { position: static; width: 28px; height: 28px; border-radius: 8px; margin-bottom: 2px; }
.kpi-l { padding-right: 0; }
