/* Dandana — Figma dizayni asosida */
:root {
  --red: #e11d2e;
  --red-dark: #c01425;
  --red-soft: #fdecee;
  --green: #16a34a;
  --green-soft: #e8f7ee;
  --blue: #2563eb;
  --blue-soft: #e8f0fe;
  --orange: #d97706;
  --orange-soft: #fdf3e2;
  --purple: #7c3aed;
  --purple-soft: #f1ebfe;
  --pink: #db2777;
  --pink-soft: #fde8f2;
  --gray-soft: #f1f2f4;
  --bg: #f5f6f8;
  --card: #ffffff;
  --border: #eceef2;
  --text: #121826;
  --muted: #8a93a3;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
h1 { font-size: 24px; margin: 0; font-weight: 700; }
h2 { font-size: 17px; margin: 0 0 4px; font-weight: 700; }
h3 { font-size: 15px; margin: 0; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.bold { font-weight: 700; }
.right { text-align: right; }
.center { text-align: center; }
.red { color: var(--red); } .green { color: var(--green); } .blue { color: var(--blue); } .orange { color: var(--orange); }
.nowrap { white-space: nowrap; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { padding: 22px 22px 18px; }
.brand-name { color: var(--red); font-weight: 800; font-size: 20px; letter-spacing: .3px; }
.brand-sub { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .6px; }
.nav { padding: 6px 12px; flex: 1; overflow-y: auto; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
  color: #3d4555; font-size: 13.5px; margin-bottom: 2px;
}
.nav a:hover { background: var(--gray-soft); }
.nav a.active { background: var(--red-soft); color: var(--red); font-weight: 600; }
.nav .ico { width: 18px; text-align: center; font-size: 15px; opacity: .85; }
.nav .count { margin-left: auto; background: var(--red); color: #fff; border-radius: 10px; font-size: 10px; padding: 1px 6px; }
.sidebar-foot { padding: 14px 18px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--red-soft); color: var(--red);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex-shrink: 0;
}
.main { flex: 1; min-width: 0; padding: 22px 28px 40px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.topbar .sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
.top-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.date-pill { border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 8px 12px; font-size: 13px; }

/* ---------- Cards / grid ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.g-main-wide { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
.stack > * + * { margin-top: 16px; }
.kpi .label { color: var(--muted); font-size: 12.5px; }
.kpi .value { font-size: 24px; font-weight: 700; margin: 6px 0 4px; white-space: nowrap; }
.kpi .note { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.gap-s { gap: 6px; }
.mt { margin-top: 14px; } .mt-s { margin-top: 8px; } .mb { margin-bottom: 14px; }
.flex1 { flex: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border);
  background: #fff; color: var(--text); border-radius: 8px; padding: 9px 14px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.btn:hover { background: var(--gray-soft); }
.btn-red { background: var(--red); border-color: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-green { background: var(--green); border-color: var(--green); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; padding: 13px; font-size: 14px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link { color: var(--red); font-weight: 600; font-size: 12.5px; background: none; border: 0; cursor: pointer; padding: 0; font-family: inherit; }
.inline { display: inline; }

/* ---------- Forms ---------- */
.input, select.input, textarea.input {
  width: 100%; border: 1px solid var(--border); background: #f7f8fa; border-radius: 8px; padding: 9px 11px;
  font-size: 13px; font-family: inherit; color: var(--text); outline: none;
}
.input:focus { border-color: #f3a3aa; background: #fff; }
label, .lbl { display: block; font-size: 12px; font-weight: 600; color: #3d4555; margin-bottom: 5px; }
.field { margin-bottom: 12px; }
.field .help { font-size: 11px; color: var(--muted); margin-top: 3px; }
.field .err { font-size: 11.5px; color: var(--red); margin-top: 3px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 14px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.search { position: relative; }
.search input { padding-left: 32px; min-width: 220px; background: #fff; }
.search::before { content: "⌕"; position: absolute; left: 11px; top: 7px; color: var(--muted); font-size: 16px; }
.check { width: 16px; height: 16px; accent-color: var(--red); }

/* ---------- Chips / badges ---------- */
.badge { display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.b-green { background: var(--green-soft); color: var(--green); }
.b-red { background: var(--red-soft); color: var(--red); }
.b-blue { background: var(--blue-soft); color: var(--blue); }
.b-orange { background: var(--orange-soft); color: var(--orange); }
.b-gray { background: var(--gray-soft); color: #5b6474; }
.b-purple { background: var(--purple-soft); color: var(--purple); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 7px 14px; font-size: 12.5px;
  font-weight: 600; cursor: pointer; color: #3d4555; font-family: inherit;
}
.chip.active, .chip:hover { background: var(--red-soft); border-color: #f8c6cb; color: var(--red); }
.seg { display: inline-flex; background: var(--gray-soft); border-radius: 8px; padding: 3px; gap: 2px; }
.seg button, .seg a { border: 0; background: transparent; padding: 6px 12px; border-radius: 6px; font-size: 12.5px; font-weight: 600; cursor: pointer; color: #5b6474; font-family: inherit; }
.seg .on { background: #fff; color: var(--red); box-shadow: var(--shadow); }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 600; padding: 10px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: #fafbfc; }
.table tfoot td { font-weight: 700; border-top: 2px solid var(--border); }
.table-wrap { overflow-x: auto; }

/* ---------- Alerts ---------- */
.messages { margin-bottom: 16px; }
.alert { padding: 11px 14px; border-radius: 10px; margin-bottom: 8px; font-size: 13px; border: 1px solid; }
.alert-success { background: var(--green-soft); border-color: #c6ebd3; color: #12733a; }
.alert-error { background: var(--red-soft); border-color: #f8c6cb; color: #a0101e; }
.alert-warning { background: var(--orange-soft); border-color: #f5dfb6; color: #8a4b04; }
.alert-info { background: var(--blue-soft); border-color: #c9dafc; color: #1e40af; }
.note-box { border-radius: 10px; padding: 14px; font-size: 13px; }
.note-green { background: var(--green-soft); border: 1px solid #c6ebd3; }
.note-blue { background: var(--blue-soft); border: 1px solid #c9dafc; }
.note-orange { background: var(--orange-soft); border: 1px solid #f5dfb6; }
.note-red { background: var(--red-soft); border: 1px solid #f8c6cb; }
.big-num { font-size: 26px; font-weight: 800; margin-top: 4px; }

/* ---------- Bar chart ---------- */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 190px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.bar-pair { display: flex; gap: 3px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.bar { width: 100%; max-width: 30px; background: #dfe3ea; border-radius: 6px 6px 3px 3px; min-height: 3px; position: relative; }
.bar.on { background: var(--red); }
.bar.g { background: #23a05a; max-width: 16px; }
.bar.o { background: #c97a1c; max-width: 16px; }
.bar:hover::after { content: attr(data-v); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: #121826; color: #fff; font-size: 11px; padding: 3px 6px; border-radius: 5px; white-space: nowrap; margin-bottom: 4px; z-index: 2; }
.bar-label { font-size: 11px; color: var(--muted); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.progress { height: 7px; background: var(--gray-soft); border-radius: 6px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 6px; }

/* ---------- Product tiles (POS) ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.tile { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px; cursor: pointer; transition: .12s; position: relative; user-select: none; }
.tile:hover { border-color: #f8c6cb; transform: translateY(-1px); }
.tile .pic { height: 78px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 34px; margin-bottom: 10px; }
.tile .name { font-weight: 600; font-size: 13px; }
.tile .price { font-weight: 700; margin-top: 8px; font-size: 13px; }
.tile .plus { position: absolute; right: 10px; bottom: 10px; width: 24px; height: 24px; border-radius: 6px; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.tile .qbadge { position: absolute; top: 8px; right: 8px; background: var(--red); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 7px; font-weight: 700; }
.c-red { background: var(--red-soft); } .c-orange { background: var(--orange-soft); } .c-green { background: var(--green-soft); }
.c-blue { background: var(--blue-soft); } .c-purple { background: var(--purple-soft); } .c-pink { background: var(--pink-soft); }

.cart-line { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.cart-line .pic { width: 38px; height: 38px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.qty { display: flex; align-items: center; gap: 6px; }
.qty button { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--border); background: #fff; cursor: pointer; font-weight: 700; color: var(--text); }
.qty button.plus { background: var(--red-soft); border-color: #f8c6cb; color: var(--red); }
.qty .n { min-width: 18px; text-align: center; font-weight: 600; }
.sum-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; }
.sum-row.total { font-weight: 800; font-size: 17px; padding-top: 10px; border-top: 1px dashed var(--border); margin-top: 6px; }

/* ---------- Kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 14px; overflow-x: auto; }
.kcol { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px; min-height: 420px; border-top: 3px solid; }
.kcol.kc-blue { border-top-color: var(--blue); } .kcol.kc-orange { border-top-color: var(--orange); }
.kcol.kc-green { border-top-color: var(--green); } .kcol.kc-gray { border-top-color: #9aa2b1; }
.kcard { border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-top: 10px; background: #fff; }
.kcard .num { color: var(--red); font-weight: 700; font-size: 12px; }
.kcard ul { list-style: none; padding: 0; margin: 6px 0; font-size: 12px; color: #5b6474; }

/* ---------- Tables (stollar) ---------- */
.tables-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.tcard { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.tnum { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.tcard.bosh .tnum { background: var(--green-soft); color: var(--green); }
.tcard.band .tnum { background: var(--red-soft); color: var(--red); }
.tcard.bron .tnum { background: var(--blue-soft); color: var(--blue); }

/* ---------- Receipt ---------- */
.receipt { width: 300px; margin: 0 auto; background: #fff; padding: 18px; font-family: "Courier New", monospace; font-size: 12.5px; border: 1px dashed #cfd4dc; }
.receipt .line { display: flex; justify-content: space-between; gap: 8px; }
/* Summalar bo'linmasin (58 mm chekda "70 / 000" bo'lib qolardi); uzun nomlar chap ustunda o'raladi */
.receipt .line > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.receipt .line > span:last-child { white-space: nowrap; text-align: right; }
.receipt hr { border: 0; border-top: 1px dashed #999; margin: 8px 0; }
.list-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); gap: 10px; }
.list-item:last-child { border-bottom: 0; }
.order-pick { display: block; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.order-pick.active { border-color: var(--red); background: var(--red-soft); }
.steps { margin: 0; padding-left: 18px; font-size: 12.5px; color: #3d4555; }
.steps li { margin-bottom: 5px; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(18, 24, 38, .45); display: none; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal-bg.open { display: flex; }
.modal { background: #fff; border-radius: 14px; padding: 22px; width: 440px; max-width: 100%; max-height: 92vh; overflow-y: auto; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: 380px; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1000px) {
  .g-main, .g-main-wide, .g3, .g2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .app { flex-direction: column; }
  .sidebar { display: none; }
  .mtop { display: flex; }
  .mtabs { display: flex; }
  .main { padding: 14px 14px calc(96px + env(safe-area-inset-bottom)); }
  .g4, .form-grid { grid-template-columns: 1fr; }
  .brand { padding: 12px 16px 4px; } .brand-name { font-size: 18px; }
  h1 { font-size: 20px; }
  .kanban { display: flex; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .kcol { min-width: 84vw; scroll-snap-align: start; min-height: 300px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile .pic { height: 64px; }
  .mcart { display: flex !important; }
  .search input { min-width: 0; width: 100%; }
  .card[style*="sticky"] { position: static !important; }
}
.mcart { display: none; position: fixed; left: 12px; right: 12px; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 40; background: var(--red);
  color: #fff; border-radius: 14px; padding: 14px 18px; align-items: center; justify-content: space-between;
  font-weight: 700; box-shadow: 0 8px 24px rgba(225, 29, 46, .35); cursor: pointer; }
.mcart.hidden, .mcart.cart-seen { display: none !important; }
@media print {
  .sidebar, .no-print, .topbar .top-actions, .messages { display: none !important; }
  .main { padding: 0; } body { background: #fff; }
  .card { box-shadow: none; }
}

/* ---------- Telefon: yuqori panel, pastki tablar, menyu ---------- */
.mtop { display: none; position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--border);
  padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top)); align-items: center; justify-content: space-between; }
.mtop .brand-name { font-size: 19px; }
.mtop-user { border: 0; background: none; padding: 0; cursor: pointer; }
.mtabs { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; background: #fff;
  border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 16px rgba(16, 24, 40, .06); }
.mtabs a, .mtabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0;
  background: none; font: inherit; font-size: 11px; font-weight: 600; color: #6b7383; padding: 6px 2px;
  border-radius: 10px; cursor: pointer; min-width: 0; }
.mtabs .mi { font-size: 21px; line-height: 1.1; filter: grayscale(1); opacity: .7; }
.mtabs .on { color: var(--red); background: var(--red-soft); }
.mtabs .on .mi { filter: none; opacity: 1; }
.mtabs .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); vertical-align: 2px; }
.sheet-bg { position: fixed; inset: 0; background: rgba(18, 24, 38, .45); z-index: 60; display: none; align-items: flex-end; }
.sheet-bg.open { display: flex; }
.sheet { background: #fff; width: 100%; border-radius: 20px 20px 0 0; padding: 10px 16px calc(18px + env(safe-area-inset-bottom));
  max-height: 88vh; overflow-y: auto; animation: up .18s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-handle { width: 40px; height: 5px; border-radius: 3px; background: #d8dce3; margin: 0 auto 14px; }
.sheet-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sheet-grid a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px;
  border: 1px solid var(--border); border-radius: 14px; font-size: 12.5px; font-weight: 600; text-align: center; }
.sheet-grid a.on { border-color: #f8c6cb; background: var(--red-soft); color: var(--red); }
.sheet-grid .mi { font-size: 26px; }
.sheet-grid .count { position: absolute; top: 6px; right: 8px; background: var(--red); color: #fff; border-radius: 10px; font-size: 10px; padding: 1px 6px; }

.grid > * { min-width: 0; }
.g-kassa { grid-template-columns: 260px minmax(0, 1fr) 320px; align-items: start; }
@media (max-width: 1100px) { .g-kassa { grid-template-columns: 240px minmax(0, 1fr); } .g-kassa > :last-child { grid-column: 1 / -1; } }
@media (max-width: 760px) {
  .mtop, .mtabs { display: flex; }
  .g-kassa { grid-template-columns: 1fr; }
  .kassa-list { display: flex; gap: 8px; overflow-x: auto; padding: 12px; }
  .kassa-list h3 { display: none; }
  .kassa-list .order-pick { min-width: 150px; margin: 0; flex-shrink: 0; }
  .topbar .date-pill:only-of-type:not(:first-child) { display: none; }
  .kpi .value { white-space: normal; word-break: break-word; }
  html, body { overflow-x: hidden; }
  /* Barmoq bilan bosishga qulay o'lchamlar */
  .btn { min-height: 44px; padding: 10px 16px; font-size: 14px; border-radius: 10px; }
  .btn-sm { min-height: 38px; }
  .input, select.input, textarea.input { font-size: 16px; padding: 12px 13px; border-radius: 10px; }
  .chip { padding: 10px 16px; font-size: 14px; }
  .seg button, .seg a { padding: 9px 14px; font-size: 14px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .chips > * { flex-shrink: 0; }
  .qty button { width: 36px; height: 36px; font-size: 18px; border-radius: 9px; }
  .link { font-size: 14px; padding: 6px 0; display: inline-block; }
  .topbar { margin-bottom: 14px; }
  .top-actions { width: 100%; }
  .top-actions > .search, .top-actions > form.search { flex: 1 1 100%; }
  .grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid.g3 { gap: 10px; }
  .kpi .value { font-size: 18px; }
  .kpi .note { font-size: 11px; }
  .card { padding: 14px; border-radius: 14px; }
  .table th, .table td { padding: 10px 8px; }
  .tables-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .modal-bg { align-items: flex-end; padding: 0; }
  .modal { border-radius: 20px 20px 0 0; width: 100%; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .sum-row.total { font-size: 19px; }
  .messages { position: sticky; top: 58px; z-index: 20; }
}

/* ======================================================================
   KATTA KASSIR EKRANI (POS, Kassa, Smena) — barmoq bilan bosishga qulay
   ====================================================================== */
.btn-lg { min-height: 54px; font-size: 16px; padding: 12px 18px; border-radius: 12px; }
.btn-xl { min-height: 64px; font-size: 19px; padding: 14px 20px; border-radius: 14px; font-weight: 800; }
.input-xl { font-size: 26px !important; font-weight: 700; padding: 14px 16px !important; letter-spacing: .5px; }
.btn-green:hover { background: #128a3e; }
.big-ui .btn { min-height: 46px; font-size: 15px; }
.big-ui .btn-sm { min-height: 38px; font-size: 13px; }
.big-ui .input, .big-ui select.input { font-size: 16px; padding: 11px 13px; }
.big-ui label, .big-ui .lbl { font-size: 13px; }
.big-ui .chip { font-size: 16px; padding: 11px 18px; border-radius: 12px; }
.big-ui .seg button, .big-ui .seg a { font-size: 15px; padding: 10px 16px; }
.big-ui .sum-row { font-size: 15px; padding: 6px 0; }
.big-ui .kpi .value { font-size: 26px; }
.big-ui .order-pick { padding: 14px; border-radius: 12px; }
.big-ui .order-pick .bold { font-size: 17px; }

/* Smena */
.shift-alert { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: var(--orange-soft); border: 1px solid #f5dfb6; color: #8a4b04; border-radius: 14px; padding: 12px 16px; margin-bottom: 14px; font-size: 15px; }
.shift-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--border); border-left: 5px solid var(--green); border-radius: 14px; padding: 14px 18px; }
.shift-open-card { max-width: 560px; }
.shift-icon { font-size: 56px; }
.kpi-hl { border: 2px solid var(--green); background: var(--green-soft); }

/* POS maketi */
.pos-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 18px; align-items: start; }
.pos-search { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.pos-search .input { font-size: 18px; padding: 14px 16px; border-radius: 14px; background: #fff; }
.pos-cats { margin-bottom: 14px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
.pos-cats .chip { flex-shrink: 0; font-size: 17px; padding: 13px 22px; font-weight: 700; }
.pos-page .tiles { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.pos-page .tile { display: block; width: 100%; text-align: left; font: inherit; color: inherit; padding: 12px; border-radius: 16px; border: 2px solid var(--border); transition: transform .08s, border-color .15s; }
.pos-page .tile:active { transform: scale(.96); }
.pos-page .tile.in-cart { border-color: var(--red); background: #fffafa; }
.pos-page .tile .pic { height: 92px; font-size: 50px; border-radius: 12px; margin-bottom: 10px; }
.pos-page .tile .name { font-size: 17px; font-weight: 700; line-height: 1.25; min-height: 42px; }
.pos-page .tile .price { font-size: 19px; font-weight: 800; color: var(--red); margin-top: 6px; }
.pos-page .tile .qbadge { top: 8px; right: 8px; font-size: 18px; padding: 4px 12px; border-radius: 14px; box-shadow: 0 2px 8px rgba(225,29,46,.35); }

/* Savat */
.pos-cart { position: sticky; top: 14px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 28px); padding: 14px; }
.seg-big { display: flex; width: 100%; padding: 4px; border-radius: 12px; }
.seg-big button { flex: 1; font-size: 16px !important; font-weight: 700; padding: 12px 6px !important; border-radius: 9px; }
.table-btn { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 14px 16px; border-radius: 12px;
  border: 2px dashed #f3a3aa; background: var(--red-soft); color: var(--red); font: inherit; font-size: 17px; cursor: pointer; }
.table-btn b { font-size: 20px; }
.table-btn.chosen { border-style: solid; border-color: var(--green); background: var(--green-soft); color: var(--green); }
.cart-items { flex: 1; overflow-y: auto; min-height: 140px; margin: 0 -4px; padding: 0 4px; }
.cart-empty { text-align: center; color: var(--muted); font-size: 18px; padding: 30px 0; line-height: 1.6; }
.pos-page .cart-line { padding: 10px 0; gap: 10px; }
.pos-page .cart-line.just { animation: flashIn .6s; }
@keyframes flashIn { from { background: var(--green-soft); } to { background: transparent; } }
.cl-name { font-size: 17px; font-weight: 700; line-height: 1.25; }
.cl-price { font-size: 14px; color: var(--muted); }
.cl-sum { font-size: 17px; font-weight: 800; min-width: 84px; text-align: right; }
.pos-page .qty { gap: 6px; }
.pos-page .qty button, .big-ui .qty button { width: 44px; height: 44px; font-size: 24px; border-radius: 11px; }
.pos-page .qty .n, .big-ui .qty .n { min-width: 28px; font-size: 20px; font-weight: 800; }
.cart-more { border: 1px solid var(--border); border-radius: 12px; padding: 0 12px; }
.cart-more summary { cursor: pointer; padding: 12px 0; font-size: 15px; font-weight: 600; color: #5b6474; list-style: none; }
.cart-more summary::-webkit-details-marker { display: none; }
.cart-more[open] { padding-bottom: 8px; }
.cart-sum { border-top: 2px dashed var(--border); padding-top: 8px; }
.pos-total-row { display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; }
.pos-total-row span:first-child { font-size: 20px; }
.pos-total-row span:last-child { font-size: 32px; color: var(--red); }
.cart-actions { display: flex; gap: 8px; }
.cart-actions .btn { min-height: 60px; font-size: 18px; font-weight: 800; border-radius: 14px; min-width: 0; padding: 10px 8px; }
.cart-actions #clearBtn { width: 60px; flex: 0 0 60px; font-size: 22px; }

/* Stol tanlash */
.modal-wide { width: 640px; }
.tpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px; }
.tpick button { height: 78px; border-radius: 14px; border: 2px solid; font: inherit; font-size: 26px; font-weight: 800; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.tpick button small { font-size: 11px; font-weight: 600; opacity: .8; }
.tpick .tp-bosh { background: var(--green-soft); border-color: #bfe8cf; color: var(--green); }
.tpick .tp-band { background: var(--red-soft); border-color: #f8c6cb; color: var(--red); }
.tpick .tp-bron { background: var(--blue-soft); border-color: #c9dafc; color: var(--blue); }
.tpick button:active { transform: scale(.95); }

/* To'lov oynasi */
.modal-pay { width: 480px; }
.pay-total { text-align: center; background: var(--red-soft); border: 1px solid #f8c6cb; border-radius: 14px; padding: 12px; margin-bottom: 14px; }
.pay-total div:last-child { font-size: 38px; font-weight: 800; color: var(--red); }
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.numpad button { height: 58px; border-radius: 12px; border: 1px solid var(--border); background: #fff; font: inherit; font-size: 24px; font-weight: 700; cursor: pointer; color: var(--text); }
.numpad button:active { background: var(--red-soft); }
.pay-change { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; padding-top: 10px; border-top: 2px dashed var(--border); font-weight: 800; font-size: 20px; }
.pay-change #mChange { font-size: 32px; }
.modal-pay .chip { font-size: 17px; font-weight: 700; padding: 12px 16px; }

@media (max-width: 1100px) { .pos-wrap { grid-template-columns: minmax(0, 1fr) 360px; } .pos-page .tiles { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } }
.pos-wrap > * { min-width: 0; }

/* POS Compact & Kiosk Mode (1024x768 va 1366x768 POS apparatlari uchun) */
body.pos-page.sidebar-collapsed .sidebar,
@media (max-width: 1150px) {
  body.pos-page .sidebar {
    width: 60px;
    transition: width 0.15s ease;
  }
  body.pos-page .sidebar .brand,
  body.pos-page .sidebar .brand-name,
  body.pos-page .sidebar .brand-sub,
  body.pos-page .sidebar .nav a span:not(.ico),
  body.pos-page .sidebar .nav .count,
  body.pos-page .sidebar > div:nth-last-child(2),
  body.pos-page .sidebar-foot > div {
    display: none !important;
  }
  body.pos-page .sidebar .nav a {
    justify-content: center;
    padding: 12px 0;
    font-size: 20px;
  }
  body.pos-page .sidebar .nav .ico {
    margin: 0;
    font-size: 20px;
  }
  body.pos-page .sidebar-foot {
    justify-content: center;
    padding: 10px 0;
  }
  body.pos-page .main {
    padding: 10px 14px;
  }
  body.pos-page .pos-wrap {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 12px;
  }
  body.pos-page .tiles {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
  }
  body.pos-page .tile {
    padding: 10px;
  }
  body.pos-page .tile .pic {
    height: 68px;
    font-size: 36px;
    margin-bottom: 6px;
  }
  body.pos-page .tile .name {
    font-size: 14px;
    min-height: 34px;
  }
  body.pos-page .tile .price {
    font-size: 15px;
  }
}

/* Kiosk / To'liq ekran rejimi */
body.pos-page.kiosk-mode .sidebar,
body.pos-page.kiosk-mode .mtop {
  display: none !important;
}
body.pos-page.kiosk-mode .main {
  padding: 8px 12px !important;
}

/* 768px balandlikdagi monitorlar uchun ixcham vertikal moslashuv */
@media (max-height: 800px) {
  body.pos-page .pos-cart {
    max-height: calc(100vh - 16px);
    padding: 10px;
    gap: 6px;
  }
  body.pos-page .cart-items {
    max-height: 220px;
  }
  body.pos-page .table-btn {
    padding: 8px 12px;
    font-size: 15px;
  }
  body.pos-page .seg-big button {
    padding: 8px 4px !important;
    font-size: 14px !important;
  }
  body.pos-page .pos-total-row {
    font-size: 18px;
    padding-top: 6px;
  }
  body.pos-page .pos-total-row span:last-child {
    font-size: 24px;
  }
  body.pos-page .cart-actions .btn {
    min-height: 44px;
    font-size: 16px;
    padding: 8px 12px;
  }
}

/* Sensor Numpad va tezkor asboblar tugmalari */
.pos-page .qty .n.touch-numpad {
  cursor: pointer;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 2px 8px;
  transition: .15s;
}
.pos-page .qty .n.touch-numpad:hover,
.pos-page .qty .n.touch-numpad:active {
  background: var(--red-soft);
  border-color: var(--red);
  color: var(--red);
}
.modal-qty {
  width: 360px;
}
.qty-display {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  text-align: center;
}
.qty-num-val {
  font-size: 44px;
  font-weight: 800;
  color: var(--red);
  letter-spacing: 1px;
}
.pos-tool-btn {
  font-size: 15px;
  font-weight: 600;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pos-tool-btn:hover {
  background: var(--bg);
  border-color: #cbd5e1;
}

@media (max-width: 860px) {
  .pos-wrap { grid-template-columns: minmax(0, 1fr); }
  .pos-cart { position: static; max-height: none; }
  .cart-items { max-height: none; }
}
@media (max-width: 760px) {
  .pos-page .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pos-page .tile .pic { height: 70px; font-size: 40px; }
  .pos-page .tile .name { font-size: 15px; min-height: 38px; }
  .pos-page .tile .price { font-size: 17px; }
  .pos-total-row span:last-child { font-size: 28px; }
  .numpad button { height: 52px; }
  .pay-total div:last-child { font-size: 32px; }
  .seg-big button { font-size: 14px !important; padding: 11px 4px !important; }
  .cart-actions .btn { font-size: 16px; }
  .shift-alert .btn { width: 100%; }
}

button.link { padding: 0 4px; }
