/* Kartick Wholesale — shared app styles (shop + admin) */
:root {
  --p: #6D28D9; --pd: #4e1d9c; --pl: #f4effd; --pm: #d3c0f4;
  --bg: #f3f3f7; --card: #fff; --tx: #17171f; --mu: #6b6b7b; --li: #e8e8ef; --li2: #f1f1f5;
  --ok: #15803d; --okl: #e8f6ee; --wa: #b45309; --wal: #fdf3e3; --er: #dc2626; --erl: #fdecec;
  --r: 14px; --rs: 10px; --hdr: 54px; --nav: 62px;
  --sh: 0 1px 2px rgba(20, 20, 40, .06), 0 4px 14px rgba(20, 20, 40, .05);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--tx);
  font: 13px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overscroll-behavior-y: none;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i.s { width: 16px; height: 16px; }
.i.xs { width: 13px; height: 13px; }
.i.l { width: 26px; height: 26px; }
.mu { color: var(--mu); }
.sm { font-size: 11.5px; }
.xs { font-size: 10.5px; }
.b { font-weight: 700; }
.ok { color: var(--ok); } .er { color: var(--er); } .wa { color: var(--wa); }
.hide { display: none !important; }
.flex { display: flex; align-items: center; gap: 8px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt { margin-top: 10px; } .mt2 { margin-top: 16px; } .mb { margin-bottom: 10px; }
.tc { text-align: center; } .tr { text-align: right; }
.nowrap { white-space: nowrap; }

/* ------------------------------------------------------------------ shell */
#app { max-width: 1100px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; }
.hdr {
  position: sticky; top: 0; z-index: 40; height: var(--hdr);
  display: flex; align-items: center; gap: 6px; padding: 0 8px 0 6px;
  background: var(--card); border-bottom: 1px solid var(--li);
}
.hdr .ttl { flex: 1; min-width: 0; font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hdr .ttl small { display: block; font-size: 11px; font-weight: 500; color: var(--mu); }
.hbtn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; position: relative; flex: none; }
.hbtn:active { background: var(--li2); }
.hdr-home {
  position: sticky; top: 0; z-index: 40; color: #fff; padding: 10px 12px 12px;
  background: linear-gradient(135deg, var(--p), var(--pd));
  border-radius: 0 0 20px 20px; box-shadow: 0 6px 20px rgba(40, 10, 90, .18);
}
.hdr-home .top { display: flex; align-items: center; gap: 10px; }
.hdr-home .logo { width: 38px; height: 38px; border-radius: 11px; background: rgba(255,255,255,.18); display: grid; place-items: center; overflow: hidden; flex: none; font-weight: 800; font-size: 17px; }
.hdr-home .logo img { width: 100%; height: 100%; object-fit: cover; }
.hdr-home .nm { flex: 1; min-width: 0; }
.hdr-home .nm b { display: block; font-size: 16px; letter-spacing: .2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr-home .nm span { font-size: 11px; opacity: .85; }
.hdr-home .hbtn { color: #fff; background: rgba(255,255,255,.14); width: 36px; height: 36px; }
.search {
  margin-top: 10px; display: flex; align-items: center; gap: 8px; background: #fff; color: var(--tx);
  border-radius: 12px; padding: 0 10px; height: 40px;
}
.search input { flex: 1; border: 0; outline: 0; background: none; min-width: 0; height: 100%; font-size: 14px; }
.search .i { color: var(--mu); }
.main { padding: 10px 10px calc(var(--nav) + 22px + var(--safe-b)); }
.main.nonav { padding-bottom: calc(96px + var(--safe-b)); }

.bnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; margin: 0 auto; max-width: 640px;
  height: calc(var(--nav) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: flex; background: rgba(255,255,255,.97); backdrop-filter: blur(10px);
  border-top: 1px solid var(--li); box-shadow: 0 -4px 18px rgba(20,20,40,.06);
}
@media (min-width: 660px) { .bnav { bottom: 10px; border: 1px solid var(--li); border-radius: 18px; height: var(--nav); padding: 0; } }
.bnav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--mu); position: relative; }
.bnav a.on { color: var(--p); }
.bnav a.on .i { stroke-width: 2.4; }
.bnav a.on::before { content: ""; position: absolute; top: 0; width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: var(--p); }
.dot {
  position: absolute; top: 6px; left: 50%; margin-left: 4px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--er); color: #fff; font-size: 10px; font-weight: 700; line-height: 17px; text-align: center;
  border: 2px solid #fff; box-sizing: content-box;
}
.hbtn .dot { top: 2px; left: auto; right: 0; margin: 0; }

