:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --ink: #1b1f27;
  --muted: #6b7280;
  --line: #e3e6eb;
  --accent: #2455e6;
  --accent-ink: #ffffff;
  --side: #161b26;
  --side-ink: #c7cdd9;
  --ok: #12804a;
  --ok-bg: #e4f6ec;
  --warn: #a35a00;
  --warn-bg: #fff1dc;
  --bad: #b42318;
  --bad-bg: #fde8e6;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.45 system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* Yuqori panel: til, profil, chiqish */
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; justify-content: flex-end; align-items: center; gap: 14px;
  padding: 10px 30px; background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20; min-height: 58px;
}
.topbar form { margin: 0; }
.topbar .btn.small { padding: 7px 14px; }
.seg { display: inline-flex; border: 1px solid #cfd4dc; border-radius: 8px; overflow: hidden; }
.seg a { padding: 6px 11px; font-size: 13px; font-weight: 600; color: var(--muted); border-right: 1px solid #cfd4dc; line-height: 1.2; }
.seg a:last-child { border-right: 0; }
.seg a:hover { background: #f1f3f7; text-decoration: none; }
.seg a.on { background: var(--ink); color: #fff; }
.userchip { display: inline-flex; align-items: center; gap: 10px; padding: 3px 10px 3px 4px; border-radius: 99px; color: var(--ink); }
.userchip:hover, .userchip.active { background: #eef1f6; text-decoration: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; }
.uinfo { display: flex; flex-direction: column; line-height: 1.2; }
.uinfo b { font-size: 14px; }
.uinfo small { color: var(--muted); font-size: 12px; }
.langs-top { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.langs-top a { font-size: 13px; padding: 3px 10px; border: 1px solid #cfd4dc; border-radius: 99px; color: var(--ink); }
.langs-top a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.errbox[hidden] { display: none; }

/* Layout */
.app { display: flex; min-height: 100vh; }
.side {
  width: 232px; background: var(--side); color: var(--side-ink);
  padding: 18px 12px; display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh; flex-shrink: 0;
}
.brand { color: #fff; font-weight: 700; font-size: 17px; padding: 4px 10px 14px; }
.brand small { display: block; font-weight: 400; color: #8e97a8; font-size: 12px; margin-top: 2px; }
.side a, .side button.linklike {
  color: var(--side-ink); padding: 9px 12px; border-radius: 8px; display: block;
  background: none; border: 0; font: inherit; text-align: left; width: 100%; cursor: pointer;
}
.side a:hover, .side button.linklike:hover { background: #232a3a; text-decoration: none; color: #fff; }
.side a.active { background: var(--accent); color: #fff; }
.side .spacer { flex: 1; }
.side .who { padding: 8px 12px; font-size: 13px; color: #8e97a8; }
.side .who b { color: #fff; font-weight: 600; display: block; }
.main { flex: 1; padding: 26px 30px; min-width: 0; }
.pagehead { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }

/* Panels / cards */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .cols-4 { grid-template-columns: repeat(2, 1fr); } .cols-3 { grid-template-columns: 1fr 1fr; } }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-size: 26px; font-weight: 700; margin-top: 2px; letter-spacing: -0.5px; }
.stat .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: #fafbfc; }
tr:last-child td { border-bottom: 0; }
td.right, th.right { text-align: right; }
.tablewrap { overflow-x: auto; }
tr.void td { color: var(--muted); text-decoration: line-through; }
tr.void td.keep { text-decoration: none; }

/* Forms */
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
input, select, textarea {
  font: inherit; color: var(--ink); background: #fff; width: 100%;
  border: 1px solid #cfd4dc; border-radius: 8px; padding: 9px 11px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #9db6ff; border-color: var(--accent); }
.field { margin-bottom: 12px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 140px; }
.row > .shrink { flex: 0 0 auto; }
.btn {
  font: inherit; font-weight: 600; cursor: pointer; display: inline-block;
  border: 1px solid transparent; border-radius: 8px; padding: 9px 16px;
  background: var(--accent); color: var(--accent-ink); text-align: center;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn.secondary { background: #fff; color: var(--ink); border-color: #cfd4dc; }
.btn.danger { background: var(--bad); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.big { padding: 14px 20px; font-size: 17px; width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
form.inline { display: inline; }

/* Badges / flashes */
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #eceff4; color: #3b4452; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.flash { padding: 11px 14px; border-radius: 8px; margin-bottom: 14px; font-weight: 500; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.error { background: var(--bad-bg); color: var(--bad); }
.banner { border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; font-weight: 600; }
.banner.ok { background: var(--ok-bg); color: var(--ok); }
.banner.bad { background: var(--bad-bg); color: var(--bad); }
.banner ul { margin: 8px 0 0; font-weight: 400; }

/* Chart */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 8px; }
.bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; }
.bar i { display: block; width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; opacity: .85; }
.bar:hover i { opacity: 1; }
.bar span { font-size: 10px; color: var(--muted); margin-top: 4px; white-space: nowrap; }

/* Login */
.center { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.card-narrow { width: 100%; max-width: 400px; }

/* POS */
.pos { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(340px, 1fr); gap: 16px; align-items: start; }
.pos .searchbox { font-size: 18px; padding: 13px 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.chip { border: 1px solid #cfd4dc; background: #fff; border-radius: 99px; padding: 4px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.plist { max-height: calc(100vh - 230px); overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.pitem { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; background: #fff; }
.pitem:last-child { border-bottom: 0; }
.pitem:hover { background: #f1f5ff; }
.pitem.out { opacity: .45; cursor: not-allowed; background: #fafafa; }
.pitem .nm { font-weight: 600; }
.pitem .meta { color: var(--muted); font-size: 12px; }
.cart { position: sticky; top: 16px; }
.cartlines { max-height: 42vh; overflow: auto; margin: 0 -4px; }
.cline { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.cline .nm { font-weight: 600; }
.qty { display: inline-flex; align-items: center; gap: 4px; }
.qty button { width: 28px; height: 28px; border-radius: 6px; border: 1px solid #cfd4dc; background: #fff; font-size: 16px; cursor: pointer; line-height: 1; }
.qty input { width: 56px; text-align: center; padding: 4px; }
.totals { margin: 12px 0; }
.totals .line { display: flex; justify-content: space-between; padding: 3px 0; }
.totals .grand { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; border-top: 2px solid var(--ink); padding-top: 8px; margin-top: 6px; }
.pay { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.pay input { display: none; }
.pay label { margin: 0; padding: 10px; text-align: center; border: 2px solid #cfd4dc; border-radius: 8px; cursor: pointer; color: var(--ink); font-weight: 600; }
.pay input:checked + label { border-color: var(--accent); background: #eef2ff; color: var(--accent); }
.empty { color: var(--muted); text-align: center; padding: 28px 8px; }
.overlay { position: fixed; inset: 0; background: rgba(15, 20, 30, .55); display: grid; place-items: center; z-index: 50; padding: 20px; }
.overlay[hidden] { display: none; }
.modal { background: #fff; border-radius: 14px; padding: 26px; max-width: 400px; width: 100%; text-align: center; }
.modal .tick { width: 54px; height: 54px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; font-size: 30px; margin: 0 auto 10px; }
.modal .btn { margin-top: 8px; width: 100%; }
.errbox { background: var(--bad-bg); color: var(--bad); padding: 9px 12px; border-radius: 8px; margin-bottom: 10px; font-weight: 500; }

/* Kirim */
.tbl-input input, .tbl-input select { padding: 7px 9px; }

/* Receipt (chek) */
.receipt-page { background: #e8e8e8; min-height: 100vh; padding: 20px; }
.receipt { width: 80mm; margin: 0 auto; background: #fff; padding: 6mm 5mm; font: 12px/1.35 "Courier New", monospace; color: #000; }
.receipt h1 { font-size: 16px; text-align: center; margin: 0; }
.receipt .c { text-align: center; }
.receipt hr { border: 0; border-top: 1px dashed #000; margin: 6px 0; }
.receipt table th, .receipt table td { padding: 2px 0; border: 0; background: none; text-transform: none; letter-spacing: 0; font-size: 12px; color: #000; }
.receipt table th { font-weight: 700; }
.receipt .tot { display: flex; justify-content: space-between; }
.receipt .big { font-size: 15px; font-weight: 700; }
.receipt .void-mark { text-align: center; font-weight: 700; border: 2px solid #000; padding: 3px; margin: 6px 0; }
.noprint-bar { text-align: center; margin-bottom: 14px; display: flex; gap: 8px; justify-content: center; }
@media print {
  @page { size: 80mm auto; margin: 0; }
  .receipt-page { background: #fff; padding: 0; }
  .receipt { width: 80mm; padding: 3mm; }
  .noprint-bar { display: none; }
}

/* ================= Yangi dizayn (inventar paneli uslubi) ================= */
:root { --accent: #0b63c5; --bg: #f4f6fa; --line: #e6eaf0; --radius: 12px; }
body { background: var(--bg); }
h1 { font-size: 24px; font-weight: 600; }
h2 { font-size: 17px; font-weight: 600; }
.panel { border-radius: 12px; box-shadow: 0 1px 2px rgba(16, 24, 40, .03); }
.btn.outline { background: #fff; color: var(--accent); border: 1px solid var(--accent); display: inline-flex; align-items: center; gap: 8px; }
.btn.outline:hover { background: #f1f7fe; filter: none; }
.btn.outline .ico { width: 18px; height: 18px; }
.ico { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* Chap menyu */
.side { width: 248px; background: #fff; color: #374151; border-right: 1px solid var(--line); padding: 0 14px 18px; gap: 2px; box-shadow: none; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 18px; margin: 0 -14px 14px; padding: 14px 14px 14px 24px; border-bottom: 1px solid var(--line); }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.side a { display: flex; align-items: center; gap: 12px; color: #374151; padding: 11px 12px; border-radius: 10px; font-size: 15px; width: auto; background: none; }
.side a:hover { background: #f3f6fb; color: var(--ink); text-decoration: none; }
.side a.active { background: #eaf2fc; color: var(--accent); font-weight: 600; }
.side a .count { margin-left: auto; background: var(--accent); color: #fff; border-radius: 99px; font-size: 11px; font-style: normal; font-weight: 700; padding: 1px 8px; }
.side .sep { height: 1px; background: var(--line); margin: 10px 6px; flex-shrink: 0; }

/* Yuqori panel */
.topbar { justify-content: flex-start; gap: 14px; padding: 12px 28px; background: #fff; border-bottom: 1px solid var(--line); }
.menu-btn { margin-right: 0; }
.dd { position: relative; }
.dd > summary { list-style: none; cursor: pointer; }
.dd > summary::-webkit-details-marker { display: none; }
.dd-menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 230px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(16, 24, 40, .16); padding: 6px; z-index: 30; }
.dd-menu.right { left: auto; right: 0; }
.dd-menu form { margin: 0; }
.dd-menu a, .dd-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 8px; color: var(--ink); background: none; border: 0; font: inherit; text-align: left; cursor: pointer; }
.dd-menu a:hover, .dd-menu button:hover { background: #f1f5fa; text-decoration: none; }
.dd-menu .ico { color: #6b7280; }
.gsearch { position: relative; flex: 1; max-width: 560px; min-width: 0; margin: 0; }
.gsearch .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #6b7280; pointer-events: none; }
.gsearch input { padding-left: 42px; height: 44px; border-radius: 10px; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.tb-shop { font-weight: 500; max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iconbtn { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: #374151; }
.iconbtn:hover { background: #f1f5fa; text-decoration: none; }
.iconbtn .dot { position: absolute; top: 1px; right: -1px; background: #e5484d; color: #fff; font-size: 10px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 99px; display: grid; place-items: center; padding: 0 4px; }
.userchip .ico { width: 18px; height: 18px; color: #6b7280; }
.avatar { background: var(--accent); }

/* Boshqaruv paneli */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.dash-main, .dash-side { display: grid; gap: 16px; min-width: 0; }
.dash .panel { margin-bottom: 0; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.kpi { display: flex; flex-direction: column; gap: 8px; }
.kpi-title { color: #4b5563; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.trend.up { color: #12804a; } .trend.down { color: #b42318; }
.kpi-val { font-size: 26px; font-weight: 700; letter-spacing: -.5px; line-height: 1.15; }
.kpi-val small { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.kpi-foot { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.kpi-sub { font-size: 12px; }
.kpi-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
.kpi-two b { display: block; font-size: 26px; font-weight: 700; }
.kpi-two span { font-size: 13px; color: var(--muted); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #eef1f6; color: #4b5563; }
.pill.up { background: #e4f6ec; color: #12804a; } .pill.down { background: #fde8e6; color: #b42318; }
.ph { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ph h2 { margin: 0; }
.more { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--accent); white-space: nowrap; }
.more .ico { width: 16px; height: 16px; }
select.mini { width: auto; padding: 7px 12px; border-radius: 8px; font-size: 14px; }

.bchart { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; }
.yax { position: relative; height: 260px; }
.yax span { position: absolute; right: 0; transform: translateY(-50%); font-size: 12px; color: #6b7280; }
.plot { position: relative; height: 260px; }
.plot .lines i { position: absolute; left: 0; right: 0; border-top: 1px dashed #e1e5ec; }
.cols { position: absolute; inset: 0; display: flex; gap: 10px; align-items: stretch; }
.col { flex: 1; position: relative; background: #f6f7f9; border-radius: 4px 4px 0 0; }
.col b { position: absolute; bottom: 0; left: 16%; right: 16%; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; }
.col:hover b { filter: brightness(1.15); }
.xax { display: flex; gap: 10px; margin-top: 8px; }
.xax span { flex: 1; text-align: center; font-size: 12px; color: #4b5563; white-space: nowrap; overflow: hidden; }

.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; flex: 1; min-width: 150px; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.legend b { margin-left: auto; }
.psum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: center; }
.psum a { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ink); padding: 8px 4px; border-radius: 10px; }
.psum a:hover { background: #f6f9fd; text-decoration: none; }
.circ { width: 48px; height: 48px; border-radius: 50%; background: #eaf2fc; color: var(--accent); display: grid; place-items: center; }
.circ.warn { background: #fff1dc; color: #a35a00; } .circ.bad { background: #fde8e6; color: #b42318; }
.psum b { font-size: 22px; }
.psum a > span:last-child { font-size: 13px; color: var(--muted); }

.lowitem { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.lowitem:last-child { border-bottom: 0; }
.lowitem:hover { text-decoration: none; background: #fafcff; }
.thumb { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; color: #fff; flex-shrink: 0; }
.t0 { background: #0b63c5; } .t1 { background: #e5484d; } .t2 { background: #f5a623; } .t3 { background: #3db8a5; } .t4 { background: #8b5cf6; } .t5 { background: #64748b; }
.li-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.li-body b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.li-body .muted { font-size: 13px; }
.tag { background: #fde8e6; color: #b42318; border-radius: 99px; padding: 3px 12px; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.tag.out { background: #b42318; color: #fff; }
.trend-val { font-size: 26px; font-weight: 700; letter-spacing: -.5px; }
.trend-val small { font-size: 13px; font-weight: 500; color: var(--muted); }
#area { margin-top: 12px; }
.pending-box { border-color: #f0c36d; background: #fffdf7; }

/* Kirish / ro'yxatdan o'tish */
.auth-shell { min-height: 100vh; padding: 16px; background: #e6e9ef; }
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); background: #fff; border-radius: 22px; overflow: hidden; min-height: calc(100vh - 32px); box-shadow: 0 10px 40px rgba(16, 24, 40, .08); }
.auth-left { display: flex; flex-direction: column; padding: 28px 56px; min-width: 0; }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; min-width: 0; }
.auth-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 0; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { font-size: 24px; margin: 0 0 6px; }
.auth-sub { margin: 0 0 22px; font-size: 14px; }
.auth-form .field { margin-bottom: 16px; }
.iconfield { position: relative; }
.iconfield .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; stroke: #8a93a3; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.iconfield input { padding-left: 42px; padding-right: 44px; height: 46px; border-radius: 10px; }
.eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; border-radius: 8px; }
.eye svg { width: 20px; height: 20px; stroke: #8a93a3; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.eye.on svg { stroke: var(--accent); }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 18px; font-size: 14px; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--ink); font-size: 14px; cursor: pointer; }
.check input { width: 16px; height: 16px; padding: 0; }
.note { background: #f1f6fd; color: #27476f; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin: -6px 0 14px; }
.note[hidden] { display: none; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-card a.btn { display: block; }
.auth-foot { text-align: center; color: #9aa3b2; font-size: 12px; }
.auth-right { position: relative; margin: 14px; border-radius: 18px; overflow: hidden; color: #fff; background: linear-gradient(150deg, #0e6ad0 0%, #0a4fa6 55%, #0a3d82 100%); display: flex; flex-direction: column; min-height: 480px; }
.auth-right::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; right: -160px; top: -160px; background: radial-gradient(circle, rgba(255, 255, 255, .14), transparent 65%); }
.auth-copy { position: relative; padding: 48px 48px 0; max-width: 540px; z-index: 1; }
.auth-copy h2 { font-size: 30px; line-height: 1.2; margin: 0 0 12px; font-weight: 600; }
.auth-copy p { margin: 0 0 18px; opacity: .85; font-size: 16px; line-height: 1.5; }
.auth-copy ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.auth-copy li { padding-left: 30px; position: relative; font-size: 15px; }
.auth-copy li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: rgba(255, 255, 255, .22); display: grid; place-items: center; font-size: 12px; }
.auth-mock { position: absolute; right: -70px; bottom: -60px; width: min(820px, 118%); z-index: 0; }


/* ---------- Mobil va planshet ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
button, a, .pitem, .chip, input, select { touch-action: manipulation; }
body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
img, svg { max-width: 100%; }
.menu-btn, .scrim, .cartbar { display: none; }
.menu-btn {
  width: 42px; height: 42px; border: 1px solid #cfd4dc; border-radius: 10px; background: #fff;
  font-size: 22px; line-height: 1; cursor: pointer; margin-right: auto; color: var(--ink);
}

/* Planshet va undan kichik: chap menyu ochiladigan panelga aylanadi */
@media (max-width: 1024px) {
  .menu-btn { display: inline-grid; place-items: center; }
  .side {
    position: fixed; left: 0; top: 0; bottom: 0; height: auto; width: 270px; z-index: 60;
    transform: translateX(-102%); transition: transform .22s ease; overflow-y: auto;
    padding-top: calc(18px + env(safe-area-inset-top)); padding-bottom: calc(18px + env(safe-area-inset-bottom));
    box-shadow: 0 0 30px rgba(0, 0, 0, .35);
  }
  body.nav-open .side { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(15, 20, 30, .5); z-index: 55; }
  body.nav-open .scrim { display: block; }
  body.nav-open { overflow: hidden; }
  .side a { padding: 13px 14px; font-size: 16px; }
  .topbar { padding: 10px 20px; }
  .main { padding: 22px 20px; }
}

/* Telefon */
@media (max-width: 760px) {
  .main { padding: 16px 14px 24px; }
  .cols-2, .cols-3, .cols-4 { grid-template-columns: minmax(0, 1fr); }
  .grid > * { min-width: 0; }
  .topbar { padding: 8px 12px; gap: 8px; }
  .uinfo { display: none; }
  .userchip { padding: 0; }
  .seg a { padding: 8px 9px; }
  h1 { font-size: 20px; }
  .panel { padding: 14px; }
  .stat .value { font-size: 24px; }
  /* iPhone: 16px dan kichik matnda maydonga bosganda sahifa yaqinlashib ketadi */
  input, select, textarea { font-size: 16px; padding: 11px 12px; }
  .btn { min-height: 44px; padding: 11px 16px; }
  .btn.small { min-height: 40px; padding: 8px 12px; }
  .topbar .btn.small { min-height: 40px; }
  .pagehead .btn { width: 100%; }
  .row > * { flex: 1 1 100%; }
  .row > .shrink { flex: 1 1 100%; }
  .row > .shrink .btn, .row > .shrink button { width: 100%; }
  .tablewrap { -webkit-overflow-scrolling: touch; }
  .tablewrap table { min-width: 620px; }
  th, td { padding: 10px 9px; }
  .noprint-bar { flex-wrap: wrap; }
  .receipt { max-width: 100%; }
  .receipt-page { padding: 12px; }
}

/* Juda tor telefonlar */
@media (max-width: 380px) {
  .seg a { padding: 8px 7px; font-size: 12px; }
  .topbar .btn.small { padding: 8px 10px; font-size: 13px; }
}

/* Kassa: mobil/planshet */
@media (max-width: 900px) {
  .pos { grid-template-columns: minmax(0, 1fr); padding-bottom: 76px; }
  .pos > * { min-width: 0; }
  .plist { max-height: 56vh; }
  .cart { position: static; }
  .cartlines { max-height: none; }
  .pos .searchbox { font-size: 17px; padding: 13px 14px; }
  .pitem { padding: 13px 12px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .chip { white-space: nowrap; padding: 8px 14px; font-size: 14px; }
  .qty button { width: 40px; height: 40px; font-size: 18px; }
  .qty input { width: 64px; padding: 8px 4px; }
  .pay label { padding: 13px 8px; }
  .totals .grand { font-size: 26px; }
  .cartbar {
    display: none; position: fixed; left: 12px; right: 12px; z-index: 40;
    bottom: calc(12px + env(safe-area-inset-bottom));
    justify-content: space-between; align-items: center; gap: 12px;
    background: var(--accent); color: #fff; border: 0; border-radius: 14px;
    padding: 14px 18px; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer;
    box-shadow: 0 6px 20px rgba(36, 85, 230, .45);
  }
  .cartbar.show { display: flex; }
  .modal { padding: 22px 18px; }
}

/* ================= Yangi dizayn: mobil/planshet moslashuvi ================= */
@media (max-width: 1280px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .dash-side { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
@media (max-width: 1024px) {
  .tb-shop { display: none; }
  .topbar { padding: 10px 18px; }
  .brand { margin-top: 0; }
}
@media (max-width: 900px) {
  .auth-shell { padding: 0; }
  .auth { grid-template-columns: minmax(0, 1fr); border-radius: 0; min-height: 100vh; box-shadow: none; }
  .auth-right { display: none; }
  .auth-left { padding: 20px 22px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis .kpi:last-child { grid-column: span 2; }
}
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 8px 10px; padding: 8px 12px; }
  .qa .qa-text, .qa > summary > .ico:last-child { display: none; }
  .qa > summary { padding: 9px 10px; min-height: 42px; }
  .gsearch { order: 5; flex: 1 1 100%; max-width: none; }
  .tb-right { gap: 6px; }
  .tb-right a.iconbtn:first-of-type { display: none; }   /* sozlamalar: menyuda bor */
  .userchip .ico { display: none; }
  .dash-side { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .kpis .kpi:last-child { grid-column: auto; }
  .yax, .plot { height: 200px; }
  .cols, .xax { gap: 4px; }
  .xax span { font-size: 10px; }
  .donut-wrap { justify-content: center; }
  .auth-top { flex-wrap: wrap; }
  .auth-card { max-width: none; }
  .dd-menu.right { right: -4px; }
}

/* ================= Qaytim va smena ================= */
.gate { max-width: 560px; margin: 40px auto; text-align: center; }
.gate .btn { margin-top: 6px; }
.cash { border: 1px dashed #cfd4dc; background: #fafbfd; border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.cash[hidden] { display: none; }
.cash input { font-size: 18px; font-weight: 600; text-align: right; }
.cash .quick { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 4px; }
.cash .quick .chip { font-size: 13px; }
.change { font-size: 15px; margin-top: 6px; min-height: 22px; }
.change b { font-size: 22px; }
.change.ok { color: var(--ok); } .change.bad { color: var(--bad); } .change.muted { font-size: 12px; }
.changeline { background: var(--ok-bg); color: var(--ok); border-radius: 12px; padding: 10px; margin: 0 0 10px; font-size: 16px; }
.changeline b { font-size: 28px; }
.pill.warnp { background: #fff1dc; color: #a35a00; }
.banner.warnb { background: var(--warn-bg); color: var(--warn); }
.kpis.fig { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; }
.kpis.fig .kpi-val { font-size: 22px; }
.kpis.fig + .panel { margin-top: 0; }
@media (max-width: 900px) { .kpis.fig { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpis.fig .kpi:last-child { grid-column: auto; } }
@media (max-width: 560px) { .kpis.fig { grid-template-columns: minmax(0, 1fr); } }
