/* Old POS v11.4.0 — native-app feel (phone) + desktop-app feel (computer) + Telegram invite. Loaded after style.css. */

/* ===== Shared: app-like behaviour ===== */
html{-webkit-tap-highlight-color:transparent;text-size-adjust:100%;-webkit-text-size-adjust:100%}
.btn,.nav-link,.qa,.stat,.sync-chip,.bottom-nav button,.topbar,.sidebar,.desk-bar,.guide-step,.tab,.chip,.acct{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
input,textarea,select,[contenteditable]{-webkit-user-select:text;user-select:text}
button,a,.btn{touch-action:manipulation}
.btn:active,.qa:active,.guide-step:active,.nav-link:active{transform:scale(.97)}
.btn,.qa,.nav-link,.guide-step{transition:transform .12s ease,background .15s,box-shadow .2s,color .15s}
:focus-visible{outline:2px solid var(--primary);outline-offset:2px;border-radius:8px}

/* ===== Telegram invite (menu + sign-in page only) ===== */
.tg-card{display:flex;align-items:center;gap:11px;text-decoration:none;color:var(--text);border-radius:16px;padding:10px 12px;margin:0 0 10px;
  background:linear-gradient(135deg,rgba(42,171,238,.13),rgba(42,171,238,.05));border:1px solid rgba(42,171,238,.32);transition:transform .15s ease,box-shadow .2s,border-color .2s}
.tg-card:hover{transform:translateY(-1px);border-color:rgba(42,171,238,.6);box-shadow:0 10px 22px -14px rgba(42,171,238,.9)}.tg-card:active{transform:scale(.98)}
.tg-ico{flex:0 0 38px;width:38px;height:38px;display:block;filter:drop-shadow(0 4px 8px rgba(42,171,238,.45))}.tg-ico svg{width:100%;height:100%;display:block}
.tg-txt{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.28}.tg-txt b{font-size:13.5px;font-weight:800;letter-spacing:-.01em}
.tg-txt small{font-size:11.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tg-go{flex:0 0 auto;background:#2AABEE;color:#fff;font-weight:800;font-size:12.5px;border-radius:99px;padding:7px 15px;box-shadow:0 6px 14px -8px rgba(42,171,238,1)}

/* ===== Sign-in page: professional layout (phone + laptop) ===== */
.gate-msg,.gate-msg:empty{min-height:0}.gate-msg:empty{margin:0}.gate-msg:not(:empty){margin:12px 0 0}
.welcome .gate-about{margin:22px auto auto;padding:0 4px 28px;text-align:center}
.gate-about>h2{font-size:clamp(16px,2.4vw,19px);margin:0 0 8px;letter-spacing:-.01em}
.gate-about>p{font-size:13px;line-height:1.65;margin:0 auto 16px;max-width:640px}
.gate-about h3.who,.gate-about h3.who+p{display:none}
.about-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px;text-align:left}
.about-grid article{padding:13px 14px;border-radius:16px;box-shadow:none}.about-grid h3{font-size:13.5px;margin:0 0 4px}.about-grid p{font-size:12.2px;line-height:1.55}
.gate-about nav{margin-top:6px;font-size:12.5px}
@media(max-width:780px){
  .welcome{background:var(--card)}
  .welcome .gate{min-height:0!important;flex:none;margin:0}
  .gate-brand{padding:calc(30px + env(safe-area-inset-top)) 22px 46px}
  .gate-brand h1{font-size:27px}.gate-tag{font-size:14px}
  .gate-chips{display:flex}
  .gate-card{flex:none;margin-top:-26px;padding:26px 20px 18px;box-shadow:0 -14px 30px -18px rgba(2,6,23,.35)}
  .welcome .gate-about{margin:0;padding:6px 16px calc(26px + env(safe-area-inset-bottom))}
  .about-grid{grid-template-columns:1fr 1fr;gap:8px}.about-grid article{padding:11px 12px}.about-grid p{display:none}
}
@media(min-width:781px){
  .welcome{padding:28px}.gate{max-width:940px;border-radius:30px}
  .gate-brand,.gate-card{padding:46px 40px}.gate-card{justify-content:center}
}
@media(max-width:860px) and (min-width:781px){.about-grid{grid-template-columns:1fr 1fr}}

/* ===== Phone / tablet: installed-app feel ===== */
.desk-bar{display:none}
@media(max-width:1023px){
  html,body{overscroll-behavior-y:none}
  body{-webkit-font-smoothing:antialiased}
  .topbar{border-bottom-color:transparent;box-shadow:0 1px 0 var(--border)}
  .main{padding-bottom:calc(var(--bn-h,64px) + 28px + env(safe-area-inset-bottom))}
  .card,.stat{border-radius:18px}
  input,select,textarea{font-size:16px}               /* stops iOS from zooming into fields */
  .btn{min-height:44px}.btn-sm{min-height:38px}
  .view{animation:appIn .28s cubic-bezier(.2,.8,.2,1) backwards}
  html.is-app .main{padding-top:6px}
}
@keyframes appIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

/* ===== Desktop: native-window / desktop-app feel ===== */
@media(min-width:1024px){
  :root{--bar-h:56px}
  body{background:color-mix(in srgb,var(--bg,#e8eef6) 88%,var(--primary) 12%)}
  .main{padding-top:0}
  .sidebar{
    background:linear-gradient(180deg,var(--card) 0%,color-mix(in srgb,var(--card) 94%,var(--primary) 6%) 100%);
    border-right:1px solid var(--border);
    box-shadow:4px 0 24px -16px rgba(15,23,42,.18)
  }
  .desk-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;position:sticky;top:0;z-index:35;height:var(--bar-h);margin:0 -28px 12px;padding:0 28px;
    background:color-mix(in srgb,var(--card) 92%,transparent);-webkit-backdrop-filter:saturate(1.5) blur(16px);backdrop-filter:saturate(1.5) blur(16px);border-bottom:1px solid var(--border);
    box-shadow:0 1px 0 rgba(255,255,255,.5)}
  .db-title{display:flex;align-items:baseline;gap:12px;min-width:0}.db-title b{font-size:16px;font-weight:800;letter-spacing:-.02em}
  .db-title span{font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .search-wrap{top:var(--bar-h)}
  .cart-desk{top:calc(var(--bar-h) + 14px)!important;max-height:calc(100vh - var(--bar-h) - 28px)!important}
  .nav-link{border-radius:11px;cursor:default}.nav-link.active{box-shadow:0 8px 20px -12px rgba(37,99,235,.9)}
  .card{box-shadow:0 1px 2px rgba(15,23,42,.04),0 6px 20px -12px rgba(15,23,42,.14)}
  .btn,.nav-link,.stat{cursor:default}.btn:active{transform:scale(.985)}
  .view{animation:deskIn .22s ease backwards}
  *{scrollbar-width:thin}
  ::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-thumb{background:var(--border);border-radius:10px;border:2px solid transparent;background-clip:content-box}::-webkit-scrollbar-thumb:hover{background:var(--muted);background-clip:content-box}
}
@keyframes deskIn{from{opacity:0}to{opacity:1}}
@media print{.desk-bar,.tg-card{display:none!important}}
@media(prefers-reduced-motion:reduce){.view{animation:none!important}}

/* sign-in feature icons: fixed square badges (older rule collapsed them to thin pills) */

/* ===== Dashboard (v11.5) ===== */
.hm{background:rgba(255,255,255,.13);border:1px solid rgba(255,255,255,.18);border-radius:16px;padding:10px 12px;min-width:0;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
.hm .k{display:block;font-size:11.5px;font-weight:600;opacity:.8;margin-bottom:3px}
.hm .v{font-size:16px;font-weight:800;letter-spacing:-.02em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;display:block}
.hm.stat-locked{cursor:pointer}.hm.stat-locked .lock-mask{background:rgba(255,255,255,.2);color:#fff;padding:3px 9px;font-size:12px}
.bar.today i{background:var(--grad);opacity:1}.bar:not(.today) i{opacity:.55}
body[data-view="dashboard"] #db-sell,body[data-view="pos"] #db-sell{display:none}
.bottom-nav .bn-scan.active::after{display:none}.bottom-nav .bn-scan.active{box-shadow:0 10px 22px -6px rgba(30,64,175,.7),0 0 0 5px var(--card),0 0 0 8px rgba(37,99,235,.25)}
@media(min-width:1024px){
  .dh-sell{display:inline-flex}.dash-hero{padding:26px 30px 22px;border-radius:28px}
  .dh-top h2{font-size:26px}.dh-main{margin:22px 0 18px}.dh-metrics{max-width:560px;gap:12px}.hm{padding:12px 16px}.hm .v{font-size:19px}
  .qa-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
  .desk-bar #db-sell{margin-left:auto}
}
.gs-dot{display:inline-block;width:18px;height:18px;border-radius:50%;border:2px solid var(--border);flex:0 0 18px;margin:0 2px}
@media(max-width:699px){.qa-row{grid-template-columns:repeat(2,minmax(0,1fr))}.qa{min-height:64px;flex-direction:row;gap:10px;justify-content:flex-start;padding:10px 14px}}
@media(min-width:1024px){.dh-metrics{max-width:none}}
.side-foot .tg-go,.drawer .tg-go{display:none}
.foot-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.foot-actions .btn{width:100%}

/* ===== v12.0.0: slim dashboard hero card ===== */
.hm{padding:7px 10px;border-radius:12px}
.hm .k{font-size:10px;font-weight:500;margin-bottom:1px}
.hm .v{font-size:13px;font-weight:650;letter-spacing:-.01em}
.hm.stat-locked .lock-mask{padding:2px 7px;font-size:11px}
@media(min-width:1024px){
  .dash-hero{padding:18px 24px 16px;border-radius:22px}
  .dh-top h2{font-size:20px}.dh-greet{font-size:11px}
  .dh-main{margin:14px 0 12px}.dh-v{font-size:36px}.dh-k{font-size:12px}.dh-chip{font-size:11.5px}
  .dh-metrics{gap:10px}.hm{padding:9px 14px}.hm .k{font-size:11px}.hm .v{font-size:15px}
}
@media(max-width:340px){.dh-main{flex-direction:column;align-items:flex-start;gap:6px}.dh-chip{margin:0}}

/* ===== v11.6: simple, slim, professional layer (whole app) ===== */
body{font-size:13px;line-height:1.45}
.xs{font-size:11px}.sm{font-size:12.5px}.xl{font-size:18px}.xxl{font-size:24px}
.page-head h2{font-size:18px;font-weight:700;letter-spacing:-.015em}.page-head p{font-size:12px}
.sec-title{font-size:13.5px;font-weight:650;margin-bottom:10px}.sec-title i{font-size:13px}
.stat .k{font-size:11px;font-weight:500;margin-bottom:4px}
.stat .v{font-size:17px;font-weight:650}
.row .t{font-size:13px;font-weight:550}.row .s{font-size:11px}
.kv,.sumrow{font-size:12.5px}.sumrow.big{font-size:16px;font-weight:700}
.empty{font-size:12.5px;padding:28px 14px}.empty>i{font-size:24px}
table.tbl{font-size:12.5px}.tbl th{font-size:10.5px;font-weight:600;padding:8px 10px}.tbl td{padding:8px 10px}
.badge{font-size:10.5px;font-weight:550;padding:2px 7px}
.chip{font-size:11.5px;font-weight:550;padding:5px 12px}
.btn{font-size:13px;font-weight:600;min-height:38px;padding:8px 14px;border-radius:11px}
.btn-sm{min-height:30px;padding:5px 10px;font-size:11.5px;border-radius:9px}
.btn-lg{padding:11px 16px;font-size:14px;border-radius:13px}
.icon-btn i{font-size:15px}
.input{padding:8px 11px;border-radius:11px;font-size:16px}
@media(min-width:1024px){.input{font-size:13.5px}}
.label{font-size:11.5px;font-weight:550;margin-bottom:4px}
.nav-link{font-size:13px;padding:9px 12px;border-radius:11px;gap:10px}.nav-link i{font-size:15px}
.pname{font-size:12px;font-weight:550}.pprice{font-size:12.5px;font-weight:650}.pmeta{font-size:10.5px}
.qty button{width:27px;height:27px}.qty span{font-size:13px}
.cb-mid b{font-size:13.5px}.cb-mid small{font-size:10.5px}.cb-total{font-size:15px;font-weight:700}
.pay-opt{font-size:11.5px;padding:8px 4px}.pay-opt i{font-size:15px}
.modal-head h3{font-size:15px;font-weight:700}.modal-body{padding:14px}
.ui-confirm h3{font-size:16px;font-weight:700}.ui-confirm p{font-size:13px}
.lock h2{font-size:19px}.lock p{font-size:13px}
.card.pad{padding:14px}
h1,h2,h3{font-weight:700}
@media(max-width:480px){.page-head h2{font-size:17px}.stat .v{font-size:16px}.card.pad{padding:12px}}

/* ===== v11.7: dashboard hero (slim, 4 KPI tiles), header Backup + Telegram, slim menu link ===== */
.hm{appearance:none;-webkit-appearance:none;position:relative;display:block;width:100%;font:inherit;color:#fff;text-align:left;cursor:pointer;padding:8px 9px 8px;border-radius:12px;transition:transform .12s,background .15s}
.hm:hover{background:rgba(255,255,255,.2)}.hm:active{transform:scale(.97)}
.hm .k{display:flex;align-items:center;gap:4px;font-size:10px;font-weight:500;margin:0 0 2px;opacity:.85;white-space:nowrap}
.hm .k i{font-size:9px;opacity:.9;flex:0 0 auto}.hm .k span{overflow:hidden;text-overflow:ellipsis;min-width:0}
.hm .k em{display:none;font-style:normal}
.hm .v{font-size:13.5px;font-weight:700;letter-spacing:-.01em;line-height:1.25}
.hm-d{position:absolute;top:7px;right:8px;font-size:9px;font-weight:700;line-height:1;padding:2px 5px;border-radius:99px;background:rgba(255,255,255,.16)}
.hm-d.up{background:rgba(34,197,94,.28);color:#dcfce7}.hm-d.dn{background:rgba(248,113,113,.3);color:#fee2e2}
.hm.stat-locked .lock-mask em{display:none}
@media(max-width:359px){.dh-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.hm .k{font-size:10.5px}.hm .v{font-size:14.5px}}
@media(min-width:600px){
  .dash-hero{padding:15px 18px 15px}.dh-top h2{font-size:18px}.dh-greet{font-size:11.5px}
  .dh-metrics{gap:10px;margin-top:13px;max-width:none}.hm{padding:10px 13px}
  .hm .k{font-size:11.5px}.hm .k i{font-size:11px}.hm .k em{display:inline}.hm .v{font-size:17px}.hm-d{top:10px;right:11px;font-size:10px}
}
@media(min-width:1024px){.dash-hero{padding:16px 22px}.dh-top h2{font-size:19px}.hm .v{font-size:19px}}

/* header: Backup button + Telegram icon */
.sync-chip .lbl{display:inline!important}
.sync-chip{padding:6px 11px;font-size:11.5px;font-weight:600;gap:6px}
.topbar-actions{gap:8px}
.tg-btn{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;flex:0 0 32px;border-radius:50%;transition:transform .15s,box-shadow .2s;box-shadow:0 4px 10px -5px rgba(42,171,238,.9)}
.tg-btn svg{width:100%;height:100%;display:block}.tg-btn:hover{transform:translateY(-1px)}.tg-btn:active{transform:scale(.94)}
.db-actions{display:flex;align-items:center;gap:10px;margin-left:auto}.db-tg{display:inline-flex}
.desk-bar #db-sell{margin-left:0}

/* menu: slim Telegram row */
.tg-link{display:flex;align-items:center;gap:9px;text-decoration:none;color:var(--muted);border:1px solid var(--border);border-radius:11px;padding:6px 10px;margin:0 0 8px;font-size:12px;font-weight:600;transition:background .15s,border-color .15s,color .15s}
.tg-link:hover{background:rgba(42,171,238,.08);border-color:rgba(42,171,238,.45);color:var(--text)}.tg-link:active{transform:scale(.98)}
.tg-link .tg-ico{flex:0 0 20px;width:20px;height:20px;display:block;filter:none}.tg-link .tg-ico svg{width:100%;height:100%;display:block}
.tg-link .tg-t{flex:1;min-width:0;display:flex;align-items:baseline;gap:6px;white-space:nowrap;color:var(--text)}.tg-link small{font-size:11px;font-weight:500;color:var(--muted)}
@media print{.tg-btn,.tg-link{display:none!important}}

/* quick actions: slim 4-across tiles on phones too; Get-started + stat cards tighter */
@media(max-width:699px){
  .qa-row{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-bottom:12px}
  .qa{flex-direction:column;justify-content:center;gap:4px;min-height:58px;padding:8px 2px;border-radius:13px;font-size:10.5px;font-weight:600}
  .qa i{font-size:16px}.qa span{font-size:10.5px}
  .guide-step{padding:9px 2px;font-size:12.5px}
  .dash-sec{margin:14px 0 8px}
}
@media(max-width:340px){.qa span{font-size:9.5px}}

/* ===== v11.8: mobile polish — fixes + simpler tap targets ===== */
.input.has-ico{padding-left:36px}
.search-ico{left:12px;font-size:13px}
.pos-search .input{padding-left:42px;padding-right:44px}
.disc-box .disc-input{padding-left:36px;padding-right:112px}
textarea.input{padding:9px 11px;line-height:1.45}
select.input{padding-right:30px}
/* filter chips: one tidy swipeable row instead of wrapping into 2–3 lines */
.chips{display:flex;flex-wrap:nowrap;gap:6px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding-bottom:2px;margin-left:-2px;margin-right:-2px;padding-left:2px;padding-right:2px}
.chips::-webkit-scrollbar{display:none}.chips>*{flex:0 0 auto}
.chip{min-height:32px;display:inline-flex;align-items:center}
#pf-bcfmt{min-width:128px!important;padding-right:30px}
@media(max-width:480px){#pf-bcfmt+.muted{flex-basis:100%}.flex:has(>#pf-bcfmt){flex-wrap:wrap}}

/* SEO: About heading is the page h1 but keeps the sign-in page look */
.gate-about>h1,#seo-content>h1{font-size:clamp(16px,2.4vw,19px);font-weight:700;margin:0 0 8px;letter-spacing:-.01em;line-height:1.3}
