*{box-sizing:border-box}
body{margin:0;background:#f1f5f9;color:#334155;font-family:'Open Sans',system-ui,sans-serif;font-size:14px}
a{color:#2563eb;text-decoration:none}
.mono{font-family:'JetBrains Mono',ui-monospace,monospace}
.muted{color:#64748b}.small{font-size:12.5px}.center{text-align:center}
.h1{margin:2px 0 0;font-size:22px;font-weight:800;color:#0f172a;letter-spacing:-.01em}
.brand-sm{font-size:10.5px;font-weight:700;color:#64748b;letter-spacing:.08em;text-transform:uppercase}
.row{display:flex;align-items:center;gap:10px}
.between{display:flex;align-items:center;justify-content:space-between;gap:8px}
.wrap{display:flex;flex-wrap:wrap;gap:6px}
.sp{flex:1}
/* layout */
.shell{min-height:100vh;display:flex}
.side{display:none}
.main{flex:1;min-width:0;padding-bottom:84px}
.top{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px;background:#fff;border-bottom:1px solid #e2e8f0;position:sticky;top:0;z-index:5}
.wrapc{padding:12px;max-width:820px;margin:0 auto}
.tabbar{position:fixed;left:0;right:0;bottom:0;display:flex;background:#fff;border-top:1px solid #e2e8f0;padding:4px 2px calc(10px + env(safe-area-inset-bottom))}
.tab,.tabform{flex:1}
.tab{display:flex;flex-direction:column;align-items:center;gap:3px;font-size:10.5px;font-weight:700;color:#64748b;padding:6px 0;min-height:48px;border:none;background:none;width:100%;font-family:inherit;cursor:pointer}
.tab.active{color:#2563eb}.tab.off{opacity:.45;pointer-events:none}
@media (min-width:900px){
  .side{display:flex;flex-direction:column;width:230px;background:#1e293b;color:#cbd5e1;padding:20px 12px;position:sticky;top:0;height:100vh}
  .side .brand-sm{color:#94a3b8;padding:0 10px}
  .side .brand{color:#fff;font-weight:800;font-size:16px;padding:2px 10px 18px}
  .nav{display:flex;align-items:center;justify-content:space-between;width:100%;height:40px;padding:0 10px;border-radius:8px;color:#cbd5e1;font-weight:600;border:none;background:none;font-family:inherit;font-size:14px;cursor:pointer;text-align:left}
  .nav.on{background:#334155;color:#fff}.nav.disabled{opacity:.5;pointer-events:none}
  .soon{font-size:10px;text-transform:uppercase;letter-spacing:.04em;color:#94a3b8}
  .logout{margin-top:auto}
  .tabbar{display:none}.main{padding-bottom:20px}
}
/* controls */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:40px;padding:0 14px;border-radius:8px;border:1px solid #cbd5e1;background:#fff;color:#334155;font-size:13px;font-weight:600;font-family:inherit;cursor:pointer}
.btn-p{background:#2563eb;border-color:#2563eb;color:#fff;font-weight:700}
.btn-s{height:32px;font-size:12px;padding:0 10px;border-radius:6px}
.wide{width:100%}.big{height:48px;font-size:15px;margin-bottom:12px}
.iconbtn{width:40px;height:40px;border-radius:8px;border:1px solid #e2e8f0;background:#fff;display:inline-flex;align-items:center;justify-content:center;color:#334155;font-size:26px;line-height:1}
.panel{background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:14px;margin-bottom:12px;box-shadow:0 1px 3px rgba(0,0,0,.04)}
.ptitle{margin:0 0 10px;font-size:11px;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.06em}
.field{display:flex;flex-direction:column;gap:5px;margin-bottom:12px;font-size:12px;font-weight:700;color:#475569}
.input{height:42px;border-radius:8px;border:1px solid #cbd5e1;background:#fff;padding:0 12px;font-size:15px;font-family:inherit;color:#0f172a;width:100%}
.hint{font-size:11.5px;color:#64748b;margin:0}
.alert{border-radius:8px;padding:10px 12px;margin-bottom:12px;font-weight:600;font-size:13px}
.alert.err{background:#fee2e2;border:1px solid #fecaca;color:#991b1b}
.auth{max-width:400px;margin:0 auto;padding:40px 16px}
.auth .h1{margin-bottom:12px}
.search{display:flex;align-items:center;gap:8px;height:40px;padding:0 12px;border-radius:8px;border:1px solid #e2e8f0;background:#fff;margin-bottom:10px;color:#94a3b8}
.search input{border:none;outline:none;flex:1;font-family:inherit;font-size:14px;background:transparent;min-width:0;color:#0f172a}
.tabs{display:flex;gap:6px;overflow-x:auto;margin:0 -12px 10px;padding:0 12px 2px;scrollbar-width:none}
.st{flex:none;display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border-radius:8px;border:1px solid transparent;font-size:12.5px;font-weight:600;font-family:inherit;cursor:pointer}
.st.on{box-shadow:0 0 0 1px currentColor;border-color:currentColor}
.cnt{display:inline-flex;align-items:center;height:18px;padding:0 6px;border-radius:9px;background:rgba(0,0,0,.08);font-size:11px;font-weight:700}
/* status colors */
.st-all{background:#f1f5f9;color:#334155;border-color:#e2e8f0}
.st-new,.b-new{background:#fef3c7;color:#92400e;border-color:#fde68a}
.st-accepted,.b-accepted{background:#e0f2fe;color:#0369a1;border-color:#bae6fd}
.st-nocall,.b-nocall{background:#ffedd5;color:#9a3412;border-color:#fed7aa}
.st-sent,.b-sent{background:#ede9fe;color:#5b21b6;border-color:#ddd6fe}
.st-branch,.b-branch{background:#ccfbf1;color:#0f766e;border-color:#99f6e4}
.st-received,.b-received{background:#dcfce7;color:#166534;border-color:#bbf7d0}
.st-returned,.b-returned{background:#fee2e2;color:#991b1b;border-color:#fecaca}
.st-canceled,.b-canceled{background:#f1f5f9;color:#475569;border-color:#e2e8f0}
.badge{display:inline-flex;align-items:center;height:24px;padding:0 10px;border-radius:12px;border:1px solid transparent;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.3px;white-space:nowrap}
/* order card */
.card{display:block;background:#fff;border:1px solid #e2e8f0;border-radius:10px;box-shadow:0 1px 3px rgba(0,0,0,.04);margin-bottom:12px;color:inherit}
.cardhead{display:flex;align-items:center;gap:8px;padding:12px 14px 9px;border-bottom:1px solid #f1f5f9}
.oid{font-size:17px;font-weight:800;color:#0f172a}.meta{font-size:11.5px;color:#64748b}
.cardbody{padding:10px 14px 14px}
.name{font-weight:700;color:#0f172a;margin-bottom:4px}
.addr{font-size:12.5px;color:#475569;margin-bottom:8px}
.dash{border-top:1px dashed #e2e8f0;margin:8px 0}
.item{font-size:12.5px;color:#475569;line-height:1.55}
.total{font-size:15px;font-weight:800;color:#0f172a;margin-top:4px}
.empty{text-align:center;padding:40px 16px;background:#fff;border:1px dashed #cbd5e1;border-radius:10px}
.cname{font-size:16px;font-weight:800;color:#0f172a;margin-bottom:8px}
.comm{display:flex;flex-wrap:wrap;gap:6px}
.cb{display:inline-flex;align-items:center;height:32px;padding:0 10px;border-radius:6px;font-size:12.5px;font-weight:600}
.cb-phone,.cb-tg{background:#e0f2fe;color:#0369a1}.cb-viber{background:#f3e8ff;color:#6d28d9}
.nottn{display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:11px;background:#94a3b8;color:#fff;font-size:11px;font-weight:700;margin:8px 0 4px}
.ttnpill{display:inline-flex;height:30px;align-items:center;padding:0 9px;border-radius:6px;border:1px solid #cbd5e1;margin-top:8px;font-weight:700}
.line{padding:6px 0;border-bottom:1px dashed #e2e8f0}
.totalrow{padding-top:8px}
.logs{background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px;padding:2px 10px;font-size:12.5px}
.logl{padding:7px 0;border-bottom:1px dashed #e2e8f0}
.logl:last-child{border-bottom:none}
.itemrow{display:grid;grid-template-columns:1fr 64px 90px;gap:6px;margin-bottom:6px}
.seg{display:flex;background:#e2e8f0;border-radius:8px;padding:3px;gap:3px}
.seg label{flex:1}.seg input{display:none}
.seg span{display:flex;align-items:center;justify-content:center;height:34px;border-radius:6px;font-size:12.5px;font-weight:700;cursor:pointer}
.seg input:checked+span{background:#fff}
/* stage 2 */
.alert.ok{background:#dcfce7;border:1px solid #bbf7d0;color:#166534}
.ok{display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:11px;background:#dcfce7;border:1px solid #bbf7d0;color:#166534;font-size:11px;font-weight:700}
.warn{color:#b45309;font-weight:600;font-size:12px}
.ac{position:absolute;left:0;right:0;top:100%;z-index:20;background:#fff;border-radius:8px;box-shadow:0 6px 18px rgba(15,23,42,.15);max-height:280px;overflow-y:auto}
.ac:empty{display:none}
.ac-item{display:block;width:100%;text-align:left;padding:10px 12px;border:none;border-bottom:1px solid #f1f5f9;background:#fff;font-family:inherit;font-size:13px;color:#0f172a;cursor:pointer}
.ac-item:hover{background:#f8fafc}.ac-item span{color:#64748b;font-size:12px}
.ac-err{padding:10px 12px;color:#b45309;font-size:12.5px}
.ttnrow{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:8px 0 4px}
.ttnpill{background:#fff;cursor:pointer;font-family:'JetBrains Mono',monospace;font-size:13px}
.ttnpill.copied{background:#dcfce7;border-color:#86efac}
.tstate{display:inline-flex;align-items:center;height:22px;padding:0 7px;border-radius:4px;font-size:11px;font-weight:600;background:#e0f2fe;color:#0369a1;border:1px solid #bae6fd}
.t-branch{background:#fef3c7;color:#b45309;border-color:#fde68a}.t-received{background:#dcfce7;color:#15803d;border-color:#bbf7d0}.t-returned{background:#fee2e2;color:#b91c1c;border-color:#fecaca}
.ttnform{margin-top:10px}
.ttnform summary{list-style:none;cursor:pointer}.ttnform summary::-webkit-details-marker{display:none}
.ttnform[open] summary{margin-bottom:10px}
.ttngrid,.grid2{display:grid;grid-template-columns:1fr 1fr;gap:0 10px}
.ttngrid .seg,.ttngrid .check,.ttngrid button,.ttngrid .field:nth-child(5){grid-column:1/-1}
.check{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600;margin-bottom:12px}
.check input{width:18px;height:18px}
.prow .cardbody{gap:10px;flex-wrap:wrap}
.itemrow>div{position:relative}
/* stage 3: telegram */
.howto{margin-bottom:12px}
.howto summary{cursor:pointer;font-weight:700;color:#2563eb;font-size:13px;list-style:none}
.howto summary::-webkit-details-marker{display:none}
.howto ol{padding-left:18px;line-height:1.6;margin:8px 0}
.chatrow{padding:8px 0;border-bottom:1px dashed #e2e8f0}
.linkbox{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:10px 12px;margin-top:10px}
.linkbox p{margin:0 0 8px}.linkbox .hint{margin:8px 0 0}
.evgrid{display:grid;grid-template-columns:1fr 1fr;gap:0 10px}
@media (max-width:520px){.evgrid{grid-template-columns:1fr}}
.codebox{display:inline-flex;align-items:center;height:40px;padding:0 16px;margin:0 0 10px;border-radius:8px;border:1px dashed #94a3b8;background:#fff;font-size:20px;font-weight:700;letter-spacing:.15em;color:#0f172a;cursor:pointer}
.codebox.copied{background:#dcfce7;border-color:#86efac}
.confirm{display:inline-flex;align-items:center;gap:6px}
.confirm summary{list-style:none}.confirm summary::-webkit-details-marker{display:none}
.confirm[open]{flex-direction:row}
.confirm form{display:inline}
.btn-danger{background:#dc2626;border-color:#dc2626;color:#fff;font-weight:700}
.chatrow.pending{background:#eff6ff;border:1px solid #bfdbfe;border-radius:8px;padding:8px 10px;margin:8px 0}
.btn.busy{opacity:.85;cursor:progress;pointer-events:none}
.btn.busy::before{content:"";width:14px;height:14px;border-radius:50%;border:2px solid currentColor;border-right-color:transparent;animation:spin .7s linear infinite;flex:none}
@keyframes spin{to{transform:rotate(360deg)}}
.t-created{background:#f1f5f9;color:#475569;border-color:#e2e8f0}.t-sent{background:#e0f2fe;color:#0369a1;border-color:#bae6fd}

/* ===== layout v2: one grid for phone and desktop ===== */
:root{--maxw:1180px;--gut:12px}
.wrapc{max-width:var(--maxw);padding:var(--gut)}
.top{padding:12px var(--gut)}
@media (min-width:900px){
  :root{--gut:24px}
  .top{padding:16px max(var(--gut), calc((100% - var(--maxw))/2 + var(--gut)))}
  .wrapc{padding-top:20px}
}
/* two-column pages */
.cols{display:block}
.col{min-width:0}
@media (min-width:1100px){
  .cols{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:16px;align-items:start}
}
/* action groups: buttons line up, on phones they share the row evenly */
.actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.actions>form{display:flex}
.actions details.confirm{display:flex;gap:8px;flex-wrap:wrap}
@media (max-width:599px){
  .actions>.btn,.actions>form,.actions>details{flex:1 1 calc(50% - 4px)}
  .actions>form .btn,.actions>details>summary,.actions>details form,.actions>details form .btn{width:100%}
  .actions details.confirm[open]{flex-basis:100%}
  .actions details.confirm[open]>*{flex:1 1 calc(50% - 4px)}
}
/* accordion rows instead of scattered small buttons */
details.acc{border-top:1px solid #f1f5f9;margin:12px -14px 0;padding:0 14px}
details.acc>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;min-height:46px;font-weight:700;font-size:13.5px;color:#0f172a;cursor:pointer}
details.acc>summary::-webkit-details-marker{display:none}
details.acc>summary::after{content:"";width:8px;height:8px;border-right:2px solid #94a3b8;border-bottom:2px solid #94a3b8;transform:rotate(45deg);margin:0 4px 4px 0;transition:transform .15s}
details.acc[open]>summary::after{transform:rotate(-135deg);margin-bottom:-4px}
details.acc[open]{padding-bottom:12px}
details.acc.acc-first{border-top:none;margin-top:0}
details.acc>summary~*{margin-top:4px}
form.inline{display:flex;gap:8px}
form.inline .input{flex:1;min-width:0}
/* form grid */
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:0 10px}
.grid2>.span2,.grid2>input[type=hidden]+.span2{grid-column:1/-1}
.seg{width:100%}
/* status picker: even grid */
.stgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.stgrid .st{justify-content:center;height:40px;width:100%;padding:0 6px;text-align:center}
@media (min-width:600px){.stgrid{grid-template-columns:repeat(4,minmax(0,1fr))}}
/* orders list */
.cards{display:grid;gap:12px}
.cards .card{margin:0}
@media (min-width:900px){.cards{grid-template-columns:repeat(auto-fill,minmax(340px,1fr))}}
.card .name{margin-bottom:2px}
.card .phone{font-size:12.5px;color:#475569;margin-bottom:6px}
.item{display:flex;justify-content:space-between;gap:10px}
.iname{min-width:0}
.isum,.line b,.total{white-space:nowrap}
.cardfoot{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-top:8px;padding-top:8px;border-top:1px dashed #e2e8f0}
.cardfoot .total{margin:0}
.line{gap:12px}
/* products list */
.plist{display:grid;gap:10px}
.prow{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"info stock" "act act";gap:10px 12px;align-items:center;background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:12px 14px;box-shadow:0 1px 3px rgba(0,0,0,.04)}
.pinfo{grid-area:info;min-width:0}.pinfo .name{margin-bottom:2px}
.pstock{grid-area:stock}
.pact{grid-area:act;display:flex;gap:8px;flex-wrap:wrap}
.pact>.btn,.pact>details{flex:1}
.pact details.confirm{display:flex;gap:8px}
.pact details.confirm>summary,.pact details.confirm form,.pact details.confirm .btn{width:100%}
.pact details.confirm form{flex:1}
@media (min-width:700px){
  .prow{grid-template-columns:minmax(0,1fr) auto auto;grid-template-areas:"info stock act"}
  .pact{flex-wrap:nowrap}.pact>.btn,.pact>details{flex:none}
}
/* panels & headings rhythm */
.panel{padding:16px}
details.acc{margin-left:-16px;margin-right:-16px;padding-left:16px;padding-right:16px}
.panel>.between:first-child .ptitle{margin-bottom:10px}
.chatrow{gap:10px}
.chatrow>span{min-width:0;overflow-wrap:anywhere}
.linkbox .actions{margin-top:2px}
.ttnrow{gap:8px}
.tstate{height:auto;min-height:22px;padding:3px 8px;line-height:1.35}
.addr{overflow-wrap:anywhere}
.cname{overflow-wrap:anywhere}
/* sticky submit on phones for the order form */
@media (max-width:899px){.big{position:sticky;bottom:calc(76px + env(safe-area-inset-bottom));z-index:4;box-shadow:0 6px 18px rgba(37,99,235,.3)}}

/* order form: item rows */
@media (max-width:599px){
  .itemrow{grid-template-columns:72px 1fr;gap:6px}
  .itemrow>div{grid-column:1/-1}
}
.tabs{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 24px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 24px),transparent)}
.btn{white-space:nowrap}
.alert{animation:pop .35s ease}@keyframes pop{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
.alert.fade{opacity:0;transition:opacity .4s}
.alert.near{margin:10px 0 0}
.alert.ok{display:block;height:auto;padding:10px 12px;border-radius:8px;font-size:13px;font-weight:600}
/* stage 4: online store */
.src{display:inline-flex;align-items:center;height:20px;padding:0 7px;border-radius:10px;background:#f1f5f9;color:#475569;font-size:11px;font-weight:700;margin-left:2px}
.steps{padding-left:18px;line-height:1.65;margin:6px 0 10px}
.maprows{display:grid;gap:8px;margin:8px 0 12px}
.maprow{display:grid;grid-template-columns:130px minmax(0,1fr);align-items:center;gap:10px}
.maprow .badge{justify-content:center}
.maprow .input{height:38px;font-size:14px}
.btn-ghost-danger{color:#b91c1c;border-color:#fecaca}
/* order header: compact status picker + actions menu */
.hdr-actions{gap:8px}
.stpick{margin:0}
.stsel{appearance:none;-webkit-appearance:none;height:32px;padding:0 28px 0 12px;border-radius:16px;border:1px solid;font-family:inherit;font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.3px;cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23475569' stroke-width='1.6' fill='none'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 11px center;max-width:46vw}
.stsel option{text-transform:none;background:#fff;color:#0f172a;font-weight:600}
.menu{position:relative}
.menu>summary{list-style:none;cursor:pointer;font-size:22px;font-weight:700}
.menu>summary::-webkit-details-marker{display:none}
.menu[open]>summary{background:#f1f5f9}
.menu-list{position:absolute;right:0;top:calc(100% + 6px);z-index:30;min-width:240px;background:#fff;border:1px solid #e2e8f0;border-radius:10px;box-shadow:0 10px 30px rgba(15,23,42,.18);padding:6px}
.menu-list form{margin:0}
.mi{display:flex;align-items:center;gap:8px;width:100%;min-height:42px;padding:0 12px;border:none;background:none;border-radius:8px;font-family:inherit;font-size:14px;font-weight:600;color:#0f172a;text-align:left;cursor:pointer;list-style:none}
.mi:hover{background:#f8fafc}
.mi-danger{color:#b91c1c}
.mi-confirm>summary::-webkit-details-marker{display:none}
.mi-confirm[open]>summary{background:#fef2f2}
.mi-sub{padding:6px 8px 8px}.mi-sub .hint{margin:0 0 8px}
.arch{display:inline-flex;vertical-align:middle;height:20px;align-items:center;padding:0 8px;border-radius:10px;background:#f1f5f9;color:#475569;font-size:11px;font-weight:700;letter-spacing:.3px;text-transform:uppercase}
.st-arch{background:#f8fafc;color:#475569;border-color:#e2e8f0}
/* stage 5: reminders, return, print */
.narrow{max-width:640px}
.dt .input{font-size:16px}
.area{height:auto;min-height:110px;padding:10px 12px;line-height:1.45;resize:vertical}
.remrow{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;padding:10px 0;border-bottom:1px dashed #e2e8f0}
.remrow:last-child{border-bottom:none}.remrow.done{opacity:.55}
.remflag{font-size:16px;text-decoration:none;vertical-align:middle}
.mi-links{padding:2px 0 4px 18px}.mi-links .mi{min-height:38px;font-size:13.5px;font-weight:600;color:#2563eb}
.mi .cnt{margin-left:auto}
a.mi{text-decoration:none}
#cnt{white-space:nowrap}
/* stage 6: sms */
.smstpl{border-top:1px dashed #e2e8f0;padding-top:10px;margin-top:6px}
.smstpl .check{margin-bottom:6px;flex-wrap:wrap}
.sms-area{min-height:78px;font-size:14px}
.input.mini{width:56px;height:30px;padding:0 6px;font-size:14px;display:inline-block}
code.var{background:#f1f5f9;border-radius:4px;padding:1px 5px;font-size:12px;color:#334155}
/* inline sms */
.smschips{margin-bottom:8px}
.tplsearch{height:36px;font-size:14px;margin-bottom:8px}
.smsbar{margin-top:6px}
.linkbtn{border:none;background:none;color:#2563eb;font-family:inherit;font-size:12.5px;font-weight:600;cursor:pointer;padding:0}
.tplform{margin-top:10px}
.smslog{margin-top:10px;border-top:1px dashed #e2e8f0;padding-top:8px;display:grid;gap:4px}
.smslog .small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* order card menu */
.cardwrap{position:relative}
.cardwrap .cardhead{padding-right:56px}
.cardmenu{position:absolute;top:7px;right:8px}
.cardmenu>summary{width:36px;height:36px;font-size:20px;border-color:transparent;background:transparent}
.cardmenu[open]>summary{background:#f1f5f9;border-color:#e2e8f0}
.cardmenu .menu-list{top:calc(100% + 4px)}
/* SMS templates: one row, free horizontal scroll (no snapping) */
.smschips{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scroll-snap-type:none;scrollbar-width:none;padding-bottom:2px;margin-left:-2px;margin-right:-2px;padding-left:2px;padding-right:2px;overscroll-behavior-x:contain}
.smschips::-webkit-scrollbar{display:none}
.smschips .chip{flex:none;height:28px;padding:0 10px;font-size:12px;border-radius:14px;white-space:nowrap}
.smschips .chip[hidden]{display:none}
@media (hover:hover){.smschips{scrollbar-width:thin}.smschips::-webkit-scrollbar{display:block;height:4px}.smschips::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:2px}}
/* "More" page */
.morelist{display:flex;flex-direction:column}
.morelist a,.morelist .mrow{display:flex;align-items:center;gap:12px;padding:14px 4px;border-bottom:1px solid #eef2f7;color:#0f172a;text-decoration:none;font-weight:600;font-size:14px}
.morelist a:last-child{border-bottom:0}
.morelist .mic{width:34px;height:34px;border-radius:9px;background:#eff6ff;color:#2563eb;display:flex;align-items:center;justify-content:center;flex:none;font-size:16px}
.morelist .msub{display:block;font-weight:400;font-size:12px;color:#64748b;margin-top:2px}
.morelist .chev{margin-left:auto;color:#94a3b8;font-size:18px}
.morelist .dis{opacity:.55;pointer-events:none}
.itemedit{width:32px;height:40px;flex:none}
.itemrow{grid-template-columns:1fr 64px 90px 40px}
.itemrow .itemedit{width:40px;padding:0;font-size:14px}
.itemrow.on .itemedit{border-color:#2563eb;background:#eff6ff}
@media (max-width:599px){.itemrow{grid-template-columns:72px 1fr 40px}}
.alert.info{background:#eff6ff;color:#1e40af;border:1px solid #bfdbfe;font-weight:500}
.itemrow+.alert.info,#itemsoon{margin-top:4px}
.morelist .soon{margin-left:auto;font-size:10px;text-transform:uppercase;letter-spacing:.04em;color:#94a3b8;font-weight:700}
.tab-dis{opacity:.4;pointer-events:none}
.gear{color:#334155}
/* "More": plan card (as in the prototype) and menu rows */
.plancard{display:block;background:#1e293b;color:#fff;border-radius:12px;padding:14px 16px;margin-bottom:12px;text-decoration:none;box-shadow:0 6px 18px rgba(15,23,42,.18)}
.plancard .plabel{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#94a3b8}
.pbadge{display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:11px;background:#14532d;border:1px solid #166534;color:#bbf7d0;font-size:11px;font-weight:700}
.pbadge.off{background:#7f1d1d;border-color:#991b1b;color:#fecaca}
.plancard .pname{font-size:18px;font-weight:800;margin-top:4px}
.plancard .pdesc{font-size:12px;color:#cbd5e1;margin-top:2px}
.pbar{height:4px;border-radius:2px;background:#334155;margin-top:12px;overflow:hidden}.pbar span{display:block;height:100%;background:#4ade80;border-radius:2px}
.mlist{padding:0;overflow:hidden}
.mrow{display:flex;align-items:center;gap:12px;padding:12px 14px;border-bottom:1px solid #eef2f7;color:#0f172a;text-decoration:none}
.mlist .mrow:last-child{border-bottom:0}
a.mrow:hover{background:#f8fafc}
.mrow.dis{opacity:.55}
.mi2{width:36px;height:36px;border-radius:9px;border:1px solid;display:flex;align-items:center;justify-content:center;flex:none}
.mtxt{flex:1;min-width:0;display:flex;flex-direction:column}
.mt{font-size:14px;font-weight:700}.ms{font-size:12px;color:#64748b;margin-top:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mrow .soon,.morelist .soon{margin-left:auto;font-size:10px;text-transform:uppercase;letter-spacing:.04em;color:#94a3b8;font-weight:700}
.plans{display:flex;flex-direction:column;gap:6px;margin-bottom:12px}
.plan{display:flex;align-items:center;justify-content:space-between;border:1px solid #e2e8f0;border-radius:8px;padding:10px 12px}
.pprice{font-weight:800;font-size:15px}
.btn:disabled{opacity:.6;cursor:not-allowed}
.profile{display:flex;align-items:center;gap:12px}
.avatar{width:44px;height:44px;border-radius:50%;background:#2563eb;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:18px;flex:none}
.avatar.sm{width:32px;height:32px;font-size:13px;background:#e0f2fe;color:#0369a1}
.chatrow{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap}
.chatwho{display:flex;align-items:center;gap:10px;min-width:0}
.chatwho b{overflow-wrap:anywhere}
.reqbox{background:#fffbeb;border:1px solid #fde68a;border-radius:10px;padding:10px 12px;margin-bottom:12px}
.reqbox .chatrow.pending{background:#fff;border-color:#fde68a}
.chatrow details.confirm[open]{display:flex;gap:6px}
/* platform admin */
.admintop{background:#0f172a;border-bottom-color:#0f172a}
.admintop .h1{color:#fff}.admintop .brand-sm{color:#94a3b8}.admintop .iconbtn{background:#1e293b;border-color:#334155;color:#e2e8f0}
.adseg{display:flex;background:#e2e8f0;border-radius:8px;padding:3px;gap:3px;margin-bottom:12px}
.adseg a{flex:1;display:flex;align-items:center;justify-content:center;gap:5px;height:34px;border-radius:6px;font-size:12.5px;font-weight:700;color:#334155;text-decoration:none}
.adseg a.on{background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.08)}
.paycard{border-color:#fde68a}
.aname{font-size:14.5px;color:#0f172a}
.btn-ok{background:#16a34a;border-color:#16a34a;color:#fff;font-weight:700}
.accrow{padding:12px 14px}.accrow>summary{list-style:none;cursor:pointer}.accrow>summary::-webkit-details-marker{display:none}
.extgrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.reqrow{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;padding:10px 0;border-bottom:1px dashed #e2e8f0}
.reqrow.off{opacity:.5}
.pre{white-space:pre-line;overflow-wrap:anywhere}
.adminrow{background:#fff;border:1px solid #e2e8f0;border-radius:10px;margin-bottom:12px;box-shadow:0 1px 3px rgba(0,0,0,.04)}
/* brand */
.sidelogo{display:flex;align-items:center;gap:9px;color:#fff;text-decoration:none;font-family:'Unbounded',sans-serif;font-weight:600;font-size:13px;letter-spacing:-.01em;margin-bottom:10px}
.authlogo{display:flex;align-items:center;gap:10px;color:#0f172a;text-decoration:none;font-family:'Unbounded',sans-serif;font-weight:600;font-size:16px;letter-spacing:-.01em;margin-bottom:18px}
.installbox{display:flex;align-items:center;gap:12px;background:#0f172a;color:#cbd5e1;border-radius:12px;padding:12px 14px;margin:0 0 14px}
.installbox[hidden]{display:none}
.installbox img{border-radius:10px;flex:none}
.installbox div{flex:1;font-size:12.5px;line-height:1.45}
.installbox b{display:block;color:#fff;font-size:13.5px}

/* subscription ending */
.paybanner{display:block;padding:10px 16px;font-size:13px;font-weight:700;text-decoration:none;text-align:center}
.paybanner.soon{background:#fef3c7;color:#92400e;border-bottom:1px solid #fde68a}
.paybanner.grace{background:#fee2e2;color:#991b1b;border-bottom:1px solid #fecaca}
.lockcard{background:#0f172a;color:#cbd5e1;border-radius:14px;padding:20px;margin-bottom:12px}
.lockcard h2{color:#fff;font-size:20px;margin:6px 0 6px}
.lockcard .stat{display:flex;gap:10px;margin-top:14px}
.lockcard .stat div{flex:1;background:#1e293b;border-radius:10px;padding:10px 12px}
.lockcard .stat b{display:block;color:#fff;font-size:20px}
/* import from a spreadsheet */
.gscols{display:flex;flex-direction:column;gap:6px}
.gscol{display:grid;grid-template-columns:28px minmax(0,1fr) 190px;gap:10px;align-items:center;padding:7px 10px;border:1px solid #e2e8f0;border-radius:8px;background:#f8fafc}
.gscol.set{background:#fff;border-color:#bfdbfe}
.gsl{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:6px;background:#e2e8f0;color:#334155;font:700 12px 'JetBrains Mono',monospace}
.gscol.set .gsl{background:#dbeafe;color:#1d4ed8}
.gsinfo{display:flex;flex-direction:column;gap:4px;font-size:13px;color:#475569}
.gslink{font-weight:700;color:#1d4ed8;text-decoration:none}
.errpanel{border-color:#fecaca}
.errlist{display:flex;flex-direction:column;gap:6px}
.erow{display:grid;grid-template-columns:auto 1fr;gap:10px;align-items:flex-start;font-size:13px;padding:8px 10px;background:#fef2f2;border-radius:8px;line-height:1.45}
.eno{min-width:34px;height:24px;padding:0 6px;border-radius:6px;background:#fee2e2;color:#991b1b;font:700 12px 'JetBrains Mono',monospace;display:flex;align-items:center;justify-content:center}
.eno:before{content:"ряд. ";font-weight:600;font-size:10px;margin-right:2px}
.radios{display:flex;flex-direction:column;gap:8px}
.ich{min-width:0;display:flex;flex-direction:column;gap:2px}
.ich b{font-size:13.5px}
.isamp{font-size:12px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.isel{height:36px;font-size:13.5px;padding:0 8px}
.strow{display:grid;grid-template-columns:minmax(0,1fr) 180px;gap:10px;align-items:center;padding:6px 0;border-bottom:1px solid #f1f5f9}
.strow:last-of-type{border-bottom:0}
.chk{display:flex;gap:8px;align-items:flex-start;font-size:13.5px;font-weight:600;color:#0f172a;cursor:pointer}
.chk input{width:18px;height:18px;margin-top:1px;flex:none}
.sticky-actions{position:sticky;bottom:calc(64px + env(safe-area-inset-bottom));background:linear-gradient(transparent,#f1f5f9 30%);padding:14px 0 6px;z-index:4}
@media (min-width:900px){.sticky-actions{bottom:0}}
@media (max-width:520px){.gscol{grid-template-columns:28px minmax(0,1fr)}.gscol .isel{grid-column:1/-1}.strow{grid-template-columns:1fr;gap:6px}}
.emptycols{margin-top:10px}.emptycols>summary{font-size:13px;font-weight:700;color:#64748b;cursor:pointer;padding:6px 0}
.elines{display:flex;flex-direction:column;gap:3px}
/* table hub, data view, export, bulk */
.tiles{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:12px}
.tile{display:flex;flex-direction:column;gap:6px;aspect-ratio:1/1;max-height:260px;padding:18px;background:#fff;border:1px solid #e2e8f0;border-radius:14px;box-shadow:0 1px 3px rgba(0,0,0,.04);color:#0f172a;text-decoration:none;transition:border-color .15s,transform .15s}
.tile:hover{border-color:#93c5fd;transform:translateY(-1px)}
.tile b{font-size:20px;margin-top:auto}
.tico{width:48px;height:48px;border-radius:12px;display:flex;align-items:center;justify-content:center}
.ti-in{background:#dbeafe;color:#1d4ed8}.ti-out{background:#dcfce7;color:#166534}
.tdesc{font-size:13px;color:#64748b;line-height:1.35}
.tstat{font-size:12px;font-weight:600;color:#475569}.tstat em{color:#b91c1c;font-style:normal}
.datarow{display:flex}
.wrapc.wide{max-width:none}
.dhead{flex-wrap:wrap;margin-bottom:8px}
.dtabs{margin:0}
.st-err .cnt{background:#fee2e2;color:#991b1b}
.dwrap{overflow:auto;max-height:calc(100vh - 210px);background:#fff;border:1px solid #e2e8f0;border-radius:10px}
.dtable{border-collapse:separate;border-spacing:0;font-size:12.5px;min-width:100%}
.dtable th,.dtable td{border-bottom:1px solid #eef2f6;border-right:1px solid #eef2f6;padding:6px 8px;text-align:left;vertical-align:top;max-width:220px;min-width:64px}
.dtable td{white-space:nowrap}
.dtable .cv{display:block;overflow:hidden;text-overflow:ellipsis}
.dtable thead th{position:sticky;top:0;background:#f8fafc;z-index:2;font-weight:600;white-space:normal}
.dtable thead th.map{background:#eff6ff}
.dtable .dn{position:sticky;left:0;background:#f8fafc;z-index:1;min-width:44px;font:600 11px 'JetBrains Mono',monospace;color:#64748b;text-align:right}
.dtable thead .dn{z-index:3}
.dtable .dres{min-width:96px;white-space:nowrap}
.dl{display:inline-block;font:700 10px 'JetBrains Mono',monospace;color:#64748b;margin-right:4px}
.dh{font-weight:700;color:#0f172a}
.dt{display:block;font-size:10.5px;font-weight:600;color:#94a3b8;text-transform:uppercase;letter-spacing:.03em;margin-top:2px}
.map .dt{color:#1d4ed8}
td.map{background:#fbfdff}
td.cerr{background:#fee2e2!important;color:#991b1b}
.cmsg{display:block;font-size:10.5px;font-weight:700;margin-top:3px;white-space:normal;min-width:140px}
tr.rerr .dn{color:#b91c1c}
.rbad{color:#b91c1c;font-weight:700}
.dres a{font-weight:700;color:#166534;text-decoration:none}
.pager{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:10px}
.gonerow{text-decoration:none;color:inherit;background:#fffbeb}.gonerow .eno{background:#fef3c7;color:#92400e}
.exgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 12px}
.subbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:-2px 0 12px}
.srcs{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none}.srcs::-webkit-scrollbar{display:none}
.chip2{flex:none;display:inline-flex;align-items:center;height:30px;padding:0 11px;border-radius:15px;border:1px solid #e2e8f0;background:#fff;font-size:12.5px;font-weight:600;color:#334155;text-decoration:none;cursor:pointer;font-family:inherit;white-space:nowrap}
.chip2.on{background:#0f172a;border-color:#0f172a;color:#fff}
.warnchip{border-color:#fde68a;background:#fffbeb;color:#92400e}.warnchip.on{background:#d97706;border-color:#d97706;color:#fff}
.srcwarn{background:#fef3c7!important;color:#92400e!important}
.srcgone{background:#fee2e2!important;color:#991b1b!important}
.cardwrap.selmode{padding-left:40px}
.selbox{position:absolute;left:0;top:0;bottom:0;width:36px;display:flex;align-items:center;justify-content:center;cursor:pointer}
.selbox input{width:20px;height:20px}
.bulkbar{position:sticky;bottom:calc(66px + env(safe-area-inset-bottom));z-index:6;margin-top:12px;background:#0f172a;color:#fff;border-radius:12px;padding:10px 12px;display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;box-shadow:0 8px 24px rgba(15,23,42,.25)}
.bulkbar .chk{color:#fff}
.bulkbtns{display:flex;flex-wrap:wrap;gap:6px}
.bulkbar .btn:not(.btn-p){background:#1e293b;border-color:#334155;color:#e2e8f0}
@media (min-width:900px){.bulkbar{bottom:12px}}
.impstats2{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:12px}
.impstats2 div{background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:12px;text-align:center}
.impstats2 b{display:block;font-size:24px;color:#166534}.impstats2 .bad b{color:#b91c1c}
.impstats2 span{font-size:12px;color:#64748b}
.resrow{display:grid;grid-template-columns:24px 1fr;gap:8px;padding:8px 0;border-bottom:1px solid #f1f5f9}
.resrow:last-child{border-bottom:0}
.resrow a{color:#0f172a;text-decoration:none}
.ricon{font-weight:800}.resrow.rgood .ricon{color:#16a34a}.resrow.rfail .ricon{color:#dc2626}
.sheetlink{color:#1d4ed8;text-decoration:none;font-weight:600}.sheetlink.gone{color:#b91c1c}
@media (max-width:520px){.exgrid{grid-template-columns:1fr 1fr}.tile{padding:14px}.tile b{font-size:18px}.tdesc{font-size:12px}}
.cardhead>*{flex:none;white-space:nowrap}
.cardhead .sp{flex:1}
.cardhead .src{max-width:110px;overflow:hidden;text-overflow:ellipsis}
.sidelogo span{white-space:nowrap;font-size:12px}
@media (max-width:420px){.mtime{display:none}.cardhead{gap:6px}.selmode .cardhead .meta{display:none}.hide-s{display:none}}
/* accounts */
.accswitch{display:flex;align-items:center;gap:12px;text-decoration:none;color:inherit}
.accav{flex:none;width:38px;height:38px;border-radius:10px;background:#0f172a;color:#a3e635;display:flex;align-items:center;justify-content:center;font:700 16px 'Unbounded',sans-serif}
.acctxt{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.acctxt b{font-size:14.5px;color:#0f172a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.acctxt .small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.acctxt .badge{align-self:flex-start;margin-top:3px;height:20px;font-size:10px;padding:0 8px}
.accact{flex:none;font-size:12.5px;font-weight:700;color:#1d4ed8}
.accrow2{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid #f1f5f9}
.accrow2:last-of-type{border-bottom:0}
.accrow2.cur .accav{background:#2563eb;color:#fff}
.accbtns{display:flex;gap:6px;align-items:center;flex:none}
.accbtns details.confirm[open]{display:flex;gap:6px}
details.panel.acc>summary{cursor:pointer;list-style:none;font-size:14px}
details.panel.acc>summary::-webkit-details-marker{display:none}
.brandsw{display:block;text-decoration:none;color:inherit}
.swi{font-size:11px;font-weight:700;color:#a3e635;margin-left:4px}
@media (max-width:520px){.accrow2{flex-wrap:wrap}.accbtns{margin-left:50px}}
.morelogo{display:flex;align-items:center;gap:10px;text-decoration:none;color:#0f172a;font-family:'Unbounded',sans-serif;font-weight:600;font-size:14px;line-height:1.15;letter-spacing:-.01em}
.morelogo img{flex:none}
/* home: analytics */
.hidden{display:none!important}
.main.loading .dash{opacity:.55;transition:opacity .15s}
.dper{white-space:nowrap}
.dfilters{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}
.dperiods{margin:0 -12px;padding:0 12px}
.chip2.busy{opacity:.6}
.dcustom{display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap;background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:10px}
.dcustom .field{margin:0;flex:1;min-width:130px}.dcustom .input{height:38px;font-size:14px}.dcustom .btn{height:38px}
.dsel{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}
.dsel select[name=product]{grid-column:1/-1}
.kgrid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
.kpi{background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:12px 14px;display:flex;flex-direction:column;gap:2px;min-width:0;box-shadow:0 1px 3px rgba(0,0,0,.04)}
.kl{font-size:11px;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.06em}
.kv{font-size:26px;font-weight:800;color:#0f172a;letter-spacing:-.02em;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
.kv small{font-size:15px;font-weight:700;color:#64748b;margin-left:1px}
.ks{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;font-size:11.5px;color:#64748b;min-height:17px}
.kd{font-weight:700;font-size:11.5px;white-space:nowrap}.kd.up{color:#15803d}.kd.down{color:#b91c1c}.kd.flat{color:#64748b}
.dvs{margin:6px 2px 12px}
.dchartp{padding-bottom:10px}.dchartp .ptitle{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.dseg{flex:none;display:inline-flex;background:#f1f5f9;border-radius:8px;padding:2px;gap:2px}
.dseg button{border:none;background:none;height:28px;padding:0 10px;border-radius:6px;font:600 12px 'Open Sans',sans-serif;color:#64748b;cursor:pointer}
.dseg button.on{background:#fff;color:#0f172a;box-shadow:0 1px 2px rgba(0,0,0,.08)}
.dchart{position:relative;margin-top:10px;min-height:190px}
.dchart svg{display:block;overflow:visible}
.cgrid{stroke:#eef2f6;stroke-width:1}.cbase{stroke:#cbd5e1;stroke-width:1}
.caxis{font:500 10.5px 'Open Sans',sans-serif;fill:#64748b}
.cbar{fill:#2563eb}.cbar.hot{fill:#1e40af}
.ctip{position:absolute;z-index:3;pointer-events:none;background:#0f172a;color:#e2e8f0;border-radius:8px;padding:8px 10px;font-size:12px;display:flex;flex-direction:column;gap:2px;white-space:nowrap;box-shadow:0 6px 18px rgba(15,23,42,.25);transform:translateY(-100%);margin-top:-6px}
.ctip[hidden]{display:none}.ctip b{color:#fff;font-size:12.5px}.ctip span{display:flex;justify-content:space-between;gap:14px}.ctip em{font-style:normal;font-weight:700;color:#fff;font-variant-numeric:tabular-nums}
.dtablev{margin-top:8px;font-size:12.5px}.dtablev summary{cursor:pointer;color:#64748b;font-weight:600;font-size:12px}
.dtablev table{width:100%;border-collapse:collapse;margin-top:6px}.dtablev th,.dtablev td{text-align:left;padding:5px 6px;border-bottom:1px solid #eef2f6}.dtablev th{color:#64748b;font-size:11px;text-transform:uppercase;letter-spacing:.04em}
.dtablev td:nth-child(n+2),.dtablev th:nth-child(n+2){text-align:right;font-variant-numeric:tabular-nums}
.dgrid{display:grid;grid-template-columns:minmax(0,1fr);gap:0 12px}
.hbar{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 10px;padding:7px 0;color:inherit;text-decoration:none;border-radius:6px}
a.hbar:hover .hl{color:#2563eb}
.hl{font-size:13px;font-weight:600;color:#0f172a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hl .badge{height:20px;font-size:10px;padding:0 8px}
.hv{font-size:13px;font-weight:700;color:#0f172a;font-variant-numeric:tabular-nums;white-space:nowrap}
.hv em{font-style:normal;font-weight:600;color:#64748b;margin-left:8px;font-size:12px}
.ht{grid-column:1/-1;height:6px;background:#f1f5f9;border-radius:3px;overflow:hidden}
.ht i{display:block;height:100%;background:#2563eb;border-radius:0 3px 3px 0;min-width:3px}
.split{display:flex;gap:2px;height:10px;border-radius:5px;overflow:hidden}
.split i{display:block;min-width:4px}.sp1{background:#2563eb}.sp2{background:#d97706}
.splitl{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:8px;font-size:12px;color:#334155}
.splitl span{display:inline-flex;align-items:center;gap:6px}.splitl i{width:10px;height:10px;border-radius:3px;display:inline-block}
@media (min-width:700px){
  .dfilters{flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between}
  .dperiods{margin:0;padding:0}
  .dcustom{order:3;width:100%}
  .dsel{display:flex;gap:8px}.dsel select{width:auto;max-width:220px}
  .kgrid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .dgrid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
}
@media (min-width:900px){.wrapc.dash{max-width:1120px;padding:16px 20px}.kv{font-size:28px}}
@media (max-width:380px){.kv{font-size:22px}}
/* home: transit, forecast, speed, returns */
.dtop{margin-top:2px}
.bigv{display:block;font-size:28px;font-weight:800;color:#0f172a;letter-spacing:-.02em;margin:6px 0 2px;font-variant-numeric:tabular-nums;white-space:nowrap}
.bigv small{font-size:16px;color:#64748b}
.trow{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 0;border-top:1px solid #f1f5f9;font-size:13px;color:#334155;text-decoration:none}
.trow span:first-child{display:inline-flex;align-items:center;gap:8px;min-width:0}
a.trow:hover span:first-child{color:#2563eb}
.trow.tlate{color:#9a3412;font-weight:600}
.trow .ell{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dot{width:8px;height:8px;border-radius:50%;flex:none}.d-sent{background:#7c3aed}.d-branch{background:#0d9488}
.fcbar{position:relative;height:12px;background:#e2e8f0;border-radius:6px;margin-top:4px}
.fcbar i{position:absolute;left:0;top:0;bottom:0;background:#2563eb;border-radius:6px 0 0 6px;min-width:4px}
.fcbar b{position:absolute;top:-4px;bottom:-4px;width:2px;background:#0f172a;border-radius:1px;margin-left:-1px}
.fcl{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-top:8px;font-size:12px;color:#64748b}.fcl b{color:#0f172a}
.plink{white-space:nowrap;color:#2563eb;font-weight:600}
.spd{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.spstep{background:#f8fafc;border:1px solid #eef2f6;border-radius:8px;padding:10px;display:flex;flex-direction:column;gap:2px;min-width:0}
.spl{font-size:11px;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.04em}
.spv{font-size:20px;font-weight:800;color:#0f172a;white-space:nowrap}
.sph{font-size:11px;color:#64748b;line-height:1.3}
.rgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:6px}
.rgrid>div{display:flex;flex-direction:column;gap:2px;min-width:0}
.rv{font-size:18px;font-weight:800;color:#0f172a;white-space:nowrap}.rv.bad{color:#b91c1c}
/* names page */
.pnsearch{margin-bottom:10px}
.pnlist{padding:4px 14px}
.pnrow{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:4px 10px;padding:10px 0;border-top:1px solid #f1f5f9}
.pnrow:first-child{border-top:none}
.pncheck{display:flex;align-items:center;gap:10px;min-width:0;cursor:pointer}
.pncheck input{width:18px;height:18px;flex:none}
.pnname{font-size:13.5px;font-weight:600;color:#0f172a;overflow-wrap:anywhere}
.pncnt{font-size:12px;font-weight:700;color:#64748b;background:#f1f5f9;border-radius:9px;padding:1px 7px}
.pnsplit{grid-column:3}
.pnmem{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:4px 6px;padding-left:28px}
.pnmem span{font-size:11.5px;color:#64748b;background:#f8fafc;border:1px solid #eef2f6;border-radius:6px;padding:1px 6px;overflow-wrap:anywhere}
.pnmem .pntag{background:#e0f2fe;border-color:#bae6fd;color:#0369a1;font-weight:700}.pnmem .pntag.auto{background:#f1f5f9;border-color:#e2e8f0;color:#475569}
.pnbar{position:sticky;bottom:calc(76px + env(safe-area-inset-bottom));z-index:4;background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:10px;display:flex;flex-wrap:wrap;gap:8px;box-shadow:0 6px 18px rgba(15,23,42,.12)}
.pnbar .input{flex:1;min-width:180px;height:40px;font-size:14px}.pnbar .alert{width:100%;margin:0}
@media (min-width:900px){.pnbar{bottom:12px}}
@media (max-width:420px){.spd{grid-template-columns:1fr}.spstep{flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:2px 10px}.spstep .spl{width:100%}.rv{font-size:16px}}
.dprod{grid-column:1/-1;display:flex;gap:8px;min-width:0}.dprod select{flex:1;min-width:0}.dnames{height:36px;white-space:nowrap;flex:none}
@media (min-width:700px){.dprod select{max-width:220px}}
/* table: several imports */
.implist{margin-top:8px}
.improw{display:flex;align-items:center;gap:12px;padding:11px 0;border-top:1px solid #f1f5f9;color:inherit;text-decoration:none}
.improw:first-child{border-top:none}
.impico{width:36px;height:36px;border-radius:9px;background:#e0f2fe;color:#0369a1;border:1px solid #bae6fd;display:inline-flex;align-items:center;justify-content:center;font-size:17px;flex:none}
.imptxt{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.imptxt b{font-size:14px;color:#0f172a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.imptxt span{font-size:12px;color:#64748b}.imptxt em{font-style:normal;color:#b91c1c;font-weight:600}
a.improw:hover b{color:#2563eb}
.impnew{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;margin-top:10px;padding-top:12px;border-top:1px solid #f1f5f9}
.tablist{display:flex;flex-direction:column;gap:6px}
.tabopt{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;cursor:pointer}
.tabopt:has(input:checked){border-color:#2563eb;background:#eff6ff}
.tabopt input{width:18px;height:18px;flex:none}
.tabopt span{display:flex;flex-direction:column;min-width:0}.tabopt b{color:#0f172a;font-size:14px;overflow-wrap:anywhere}.tabopt em{font-style:normal;font-size:12px;color:#64748b}
.tabopt.tused em{color:#92400e}
.tabpick{display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap}
.btn-dangerline{color:#b91c1c;border-color:#fecaca}
details.confirm[open]:has(.confirmbox){flex-basis:100%;flex-direction:column;align-items:stretch}
details.confirm[open]:has(.confirmbox)>*{flex:none!important}
.confirmbox{background:#fef2f2;border:1px solid #fecaca;border-radius:8px;padding:10px 12px;margin-top:8px}
.confirmbox .btn{width:100%}
.chipch{color:#475569;background:#f8fafc}
/* FAQ */
.faqtoc{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 14px}
.faqs{background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:14px 14px 4px;margin-bottom:12px;box-shadow:0 1px 3px rgba(0,0,0,.04);scroll-margin-top:80px}
.faqi{border-top:1px solid #f1f5f9}
.faqs .ptitle+.faqi{border-top:none}
.faqi summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 0;font-weight:700;font-size:14px;color:#0f172a}
.faqi summary::-webkit-details-marker{display:none}
.faqi summary::after{content:"";width:8px;height:8px;border-right:2px solid #94a3b8;border-bottom:2px solid #94a3b8;transform:rotate(45deg);flex:none;margin-top:-4px;transition:transform .15s}
.faqi[open] summary::after{transform:rotate(-135deg);margin-top:4px}
.faqi[open] summary{color:#2563eb}
.faqa{padding:0 0 12px;font-size:13.5px;line-height:1.6;color:#334155}
.faqa p{margin:0 0 8px}.faqa p:last-child{margin-bottom:0}
.faqa ul,.faqa ol{margin:0 0 8px;padding-left:20px}.faqa li{margin:3px 0}
.faqa .badge{margin:2px 0}
.faqhelp{text-align:center}
/* platform admin */
.admbody .side{background:#0b1220}
.admtag{display:inline-block;margin:0 10px 16px;padding:3px 8px;border-radius:6px;background:#7c2d12;color:#fed7aa;font-size:10.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;align-self:flex-start}
.navcnt{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:#dc2626;color:#fff;font-size:11px;font-weight:800}
.admme{margin-top:auto;display:flex;flex-direction:column;gap:4px;padding:10px;border-top:1px solid #1e293b;font-size:12px;color:#94a3b8;word-break:break-all}.admme a{color:#cbd5e1;font-weight:700}
.tab{position:relative}.tabdot{position:absolute;top:2px;left:calc(50% + 6px);min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:#dc2626;color:#fff;font-size:10px;line-height:16px}
a.kpi.klink{text-decoration:none;color:inherit}a.kpi.klink:hover{border-color:#93c5fd}
.admrow{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 0;border-top:1px solid #f1f5f9;color:inherit;text-decoration:none}
.admrow:first-of-type{border-top:none}
.admrow .ell{display:flex;flex-direction:column;min-width:0}.admrow .ell b,.admrow .ell em{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.admrow .ell b{font-size:13.5px;color:#0f172a}.admrow .ell em{font-style:normal;font-size:12px;color:#64748b}
.admlist{padding:4px 14px}
.admclient{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid #f1f5f9;color:inherit;text-decoration:none}
.admclient:first-child{border-top:none}a.admclient:hover b{color:#2563eb}
.acav{width:38px;height:38px;border-radius:10px;background:#e2e8f0;color:#334155;font-weight:800;display:inline-flex;align-items:center;justify-content:center;flex:none}
.actxt{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.actxt b{font-size:14px;color:#0f172a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.actxt em{font-style:normal;font-size:12px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.acchips{display:flex;flex-wrap:wrap;gap:4px}
.acchips span{font-size:11px;font-weight:600;color:#334155;background:#f1f5f9;border-radius:6px;padding:1px 6px}
.acchips span.off{color:#94a3b8;background:#f8fafc}
.acchips .acmoney{background:#dcfce7;color:#166534}.acchips .acerr{background:#fee2e2;color:#991b1b}
.acright{display:flex;flex-direction:column;align-items:flex-end;gap:4px;flex:none}
.kv2{display:flex;justify-content:space-between;gap:12px;padding:6px 0;border-top:1px solid #f1f5f9;font-size:13px}
.kv2:first-of-type{border-top:none}.kv2 span{color:#64748b}.kv2 b{text-align:right;color:#0f172a;overflow-wrap:anywhere}
.logrow{display:flex;flex-direction:column;gap:2px;padding:8px 0;border-top:1px solid #f1f5f9;font-size:13px}
.logrow:first-child{border-top:none}
.plangrid{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr);gap:8px;align-items:center}
.plangrid .input{height:38px;font-size:14px}
.promorow{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 0;border-top:1px solid #f1f5f9}
.promorow:first-of-type{border-top:none}
.impbanner{display:block;background:#7c2d12;color:#fff7ed;text-align:center;padding:9px 12px;font-size:13px;text-decoration:none;position:sticky;top:0;z-index:20}
.impbanner b{text-decoration:underline}
.codein{font-size:24px;letter-spacing:.3em;text-align:center}
.promoreg{margin:-4px 0 12px}.promoreg summary{cursor:pointer;color:#2563eb;font-weight:600}
.sortf{flex:none}.sortf .isel{width:auto}
@media (max-width:520px){.acright .small{display:none}.admclient{align-items:flex-start}}
/* warehouse */
.topbtns{gap:8px;flex-wrap:nowrap}
.plist2{display:grid;gap:8px;margin-bottom:12px}
.pcard{position:relative}
.pcard.selmode{padding-left:40px}
.pline{display:grid;grid-template-columns:48px minmax(0,1fr) auto;gap:12px;align-items:center;background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:10px 12px;color:#0f172a;text-decoration:none;box-shadow:0 1px 3px rgba(0,0,0,.04)}
a.pline:hover{border-color:#cbd5e1}
.pthumb{width:48px;height:48px;border-radius:8px;object-fit:cover;background:#f1f5f9;display:block}
.pnoimg{display:flex;align-items:center;justify-content:center;font-weight:800;color:#94a3b8;font-size:18px;border:1px solid #e2e8f0}
.pmain{min-width:0;display:flex;flex-direction:column;gap:2px}
.pmain .name{font-weight:700;font-size:14px;overflow:hidden;text-overflow:ellipsis}
.pmeta{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pfc{font-size:12px;color:#475569}
.pfc-low{color:#b45309}.pfc-out{color:#b91c1c}
.lowpanel{border-color:#fde68a;background:#fffbeb}
.lowhead{display:flex;align-items:center;gap:8px;margin-bottom:8px;color:#92400e}
.lowico{width:22px;height:22px;border-radius:11px;background:#d97706;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:13px;flex:none}
.lowlist{display:flex;flex-direction:column;margin-bottom:10px}
.lowrow{display:flex;justify-content:space-between;gap:10px;padding:7px 0;border-top:1px solid #fde68a;color:#0f172a;text-decoration:none;font-size:13px}
.lowname{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.lowmeta{flex:none;color:#78350f;text-align:right}
.tred{color:#b91c1c}
.movebar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;position:sticky;top:64px;z-index:4}
.movebar select{width:auto;min-width:0;flex:1 1 140px;height:34px}
.movebar .alert{flex-basis:100%}
.stocklinks{margin-top:4px}
/* product card */
.phead{display:flex;gap:14px;align-items:center;margin-bottom:12px}
.pbig{width:96px;height:96px;border-radius:10px;object-fit:cover;background:#f1f5f9;border:1px solid #e2e8f0;display:flex;align-items:center;justify-content:center;color:#94a3b8;font-size:30px;font-weight:800;flex:none}
.photobtns{display:flex;flex-direction:column;gap:6px;align-items:flex-start}
.statgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:10px}
@media (min-width:700px){.statgrid{grid-template-columns:repeat(4,minmax(0,1fr))}}
.stat{background:#f8fafc;border:1px solid #eef2f7;border-radius:8px;padding:8px 10px;min-width:0}
.stat .k{font-size:11px;color:#64748b;font-weight:700}.stat .v{font-size:16px;font-weight:800;margin-top:2px}
.stat.warn{background:#fffbeb;border-color:#fde68a}.stat.bad{background:#fef2f2;border-color:#fecaca}
.taglist{display:flex;flex-wrap:wrap;gap:6px}
.tagx{display:inline-flex;align-items:center;gap:4px;background:#f1f5f9;border:1px solid #e2e8f0;border-radius:14px;padding:0 4px 0 10px;font-size:12px;max-width:100%}
.tagx span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tagx button{border:none;background:none;color:#64748b;cursor:pointer;width:24px;height:24px;font-size:14px;border-radius:12px}
.tagx button:hover{background:#e2e8f0;color:#b91c1c}
/* supply */
.suprow{display:grid;grid-template-columns:40px minmax(0,1fr) 84px;gap:10px;align-items:center;padding:8px 0;border-bottom:1px solid #eef2f7}
.suprow:last-child{border-bottom:0}
.suprow.withcost{grid-template-columns:40px minmax(0,1fr) 84px 92px}
.suprow .pthumb{width:40px;height:40px}
.suprow .input{height:38px;text-align:center;padding:0 6px}
.suprow.has{background:#f0fdf4}
.supname{min-width:0}.supname b{display:block;font-size:13.5px;overflow:hidden;text-overflow:ellipsis}
.supbar{position:sticky;bottom:calc(68px + env(safe-area-inset-bottom));z-index:4;display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;background:#0f172a;color:#fff;border-radius:10px;padding:10px 12px;margin-top:12px;box-shadow:0 6px 20px rgba(15,23,42,.25)}
@media (min-width:900px){.supbar{bottom:12px}}
.supbar .btn{border-color:#fff}
.suphead{display:grid;grid-template-columns:40px minmax(0,1fr) 84px;gap:10px;font-size:11px;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.04em;padding-bottom:6px;border-bottom:1px solid #e2e8f0}
.suphead.withcost{grid-template-columns:40px minmax(0,1fr) 84px 92px}
.suphead span:nth-child(n+3){text-align:center}
.supitem{display:flex;justify-content:space-between;gap:10px;font-size:13px;padding:5px 0;border-top:1px dashed #e2e8f0}
.supitem span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.supcard.cx{opacity:.6}
.supcard .between{gap:10px}
.lnkrow{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 10px;align-items:start;padding:12px 0;border-bottom:1px solid #eef2f7}
.lnkrow:last-child{border-bottom:0}
.lnkrow .lnkform{grid-column:2;display:flex;gap:6px;flex-wrap:wrap}
.lnkrow .lnkform select{flex:1 1 180px;min-width:0;height:36px}
.lnkrow input[type=checkbox]{width:18px;height:18px;margin-top:2px}
.catrow{display:flex;gap:8px;align-items:center;padding:8px 0;border-bottom:1px solid #eef2f7;flex-wrap:wrap}
.catrow:last-child{border-bottom:0}
.catrow .input{flex:1 1 160px;min-width:0;height:36px}
.costcol[hidden],[hidden].pbig{display:none!important}
.homelow{display:flex;align-items:center;gap:10px;text-decoration:none;color:#92400e;padding:12px 14px}.homelow .mtxt{gap:1px}.homelow .small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pline .pstock{grid-area:auto;align-self:center}
