/* Shriftlar lokal beriladi (npm: @fontsource, /vendor/fonts): CSP faqat 'self', internet kerak emas */
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/vendor/fonts/sans/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("/vendor/fonts/sans/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("/vendor/fonts/sans/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-display: swap; src: url("/vendor/fonts/sans/ibm-plex-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/vendor/fonts/mono/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-display: swap; src: url("/vendor/fonts/mono/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); }

/* Dizayn tokenlari (kassa-dizayn/HANDOFF.md) */
:root {
  --bg: #f4f5f2;
  --card: #ffffff;
  --text: #14171a;
  --muted: #5b6168;
  --line: #e2e4de;
  --line-soft: #eef0eb;
  --accent: #0e7490;
  --accent-dark: #0b5c73;
  --accent-soft: #def1f6;
  --on-accent: #ffffff;
  --green: #0b5a4a;
  --red: #9b1c14;
  --warn: #8a4b06;
  --warn-soft: #fdf1dc;
  --info: #2b59c3;
  --amber: #b45309;
  --radius: 14px;
  --input-line: #c9cec6;
  --chip: #eef0eb;
  --highlight: #f8f9f6;
  /* Grafik ranglari: yashil va sarg'ish-jigarrang (rang ko'rmaslikda ham farqlanadi) */
  --series-1: #0e7490;
  --series-2: #b45309;
  --bar-soft: #8cc6d6;
  /* O'sish/kamayish belgilari foni */
  --green-soft: #e3f1ec;
  --red-soft: #fbe4e1;
  --shadow: none;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: light dark;
}

