*{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}
.chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}
.chip{height:34px;padding:0 12px;border-radius:17px;border:1px solid #cbd5e1;background:#fff;font-family:inherit;font-size:13px;font-weight:600;color:#334155;cursor:pointer}
.chip.on{background:#2563eb;border-color:#2563eb;color:#fff}
.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}
.chip-own{border-style:dashed}
.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}
