/* ڕەنگی سیستەم (js/theme.js): the settings screen, its live preview and the logo in the menu */

/* the shop's logo at the top of the menu */
.side .brand{cursor:pointer;border-radius:16px;transition:background .15s}
.side .brand:hover{background:#ffffff0a}
.brand .logo.img{background:#fff;padding:5px;box-shadow:0 8px 20px -8px color-mix(in srgb,var(--btn1) 70%,transparent)}
.brand .logo.img{display:flex;align-items:center;justify-content:center;overflow:hidden}
.brand .logo.img img{display:block;width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain}
/* a wide logo: the whole width of the menu, the shop name under it */
.side .brand.wide{flex-direction:column;align-items:stretch;gap:8px;text-align:center;padding:4px 8px 18px}
.side .brand.wide .logo{width:100%;height:62px;flex:none;border-radius:16px;padding:7px 14px}
.side .brand.wide>div{font-size:14px}

.thm-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:18px;align-items:start}
.thm-sec{padding:18px 20px;margin-bottom:16px}
.thm-sec h3{margin:0 0 14px;font-family:var(--display);font-size:16px}
.thm-prev{position:sticky;top:86px}

/* presets */
.thm-presets{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:10px}
.thm-pre{display:flex;flex-direction:column;gap:8px;padding:8px 8px 10px;border-radius:16px;border:2px solid var(--line);background:var(--surface);color:var(--text);
  font:inherit;cursor:pointer;transition:border-color .15s,transform .15s,box-shadow .2s}
.thm-pre:hover{transform:translateY(-2px);box-shadow:var(--sh2)}
.thm-pre.on{border-color:var(--brand);box-shadow:0 0 0 4px color-mix(in srgb,var(--brand) 18%,transparent)}
.thm-pre b{font-size:13px;font-weight:700;text-align:center}
.tp-sw{position:relative;display:block;height:54px;border-radius:11px;overflow:hidden;background:linear-gradient(120deg,var(--a),var(--b))}
.tp-sw i{position:absolute;inset-block:0;inset-inline-start:0;width:30%;background:var(--s)}
.tp-sw i::after{content:"";position:absolute;inset-inline:6px;top:12px;height:6px;border-radius:4px;background:color-mix(in srgb,var(--a) 70%,#fff);box-shadow:0 12px 0 #ffffff30,0 22px 0 #ffffff22}

/* custom colours */
.thm-pick{display:flex;flex-wrap:wrap;gap:10px;align-items:stretch}
.thm-col{display:flex;align-items:center;gap:10px;padding:8px 14px 8px 8px;border:1px solid var(--line2);border-radius:14px;background:var(--surface2);cursor:pointer;min-width:170px}
.thm-col input{width:44px;height:44px;border:0;border-radius:12px;padding:0;background:none;cursor:pointer}
.thm-col input::-webkit-color-swatch-wrapper{padding:0}.thm-col input::-webkit-color-swatch{border:0;border-radius:12px}
.thm-col b{display:block;font-size:13.5px}.thm-col small{display:block;color:var(--muted);font-family:"Inter",system-ui,sans-serif;direction:ltr;text-align:start}
.thm-fromlogo{align-self:center;display:inline-flex;align-items:center;gap:8px}
.thm-fromlogo svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}

/* the preview: a little POS in light and in dark */
.thm-mocks{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.thm-mock{--bg:#f3f5fb;--surface:#fff;--line:#e6e9f2;--text:#131a2c;--tx2:#c3c9d6;
  display:flex;height:190px;border-radius:14px;overflow:hidden;background:var(--bg);border:1px solid var(--line);box-shadow:var(--sh2)}
.thm-mock.dk{--bg:#0a0f1e;--surface:#111831;--line:#222d4d;--text:#e7ebf5;--tx2:#3a4566}
.tm-side{width:30%;padding:10px 7px;display:flex;flex-direction:column;gap:7px;background:linear-gradient(180deg,var(--side),var(--side2))}
.tm-logo{width:22px;height:22px;border-radius:7px;margin-bottom:6px;background:linear-gradient(135deg,var(--btn1),var(--btn2))}
.tm-side i{display:block;height:9px;border-radius:5px;background:#ffffff1c}
.tm-side i.on{background:color-mix(in srgb,var(--btn1) 55%,transparent);box-shadow:inset 3px 0 0 color-mix(in srgb,var(--btn1) 50%,#fff)}
.tm-main{flex:1;min-width:0;padding:10px;display:flex;flex-direction:column;gap:9px}
.tm-top{display:flex;align-items:center;justify-content:space-between;gap:6px}
.tm-top b{display:block;width:44%;height:9px;border-radius:5px;background:var(--text);opacity:.8}
.tm-top span{width:18px;height:18px;border-radius:6px;background:var(--brand-soft);border:1px solid var(--line)}
.tm-cards{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.tm-card{background:var(--surface);border:1px solid var(--line);border-radius:9px;padding:7px;display:flex;flex-direction:column;gap:6px}
.tm-card em{display:block;width:18px;height:18px;border-radius:6px;background:var(--brand-soft)}
.tm-card em::after{content:"";display:block;width:8px;height:8px;margin:5px;border-radius:3px;background:var(--brand)}
.tm-card strong{display:block;height:8px;width:70%;border-radius:4px;background:var(--tx2)}
.tm-row{margin-top:auto;display:flex;gap:6px;align-items:center}
.tm-chip{height:16px;flex:1;border-radius:8px;background:var(--brand-soft);border:1px solid color-mix(in srgb,var(--brand) 25%,transparent)}
.tm-btn{flex:1.4;height:26px;border-radius:9px;display:grid;place-items:center;color:#fff;font-size:11px;font-weight:700;
  background:linear-gradient(120deg,var(--btn1),var(--btn2));box-shadow:0 6px 14px -6px color-mix(in srgb,var(--btn1) 80%,transparent)}

@media (max-width:1000px){.thm-grid{grid-template-columns:minmax(0,1fr)}.thm-prev{position:static}}
@media (max-width:520px){.thm-mocks{grid-template-columns:1fr}.thm-col{min-width:0;flex:1}}

/* ---------- سەرەکی (js/home.js): pinned row + every screen as a list ---------- */
.hm-sec{margin-top:18px}
.hm-h{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.hm-h h3{margin:0;font-family:var(--display);font-size:16px;display:flex;align-items:center;gap:8px}
.hm-hi{font-size:15px}
.hm-q{max-width:300px;height:40px}
.hm-pins{display:flex;gap:12px;overflow-x:auto;padding:4px 2px 10px;scroll-snap-type:x proximity}
.hm-pin{position:relative;flex:0 0 auto;min-width:132px;display:flex;flex-direction:column;align-items:center;gap:10px;padding:16px 14px 14px;border-radius:20px;
  background:var(--surface);border:1px solid var(--line);box-shadow:var(--sh1);cursor:pointer;scroll-snap-align:start;transition:transform .15s,box-shadow .2s,border-color .15s}
.hm-pin:hover{transform:translateY(-3px);border-color:color-mix(in srgb,var(--brand) 45%,transparent);box-shadow:0 14px 30px -12px color-mix(in srgb,var(--brand) 35%,transparent)}
.hm-pin b{font-size:13.5px;text-align:center;white-space:nowrap}
.hm-pi{width:52px;height:52px;border-radius:16px;display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,var(--btn1),var(--btn2));
  box-shadow:0 10px 20px -10px color-mix(in srgb,var(--btn1) 80%,transparent)}
.hm-pi svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.hm-pa{position:absolute;top:6px;inset-inline:6px;display:flex;justify-content:space-between;opacity:0;transition:opacity .15s}
.hm-pin:hover .hm-pa,.hm-pin:focus-within .hm-pa{opacity:1}
.hm-pa button{width:22px;height:22px;border-radius:7px;border:1px solid var(--line);background:var(--surface2);color:var(--muted);font:inherit;font-size:13px;line-height:1;cursor:pointer;padding:0}
.hm-pa button:hover{color:var(--text);border-color:var(--line2)}
.hm-pa button[disabled]{visibility:hidden}
.hm-pa button[data-pin]:hover{color:var(--red)}
.hm-empty{display:flex;align-items:center;gap:10px;padding:16px 18px;border:1.5px dashed var(--line2);border-radius:16px;color:var(--muted);width:100%}
.hm-empty svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.hm-list{columns:3 260px;column-gap:14px}
.hm-group{break-inside:avoid;margin-bottom:14px;background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:8px;box-shadow:var(--sh1)}
.hm-gh{display:flex;align-items:center;gap:8px;padding:6px 10px 8px;color:var(--muted);font-size:12.5px;font-weight:700}
.hm-gh svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.hm-row{display:flex;align-items:center;gap:10px;padding:7px 8px;border-radius:12px;cursor:pointer;transition:background .12s}
.hm-row:hover,.hm-row:focus-visible{background:var(--brand-soft);outline:0}
.hm-ri{width:32px;height:32px;flex:none;border-radius:10px;display:grid;place-items:center;background:var(--brand-soft);color:var(--brand)}
.hm-row:hover .hm-ri{background:var(--surface)}
.hm-ri svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.hm-rn{flex:1;min-width:0;font-weight:600;font-size:14px}
.hm-pb{width:30px;height:30px;flex:none;border-radius:9px;border:0;background:none;color:var(--faint);cursor:pointer;display:grid;place-items:center;opacity:.55;transition:opacity .12s,color .12s,background .12s}
.hm-pb svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.hm-row:hover .hm-pb{opacity:1}
.hm-pb:hover{background:var(--surface);color:var(--brand)}
.hm-pb.on{opacity:1;color:var(--brand)}.hm-pb.on svg{fill:currentColor}
@media (max-width:600px){.hm-q{max-width:none;flex:1 1 100%}.hm-pin{min-width:108px;padding:12px 10px}.hm-pi{width:44px;height:44px}.hm-pa{opacity:1}}

/* ---------- باکئەپ و گەڕاندنەوە (js/backups.js) ---------- */
.bk-top{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:14px;margin-bottom:16px}
.bk-hero{display:flex;align-items:center;gap:16px;padding:18px 20px;flex-wrap:wrap}
.bk-hero>div:nth-child(2){flex:1;min-width:220px}
.bk-hero b{font-family:var(--display);font-size:16px}
.bk-hi{width:54px;height:54px;flex:none;border-radius:17px;display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,var(--btn1),var(--btn2));box-shadow:0 12px 24px -12px color-mix(in srgb,var(--btn1) 80%,transparent)}
.bk-hi svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.bk-acts{display:flex;gap:8px;flex-wrap:wrap}
.bk-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.bk-stat{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:12px 14px;display:flex;flex-direction:column;justify-content:center;gap:4px;box-shadow:var(--sh1)}
.bk-stat span{font-size:12px;color:var(--muted)}.bk-stat b{font-size:16px}
.bk-grid{display:grid;grid-template-columns:minmax(260px,340px) minmax(0,1fr);gap:16px;align-items:start}
.bk-days,.bk-times{padding:14px}
.bk-days{max-height:72vh;overflow:auto;position:sticky;top:86px}
.bk-h{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:2px 4px 12px}
.bk-h h3{margin:0;font-family:var(--display);font-size:16px}
.bk-month{font-size:12px;font-weight:700;color:var(--muted);padding:10px 6px 6px;direction:ltr;text-align:end}
.bk-day{display:flex;align-items:center;gap:12px;width:100%;padding:9px 10px;margin-bottom:6px;border-radius:14px;border:1px solid var(--line);background:var(--surface);color:var(--text);font:inherit;cursor:pointer;text-align:start;transition:border-color .15s,background .15s,transform .12s}
.bk-day:hover{border-color:color-mix(in srgb,var(--brand) 45%,var(--line));transform:translateX(-2px)}
.bk-day.on{border-color:var(--brand);background:var(--brand-soft)}
.bk-dnum{width:42px;height:42px;flex:none;border-radius:13px;display:grid;place-items:center;font-weight:800;font-size:17px;background:var(--surface3);color:var(--text);font-family:"Inter",system-ui,sans-serif}
.bk-day.on .bk-dnum{background:linear-gradient(135deg,var(--btn1),var(--btn2));color:#fff}
.bk-dtx{flex:1;min-width:0;display:flex;flex-direction:column}.bk-dtx small{color:var(--muted);font-size:11.5px;direction:ltr;text-align:start}
.bk-dn{display:flex;flex-direction:column;align-items:center;line-height:1.2}.bk-dn small{font-size:10.5px;color:var(--muted)}
.bk-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:14px;align-items:center;padding:12px;border:1px solid var(--line);border-radius:16px;margin-bottom:8px;background:var(--surface);transition:border-color .15s,box-shadow .2s}
.bk-row:hover{border-color:color-mix(in srgb,var(--brand) 35%,var(--line));box-shadow:var(--sh2)}
.bk-clock{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:86px}
.bk-clock b{font-size:20px;font-family:"Inter",system-ui,sans-serif;letter-spacing:-.01em}
.bk-kind{font-size:11px;font-weight:700;padding:2px 9px;border-radius:999px;background:var(--surface3);color:var(--muted);white-space:nowrap}
.bk-kind.auto{background:var(--brand-soft);color:var(--brand)}
.bk-kind.manual{background:var(--green-soft);color:var(--green)}
.bk-kind.safe{background:var(--amber-soft);color:var(--amber)}
.bk-kind.upload{background:#e0f2fe;color:#0369a1}
.bk-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:5px}
.bk-chips span{display:inline-flex;align-items:center;gap:5px;font-size:12.5px;padding:3px 9px;border-radius:9px;background:var(--surface2);border:1px solid var(--line)}
.bk-chips svg{width:14px;height:14px;fill:none;stroke:var(--brand);stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.bk-btns{display:flex;gap:6px}
.bk-empty{padding:22px 12px;text-align:center;color:var(--muted)}
/* restore window */
.bk-when{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:16px;background:var(--brand-soft);margin-bottom:14px}
.bk-when .bk-dnum{background:linear-gradient(135deg,var(--btn1),var(--btn2));color:#fff}
.bk-mode{margin-bottom:12px}
.bk-tbl td,.bk-tbl th{vertical-align:middle}
.bk-tbl tr[data-part]{cursor:pointer}.bk-tbl tr[data-part]:hover td{background:var(--surface2)}
.bk-tbl tr.on td{background:var(--brand-soft)}
.bk-ck{width:34px}.bk-ck input{width:18px;height:18px;pointer-events:none}
.bk-pi{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:9px;background:var(--brand-soft);color:var(--brand);margin-inline-end:8px;vertical-align:middle}
.bk-pi svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.bk-warn{margin-top:12px;padding:12px 14px;border-radius:14px;background:var(--amber-soft);color:var(--text);border:1px solid color-mix(in srgb,var(--amber) 35%,transparent);font-size:13.5px;line-height:1.7}
@media (max-width:900px){.bk-top,.bk-grid{grid-template-columns:minmax(0,1fr)}.bk-days{position:static;max-height:none}.bk-row{grid-template-columns:auto minmax(0,1fr)}.bk-btns{grid-column:1/-1}}