/* -------------------------------------------------------------- elements */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); padding: 12px; margin-bottom: 10px; }
.card.flat { box-shadow: none; border: 1px solid var(--li); }
.card > h3, .sec-t { font-size: 13.5px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.card > h3 { justify-content: flex-start; }
.card > h3 > span:last-child:not(:first-child), .card > h3 > .tag { margin-left: auto; }
.btn {
  height: 44px; padding: 0 18px; border-radius: 12px; font-weight: 700; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--p); color: #fff; transition: transform .08s, opacity .15s; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.blk { width: 100%; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 10px; }
.btn.xs { height: 28px; padding: 0 10px; font-size: 11.5px; border-radius: 8px; gap: 4px; }
.btn.ghost { background: var(--pl); color: var(--p); }
.btn.line { background: #fff; color: var(--tx); border: 1px solid var(--li); }
.btn.red { background: var(--er); }
.btn.redl { background: var(--erl); color: var(--er); }
.btn.green { background: #16a34a; }
.btn.wa { background: #25D366; }
.btn.dark { background: var(--tx); }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btns > .btn { flex: 1; }
.link { color: var(--p); font-weight: 600; }

.field { margin-bottom: 10px; }
.field > label { display: block; font-size: 11.5px; font-weight: 600; color: var(--mu); margin-bottom: 4px; }
.field > label .req { color: var(--er); }
.inp {
  width: 100%; height: 42px; border: 1px solid var(--li); border-radius: var(--rs); padding: 0 11px;
  background: #fff; outline: 0; font-size: 14px; transition: border-color .15s, box-shadow .15s;
}
textarea.inp { height: auto; min-height: 70px; padding: 9px 11px; resize: vertical; }
select.inp { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b7b' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center; padding-right: 30px; }
.inp:focus { border-color: var(--p); box-shadow: 0 0 0 3px var(--pl); }
.inp.sm { height: 34px; font-size: 13px; padding: 0 9px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 8px; }
.hint { font-size: 11px; color: var(--mu); margin-top: 4px; }

.chips { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; margin: 0 -10px; padding-left: 10px; padding-right: 10px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 32px; padding: 0 13px; border-radius: 16px; background: #fff; border: 1px solid var(--li);
  font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; color: var(--tx);
}
.chip.on { background: var(--p); border-color: var(--p); color: #fff; }
.chip small { opacity: .7; font-weight: 500; }

.tag { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 10.5px; font-weight: 700; background: var(--li2); color: var(--mu); white-space: nowrap; }
.tag.pending { background: var(--wal); color: var(--wa); }
.tag.confirmed { background: #e8f0fe; color: #1d4ed8; }
.tag.delivered, .tag.paid { background: var(--okl); color: var(--ok); }
.tag.cancelled, .tag.unpaid { background: var(--erl); color: var(--er); }
.tag.partial { background: var(--wal); color: var(--wa); }
.tag.p { background: var(--pl); color: var(--p); }

.empty { text-align: center; padding: 50px 20px; color: var(--mu); }
.empty .ei { width: 74px; height: 74px; border-radius: 50%; background: var(--pl); color: var(--p); display: grid; place-items: center; margin: 0 auto 12px; }
.empty .ei .i { width: 34px; height: 34px; }
.empty b { display: block; color: var(--tx); font-size: 15px; margin-bottom: 4px; }

.spin { width: 22px; height: 22px; border: 3px solid var(--pm); border-top-color: var(--p); border-radius: 50%; animation: sp .7s linear infinite; }
.loading { display: grid; place-items: center; padding: 50px 0; }
@keyframes sp { to { transform: rotate(360deg); } }
.skel { background: linear-gradient(90deg, #ececf2 25%, #f6f6f9 50%, #ececf2 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0; } }

/* toast + sheet */
#toast { position: fixed; left: 0; right: 0; bottom: calc(var(--nav) + 18px + var(--safe-b)); z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; padding: 0 16px; }
.toast {
  background: #1f1f29; color: #fff; padding: 10px 14px; border-radius: 12px; font-size: 13px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,.2); display: flex; align-items: center; gap: 10px; max-width: 460px;
  animation: tin .22s ease-out; pointer-events: auto;
}
.toast.er { background: var(--er); }
.toast.ok { background: #15803d; }
.toast a { color: #c4b5fd; font-weight: 700; white-space: nowrap; }
@keyframes tin { from { opacity: 0; transform: translateY(10px); } }
.ovl { position: fixed; inset: 0; z-index: 150; background: rgba(15, 15, 25, .45); animation: fin .2s; display: flex; align-items: flex-end; justify-content: center; }
@keyframes fin { from { opacity: 0; } }
.sheet {
  background: #fff; width: 100%; max-width: 560px; max-height: 90vh; max-height: 90dvh; overflow-y: auto;
  border-radius: 20px 20px 0 0; padding: 8px 14px calc(16px + var(--safe-b)); animation: sup .25s cubic-bezier(.2,.9,.3,1);
}
@media (min-width: 600px) { .ovl { align-items: center; } .sheet { border-radius: 20px; } }
.sheet .grab { width: 38px; height: 4px; border-radius: 2px; background: var(--li); margin: 0 auto 10px; }
.sheet .sh-t { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sheet .sh-t b { font-size: 16px; }
@keyframes sup { from { transform: translateY(40px); opacity: .4; } }

/* ------------------------------------------------------------- products */
.notice { display: flex; gap: 8px; align-items: center; background: var(--pl); color: var(--pd); border-radius: 12px; padding: 8px 10px; font-size: 12px; font-weight: 500; margin-bottom: 10px; }
.notice .i { color: var(--p); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 820px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(5, 1fr); } }
.pcard { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--sh); display: flex; flex-direction: column; transition: transform .1s; }
.pcard:active { transform: scale(.98); }
.pimg { position: relative; aspect-ratio: 3/4; background: var(--li2); }
.pimg img { width: 100%; height: 100%; object-fit: cover; }
.pimg .bdg { position: absolute; top: 7px; left: 7px; }
.pimg .out { position: absolute; inset: 0; background: rgba(255,255,255,.55); display: grid; place-items: center; }
.pimg .out span { background: var(--tx); color: #fff; font-size: 10.5px; font-weight: 700; padding: 4px 8px; border-radius: 6px; }
.pimg .incart { position: absolute; bottom: 7px; right: 7px; background: var(--p); color: #fff; font-size: 10.5px; font-weight: 700; padding: 3px 7px; border-radius: 6px; display: flex; gap: 3px; align-items: center; }
.bdg { background: #f43f5e; color: #fff; font-size: 9.5px; font-weight: 800; padding: 3px 6px; border-radius: 5px; letter-spacing: .4px; }
.pinfo { padding: 8px 9px 10px; display: flex; flex-direction: column; gap: 2px; }
.pname { font-weight: 600; font-size: 12.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 32px; }
.pmeta { font-size: 10.5px; color: var(--mu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pprice { display: flex; align-items: baseline; gap: 5px; margin-top: 2px; }
.pprice b { font-size: 14.5px; }
.pprice s { font-size: 11px; color: var(--mu); }
.pprice small { font-size: 10.5px; color: var(--mu); }
.cdots { display: flex; gap: 3px; align-items: center; margin-top: 3px; font-size: 10px; color: var(--mu); }
.cdots i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); background-size: cover; background-position: center; }
.sk-card { border-radius: 12px; overflow: hidden; background: #fff; }
.sk-card .skel:first-child { aspect-ratio: 3/4; border-radius: 0; }

.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
@media (min-width: 560px) { .cat-grid { grid-template-columns: repeat(5, 1fr); } }
.cat { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--sh); }
.cat .ci { aspect-ratio: 1; background: var(--pl); color: var(--p); display: grid; place-items: center; }
.cat .ci img { width: 100%; height: 100%; object-fit: cover; }
.cat div:last-child { padding: 6px 8px 8px; font-size: 12px; font-weight: 600; }
.cat small { display: block; color: var(--mu); font-weight: 500; font-size: 10.5px; }

/* product detail */
.pd { margin: -10px -10px 0; }
.gal { position: relative; background: #fff; }
.gal-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 4/5; max-height: 72vh; }
.gal-track::-webkit-scrollbar { display: none; }
.gal-track img { flex: none; width: 100%; height: 100%; object-fit: contain; scroll-snap-align: center; background: #fafafa; }
.gal-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; }
.gal-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(0,0,0,.25); transition: all .2s; }
.gal-dots i.on { width: 16px; background: var(--p); }
.gal-n { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.5); color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 10px; }
.gal-back { position: absolute; top: 10px; left: 10px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; box-shadow: var(--sh); }
.gal-share { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; box-shadow: var(--sh); }
.pd-body { padding: 10px; }
.pd-head { margin-top: -22px; position: relative; border-radius: 18px; }
.pd-name { font-size: 16px; font-weight: 700; }
.pd-price { display: flex; align-items: baseline; gap: 7px; margin-top: 6px; flex-wrap: wrap; }
.pd-price b { font-size: 22px; color: var(--tx); }
.pd-price s { color: var(--mu); }
.pd-price .off { color: var(--ok); font-weight: 700; font-size: 12px; }
.colors { display: flex; gap: 9px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: 0 -2px; }
.colors::-webkit-scrollbar { display: none; }
.clr { flex: none; width: 64px; text-align: center; font-size: 10.5px; font-weight: 600; position: relative; }
.clr .ph { width: 64px; height: 76px; border-radius: 10px; overflow: hidden; border: 2px solid var(--li); background: var(--li2) center/cover; }
.clr.on .ph { border-color: var(--p); box-shadow: 0 0 0 2px var(--pm); }
.clr span { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clr .q { position: absolute; top: -4px; right: -4px; background: var(--p); color: #fff; font-size: 10px; font-weight: 800; min-width: 18px; height: 18px; border-radius: 9px; line-height: 18px; padding: 0 4px; border: 2px solid #fff; }
.sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 480px) { .sizes { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 760px) { .sizes { grid-template-columns: repeat(6, 1fr); } }
.sz { border: 1.5px solid var(--li); border-radius: 12px; padding: 7px 6px 6px; text-align: center; background: #fff; transition: border-color .15s, background .15s; }
.sz.has { border-color: var(--p); background: var(--pl); }
.sz.out { opacity: .45; }
.sz .l { font-size: 15px; font-weight: 800; }
.sz .s { font-size: 10px; color: var(--mu); height: 14px; }
.sz .s.low { color: var(--wa); font-weight: 700; }
.sz .pr { font-size: 10px; color: var(--p); font-weight: 700; }
.step { display: flex; align-items: center; justify-content: space-between; margin-top: 5px; background: #fff; border-radius: 9px; border: 1px solid var(--li); overflow: hidden; }
.step button { width: 30px; height: 30px; display: grid; place-items: center; color: var(--p); flex: none; }
.step button:active { background: var(--pl); }
.step input { width: 100%; min-width: 0; border: 0; outline: 0; text-align: center; font-weight: 800; font-size: 14px; background: none; -moz-appearance: textfield; }
.step input::-webkit-outer-spin-button, .step input::-webkit-inner-spin-button { -webkit-appearance: none; }
.step.sm button { width: 26px; height: 26px; }
.step.sm { margin: 0; width: 92px; flex: none; }
.desc { white-space: pre-line; color: #3c3c48; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 12.5px; }
.kv > :nth-child(odd) { color: var(--mu); }

.buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; max-width: 640px; margin: 0 auto;
  background: #fff; border-top: 1px solid var(--li); padding: 10px 12px calc(10px + var(--safe-b));
  display: flex; align-items: center; gap: 10px; box-shadow: 0 -6px 20px rgba(20,20,40,.08);
}
@media (min-width: 660px) { .buybar { bottom: 10px; border-radius: 18px; border: 1px solid var(--li); } }
.buybar .sum { flex: 1; min-width: 0; line-height: 1.2; }
.buybar .sum b { font-size: 17px; display: block; }
.buybar .sum span { font-size: 11px; color: var(--mu); }
.buybar .btn { min-width: 150px; }

/* cart */
.cgrp { display: flex; gap: 10px; }
.cgrp .th { width: 64px; height: 80px; border-radius: 10px; object-fit: cover; background: var(--li2); flex: none; }
.cgrp .nm { font-weight: 700; font-size: 13px; }
.cline { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px dashed var(--li); }
.cline:first-child { border-top: 0; }
.cline .szl { width: 46px; font-weight: 800; flex: none; }
.cline .amt { width: 74px; text-align: right; font-weight: 700; flex: none; }
.warnline { font-size: 11px; color: var(--er); font-weight: 600; }
.tot { display: flex; justify-content: space-between; padding: 4px 0; }
.tot.big { font-size: 16px; font-weight: 800; border-top: 1px solid var(--li); margin-top: 6px; padding-top: 9px; }

/* order / otp */
.hero { border-radius: 18px; padding: 18px 16px; color: #fff; background: linear-gradient(135deg, var(--p), var(--pd)); margin-bottom: 10px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -30px; top: -30px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.08); }
.hero.ok { background: linear-gradient(135deg, #16a34a, #0f6b32); }
.hero.er { background: linear-gradient(135deg, #ef4444, #a51d1d); }
.hero.wa { background: linear-gradient(135deg, #f59e0b, #b45309); }
.hero h2 { font-size: 18px; margin: 6px 0 3px; }
.hero p { margin: 0; opacity: .9; font-size: 12.5px; }
.hero .big { font-size: 26px; font-weight: 800; margin-top: 8px; }
.otp-in {
  width: 100%; max-width: 260px; height: 58px; display: block; margin: 12px auto 0; text-align: center;
  font-size: 30px; font-weight: 800; letter-spacing: 16px; padding-left: 16px; border: 2px solid var(--pm); border-radius: 14px; outline: 0; background: #fff;
}
.otp-in:focus { border-color: var(--p); box-shadow: 0 0 0 4px var(--pl); }
.otp-show { display: flex; justify-content: center; gap: 8px; margin: 8px 0 4px; }
.otp-show span { width: 46px; height: 56px; border-radius: 12px; background: #fff; color: var(--tx); display: grid; place-items: center; font-size: 28px; font-weight: 800; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: #fbbf24; display: inline-block; animation: pl 1.4s infinite; }
@keyframes pl { 0% { box-shadow: 0 0 0 0 rgba(251,191,36,.7); } 70% { box-shadow: 0 0 0 9px rgba(251,191,36,0); } 100% { box-shadow: 0 0 0 0 rgba(251,191,36,0); } }

.list .li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fff; border-radius: 12px; box-shadow: var(--sh); margin-bottom: 8px; }
.list .li:active { background: #fafaff; }
.li .th { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: var(--pl); flex: none; display: grid; place-items: center; color: var(--p); font-weight: 800; font-size: 16px; overflow: hidden; }
.li .th img { width: 100%; height: 100%; object-fit: cover; }
.li .t { font-weight: 700; font-size: 13px; }
.li .s { font-size: 11.5px; color: var(--mu); }
.li .r { text-align: right; flex: none; }
.li .r b { display: block; font-size: 13.5px; }

.itbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.itbl th { text-align: left; font-size: 10.5px; color: var(--mu); font-weight: 600; padding: 4px 4px 6px; border-bottom: 1px solid var(--li); }
.itbl td { padding: 7px 4px; border-bottom: 1px dashed var(--li); vertical-align: middle; }
.itbl .n { text-align: right; white-space: nowrap; }
.itbl img { width: 34px; height: 42px; object-fit: cover; border-radius: 6px; background: var(--li2); }

.profile-top { display: flex; align-items: center; gap: 12px; }
.avatar { width: 54px; height: 54px; border-radius: 50%; background: var(--pl); color: var(--p); display: grid; place-items: center; font-size: 22px; font-weight: 800; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.menu a, .menu button { display: flex; width: 100%; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--li2); font-weight: 600; text-align: left; }
.menu > :last-child { border-bottom: 0; }
.menu .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--pl); color: var(--p); display: grid; place-items: center; flex: none; }
.or { display: flex; align-items: center; gap: 10px; color: var(--mu); font-size: 11px; margin: 12px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--li); }
.gbtn-wrap { display: flex; justify-content: center; min-height: 44px; }

.viewer { position: fixed; inset: 0; z-index: 300; background: #000; display: flex; flex-direction: column; }
.viewer .gal-track { flex: 1; aspect-ratio: auto; max-height: none; }
.viewer .gal-track img { background: #000; }
.viewer .x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; display: grid; place-items: center; }

/* ----------------------------------------------------------------- admin */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-bottom: 10px; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: #fff; border-radius: 14px; padding: 11px 12px; box-shadow: var(--sh); position: relative; overflow: hidden; }
.stat .k { font-size: 11px; color: var(--mu); font-weight: 600; display: flex; align-items: center; gap: 5px; }
.stat .v { font-size: 19px; font-weight: 800; margin-top: 3px; }
.stat .sub { font-size: 10.5px; color: var(--mu); }
.stat.hl { background: linear-gradient(135deg, var(--p), var(--pd)); color: #fff; }
.stat.hl .k, .stat.hl .sub { color: rgba(255,255,255,.85); }
.otp-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fff; border-radius: 14px; box-shadow: var(--sh); margin-bottom: 8px; border-left: 4px solid #f59e0b; }
.otp-card .code { font-size: 22px; font-weight: 900; letter-spacing: 3px; color: var(--p); background: var(--pl); padding: 4px 10px; border-radius: 10px; font-variant-numeric: tabular-nums; }
.seg { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -10px 10px; padding: 0 10px; }
.seg::-webkit-scrollbar { display: none; }
.fab { position: fixed; right: max(16px, calc(50vw - 534px)); bottom: calc(var(--nav) + 18px + var(--safe-b)); z-index: 45; width: 54px; height: 54px; border-radius: 18px; background: var(--p); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 22px rgba(60,20,140,.35); }
.fab .i { width: 26px; height: 26px; }
.switch { position: relative; width: 42px; height: 24px; flex: none; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; border-radius: 12px; background: #d4d4dc; transition: .2s; cursor: pointer; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + i { background: var(--p); }
.switch input:checked + i::after { transform: translateX(18px); }
.tgl-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.tgl-row b { display: block; font-size: 13px; }

.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.slot { position: relative; aspect-ratio: 3/4; border-radius: 10px; border: 1.5px dashed var(--pm); background: var(--pl); color: var(--p); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10px; font-weight: 700; overflow: hidden; }
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot .rm { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; z-index: 2; }
.slot .mn { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 9.5px; text-align: center; padding: 2px; z-index: 2; }
.slot.filled { border-style: solid; border-color: var(--li); }
.slot.req { border-color: var(--p); }
.slot .spin { width: 20px; height: 20px; }
.color-blk { border: 1px solid var(--li); border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.color-blk .hdrow { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.color-blk input[type=color] { width: 42px; height: 42px; border: 1px solid var(--li); border-radius: 10px; padding: 2px; background: #fff; flex: none; }
.szchips { display: flex; flex-wrap: wrap; gap: 6px; }
.szchip { min-width: 42px; height: 34px; padding: 0 10px; border-radius: 9px; border: 1.5px solid var(--li); background: #fff; font-weight: 700; font-size: 12.5px; }
.szchip.on { border-color: var(--p); background: var(--p); color: #fff; }
.mtx { overflow-x: auto; margin: 0 -12px; padding: 0 12px; }
.mtx table { border-collapse: separate; border-spacing: 0; font-size: 12px; }
.mtx th { font-size: 11px; color: var(--mu); padding: 4px; text-align: center; white-space: nowrap; }
.mtx td { padding: 3px; }
.mtx th:first-child, .mtx td:first-child { position: sticky; left: 0; background: #fff; z-index: 1; text-align: left; font-weight: 700; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 8px; }
.mtx input { width: 54px; height: 34px; text-align: center; border: 1px solid var(--li); border-radius: 8px; outline: 0; font-weight: 700; }
.mtx input:focus { border-color: var(--p); }
.savebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; max-width: 640px; margin: 0 auto; padding: 10px 12px calc(10px + var(--safe-b)); background: #fff; border-top: 1px solid var(--li); display: flex; gap: 8px; box-shadow: 0 -6px 20px rgba(20,20,40,.08); }
@media (min-width: 660px) { .savebar { bottom: 10px; border-radius: 18px; border: 1px solid var(--li); } }
.savebar .btn { flex: 1; }
.login-wrap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px; background: linear-gradient(160deg, var(--p), var(--pd)); }
.login-card { width: 100%; max-width: 360px; background: #fff; border-radius: 22px; padding: 24px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.login-card .lg { width: 58px; height: 58px; border-radius: 16px; background: var(--pl); color: var(--p); display: grid; place-items: center; margin: 0 auto 10px; }
.banner-new { position: fixed; top: 8px; left: 8px; right: 8px; z-index: 210; max-width: 520px; margin: 0 auto; background: #1f1f29; color: #fff; border-radius: 16px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.3); animation: bdn .3s ease-out; }
.banner-new .code { font-size: 22px; font-weight: 900; letter-spacing: 3px; background: #fff; color: var(--p); padding: 2px 10px; border-radius: 9px; }
@keyframes bdn { from { transform: translateY(-30px); opacity: 0; } }
details.acc { background: #fff; border-radius: var(--r); box-shadow: var(--sh); margin-bottom: 10px; }
details.acc > summary { list-style: none; padding: 13px 12px; font-weight: 700; display: flex; align-items: center; gap: 10px; cursor: pointer; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary .ic { width: 32px; height: 32px; border-radius: 10px; background: var(--pl); color: var(--p); display: grid; place-items: center; }
details.acc > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--mu); border-bottom: 2px solid var(--mu); transform: rotate(45deg); transition: .2s; }
details.acc[open] > summary::after { transform: rotate(-135deg); }
details.acc > .bd { padding: 0 12px 12px; }
