/* Qurut Bozor — dizayn qoidalari: DESIGN.md
   Asosiy belgi: lojuvard (Rişton kök) lagandagi oppoq qurut uyumi va bozorçа karton narx yorlig'i. */

:root {
  --bg: #f4f6fb; --surface: #ffffff; --surface-2: #edf1f9; --tile: #e8edf8;
  --ink: #16203a; --ink-2: #2e3a5c; --muted: #5f6b86; --line: #dfe4ef;
  --lojuvard: #1c3d8c; --lojuvard-2: #142e6c; --lojuvard-soft: #e3eafa; --on-lojuvard: #f3f6ff;
  --accent: #f2a23a; --accent-2: #f6b75f; --accent-ink: #1b1405;
  --kraft: #cda772; --kraft-edge: #b38d58; --marker: #1f2347;
  --green: #2f7d4f; --green-soft: #ddf1e4; --warn: #9a5b0c; --warn-soft: #fcebd2;
  --danger: #b3261e; --danger-soft: #f9dedc; --blue: #2b54b8; --blue-soft: #e3eafa;
  --font: 'Onest', system-ui, sans-serif; --hand: 'Caveat', 'Segoe Print', cursive;
  --r: 16px; --r-sm: 10px;
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #0d1326; --surface: #151d36; --surface-2: #1c2645; --tile: #1a2342;
  --ink: #ecf0fa; --ink-2: #c9d1e6; --muted: #93a0bf; --line: #27324f;
  --lojuvard: #10204a; --lojuvard-2: #0b1736; --lojuvard-soft: #1f2d57; --on-lojuvard: #e8eeff;
  --green: #74d39c; --green-soft: #173527; --warn: #f0b35a; --warn-soft: #3a2a12;
  --danger: #f08a82; --danger-soft: #3d1d1b; --blue: #9db8ff; --blue-soft: #1f2d57;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); min-height: 100vh; }
h1, h2, h3, p, dl, dd, ol, ul, fieldset { margin: 0; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
fieldset { border: 0; padding: 0; min-width: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.warn { color: var(--warn); }
.hint { font-size: 13px; color: var(--muted); }
.ic { flex: none; }

/* ---------- tugmalar, maydonlar ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface); font-weight: 600; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-ghost-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); background: transparent; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; pointer-events: none; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); }
.icon-btn.danger { color: var(--danger); }
.link { background: none; border: 0; padding: 0; color: var(--blue); font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }
.link-muted { color: var(--muted); font-weight: 500; font-size: 13px; }

.form { display: grid; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .field > legend, fieldset > legend { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0; margin-bottom: 6px; }
.input {
  width: 100%; min-height: 46px; padding: 0 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface); outline: none;
}
textarea.input { min-height: 90px; padding: 10px 12px; resize: vertical; }
select.input { padding-right: 8px; }
.input:focus { border-color: var(--lojuvard); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
.input[disabled] { color: var(--muted); background: var(--surface-2); }
.input-sm { min-height: 38px; }
.phone-wrap { display: flex; }
.phone-wrap b { display: grid; place-items: center; padding: 0 12px; background: var(--surface-2); border: 1px solid var(--line); border-right: 0; border-radius: var(--r-sm) 0 0 var(--r-sm); font-weight: 600; }
.phone-wrap .input { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-err { display: none; padding: 10px 12px; border-radius: var(--r-sm); background: var(--danger-soft); color: var(--danger); font-weight: 600; font-size: 14px; }
.form-err.show { display: block; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.check input { width: 18px; height: 18px; accent-color: var(--lojuvard); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip > span {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 600;
}
.chip input:checked + span { background: var(--lojuvard); border-color: var(--lojuvard); color: var(--on-lojuvard); }
html[data-theme="dark"] .chip input:checked + span { background: var(--blue); border-color: var(--blue); color: #0d1326; }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.qurut-ico { width: 20px; height: 20px; }

.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper button { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.stepper .input { width: 90px; text-align: center; font-weight: 700; }
.stepper-sm button { width: 34px; height: 34px; }
.stepper-sm .input { width: 70px; min-height: 34px; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; font-weight: 600; color: var(--muted); }
.seg button[aria-selected="true"], .seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / 0.08); }
.seg-sm button { padding: 5px 10px; font-size: 13px; }

/* ---------- karton narx yorlig'i ---------- */

.tag {
  display: inline-flex; flex-direction: column; align-items: center; padding: 4px 10px 5px;
  background: linear-gradient(175deg, #d6b384, var(--kraft) 60%, #c39c66);
  color: var(--marker); font-family: var(--hand); font-weight: 700; line-height: 1;
  clip-path: polygon(2% 6%, 30% 0, 64% 4%, 98% 1%, 100% 40%, 97% 96%, 62% 100%, 28% 95%, 1% 100%, 3% 52%);
  filter: drop-shadow(0 2px 0 var(--kraft-edge)); white-space: nowrap;
}
.tag-price { font-size: 1.55rem; }
.tag-unit { font-size: 0.95rem; }
.tag-lg .tag-price { font-size: 2.3rem; }
.tag-lg .tag-unit { font-size: 1.2rem; }

/* ---------- kiriş ekrani ---------- */

.auth { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.auth-hero {
  position: relative; overflow: hidden; padding: 36px clamp(24px, 5vw, 64px);
  background: var(--lojuvard); color: var(--on-lojuvard);
  display: grid; grid-template-rows: auto auto 1fr auto; gap: 24px;
}
/* Rişton naqşiga işora: nuqtali halqalar */
.auth-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.16;
  background-image: radial-gradient(circle at center, transparent 18px, #7fa3ff 19px, transparent 20px),
                    radial-gradient(#7fa3ff 1.5px, transparent 2px);
  background-size: 64px 64px, 32px 32px;
}
.auth-hero > * { position: relative; }
.auth-copy h1 { font-size: clamp(2.2rem, 4.6vw, 4rem); font-weight: 800; letter-spacing: -0.025em; max-width: 13ch; line-height: 1.02; }
.auth-copy .lead { margin-top: 16px; font-size: 17px; max-width: 42ch; color: #c9d6fb; }
.auth-stall { display: flex; flex-direction: column; align-items: center; align-self: end; max-width: 520px; width: 100%; justify-self: center; }
.auth-stall .tag { rotate: -4deg; }
.stick { width: 3px; height: 34px; background: #e3cfa8; border-radius: 2px; }
.auth-stall .qurut-svg { width: 100%; margin-top: -22%; }
.auth-stats { display: flex; gap: 32px; flex-wrap: wrap; }
.auth-stats dt { font-size: 28px; font-weight: 800; }
.auth-stats dd { color: #c9d6fb; font-size: 14px; }
.auth-form { display: flex; flex-direction: column; justify-content: center; padding: 32px clamp(20px, 5vw, 72px); background: var(--surface); position: relative; }
.auth-form .form { max-width: 420px; width: 100%; margin-inline: auto; }
.auth-form h2 { font-size: 26px; font-weight: 800; margin-bottom: 4px; }
.auth-langs { position: absolute; top: 20px; right: 20px; display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.auth-langs button { border: 0; background: none; padding: 6px 10px; font-weight: 700; font-size: 13px; color: var(--muted); }
.auth-langs button[aria-pressed="true"] { background: var(--lojuvard); color: var(--on-lojuvard); }
.auth-switch { text-align: center; color: var(--muted); }
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.roles legend { grid-column: 1 / -1; }
.role { position: relative; }
.role input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.role > span { display: grid; gap: 4px; height: 100%; padding: 14px; border: 1.5px solid var(--line); border-radius: 14px; }
.role small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.role input:checked + span { border-color: var(--lojuvard); background: var(--lojuvard-soft); box-shadow: inset 0 0 0 1px var(--lojuvard); }
html[data-theme="dark"] .role input:checked + span { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.role input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; text-decoration: none; letter-spacing: -0.02em; }

/* bitta marta: lagandagi qurut uyumi töqilib tuşadi */
.drop { animation: drop 0.55s cubic-bezier(0.3, 1.3, 0.5, 1) backwards; }
@keyframes drop { from { transform: translateY(-110px); opacity: 0; } 60% { opacity: 1; } }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { grid-template-rows: auto; padding-bottom: 28px; }
  .auth-stall { max-width: 340px; }
  .auth-form { padding-top: 64px; }
}

/* ---------- ilova qobig'i ---------- */

.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px;
  padding: 22px 14px; background: var(--lojuvard); color: var(--on-lojuvard);
}
.side .logo { padding: 0 8px; }
.side-nav { display: grid; gap: 2px; }
.side-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  text-decoration: none; font-weight: 600; color: #c9d6fb;
}
.side-link:hover { background: rgb(255 255 255 / 0.07); color: #fff; }
.side-link[aria-current="page"] { background: rgb(255 255 255 / 0.12); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; display: inline-grid; place-items: center; }
.badge[hidden] { display: none; }
.side-me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; text-decoration: none; background: rgb(255 255 255 / 0.07); }
.side-me span { display: grid; line-height: 1.25; min-width: 0; }
.side-me b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-me small { color: #c9d6fb; }
.avatar { border-radius: 50%; object-fit: cover; flex: none; }
.avatar-txt { display: inline-grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 800; }

.main { min-width: 0; }
.mtop { display: none; }
.view { padding: 28px clamp(16px, 3vw, 40px) 64px; max-width: 1240px; outline: none; }
.tabbar { display: none; }
.loading { height: 240px; border-radius: var(--r); background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .mtop {
    display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20;
    padding: 10px 16px; background: var(--lojuvard); color: var(--on-lojuvard);
  }
  .mtop-me { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: inherit; }
  .view { padding: 20px 16px 96px; }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
    background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px; text-decoration: none; font-size: 11px; font-weight: 600; color: var(--muted); text-align: center; }
  .tab[aria-current="page"] { color: var(--lojuvard); }
  html[data-theme="dark"] .tab[aria-current="page"] { color: var(--blue); }
  .tab .badge { position: absolute; top: 0; left: 55%; margin: 0; }
}

/* ---------- sahifa qismlari ---------- */

.phead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.phead h1 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; }
.phead p { color: var(--muted); margin-top: 4px; max-width: 60ch; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin-bottom: 16px; display: grid; gap: 12px; }
.panel h2 { font-size: 18px; font-weight: 700; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.note { padding: 12px 14px; border-radius: var(--r-sm); background: var(--blue-soft); color: var(--ink-2); font-size: 14px; }
.empty { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 32px 16px; }
.empty .qurut-svg { width: 200px; }
.empty p { max-width: 46ch; color: var(--muted); }
.done-box { display: grid; gap: 12px; justify-items: start; padding: 24px; border-radius: var(--r); background: var(--green-soft); border: 1px solid color-mix(in srgb, var(--green) 35%, transparent); }
.done-box h2 { font-size: 22px; }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 14px; }
.stars { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; }
.star-ic { fill: var(--accent); }

/* boş sahifa */
.greet { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.greet h1 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; }
.greet p:last-child { color: var(--muted); max-width: 52ch; }
.sec { margin-bottom: 32px; }
.sec-title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.sec-title h2 { font-size: 20px; font-weight: 700; }
.sellers { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.seller { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); text-decoration: none; }
.seller:hover { border-color: var(--muted); }
.seller-txt { display: grid; line-height: 1.35; min-width: 0; }
.seller-txt small { color: var(--muted); font-size: 13px; }

/* qurut kartalari */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px 16px; }
.pcard { display: flex; flex-direction: column; text-decoration: none; border-radius: var(--r); }
.pcard-img { position: relative; aspect-ratio: 16 / 12; border-radius: var(--r); background: var(--tile); overflow: hidden; padding: 18px 6px 0; }
.pcard-img .qurut-svg { width: 100%; height: 100%; }
.pcard-img:has(.p-photo) { padding: 0; }
.p-photo { width: 100%; height: 100%; object-fit: cover; }
.pcard-img .tag, .myitem-img .tag, .preview-img .tag { position: absolute; top: 8px; right: 10px; rotate: 3deg; }
.pcard:nth-child(even) .tag { rotate: -3deg; }
.pcard-body { padding: 10px 2px 0; display: grid; gap: 2px; }
.pcard h3 { font-size: 16px; font-weight: 700; }
.pcard:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.pcard-attr { font-size: 13px; color: var(--ink-2); }
.pcard-seller { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.pcard-meta { font-size: 13px; color: var(--muted); }
.pcard.is-out .pcard-img { opacity: 0.55; }
@media (max-width: 520px) {
  .pgrid { grid-template-columns: 1fr 1fr; gap: 18px 10px; }
  .pcard-img { padding-top: 26px; }
  .pcard-img .tag { top: 4px; right: 4px; padding: 2px 7px 3px; }
  .pcard .tag-price { font-size: 1.15rem; }
  .pcard .tag-unit { font-size: 0.75rem; }
  .pcard h3 { font-size: 15px; }
}

/* katalog */
.cat-layout { display: grid; grid-template-columns: 270px 1fr; gap: 24px; align-items: start; }
.filters { position: sticky; top: 20px; display: grid; gap: 18px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.search { position: relative; display: block; }
.search .ic { position: absolute; left: 12px; top: 50%; translate: 0 -50%; color: var(--muted); }
.search .input { padding-left: 38px; }
.range { display: flex; align-items: center; gap: 6px; }
.cat-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.sort select { width: auto; }
.filter-body { display: grid; gap: 18px; }
.filters-toggle { display: none; }
@media (max-width: 960px) {
  .cat-layout { grid-template-columns: 1fr; }
  .filters { position: static; gap: 12px; }
  .filters-toggle { display: inline-flex; justify-self: start; }
  .filters-toggle .badge { margin-left: 4px; }
  .filters:not(.is-open) .filter-body { display: none; }
}

/* qurut sahifasi */
.pview { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(20px, 4vw, 44px); }
.pview-img { position: relative; border-radius: 22px; background: var(--tile); padding: 48px 16px 8px; align-self: start; }
.pview-img:has(.p-photo) { padding: 0; overflow: hidden; }
.pview-img .tag { position: absolute; top: 14px; right: 18px; rotate: 4deg; }
.pview-info { display: grid; gap: 14px; align-content: start; }
.pview h1 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; }
.pview-attr { font-weight: 600; color: var(--ink-2); }
.pview-desc { font-size: 16px; max-width: 52ch; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.facts div { padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { font-weight: 700; }
.seller-line { align-self: start; }
.buy { display: grid; gap: 10px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.buy-sum b { font-size: 24px; font-weight: 800; }
@media (max-width: 860px) { .pview { grid-template-columns: 1fr; } }

/* savatça */
.cart-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
.cart-groups { display: grid; gap: 14px; }
.cart-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 16px; }
.cart-group h2 { font-size: 14px; font-weight: 700; color: var(--muted); padding: 10px 0 4px; }
.cline { display: grid; grid-template-columns: 76px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.cline-img { display: block; aspect-ratio: 16/12; border-radius: 10px; background: var(--tile); overflow: hidden; padding-top: 4px; }
.cline-img:has(.p-photo) { padding: 0; }
.cline-main { display: grid; gap: 4px; min-width: 0; }
.cline-main a { text-decoration: none; }
.cline-end { display: grid; justify-items: end; gap: 4px; white-space: nowrap; }
.summary { position: sticky; top: 20px; display: grid; gap: 12px; padding: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.summary h2 { font-size: 16px; font-weight: 700; }
.addr-pick { display: grid; gap: 8px; justify-items: start; }
.addr-opt { display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; }
.addr-opt:has(input:checked) { border-color: var(--lojuvard); background: var(--lojuvard-soft); }
html[data-theme="dark"] .addr-opt:has(input:checked) { border-color: var(--blue); }
.addr-opt input { margin-top: 4px; accent-color: var(--lojuvard); }
.addr-opt span { display: grid; }
.addr-opt small { color: var(--muted); }
.pay-pick { display: grid; gap: 8px; }
.pay-opt { align-items: center; }
.pay-opt input { margin-top: 0; }
.pay-ic { color: var(--lojuvard); flex: none; }
html[data-theme="dark"] .pay-ic { color: var(--blue); }
.pay-box { max-width: 560px; justify-items: start; }
.pay-sum { display: grid; }
.pay-sum small { color: var(--muted); }
.pay-sum b { font-size: 30px; font-weight: 800; }
.pay-orders { list-style: none; padding: 0; width: 100%; display: grid; gap: 6px; }
.pay-orders li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--surface-2); }
.pay-other { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.done-box .pay-orders li { background: rgb(255 255 255 / 0.5); }
html[data-theme="dark"] .done-box .pay-orders li { background: rgb(0 0 0 / 0.2); }
.sum-rows { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.sum-rows dd { text-align: right; font-weight: 600; }
.sum-rows .total { font-size: 18px; font-weight: 800; padding-top: 6px; }
@media (max-width: 960px) { .cart-layout { grid-template-columns: 1fr; } .summary { position: static; } }
@media (max-width: 520px) { .cline { grid-template-columns: 60px 1fr; } .cline-end { grid-column: 2; justify-items: start; grid-auto-flow: column; gap: 14px; } }

/* buyurtmalar */
.olist { display: grid; gap: 14px; }
.ocard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: grid; gap: 12px; }
.ocard-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ocard-head > div { display: grid; }
.ocard-client { display: grid; grid-template-columns: 1fr 1.5fr; gap: 12px; padding: 12px; border-radius: var(--r-sm); background: var(--surface-2); }
.ocard-client > div { display: grid; gap: 2px; }
.ocard-client a { display: inline-flex; align-items: center; gap: 4px; color: var(--blue); font-weight: 600; text-decoration: none; }
.otable { width: 100%; border-collapse: collapse; font-size: 14px; }
.otable th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 0 8px 6px 0; }
.otable td { padding: 8px 8px 8px 0; border-top: 1px solid var(--line); }
.otable .num { text-align: right; white-space: nowrap; }
.otable a { color: inherit; }
.ocard-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.ocard-foot .muted { display: grid; gap: 2px; font-size: 13px; }
.ocard-foot .muted span { display: inline-flex; gap: 4px; align-items: center; }
.ocard-total { font-size: 17px; }
.ocard-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ocard-actions:empty { display: none; }
.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.st-new { background: var(--warn-soft); color: var(--warn); }
.st-preparing { background: var(--blue-soft); color: var(--blue); }
.st-shipping { background: var(--blue-soft); color: var(--blue); }
.st-delivered { background: var(--green-soft); color: var(--green); }
.st-cancelled { background: var(--danger-soft); color: var(--danger); }
.rate { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.rate > span { margin-right: 6px; font-weight: 600; }
.star-btn { border: 0; background: none; padding: 2px; color: var(--line); }
.star-btn svg { fill: currentColor; stroke: var(--muted); }
.star-btn.lit, .star-btn:focus-visible { color: var(--accent); }
.rate-done { font-weight: 600; color: var(--accent); }
.rate-done .muted { color: var(--line); }
@media (max-width: 640px) {
  .ocard-client { grid-template-columns: 1fr; }
  .otable th:nth-child(2), .otable td:nth-child(2) { display: none; }
}

/* savdogar: mahsulotlar */
.mylist { display: grid; gap: 12px; }
.myitem { display: grid; grid-template-columns: 150px 1fr auto; gap: 16px; align-items: center; padding: 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.myitem.is-hidden { opacity: 0.7; }
.myitem-img { position: relative; aspect-ratio: 16/12; border-radius: 12px; background: var(--tile); overflow: hidden; padding-top: 10px; }
.myitem-img:has(.p-photo) { padding: 0; }
.myitem-img .tag { top: 4px; right: 4px; }
.myitem-img .tag-price { font-size: 1.2rem; }
.myitem-img .tag-unit { font-size: 0.8rem; }
.myitem-body { display: grid; gap: 2px; font-size: 14px; }
.myitem-body h3 { font-size: 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.myitem-actions { display: flex; gap: 8px; }
@media (max-width: 640px) { .myitem { grid-template-columns: 110px 1fr; } .myitem-actions { grid-column: 1 / -1; } }

.editor { display: grid; grid-template-columns: 260px 1fr; gap: 22px; }
.editor-preview { display: grid; gap: 10px; align-content: start; justify-items: start; }
.preview-img { position: relative; width: 100%; aspect-ratio: 16/12; border-radius: 14px; background: var(--tile); overflow: hidden; padding: 22px 6px 0; }
.preview-img:has(.p-photo) { padding: 0; }
.upload-btn { cursor: pointer; }
@media (max-width: 760px) { .editor { grid-template-columns: 1fr; } .editor-preview { grid-template-columns: 1fr; } }

/* daromad */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { display: grid; gap: 2px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.kpi span { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi b { font-size: 22px; font-weight: 800; }
.kpi small { font-size: 12px; color: var(--muted); }
.kpi-main { background: var(--lojuvard); color: var(--on-lojuvard); border-color: var(--lojuvard); }
.kpi-main span, .kpi-main small { color: #c9d6fb; }
.income-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.chart { width: 100%; height: auto; }
.chart .bar { fill: var(--lojuvard); opacity: 0.85; }
html[data-theme="dark"] .chart .bar { fill: var(--blue); }
.chart .bar-cur { fill: var(--accent); }
.chart .bar-empty { fill: var(--line); }
.chart .axis { stroke: var(--line); }
.chart text { text-anchor: middle; fill: var(--muted); font-size: 12px; }
.chart .bar-val { fill: var(--ink); font-weight: 700; }
.chart .bar-lbl { fill: var(--ink-2); font-weight: 600; }
.toplist { list-style: none; padding: 0; display: grid; gap: 10px; }
.toplist li { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; }
.toplist li span { display: grid; line-height: 1.3; }
.toplist .qurut-ico { width: 26px; height: 26px; }
@media (max-width: 960px) { .income-grid { grid-template-columns: 1fr; } }

/* profil */
.profile { grid-template-columns: auto 1fr; gap: 24px; align-items: start; }
.profile-photo { display: grid; gap: 10px; justify-items: center; }
.profile-photo .btn { cursor: pointer; }
.addr-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.addr-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px; border-radius: var(--r-sm); border: 1px solid var(--line); }
.addr-txt { display: grid; }
.addr-txt b { display: flex; gap: 8px; align-items: center; }
.addr-txt small { color: var(--muted); }
.addr-actions { display: flex; gap: 6px; align-items: center; }
@media (max-width: 640px) {
  .profile { grid-template-columns: 1fr; }
  .addr-list li { grid-template-columns: auto 1fr; }
  .addr-actions { grid-column: 1 / -1; }
}

/* oynalar va xabarlar */
.modal-back { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgb(8 14 32 / 0.55); overflow-y: auto; }
.modal { width: min(440px, 100%); padding: 22px; border-radius: 18px; background: var(--surface); display: grid; gap: 16px; box-shadow: 0 24px 60px -20px rgb(0 0 0 / 0.5); }
.modal-form { width: min(560px, 100%); }
.modal-wide { width: min(860px, 100%); }
.modal h2 { font-size: 20px; font-weight: 800; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
#toasts { position: fixed; bottom: 20px; left: 50%; translate: -50% 0; z-index: 60; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { padding: 10px 16px; border-radius: 10px; background: var(--ink); color: var(--bg); font-weight: 600; opacity: 0; translate: 0 10px; transition: opacity 0.2s, translate 0.2s; }
.toast.show { opacity: 1; translate: 0 0; }
@media (max-width: 860px) { #toasts { bottom: 84px; } }

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

.shop-rating { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }


/* =====================================================================
   Bezak: fon effektlari va kartalarning yumşoq körinişi (2026-11-29)
   ===================================================================== */

:root {
  --shadow-1: 0 1px 2px rgb(16 24 60 / 0.05), 0 10px 28px -18px rgb(16 24 60 / 0.28);
  --shadow-2: 0 2px 4px rgb(16 24 60 / 0.06), 0 18px 40px -20px rgb(16 24 60 / 0.38);
  --glow-a: rgb(43 84 184 / 0.22);
  --glow-b: rgb(242 162 58 / 0.20);
  --pattern: rgb(28 61 140 / 0.06);
}
html[data-theme="dark"] {
  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 30px -18px rgb(0 0 0 / 0.7);
  --shadow-2: 0 2px 6px rgb(0 0 0 / 0.35), 0 20px 44px -20px rgb(0 0 0 / 0.8);
  --glow-a: rgb(80 120 230 / 0.22);
  --glow-b: rgb(242 162 58 / 0.12);
  --pattern: rgb(140 170 255 / 0.05);
}

/* Asosiy fon: sekin suzib yuradigan ikki yumşoq nur + Rişton naqşi */
.main { position: relative; isolation: isolate; }
.main::before, .main::after {
  content: ''; position: fixed; z-index: -1; pointer-events: none; border-radius: 50%; filter: blur(70px);
}
.main::before {
  width: 560px; height: 560px; top: -160px; right: -120px; background: var(--glow-a);
  animation: drift-a 38s ease-in-out infinite alternate;
}
.main::after {
  width: 460px; height: 460px; bottom: -160px; left: 18%; background: var(--glow-b);
  animation: drift-b 46s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate(-180px, 140px) scale(1.15); } }
@keyframes drift-b { to { transform: translate(220px, -120px) scale(0.9); } }
.view {
  background-image:
    radial-gradient(circle at center, transparent 17px, var(--pattern) 18px, transparent 19.5px),
    radial-gradient(var(--pattern) 1.4px, transparent 1.9px);
  background-size: 72px 72px, 36px 36px;
  background-attachment: fixed;
}

/* Yon panel: lojuvard gradient va naqş */
.side {
  background:
    radial-gradient(circle at center, transparent 15px, rgb(127 163 255 / 0.12) 16px, transparent 17.5px) 0 0 / 56px 56px,
    linear-gradient(180deg, var(--lojuvard) 0%, var(--lojuvard-2) 100%);
}
.side-link { transition: background-color 0.15s, color 0.15s; }
.mtop {
  background: linear-gradient(90deg, var(--lojuvard), var(--lojuvard-2));
  box-shadow: 0 6px 20px -12px rgb(8 14 40 / 0.6);
}

/* Telefonda pastki panel: oynaga öxşaş xira fon */
@media (max-width: 860px) {
  .tabbar {
    background: color-mix(in srgb, var(--surface) 78%, transparent);
    backdrop-filter: blur(14px) saturate(1.4);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
  }
}

/* Tugmalar */
.btn-primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.35) inset, 0 6px 16px -8px rgb(242 162 58 / 0.8);
}
.btn-primary:hover { background: linear-gradient(180deg, #f9c676, var(--accent-2)); }
.btn { transition: background-color 0.15s, border-color 0.15s, transform 0.1s; }
.btn:active { transform: translateY(1px); }

/* Qurut kartalari: alohida karta, sičqonça kelganda biroz kötariladi */
.pcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 8px 8px 12px;
  box-shadow: var(--shadow-1); transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
}
.pcard-img { border-radius: 14px; background: radial-gradient(120% 90% at 50% 15%, var(--surface-2), var(--tile)); }
.pcard-body { padding: 10px 6px 0; }
.pcard .qurut-svg { transition: transform 0.35s ease; }
@media (hover: hover) {
  .pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: color-mix(in srgb, var(--lojuvard) 25%, var(--line)); }
  .pcard:hover .qurut-svg { transform: scale(1.04); }
  .pcard:hover h3 { text-decoration: none; }
}

/* Panellar, buyurtmalar, raqamlar: yumşoq soya */
.panel, .ocard, .kpi, .myitem, .summary, .cart-group, .filters, .seller, .buy, .facts div { box-shadow: var(--shadow-1); }
.panel, .ocard, .summary, .cart-group, .filters { border-radius: 18px; }
.kpi-main {
  background:
    radial-gradient(circle at center, transparent 13px, rgb(127 163 255 / 0.18) 14px, transparent 15.5px) 0 0 / 48px 48px,
    linear-gradient(135deg, var(--lojuvard), var(--lojuvard-2));
}
.pview-img { background: radial-gradient(110% 90% at 50% 10%, var(--surface), var(--tile)); box-shadow: var(--shadow-1); }

/* Boş sahifa salomlaşuvi: lojuvard banner va qurut lagani */
.greet {
  position: relative; overflow: hidden; padding: 26px 28px; border-radius: 22px; color: var(--on-lojuvard);
  background:
    radial-gradient(circle at center, transparent 17px, rgb(127 163 255 / 0.16) 18px, transparent 19.5px) 0 0 / 64px 64px,
    linear-gradient(120deg, var(--lojuvard), var(--lojuvard-2));
  box-shadow: var(--shadow-2);
}
.greet .muted, .greet p:last-of-type { color: #c9d6fb; }
.greet h1 { color: #fff; }
.greet-art { position: absolute; right: -10px; bottom: -34px; width: 300px; opacity: 0.95; pointer-events: none; }
.greet > div:not(.greet-art), .greet > .btn { position: relative; z-index: 1; }
.greet .shop-rating .muted { color: #c9d6fb; }
@media (max-width: 700px) { .greet-art { width: 210px; right: -30px; bottom: -40px; opacity: 0.5; } }

/* Buyurtmaga tayyorlaş eslatmasi */
.made-note {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--ink-2); font-weight: 600; font-size: 14px;
}
.made-note .ic { color: var(--accent); fill: var(--accent); flex: none; }

/* Kiriş ekrani: nurlar */
.auth-hero::after {
  content: ''; position: absolute; width: 520px; height: 520px; right: -180px; top: 30%; border-radius: 50%;
  background: rgb(242 162 58 / 0.22); filter: blur(80px); pointer-events: none; animation: drift-a 40s ease-in-out infinite alternate;
}

@media (prefers-reduced-motion: reduce) {
  .main::before, .main::after, .auth-hero::after { animation: none; }
  .pcard, .pcard .qurut-svg { transition: none; }
}

/* Ta'm tugmalari: kattaroq belgi; aççiq tugma qizil */
.chip .taste-ico { width: 26px; height: 26px; margin-left: -4px; }
.chip[data-v="spicy"] > span { color: #c0392b; border-color: #f0b8b0; background: #fff4f2; }
.chip[data-v="spicy"] input:checked + span { background: #c0392b; border-color: #c0392b; color: #fff; }
html[data-theme="dark"] .chip[data-v="spicy"] > span { color: #ff8a78; border-color: #6b2a24; background: #2a1513; }
html[data-theme="dark"] .chip[data-v="spicy"] input:checked + span { background: #d9473a; border-color: #d9473a; color: #fff; }

/* Ulgurji minimum ölçagiçi va pul saqlaş eslatmalari */
.min-meter { display: grid; gap: 6px; padding: 12px; border-radius: 14px; background: var(--warn-soft); }
.min-meter.is-ok { background: var(--green-soft); }
.min-meter-top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.min-meter small { color: var(--ink-2); }
.min-bar { display: block; height: 8px; border-radius: 999px; background: rgb(0 0 0 / 0.08); overflow: hidden; }
.min-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--warn); transition: width 0.3s ease; }
.min-meter.is-ok .min-bar > span { background: var(--green); }
.escrow-note { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ink-2); padding: 10px 12px; border-radius: 12px; background: var(--blue-soft); }
.escrow-note .ic, .escrow .ic { flex: none; margin-top: 2px; fill: currentColor; }
.escrow { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; font-weight: 600; padding: 8px 10px; border-radius: 10px; }
.esc-held { background: var(--blue-soft); color: var(--blue); }
.esc-released { background: var(--green-soft); color: var(--green); }
.esc-refund { background: var(--danger-soft); color: var(--danger); }

/* Payme karta formasi */
.card-box { max-width: 520px; }
.card-face {
  position: relative; aspect-ratio: 1.586; max-width: 340px; width: 100%; border-radius: 16px; padding: 18px; color: #fff;
  display: grid; align-content: end; gap: 6px; font-family: ui-monospace, 'Cascadia Mono', monospace; letter-spacing: 0.08em;
  background:
    radial-gradient(circle at center, transparent 15px, rgb(255 255 255 / 0.12) 16px, transparent 17.5px) 0 0 / 52px 52px,
    linear-gradient(135deg, #1c3d8c, #0f2a63 60%, #33c3c3);
  box-shadow: var(--shadow-2);
}
.card-chip { position: absolute; top: 18px; left: 18px; width: 40px; height: 30px; border-radius: 6px; background: linear-gradient(135deg, #f2d27a, #c9a24a); }
.card-num { font-size: 19px; }
.card-exp { font-size: 14px; opacity: 0.85; }
.powered { text-align: center; font-size: 13px; color: var(--muted); }
.powered b { color: #33c3c3; }