/* Qorong'i mavzu: kompyuter sozlamasiga qarab */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1320;
    --card: #181e30;
    --text: #e8ecf4;
    --muted: #9ba5ba;
    --line: #2a3248;
    --line-soft: #202840;
    --accent: #22c5d9;
    --accent-dark: #67dcea;
    --accent-soft: #123a47;
    --on-accent: #06161b;
    --green: #4fd1a5;
    --red: #f2877e;
    --warn: #f2b766;
    --warn-soft: #3a2a10;
    --info: #7ea2f0;
    --amber: #e39a4d;
    --input-line: #3a4460;
    --chip: #222a42;
    --highlight: #1c2338;
    --series-1: #22c5d9;
    --series-2: #e39a4d;
    --bar-soft: #2a6a78;
    --green-soft: #17362e;
    --red-soft: #451a1a;
  }
  .tag.blue { background: #1e3a5f; color: #93c5fd; }
  .tag.red { background: #4c1d1d; color: #fca5a5; }
  .flash.ok { background: #14361f; color: #bbf7d0; }
  .flash.err { background: #451a1a; color: #fecaca; }
  .btn.red { color: #1a0b0a; }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--sans);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }

/* Klaviatura bilan yurganda fokus doim ko'rinadi (sichqonchada ko'rinmaydi) */
a:focus-visible, button:focus-visible, summary:focus-visible, .tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Kompyuterda "harakatni kamaytirish" yoqilgan bo'lsa animatsiyalar o'chadi */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 12px; }
h2 { font-size: 16px; font-weight: 600; margin: 0 0 10px; }

body { display: flex; min-height: 100vh; }

.side {
  flex: 0 0 248px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 16px;
  background: #101614;
  color: #e8ece9;
}
.side .brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; color: #fff; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.side .brand:hover { text-decoration: none; color: #fff; }
.brand-mark { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: #0e7490; color: #fff; }
.side nav { display: flex; flex-direction: column; gap: 20px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-title { padding: 0 12px 6px; color: #8c9993; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.side nav a { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px; border-radius: 8px; color: #c4cdc8; }
.side nav a:hover { background: #1a2420; color: #c4cdc8; text-decoration: none; }
.side nav a.active { background: #1f2b27; color: #fff; font-weight: 600; }
.side nav a.active::after { content: ""; width: 6px; height: 6px; margin-left: auto; border-radius: 3px; background: #22c5d9; }
.side nav a .badge { margin-left: auto; }
.side nav a.active .badge { margin-left: 0; }
.side a:focus-visible, .side button:focus-visible { outline-color: #22c5d9; }

/* Yon menyu pastidagi kartochka: smena va foydalanuvchi */
.side-card { display: flex; flex-direction: column; gap: 12px; margin-top: auto; padding: 16px; border-radius: 12px; background: #18211e; font-size: 14px; }
.side-card .state { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.side-card .state .num { margin-left: auto; font-size: 12px; font-weight: 500; color: #9aa6a0; }
.side-card .dot { width: 8px; height: 8px; border-radius: 4px; background: #22c5d9; }
.side-card .label { display: block; font-size: 12px; color: #9aa6a0; }
.side-card form { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.side-card .btn, .side-card .btn:hover { justify-content: center; min-height: 40px; border-color: #34413c; background: transparent; color: #e8ece9; font-size: 14px; font-weight: 500; }

main { flex: 1; min-width: 0; max-width: 980px; margin: 0 auto; padding: 20px 16px 60px; }

/* Tor ekranda menyu tepaga chiqadi */
@media (max-width: 760px) {
  body { flex-direction: column; }
  .side { position: static; height: auto; flex-basis: auto; flex-direction: row; align-items: center; gap: 12px; padding: 10px 12px; }
  .side .brand span:last-child { display: none; }
  .side nav { flex: 1; min-width: 0; flex-direction: row; gap: 4px; overflow-x: auto; }
  .nav-group { flex-direction: row; flex: none; }
  .side nav a { flex: none; }
  .nav-title, .side-card .state, .side-card .who-name, .side-card a.btn { display: none; }
  .side-card { margin: 0; padding: 0; background: none; }
  main { width: 100%; }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.card.narrow { max-width: 520px; }
.card.empty { color: var(--muted); }
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.total { font-family: var(--mono); font-weight: 600; font-size: 18px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.total.big { font-size: 26px; }
.num { font-family: var(--mono); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.muted { color: var(--muted); font-size: 13px; }

.tag {
  display: inline-block;
  padding: 1px 8px;
  margin-left: 4px;
  border-radius: 99px;
  background: var(--chip);
  color: var(--muted);
  font-size: 12px;
}
.tag.blue { background: #dbeafe; color: #1d4ed8; }
.tag.red { background: #fee2e2; color: var(--red); }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { color: var(--on-accent); text-decoration: none; filter: brightness(.93); }
.btn.green { background: var(--accent); border-color: var(--accent); }
.btn.red { background: var(--red); border-color: var(--red); }
.btn.ghost { background: var(--card); color: var(--text); border-color: var(--input-line); }
.btn.ghost:hover { color: var(--text); }
.btn.small { min-height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 500; }

table { width: 100%; border-collapse: collapse; }
td { padding: 10px 6px; border-top: 1px solid var(--line-soft); vertical-align: top; }
tr:first-child td { border-top: none; }

.tx .when { width: 130px; font-size: 13px; color: var(--muted); }
.tx .lines div { display: flex; justify-content: space-between; gap: 12px; }
.tx .act { width: 1%; white-space: nowrap; }
.tx .act input.reason { width: 9rem; padding: 4px 8px; font-size: 13px; margin-right: 4px; }
.tx tr.reversed { opacity: .55; }
.tx td.sum, .tx td.when-short { display: none; }

.form label { display: block; margin-bottom: 14px; font-weight: 600; }
.form input, .form select, .form textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 9px 10px;
  border: 1px solid var(--input-line);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-weight: 400;
}
.form input[data-amount] { font-family: var(--mono); font-size: 20px; font-variant-numeric: tabular-nums; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.form small { display: block; font-weight: 400; margin-top: 3px; }
.form-actions { display: flex; gap: 8px; }
form.inline { display: flex; align-items: center; gap: 10px; margin-top: 16px; }

.form fieldset.terms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
  margin: 0 0 14px;
  padding: 10px 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.form fieldset.terms legend { padding: 0 6px; font-weight: 600; }
.form fieldset.terms label { font-weight: 400; }
.form label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.form label.check input { width: auto; margin: 0; }
.form fieldset.choice { border: none; padding: 0; margin: 0 0 14px; }
.form fieldset.choice label.check { margin-bottom: 6px; }
.preview { margin: -6px 0 14px; min-height: 1.5em; }
.preview strong { color: var(--text); }

.search { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.search input[name="q"] {
  flex: 1 1 240px;
  padding: 8px 10px;
  border: 1px solid var(--input-line);
  border-radius: 8px;
  font: inherit;
}
.search label.check { display: flex; align-items: center; gap: 6px; }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.flash.ok { background: #dcfce7; color: #14532d; }
.flash.err { background: #fee2e2; color: #7f1d1d; }

.spaced { margin-top: 20px; }
.inline-form { display: inline-flex; gap: 6px; margin: 0; }
.inline-form select { min-height: 32px; max-width: 260px; padding: 0 8px; border: 1px solid var(--input-line); border-radius: 8px; background: var(--card); color: var(--text); font: inherit; font-size: 13px; }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: 12px; text-align: center; }
.request { padding: 12px 0; border-top: 1px solid var(--line); }
.request:first-of-type { border-top: none; }
.request.new { background: var(--highlight); }
.summary td { font-size: 16px; }
.form td input { margin-top: 0; }

.pager { display: flex; gap: 8px; margin-top: 12px; }

/* Foyda va zarar */
.pnl td:first-child { width: 70%; }
.pnl .sub td:first-child { padding-left: 24px; color: var(--muted); }
.pnl .sum td { border-top: 2px solid var(--line); font-weight: 600; }
.pnl .head td { padding-top: 14px; font-weight: 600; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }

.log { max-height: 320px; overflow: auto; background: var(--bg); padding: 10px; border-radius: 8px; font-size: 12px; white-space: pre-wrap; }
/* Kassa ekrani: chapda amallar, o'ngda qoldiqlar */
main.wide { max-width: 1320px; }
.desk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 16px; align-items: start; }
.desk-main { position: sticky; top: 16px; }
.desk-side .actions { margin-top: 0; }
.card.compact { padding: 12px 16px; margin-bottom: 12px; }
.card.compact td { padding: 6px 4px; }
.card.compact .total { font-size: 16px; }
.desk-side .card-head { flex-wrap: wrap; }
.desk-side .card-head > div { flex: 1 1 200px; }
.desk-side .card-head .total { white-space: normal; }
@media (max-width: 1100px) {
  .desk { grid-template-columns: minmax(0, 1fr); }
  .desk-main { position: static; }
}

.tabs { display: flex; gap: 4px; margin: -4px 0 16px; border-bottom: 1px solid var(--line); }
.tab {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  margin-bottom: -1px;
  border: 1px solid transparent;
  border-radius: 8px 8px 0 0;
  color: var(--muted);
  font-weight: 600;
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { border-color: var(--line); border-bottom-color: var(--card); background: var(--card); color: var(--accent); }

/* Ikki maydon yonma-yon, tor ekranda ustma-ust */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* Bosh sahifa (Monitoring): sarlavha, valyuta qoldiqlari, ko'rsatkichlar, kurslar, amallar */
.dash-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.dash-head h1 { margin: 4px 0 0; font-size: 30px; }
.dash-head .actions { margin: 0; }
.dash-head .clock { font-family: var(--mono); }

.balances { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px; margin-bottom: 16px; }
.bal { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 20px; }
.bal-head { display: flex; align-items: center; gap: 10px; }
.bal-head .delta { margin-left: auto; }
.code { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 28px; padding: 0 6px; border-radius: 6px; background: var(--chip); font-family: var(--mono); font-size: 12px; font-weight: 600; }
.bal-amount { font-family: var(--mono); font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bal-sub { color: var(--muted); font-size: 12px; }
.bal-sub span { font-family: var(--mono); }

.monitor { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 16px; margin-bottom: 16px; }
.monitor > .card { display: flex; flex-direction: column; gap: 20px; margin: 0; padding: 20px; }
.monitor h2 { margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
.kpi { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi-label { color: var(--muted); font-size: 13px; }
.kpi-value { font-family: var(--mono); font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.25; overflow-wrap: anywhere; }
.kpi.primary .kpi-value { color: var(--accent); }
.kpi-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; color: var(--muted); font-size: 12px; }

/* Soatlar bo'yicha amallar: SVG ustunlar (inline style CSP tufayli ishlatilmaydi) */
.hours-box { display: flex; flex-direction: column; gap: 10px; }
.hours { display: block; width: 100%; height: 120px; }
.hours rect { fill: var(--bar-soft); }
.hours rect.now { fill: var(--accent); }
.hours rect.zero { fill: var(--line); }
.hours text { fill: var(--muted); font-family: var(--mono); font-size: 11px; }

.rates th, .ops th { padding: 0 12px 10px 0; color: var(--muted); font-size: 12px; font-weight: 500; text-align: left; }
.rates th.num, .ops th.num { font-family: var(--sans); text-align: right; }
td.num.muted { font-family: var(--sans); }
.rates th:last-child, .rates td:last-child { padding-right: 0; }
.rates td { padding: 12px 12px 12px 0; }
.rates td:first-child { font-weight: 600; }
.rates tbody tr:first-child td { border-top: 1px solid var(--line-soft); }
.rates-head { display: flex; align-items: center; gap: 12px; }
.rates-head .muted { margin-left: auto; font-size: 12px; }

.alerts { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.alerts-title { font-size: 13px; font-weight: 600; }
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 10px; font-size: 13px; }
.alert svg { flex: none; margin-top: 1px; }
.alert a, .alert a:hover { color: inherit; text-decoration: underline; }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.danger { background: var(--red-soft); color: var(--red); }
.alert.info { background: var(--accent-soft); color: var(--accent-dark); }

/* Oxirgi operatsiyalar: filtr chiplari va jadval */
.ops-card { display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.ops-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ops-head h2 { margin: 0 auto 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1px solid var(--input-line); border-radius: 999px; background: var(--card); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip-btn:hover { border-color: var(--muted); }
.chip-btn span { font-family: var(--mono); opacity: .75; }
.chip-btn[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--card); }
.ops-scroll { overflow-x: auto; }
.ops { min-width: 760px; font-size: 14px; }
.ops td { padding: 14px 12px 14px 0; vertical-align: middle; }
.ops tbody tr:first-child td { border-top: 1px solid var(--line-soft); }
.ops tbody tr:hover { background: var(--highlight); }
.ops td.when { color: var(--muted); }
.ops td.when, .ops td.id { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ops .lines div { display: flex; justify-content: space-between; gap: 12px; }
.ops .lines .num { font-weight: 600; }
.ops th:last-child, .ops td:last-child { padding-right: 0; }
.op-type { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.op-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--amber); }
.op-dot.pay { background: var(--info); }
.op-dot.ex { background: var(--accent); }
.status { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: 12px; font-weight: 600; white-space: nowrap; }
.status.fail { background: var(--red-soft); color: var(--red); }
.status.wait { background: var(--warn-soft); color: var(--warn); }

/* Kechagiga nisbatan o'zgarish: o'q + foiz + rang (faqat rangga tayanmaydi) */
.trend, .delta {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.trend.up, .delta.up { background: var(--green-soft); color: var(--green); }
.trend.down, .delta.down { background: var(--red-soft); color: var(--red); }
.trend.flat { background: var(--chip); color: var(--muted); }

.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; margin-top: 4px; }
.charts .card { margin-bottom: 0; }
.chart-box { position: relative; height: 220px; }
/* Bo'sh grafik o'rnida: balandligi grafik bilan bir xil, sahifa sakramaydi */
.chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 220px;
  margin: 0;
  padding: 0 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
}
.charts .card-head h2, .grid-2 .card-head h2 { margin-bottom: 2px; }
details.data-table { margin-top: 16px; padding: 10px 20px; }
details.data-table summary { cursor: pointer; color: var(--muted); font-size: 13px; }
details.data-table table { margin-top: 8px; font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; align-items: start; }
.grid-2 > .card { margin-bottom: 16px; }
.recent { margin-top: 16px; }
@media (max-width: 600px) {
  .charts, .grid-2 { grid-template-columns: minmax(0, 1fr); }
}

/* Bank SMS */
.badge.blue { background: var(--accent); }
.filters select, .filters input { padding: 7px 8px; border: 1px solid var(--input-line); border-radius: 8px; font: inherit; }
.sms td, .sms-mini td { font-size: 14px; }
.sms .when, .sms-mini .when { width: 120px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.sms tr.new, .sms-mini tr.new { background: var(--highlight); }
.sms tr.reversed { opacity: .55; }
.sms .act { width: 1%; white-space: nowrap; text-align: right; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; margin-top: 6px; }
.raw { margin: 6px 0 0; padding: 8px 10px; background: var(--bg); border-radius: 8px; font-size: 13px; white-space: pre-wrap; word-break: break-word; }
details summary { cursor: pointer; }

/* Mijoz anketasi */
.grow { flex: 1; min-width: 0; }
.face { width: 140px; height: 140px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); display: block; }
.face.small { width: 64px; height: 64px; }
.face.empty { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.camera { width: 100%; max-width: 360px; border-radius: var(--radius); }
.files { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 6px; }
.files .file { display: inline-flex; align-items: center; gap: 6px; }
details.add { margin-top: 12px; }
details.add summary { font-weight: 600; color: var(--accent); }
.narrow-form { max-width: 480px; margin-top: 12px; }

/* Aralash amal: xizmat va pul qatorlari */
.form fieldset.block { margin: 0 0 14px; padding: 10px 12px 4px; border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.form fieldset.block legend { padding: 0 6px; font-weight: 600; }
.deal-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 0 10px; margin-bottom: 8px; }
.deal-row.three { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.4fr); }
.deal-row input, .deal-row select { margin-top: 0; }
.deal-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.deal-summary { margin-bottom: 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--highlight); }
.deal-summary ul { margin: 6px 0 0; padding-left: 20px; }
@media (max-width: 800px) {
  .deal-cols, .deal-row.three { grid-template-columns: minmax(0, 1fr); }
}

/* Kirish va hisob ekranlari (docs/design/m1_auth_screens.md) */
.flash.has-icon { display: flex; align-items: flex-start; gap: 8px; }
.flash.has-icon[hidden] { display: none; }
.flash svg { flex: none; margin-top: 2px; }
.flash.warn { background: var(--warn-soft); color: var(--warn); }
.flash.warn h1 { margin: 0; font-size: 20px; }
.tag.status-ok { background: var(--accent-soft); color: var(--accent-dark); margin-left: 0; }
.btn.block { display: flex; justify-content: center; width: 100%; margin: 0 0 12px; font-size: 16px; }
.btn.block:disabled { opacity: .6; cursor: not-allowed; }
.btn.small.red, .btn.small.ghost { min-height: 44px; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack form { margin: 0; }
.stack .btn.block { margin: 0; }
.row-link { justify-content: space-between; min-height: 56px; }
.scroll-x { overflow-x: auto; white-space: pre; }

.auth-wrap { display: flex; flex-direction: column; align-items: stretch; min-height: calc(100dvh - 80px); padding-top: 6vh; padding-bottom: 96px; }
.auth-wrap .card.narrow { width: 100%; max-width: 420px; margin: 0 auto 16px; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 20px; font-size: 20px; font-weight: 600; }
.auth-wrap .brand-mark { background: var(--accent); color: var(--on-accent); }
.auth-wrap .form input { min-height: 44px; font-size: 16px; margin-bottom: 14px; }
.auth-wrap .form label { margin-bottom: 0; }
.field-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.link-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; border: none; background: none; color: var(--accent); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.link-btn:hover { color: var(--accent-dark); text-decoration: underline; }
.link-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.auth-wrap .form input.code-input { min-height: 56px; font-family: var(--mono); font-size: 28px; letter-spacing: .4em; text-align: center; }

.pw-meter { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: -6px 0 4px; }
.pw-meter span { height: 6px; border-radius: 3px; background: var(--line); }
.pw-meter[data-level="1"] span:nth-child(-n+1) { background: var(--red); }
.pw-meter[data-level="2"] span:nth-child(-n+2) { background: var(--amber); }
.pw-meter[data-level="3"] span { background: var(--accent); }
.pw-meter-text { margin: 0 0 6px; }
.pw-rules { list-style: none; margin: 0 0 14px; padding: 0; font-size: 14px; }
.pw-rules li { display: flex; gap: 8px; min-height: 24px; color: var(--muted); }
.pw-rules li.ok { color: var(--accent-dark); }
.pw-rules .mark { width: 1.6em; font-family: var(--mono); font-weight: 600; text-align: center; }
.pw-match { min-height: 1.5em; margin: -6px 0 10px; }
.pw-match.bad { color: var(--red); }

.device-list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.device-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--highlight); }
.device-card .tag { margin-left: 0; margin-right: 4px; }
.device-card form { margin: 4px 0 0; }
.device-ip { text-align: left; }

.link-code { margin: 8px 0; padding: 12px; border-radius: 8px; background: var(--bg); font-size: 20px; text-align: left; user-select: all; overflow-x: auto; }

/* ===== M2: kassir ekranlari, moslashuvchan mobil (docs/design/m2_cashier_mobile.md) ===== */

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.form fieldset.step { display: contents; min-width: 0; margin: 0; padding: 0; border: none; }
.form fieldset.step > legend { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.form fieldset.choice > legend { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

/* Faqat mobilda yoki JS bilan paydo bo'ladigan elementlar keng ekranda yashirin */
.bottom-nav, .mobile-top, .step-bar, .step-actions, .confirm-card, .step-error, .pick-list { display: none; }
.net-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 14px; padding: 10px 14px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }
.net-banner[hidden] { display: none; }
.net-banner.err { background: var(--red-soft); color: var(--red); }
.net-banner.warn { background: var(--warn-soft); color: var(--warn); }
.net-banner .btn { flex: none; }
.btn[data-busy] { opacity: .7; pointer-events: none; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* Qadamlar yoqilganda (tor ekran + JS) */
.steps-on fieldset.step { display: none; }
.steps-on fieldset.step.current { display: block; }
.steps-on .step-bar { display: block; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-weight: 600; }
.steps-on .step-actions { display: flex; flex-direction: column-reverse; gap: 8px; margin-top: 8px; }
.steps-on .step-actions[hidden] { display: none; }
.steps-on .step-actions .btn { justify-content: center; min-height: 48px; font-size: 16px; }
.steps-on .step-error { display: block; }
.steps-on .step-error[hidden] { display: none; }
.steps-on .deal-cols { display: block; }
.steps-on .confirm-card { display: block; margin-bottom: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--highlight); }
.steps-on .confirm-card[hidden] { display: none; }
.confirm-card h2 { margin-bottom: 8px; }
.confirm-list { margin: 0 0 10px; }
.confirm-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.confirm-row:first-child { border-top: none; }
.confirm-row dt { flex: none; }
.confirm-row dd { margin: 0; min-width: 0; font-family: var(--mono); font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.confirm-row dd.total.big { font-size: 28px; white-space: normal; }
.steps-on [data-submit-row] { flex-direction: column-reverse; }
.steps-on [data-submit-row][hidden] { display: none; }
.steps-on [data-submit-row] .btn { justify-content: center; min-height: 52px; font-size: 16px; }

/* Xizmat tanlash: katta radio ro'yxat (yashirin select saqlanadi) */
.steps-on .pick-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.pick-hidden { display: none !important; }
.pick-search { min-height: 48px; padding: 0 12px; border: 1px solid var(--input-line); border-radius: 10px; background: var(--card); color: var(--text); font: inherit; font-size: 16px; }
.pick-item { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-weight: 600; cursor: pointer; }
.pick-item[hidden] { display: none; }
.pick-item:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.pick-heading { margin: 6px 0 0; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: none; }
.pick-heading[hidden] { display: none; }
.steps-on .pick-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.pick-chips .chip-btn { flex: none; min-height: 44px; }
.pick-item:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.pick-item input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); }

/* Bekor qilish paneli: keng ekranda tugma ostida kichik oyna, tor ekranda pastdan chiqadigan panel */
details.reverse-sheet { position: relative; }
details.reverse-sheet > summary, details.bn-more > summary { list-style: none; cursor: pointer; }
details.reverse-sheet > summary::-webkit-details-marker, details.bn-more > summary::-webkit-details-marker { display: none; }
details.reverse-sheet > summary:focus-visible, details.bn-more > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.reverse-sheet .sheet { position: absolute; right: 0; z-index: 20; width: 320px; margin-top: 6px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); white-space: normal; text-align: left; }
.reverse-sheet .sheet .btn.block { margin-bottom: 8px; }
.reverse-sheet textarea { min-height: 72px; }
.tx td.act { position: relative; }
.summary-text { margin: 0; }

@keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 760px) {
  .side { position: static; height: auto; padding: 10px 12px; }
  .side nav, .side-card { display: none; }
  main { padding: 14px 12px calc(88px + env(safe-area-inset-bottom)); }
  main.wide { display: flex; flex-direction: column; }
  main.wide > * { min-width: 0; }
  h1 { font-size: 22px; }
  .dash-head h1 { font-size: 24px; }
  .dash-head .actions { display: none; }
  .card { padding: 14px; }
  .card.narrow { max-width: none; }

  /* Mobil maydonlar: 48px, 16px (iOS yaqinlashtirmaydi) */
  .form input:not([type=radio]):not([type=checkbox]), .form select, .form textarea { min-height: 48px; font-size: 16px; }
  .form input[data-amount] { font-size: 20px; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { justify-content: center; min-height: 48px; font-size: 16px; }
  .form label.check { min-height: 48px; }
  .form fieldset.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .form fieldset.choice label.check { justify-content: center; margin: 0; padding: 0 12px; border: 1px solid var(--input-line); border-radius: 10px; font-weight: 600; }
  .form fieldset.choice label.check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }

  /* Pastki navigatsiya */
  .bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; align-items: stretch; height: calc(56px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: var(--card); }
  .bottom-nav > a, .bottom-nav > details { flex: 1 1 0; min-width: 0; }
  .bottom-nav > a, .bottom-nav summary { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 56px; padding: 0 4px; border-top: 3px solid transparent; color: var(--muted); font-size: 11px; font-weight: 500; text-align: center; }
  .bottom-nav .bn-icon { flex: none; }
  .bottom-nav summary { list-style: none; cursor: pointer; }
  .bottom-nav summary::-webkit-details-marker { display: none; }
  .bottom-nav > a:hover { color: var(--text); text-decoration: none; }
  .bottom-nav > a[aria-current="page"] { border-top-color: var(--accent); color: var(--text); font-weight: 700; }
  .bn-more[open] > summary { border-top-color: var(--accent); color: var(--text); font-weight: 700; }
  .bn-more .sheet { position: fixed; left: 0; right: 0; bottom: calc(56px + env(safe-area-inset-bottom)); z-index: 60; max-height: 70vh; overflow-y: auto; padding: 14px 12px; border-top: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; background: var(--card); animation: sheet-up .18s ease-out; }
  .bn-more .sheet form { margin: 0; }
  .bn-more .sheet a.btn[aria-current="page"] { border-color: var(--accent); font-weight: 700; }
  .bn-more[open]::before, .reverse-sheet[open]::before { content: ""; position: fixed; inset: 0; z-index: 55; background: color-mix(in srgb, var(--text) 45%, transparent); }
  body.kb-open .bottom-nav { display: none; }
  body.kb-open main { padding-bottom: 24px; }

  /* Bosh sahifa: smena paneli va tezkor amallar */
  .mobile-top { display: block; margin-bottom: 16px; }
  .smena-bar { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 12px; padding: 0 14px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-dark); }
  .smena-bar .dot { width: 10px; height: 10px; border-radius: 5px; background: var(--accent); }
  .smena-bar a { display: inline-flex; align-items: center; min-height: 44px; margin-left: auto; font-weight: 600; }
  .mobile-top .alert { margin-bottom: 10px; }
  .quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .quick .btn { justify-content: center; min-height: 56px; font-size: 16px; }
  main.wide > .flash { order: -4; }
  main.wide > .dash-head { order: -3; margin-bottom: 12px; }
  main.wide > .mobile-top { order: -2; }
  main.wide > .balances { order: 1; }
  main.wide > .monitor { order: 2; }
  main.wide > .ops-card { order: 3; }
  main.wide > .desk { order: 4; }
  main.wide > .more-info, main.wide > details.data-table, main.wide > .recent { order: 5; }
  .balances { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .bal { padding: 14px; gap: 8px; }
  .monitor { grid-template-columns: minmax(0, 1fr); }
  .kpi-value { font-size: 20px; }
  .desk-main:not(.keep) { display: none; }
  .more-info > summary { display: flex; align-items: center; min-height: 48px; margin-bottom: 8px; color: var(--accent); font-weight: 600; }
  .charts { grid-template-columns: minmax(0, 1fr); }
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .chip-btn { flex: none; min-height: 44px; }

  /* Jadvallar kartaga aylanadi (.op-card): amallar tarixi va bosh sahifadagi oxirgi amallar */
  .ops-scroll { overflow-x: visible; }
  .ops { min-width: 0; }
  .ops thead { display: none; }
  .tx, .tx tbody, .ops, .ops tbody { display: block; }
  tr.op-card { display: block; margin-bottom: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
  tr.op-card.reversed { opacity: .7; }
  tr.op-card td { display: block; width: auto; padding: 2px 0; border: none; }
  .tx td.when { width: auto; font-size: 13px; }
  .tx .tag.red { display: none; }
  .tx td.act { width: auto; margin-top: 8px; white-space: normal; }
  .ops tbody tr:first-child td { border-top: none; }
  .ops td { padding: 2px 0; }
  .ops tr.op-card { display: grid; grid-template-columns: auto 1fr auto; column-gap: 8px; align-items: center; margin: 0; padding: 10px 2px; border: none; border-bottom: 1px solid var(--line-soft); border-radius: 0; background: transparent; }
  .ops tr.op-card td.id { grid-column: 1; grid-row: 1; }
  .ops tr.op-card td.when { grid-column: 2; grid-row: 1; }
  .ops tr.op-card td.c-status { grid-column: 3; grid-row: 1; }
  .ops tr.op-card td.c-type, .ops tr.op-card td.c-note, .ops tr.op-card td.c-lines { grid-column: 1 / -1; }
  .ops tr.op-card td.c-type { margin-top: 6px; font-weight: 600; }
  .tx .lines div, .ops .lines div { padding: 2px 0; }
  .tx td[data-cell="type"] .status { margin-left: 6px; }

  /* Tarix qatori (Payme kabi ixcham): sarlavha + summa, ostida hisob nomlari + vaqt, pastda kichik amal */
  .tx { border-top: 1px solid var(--line-soft); }
  .tx tr.op-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: center; margin: 0; padding: 10px 2px; border: none; border-bottom: 1px solid var(--line-soft); border-radius: 0; background: transparent; }
  .tx tr.op-card td.when { display: none; }
  .tx tr.op-card td.sum, .tx tr.op-card td.when-short { display: block; }
  .tx tr.op-card td[data-cell="type"] { grid-column: 1; grid-row: 1; font-size: 15px; }
  .tx tr.op-card td.sum { grid-column: 2; grid-row: 1; text-align: right; font-size: 15px; font-weight: 700; white-space: nowrap; }
  .tx tr.op-card td.lines { grid-column: 1; grid-row: 2; display: flex; flex-wrap: nowrap; gap: 6px; overflow: hidden; color: var(--muted); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
  .tx tr.op-card td.lines div { display: inline; padding: 0; }
  .tx tr.op-card td.lines div + div::before { content: "→ "; }
  .tx tr.op-card td.lines .num { display: none; }
  .tx tr.op-card td.lines a { color: inherit; }
  .tx tr.op-card td.when-short { grid-column: 2; grid-row: 2; text-align: right; color: var(--muted); font-size: 12px; white-space: nowrap; }
  .tx tr.op-card { position: relative; }
  .tx tr.op-card td.act { display: none; }
  .tx .row-link { position: absolute; inset: 0; z-index: 1; }
  .tx tr.op-card td.lines a { position: relative; z-index: 2; }
  .tx tr.op-card td[data-cell="type"] .status:not(.fail):not(.wait) { display: none; }
  .tx tr.op-card td[data-cell="type"] .status { height: 20px; padding: 0 8px; font-size: 11px; }
  .tx tr.op-card.reversed td.sum { text-decoration: line-through; }

  /* Bekor qilish paneli: pastdan chiqadi, majburiy sabab */
  .reverse-sheet > summary.btn { width: 100%; justify-content: center; min-height: 48px; }
  .reverse-sheet .sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; width: auto; max-height: 90vh; margin: 0; overflow-y: auto; padding: 16px 14px calc(16px + env(safe-area-inset-bottom)); border-width: 1px 0 0; border-radius: var(--radius) var(--radius) 0 0; animation: sheet-up .18s ease-out; }
  .reverse-sheet .sheet .btn.block { min-height: 52px; }
  .reverse-sheet .sheet .chips { margin-bottom: 14px; }
  .pager .btn.small { min-height: 48px; flex: 1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .sheet { animation: none !important; }
}

/* PWA: aloqa holati, o'rnatish va yangilash paneli (public/pwa.js) */
.net-banner.net-global { position: sticky; top: 0; z-index: 30; }
.pwa-bar { position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 40; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--text); box-shadow: 0 4px 16px rgba(0, 0, 0, .18); }
.pwa-bar[hidden] { display: none; }
/* Kirish sahifalarida o'rnatish/yangilash paneli ko'rsatilmaydi (forma tugmasini to'smasin) */
body:has(.auth-wrap) .pwa-bar { display: none; }
.pwa-bar > span { flex: 1 1 200px; }
.pwa-bar .btn { flex: none; }
@media (max-width: 760px) {
  /* Pastki menyu ustida */
  .pwa-bar { bottom: calc(72px + env(safe-area-inset-bottom)); }
}

/* M3: to'lov agent ekranlari (docs/design/m3_agent_screens.md). Yangi rang yo'q: faqat mavjud tokenlar */
.agent-hero { gap: 10px; }
.agent-hero h2 { margin: 6px 0 0; }
.agent-hero .confirm-list { margin: 0; }
.agent-hero .bal-amount { font-size: 28px; }
.limit-wrap { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.limit-bar { position: relative; height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.limit-fill { height: 100%; border-radius: 5px; background: var(--accent); }
.limit-bar.warn .limit-fill { background: var(--amber); }
.limit-bar.err .limit-fill { background: var(--red); }
.limit-fill.w-0 { width: 0; }
.limit-fill.w-10 { width: 10%; }
.limit-fill.w-20 { width: 20%; }
.limit-fill.w-30 { width: 30%; }
.limit-fill.w-40 { width: 40%; }
.limit-fill.w-50 { width: 50%; }
.limit-fill.w-60 { width: 60%; }
.limit-fill.w-70 { width: 70%; }
.limit-fill.w-80 { width: 80%; }
.limit-fill.w-90 { width: 90%; }
.limit-fill.w-100 { width: 100%; }
.limit-text { margin: 0; color: var(--muted); font-size: 12px; }
.limit-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.limit-state.warn { color: var(--warn); }
.limit-state.err { color: var(--red); }
.share-line { margin: 0; color: var(--green); font-weight: 600; }
.share-line .num, .share-line dd { color: var(--green); }
.share-line:empty { display: none; }
.agent-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; margin-bottom: 16px; }
.agent-kpis .card { margin: 0; }
.btn.agent-pay { min-height: 64px; font-size: 18px; }
.btn[aria-disabled="true"], summary.btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
a.btn[aria-disabled="true"] { pointer-events: none; }
.agent-ops { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.agent-card { display: flex; flex-direction: column; gap: 4px; min-height: 56px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--text); }
.agent-card:hover { color: var(--text); text-decoration: none; border-color: var(--muted); }
.agent-card.reversed { opacity: .7; }
.agent-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; }
.agent-card-lines { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.agent-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.agent-actions details.reverse-sheet > summary.btn { width: 100%; justify-content: center; min-height: 56px; }
.agent-actions .sheet { left: 0; right: auto; }
.terms-form .form-row { align-items: end; }
.receipt.reversed { opacity: .8; }
.agents-table .limit-wrap { min-width: 160px; }
.total-row td { border-top: 2px solid var(--line); }
@media (max-width: 760px) {
  .agent-actions { grid-template-columns: 1fr 1fr; }
  .agent-actions .sheet { left: 0; right: 0; }
  .agents-table .limit-wrap { min-width: 0; }
  .ops.agents-table tr.op-card { display: block; }
  .ops td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-family: var(--sans); }
  .ops td.num[data-label] { text-align: left; }
}

.tx .row-link { display: none; }
@media (max-width: 760px) {
  .tx .row-link { display: block; }
  /* Tepa panel: yengil, Payme kabi (logotip + nom, o'ngda qulflash) */
  .side { justify-content: space-between; padding: 8px 12px; background: var(--card); color: var(--text); border-bottom: 1px solid var(--line); }
  .side .brand, .side .brand:hover { padding: 0; color: var(--text); font-size: 17px; }
  .side .brand span:last-child { display: inline; }
  .brand-mark { width: 34px; height: 34px; border-radius: 9px; }
  .side-card { flex-direction: row; align-items: center; }
  .side-card .btn, .side-card .btn:hover { min-height: 34px; padding: 0 12px; border-color: var(--line); background: var(--card); color: var(--text); font-size: 13px; }
}

/* Mijoz ekranlari (/me, Payme uslubi): katta balans kartasi, yumaloq tezkor tugmalar, xizmatlar to'ri, ro'yxat va chek.
   Yangi rang yo'q: faqat mavjud tokenlar */
.me { display: flex; flex-direction: column; gap: 18px; max-width: 560px; margin: 0 auto; min-width: 0; overflow-x: clip; }
.me h1, .me h2 { margin: 0; }
.me-top { display: flex; align-items: center; gap: 12px; }
.me-hello { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.me-hello strong { overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.me-logout { margin: 0; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 42px; height: 42px; padding: 0; border: none; border-radius: 50%; background: var(--card); color: var(--text); cursor: pointer; }
.icon-btn:hover { background: var(--highlight); text-decoration: none; }
.me-page-head { display: flex; align-items: center; gap: 10px; min-height: 42px; }
.me-page-head h1 { font-size: 24px; }

/* Belgi (logotip o'rniga): kategoriya belgisi yoki bosh harflar, 6 xil ohang */
.av { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: 50%; font-size: 15px; font-weight: 700; letter-spacing: .02em; line-height: 1; }
.av.big { width: 56px; height: 56px; font-size: 20px; }
.av.t0 { background: var(--accent-soft); color: var(--accent-dark); }
.av.t1 { background: var(--green-soft); color: var(--green); }
.av.t2 { background: var(--warn-soft); color: var(--warn); }
.av.t3 { background: var(--red-soft); color: var(--red); }
.av.t4 { background: var(--chip); color: var(--text); }
.av.t5 { background: var(--highlight); color: var(--accent); }

.me-balance { display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: 20px; background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff; box-shadow: var(--shadow); }
.me-balance-label { font-size: 14px; opacity: .85; }
.me-balance-sum { font-size: 32px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.me-balance-note { font-size: 13px; opacity: .85; }

.me-actions, .me-receipt-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.me-receipt-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.me-actions a, .me-round { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text); font-size: 12px; font-weight: 500; text-align: center; }
.me-actions a:hover, .me-round:hover { text-decoration: none; }
.me-action-icon { display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 50%; background: var(--card); color: var(--accent); box-shadow: var(--shadow); }
.me-actions a:active .me-action-icon, .me-round:active .me-action-icon { background: var(--accent-soft); }

.me-block { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 18px; background: var(--card); }
.me-block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.me-block-head h2 { font-size: 17px; }
.me-block-head a { font-size: 14px; font-weight: 600; }
.me-note p { margin: 0; }

.me-saved { display: flex; gap: 10px; margin: 0 -16px; padding: 0 16px 2px; overflow-x: auto; scrollbar-width: none; }
.me-saved::-webkit-scrollbar { display: none; }
.me-saved-item { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; width: 88px; padding: 10px 6px; border-radius: 14px; background: var(--bg); color: var(--text); text-align: center; }
.me-saved-item:hover { text-decoration: none; }
.me-saved-name, .me-saved-ref { width: 100%; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.me-saved-name { font-weight: 600; }
.me-saved-ref { font-family: var(--mono); font-size: 11px; }

.me-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.me-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.me-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; padding: 10px 4px; border-radius: 14px; color: var(--text); font-size: 12px; font-weight: 500; line-height: 1.25; text-align: center; overflow-wrap: anywhere; }
.me-tile:hover { background: var(--highlight); text-decoration: none; }
.me-tile small { font-size: 11px; }

.me-search { display: flex; align-items: center; gap: 8px; height: 48px; margin: 0; padding: 0 14px; border-radius: 14px; background: var(--card); color: var(--muted); }
.me-search input { flex: 1; min-width: 0; height: 100%; border: none; outline: none; background: transparent; color: var(--text); font: inherit; font-size: 16px; }
.me-search:focus-within { box-shadow: 0 0 0 2px var(--accent); }
/* Chetdan chiqmaydi (manfiy chekka sahifani yonga suradi — telefonda siljish) */
.me-chips { display: flex; gap: 8px; margin: 0; padding: 0 0 2px; overflow-x: auto; scrollbar-width: none; }
.me-chips::-webkit-scrollbar { display: none; }
.me-chips .chip-btn { flex: none; border-color: transparent; }
.me-chips .chip-btn:hover { text-decoration: none; }
.me-chips .chip-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.me-list { margin: 0; padding: 0; list-style: none; }
.me-list li + li { border-top: 1px solid var(--line-soft); }
.me-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; color: var(--text); }
.me-row:hover { text-decoration: none; }
.me-row-main { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 2px; }
.me-row-title { overflow: hidden; font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.me-row-sub { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.me-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.me-row-sum { font-size: 15px; font-weight: 700; white-space: nowrap; }
.me-row-sum.pos, .me-receipt-sum.pos, .me-summary .pos { color: var(--green); }
.me-row.reversed .me-row-sum, .struck { text-decoration: line-through; opacity: .7; }
.me-row .status { height: 20px; padding: 0 8px; font-size: 11px; }
.me-empty { margin: 0; padding: 8px 0; text-align: center; }

.me-summary { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 18px; background: var(--card); }
.me-summary > .muted { font-size: 13px; text-transform: capitalize; }
.me-summary-row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.me-summary-row .num { font-weight: 700; }
.me-day { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px 4px; border-radius: 18px; background: var(--card); }
.me-day-title { color: var(--muted); font-size: 13px; font-weight: 600; }

.me-receipt { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 16px 8px; border-radius: 20px; background: var(--card); text-align: center; }
.me-receipt-title { font-size: 16px; }
.me-receipt-sum { font-size: 30px; font-weight: 700; letter-spacing: -.02em; overflow-wrap: anywhere; }
.me-receipt .status .icon { margin-right: 4px; }
.me-receipt-rows { align-self: stretch; margin: 12px 0 0; padding: 0; text-align: left; }
.me-receipt-rows > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.me-receipt-rows dt { color: var(--muted); }
.me-receipt-rows dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }

.me-service-head { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 18px; background: var(--card); }
.me-service-head div { display: flex; flex-direction: column; min-width: 0; }
.me-service-head strong { font-size: 17px; }
.me-pay-form { padding: 16px; border-radius: 18px; background: var(--card); }
.me-pay-form .me-amount { font-size: 26px; font-weight: 700; font-family: var(--mono); }
.me-pay-hint { margin: 0; font-size: 13px; }
.me-quote { margin: 0; }
.me-pay-actions { display: flex; flex-direction: column; gap: 8px; }
.me-pay-actions .btn { justify-content: center; min-height: 52px; border-radius: 14px; font-size: 16px; }

@media (max-width: 760px) {
  /* Mijozda tepa panel yo'q: o'rnida o'z sarlavhasi (salom + chiqish) */
  .role-customer .side { display: none; }
  .role-customer main { padding-top: calc(12px + env(safe-area-inset-top)); }
  .form.me-pay-form input.me-amount { font-size: 26px; }
  .me-pay-actions { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 5; padding-top: 4px; background: var(--card); }
}

/* Kartaga o'tkazma: karta ko'rinishidagi maydon, ostida egasining ismi */
a.av:hover { text-decoration: none; }
.me-card-input { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 16px; background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff; }
.me-card-input label { color: #fff; font-size: 13px; opacity: .95; }
.form .me-card-input input[data-card] { border: none; background: rgba(255, 255, 255, .16); color: #fff; font-family: var(--mono); font-size: 20px; letter-spacing: .06em; }
.form .me-card-input input[data-card]::placeholder { color: rgba(255, 255, 255, .55); }
.me-card-chip { width: 34px; height: 24px; border-radius: 5px; background: rgba(255, 255, 255, .35); }
.me-card-owner { min-height: 20px; margin: 0; font-size: 14px; font-weight: 600; letter-spacing: .02em; }
.me-card-owner.wait { opacity: .75; font-weight: 400; }
.me-card-owner.ok::before { content: "✓ "; }
.me-card-owner.warn, .me-card-owner.err { padding: 4px 8px; border-radius: 8px; background: var(--card); font-weight: 500; }
.me-card-owner.warn { color: var(--warn); }
.me-card-owner.err { color: var(--red); }

/* Qo'shimcha bo'limlar: keng ekranda yon menyuda bor, tor ekranda tepa paneldagi "Menyu" tugmasi */
.top-more { display: none; }
@media (max-width: 760px) {
  .top-more { display: block; position: absolute; top: 8px; right: 12px; z-index: 45; }
  .top-more > summary { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 40px; height: 40px; padding: 0 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); }
  .top-more[open] > summary { border-color: var(--accent); color: var(--accent); }
  .top-more .sheet { top: 60px; bottom: auto; max-height: 75vh; border-top: none; border-bottom: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
  /* Tepa panel o'ng tomoni menyu tugmasiga bo'shatiladi */
  body:has(.top-more) .side { padding-right: 64px; }
}

/* Xizmat logotipi (public/logos): oq kartochkada, doira ichida sig'adi */
.av.av-logo { overflow: hidden; border: 1px solid var(--line-soft); background: #fff; }
.av.av-logo img { width: 78%; height: 78%; object-fit: contain; }
.logo-preview { display: block; width: 56px; height: 56px; object-fit: contain; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.form select[data-district]:disabled { opacity: .6; }

/* Sahifalar orasida silliq o'tish (Chrome 126+, Safari 18.2+; qo'llamasa oddiy o'tish). Pastki menyu joyida turadi */
@view-transition { navigation: auto; }
.bottom-nav { view-transition-name: bottom-nav; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .16s; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* Telefon raqami: o'zgarmas "+998" prefiks, foydalanuvchi faqat 9 raqam yozadi */
.me-phone { display: flex; align-items: center; gap: 0; border: 1px solid var(--input-line); border-radius: 10px; background: var(--card); }
.me-phone:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.me-phone-prefix { padding: 0 4px 0 12px; color: var(--muted); font-family: var(--mono); font-size: 18px; }
.form .me-phone input[data-ref="phone"] { flex: 1; min-width: 0; border: none; box-shadow: none; background: transparent; font-family: var(--mono); font-size: 18px; letter-spacing: .02em; }
.form .me-phone input[data-ref="phone"]:focus { outline: none; }

/* Tezkor summalar: bir qatorda, klaviaturasiz to'ldiradi */
.me-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: -4px; }
.me-quick .chip-btn { justify-content: center; min-height: 40px; padding: 0 4px; border-color: var(--line); font-family: var(--mono); font-size: 13px; }
.me-quick .chip-btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark); }

/* Fokusdagi maydon pastki tugma va klaviatura ostida qolmasin */
.me-pay-form input, .me-pay-form select { scroll-margin: 96px 0 160px; }

/* Klaviatura ochiq (maydon fokusda) — telefonda pastki menyu yashiriladi, "To'lash" tugmasi oqimga qaytadi:
   ekranning yarmini klaviatura egallaydi, qolgan joy faqat to'ldirilayotgan maydonga. Klaviatura yopilsa — qaytadi */
@media (max-width: 760px) {
  body:has(.form input:focus, .form select:focus, .form textarea:focus, .me-search input:focus) .bottom-nav { display: none; }
  body:has(.form input:focus, .form select:focus, .form textarea:focus, .me-search input:focus) main { padding-bottom: 24px; }
  body:has(.me-pay-form input:focus, .me-pay-form select:focus) .me-pay-actions { position: static; }
  body:has(.form input:focus, .form textarea:focus) .pwa-bar { display: none; }
}

/* ===== Kengaytirilgan palitra (mijoz ekranlari): asosiy firuza + binafsha, ko'k, qahrabo ohanglari.
   Bitta urg'u rangi o'rniga har bo'lim o'z ohangida — ko'z yo'naladi, ekran "uch rangli" ko'rinmaydi ===== */
:root {
  --violet: #6d4fd1;
  --violet-soft: #efeafd;
  --info-soft: #e6eefc;
  --amber-soft: #fdf0e1;
  /* Brend kartasi: matn har doim oq, shuning uchun ikkala mavzuda ham to'q (kontrast >= 4.5) */
  --brand-grad: linear-gradient(135deg, #0e7490 0%, #155e75 52%, #312e81 100%);
  --brand-grad-alt: linear-gradient(135deg, #5b3fc4 0%, #3b2d8f 55%, #1e3a8a 100%);
  --raise: 0 6px 18px rgba(15, 23, 42, .08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --violet: #b4a2ff;
    --violet-soft: #2a2450;
    --info-soft: #1b2a4a;
    --amber-soft: #3a2a12;
    --brand-grad: linear-gradient(135deg, #0f6f86 0%, #174a6b 55%, #2e2a6e 100%);
    --brand-grad-alt: linear-gradient(135deg, #4b34a8 0%, #2f2672 55%, #1b2f6b 100%);
    --raise: 0 6px 18px rgba(0, 0, 0, .35);
  }
}

/* Belgi ohanglari: kulrang o'rniga binafsha va ko'k */
.av.t4 { background: var(--violet-soft); color: var(--violet); }
.av.t5 { background: var(--info-soft); color: var(--info); }

/* Balans kartasi: chuqur gradient va bezak doiralar (rasm emas — CSS) */
.me-balance { position: relative; overflow: hidden; color: #fff; text-decoration: none;
  background: radial-gradient(circle at 88% 12%, rgba(255, 255, 255, .16) 0 64px, transparent 65px),
              radial-gradient(circle at 104% 108%, rgba(255, 255, 255, .10) 0 110px, transparent 111px), var(--brand-grad); }
.me-balance:hover { color: #fff; text-decoration: none; }
.me-balance-more { align-self: flex-start; margin-top: 8px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: 12px; font-weight: 600; }

/* Tezkor amallar: har biri o'z ohangida */
.me-action-icon { box-shadow: none; }
.me-actions .tint-accent .me-action-icon { background: var(--accent-soft); color: var(--accent-dark); }
.me-actions .tint-violet .me-action-icon { background: var(--violet-soft); color: var(--violet); }
.me-actions .tint-amber .me-action-icon { background: var(--amber-soft); color: var(--amber); }
.me-actions .tint-blue .me-action-icon { background: var(--info-soft); color: var(--info); }

/* Qatlamlar: qorong'i mavzuda kartalar fondan ajralib tursin */
.me-block, .me-summary, .me-day, .me-receipt, .me-pay-form, .me-service-head, .me-account { border: 1px solid var(--line-soft); box-shadow: var(--raise); }

/* Hisoblarim: hamyon kartalari */
.me-account { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 20px; background: var(--card); }
.me-wallet { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; min-height: 150px; padding: 18px; border-radius: 16px; color: #fff;
  background: radial-gradient(circle at 92% 8%, rgba(255, 255, 255, .16) 0 56px, transparent 57px), var(--brand-grad); }
.me-wallet.alt { background: radial-gradient(circle at 92% 8%, rgba(255, 255, 255, .16) 0 56px, transparent 57px), var(--brand-grad-alt); }
.me-wallet-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.me-wallet-currency { padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .18); font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: .06em; }
.me-wallet-label { font-size: 13px; opacity: .85; }
.me-wallet-sum { margin-top: auto; font-size: 30px; font-weight: 700; letter-spacing: -.02em; overflow-wrap: anywhere; }
.me-wallet-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; opacity: .85; }
.me-account .me-receipt-rows { margin: 0; }
.me-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.me-steps strong { color: var(--text); }

/* ===== Ekrandagi numpad (public/me.js): tizim klaviaturasi o'rniga, ~270px ===== */
.numpad { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--card); box-shadow: 0 -8px 24px rgba(0, 0, 0, .18); animation: sheet-up .14s ease-out; }
.numpad[hidden] { display: none; }
.numpad-keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; max-width: 520px; margin: 0 auto; }
.numpad-key { height: 50px; border: none; border-radius: 12px; background: var(--chip); color: var(--text); font: 600 22px var(--mono); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.numpad-key:active { background: var(--accent-soft); }
.numpad-key.muted-key { background: transparent; color: var(--muted); font-size: 18px; }
.numpad-key[hidden] { display: block; visibility: hidden; }
.numpad-done { display: block; width: 100%; max-width: 520px; height: 50px; margin: 6px auto 0; border: none; border-radius: 12px; background: var(--accent); color: var(--on-accent); font: 700 16px var(--sans); cursor: pointer; touch-action: manipulation; }
body.numpad-open main { padding-bottom: 320px; }
body.numpad-open .bottom-nav, body.numpad-open .pwa-bar { display: none; }
body.numpad-open .me-pay-actions { position: static; }
@media (prefers-reduced-motion: reduce) { .numpad { animation: none; } }

/* Numpad: Android kabi 4 ustun — o'ngda o'chirish, baland "Keyingi", yopish (bir qo'lda bosh barmoq yetadi) */
.numpad-keys { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, .9fr); max-width: 560px; }
.numpad-key { height: 54px; }
.numpad-key.side-key { background: var(--line-soft); color: var(--text); font-size: 20px; }
.numpad-keys .numpad-done { grid-row: span 2; height: auto; margin: 0; max-width: none; font-size: 15px; }
.numpad-key:disabled { visibility: hidden; }

/* ===== Mening uyim ===== */
.status.ok { background: var(--green-soft); color: var(--green); }
.me-home-card { display: flex; flex-direction: row; align-items: center; gap: 12px; color: var(--text); }
.me-home-card:hover { text-decoration: none; }
.me-home-card .me-row-main strong { font-size: 16px; }
.me-home-card .me-row-main .muted { font-size: 13px; }
.me-home-card-icon { display: flex; align-items: center; justify-content: center; flex: none; width: 48px; height: 48px; border-radius: 14px; background: var(--amber-soft); color: var(--amber); }
.me-chevron { color: var(--muted); font-size: 24px; }

.me-house-hero { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 18px; border-radius: 20px; text-align: center; color: var(--accent);
  background: radial-gradient(circle at 50% 0%, var(--accent-soft) 0 60%, transparent 61%), var(--card); border: 1px solid var(--line-soft); }
.me-house-hero h2 { color: var(--text); font-size: 19px; }
.me-house-hero p { margin: 0; }
.me-progress { width: 100%; height: 8px; margin-top: 4px; border: none; border-radius: 4px; overflow: hidden; background: var(--line); appearance: none; }
.me-progress::-webkit-progress-bar { background: var(--line); border-radius: 4px; }
.me-progress::-webkit-progress-value { background: var(--green); border-radius: 4px; }
.me-progress::-moz-progress-bar { background: var(--green); border-radius: 4px; }

.me-house h2 { display: flex; align-items: center; gap: 6px; }
.me-house-icon { color: var(--amber); font-size: 20px; }
.me-home-account { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 28px 12px 0; }
.me-home-account .me-row-side { gap: 6px; }
.me-home-account .btn.small { min-height: 34px; padding: 0 14px; border-radius: 10px; }
.me-home-remove { position: absolute; top: 6px; right: -4px; margin: 0; }
.icon-btn.small { width: 28px; height: 28px; background: transparent; color: var(--muted); font-size: 18px; }
.me-add > summary { justify-content: center; list-style: none; cursor: pointer; }
.me-add > summary::-webkit-details-marker { display: none; }
.me-add[open] > summary { display: none; }
.me-add .form { margin-top: 4px; }
.me-house-delete { margin: 0; text-align: right; }
.me-home-quick { flex-wrap: wrap; margin: 0; }
.me-home-new { display: flex; align-items: flex-end; gap: 8px; }
.me-home-new label { flex: 1; }
.me-range { margin-top: -6px; }
.me-range.err { color: var(--red); font-weight: 600; }
.deal-row select[name="item_district_id"] { grid-column: 1 / -1; }

/* Sensorli ekran: ilova kabi — uzoq bosilganda matn belgilanmaydi, havola/rasm menyusi chiqmaydi.
   Kiritish maydonlari va .selectable (masalan chek raqami) bundan mustasno */
@media (pointer: coarse) {
  body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
  input, textarea, select, [contenteditable], .selectable { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
  img, svg, a { -webkit-user-drag: none; }
}

/* iPhone: bosilgan tugma darhol ko'rinsin (sezgirlik) */
@media (pointer: coarse) {
  .numpad-key:active, .chip-btn:active, .btn:active, .me-tile:active, .me-row:active { transform: scale(.97); transition: transform .05s; }
  .numpad-key:active { background: var(--accent-soft); }
}
