:root{
  --bg:#f4f6f8; --card:#fff; --ink:#14181f; --muted:#7b8595;
  --brand:#0f8a5f; --brand-2:#12a672; --line:#e5e9ef; --accent:#ff7a45;
  --radius:16px; --shadow:0 6px 20px rgba(16,24,40,.08);
}
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
body{
  font-family:-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  background:var(--bg); color:var(--ink); line-height:1.45;
  display:flex; justify-content:center; min-height:100vh;
}
.phone{
  width:100%; max-width:460px; background:var(--bg); min-height:100vh;
  position:relative; padding-bottom:96px;
}
@media(min-width:520px){
  body{padding:24px 0; align-items:flex-start}
  .phone{min-height:calc(100vh - 48px); border-radius:28px; box-shadow:0 20px 50px rgba(16,24,40,.16); overflow:hidden}
}
/* header */
.top{
  background:linear-gradient(135deg,var(--brand),var(--brand-2));
  color:#fff; padding:18px 18px 22px; border-radius:0 0 22px 22px;
}
.top small{opacity:.85; font-size:12px; letter-spacing:.4px; text-transform:uppercase}
.top h1{font-size:20px; font-weight:700; margin-top:2px}
.top p{font-size:13px; opacity:.9; margin-top:6px}
.top-row{display:flex; justify-content:space-between; align-items:flex-start; gap:10px}
.club-btn{
  display:flex; align-items:center; gap:8px; padding:8px 10px; cursor:pointer;
  background:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.38);
  border-radius:14px; color:#fff; font:inherit; flex:0 0 auto;
}
.club-btn:hover{background:rgba(255,255,255,.28)}
.club-logo{font-size:20px; line-height:1}
.club-btn-text{font-size:10px; line-height:1.15; font-weight:800;
  letter-spacing:.4px; text-transform:uppercase; text-align:left}
.club-body{display:flex; flex-direction:column; gap:8px}
.club-body > div{display:flex; flex-direction:column; gap:6px}
.club-body b{font-size:15px}
.club-body .meta{display:block; font-size:12px; color:var(--muted)}
.tabs{display:flex; gap:8px; overflow-x:auto; padding:14px 14px 6px; scrollbar-width:none}
.tabs::-webkit-scrollbar{display:none}
.tab{
  flex:0 0 auto; border:1px solid var(--line); background:#fff; color:var(--muted);
  padding:8px 14px; border-radius:999px; font-size:13px; font-weight:600; cursor:pointer;
}
.tab.on{background:var(--ink); border-color:var(--ink); color:#fff}
/* dish */
.list{padding:8px 14px 14px; display:flex; flex-direction:column; gap:10px}
.dish{
  display:grid; grid-template-columns:56px 1fr; gap:12px; background:var(--card);
  border:1px solid var(--line); border-radius:var(--radius); padding:12px;
  box-shadow:var(--shadow); transition:.15s;
}
.dish.on{border-color:var(--brand); box-shadow:0 0 0 2px rgba(15,138,95,.15)}
.thumb{
  width:56px; height:56px; border-radius:14px; display:grid; place-items:center;
  font-size:28px; background:#eef7f2;
}
.dish-main{display:flex; flex-direction:column; gap:2px; min-width:0}
.dish-title{display:flex; justify-content:space-between; gap:8px; align-items:baseline}
.dish-title b{font-size:15px}
.price{font-weight:700; color:var(--brand); white-space:nowrap}
.meta{font-size:12px; color:var(--muted)}
.desc{font-size:12px; color:var(--muted); display:none; margin-top:4px}
.dish.open .desc{display:block}
.row{display:flex; justify-content:space-between; align-items:center; margin-top:8px}
.link{font-size:12px; color:var(--brand); cursor:pointer; background:none; border:0; font-weight:600}
.stepper{display:flex; align-items:center; gap:10px}
.stepper button{
  width:30px; height:30px; border-radius:10px; border:1px solid var(--line);
  background:#fff; font-size:18px; line-height:1; cursor:pointer; color:var(--ink);
}
.stepper span{min-width:16px; text-align:center; font-weight:700; font-size:14px}
.stepper button.on{background:var(--brand); border-color:var(--brand); color:#fff}
/* промокод */
.promo{
  margin:12px 14px 0; padding:10px 14px; border-radius:var(--radius);
  background:linear-gradient(135deg,#fff9e6,#ffeccc); border:1px dashed #e6b25a;
  font-size:13px; color:#7a5200; display:flex; gap:8px; align-items:center;
}
.promo b{font-size:13px}
.promo .code{background:#fff; border-radius:8px; padding:2px 8px; font-weight:700;
  font-family:ui-monospace,Consolas,monospace}
.promo.off{background:#f4f6f8; border-color:var(--line); color:var(--muted)}
.club-code{display:flex; gap:8px; margin-top:8px}
.club-code input{flex:1; font-size:13px; padding:9px 10px}
.club-qr{display:flex; gap:12px; align-items:center; margin-top:12px; flex-wrap:wrap}
.qr-img{width:104px; height:104px; border-radius:12px; border:1px solid var(--line); background:#fff}
.club-qr-side{display:flex; flex-direction:column; gap:6px; flex:1; min-width:140px}
.club-qr-side .btn{width:auto; align-self:flex-start}
/* повтор прошлого заказа */
.last{
  margin:12px 14px 0; background:#fff; border:1px solid var(--line); border-left:4px solid var(--brand);
  border-radius:var(--radius); padding:12px 14px; box-shadow:var(--shadow);
  display:flex; justify-content:space-between; align-items:center; gap:10px;
}
.last b{display:block; font-size:14px; margin-bottom:2px}
.last .meta{display:block; font-size:12px; color:var(--muted)}
.group-label{font-size:12px; font-weight:700; color:var(--muted); text-transform:uppercase;
  letter-spacing:.4px; margin:10px 0 2px}
.consent{display:flex; gap:8px; align-items:flex-start; font-size:12px; color:var(--muted);
  margin:4px 0 14px; line-height:1.35}
.consent input{margin-top:2px; width:16px; height:16px; accent-color:var(--brand)}
/* upsell */
.upsell{
  margin:6px 14px 0; background:linear-gradient(135deg,#fff4ec,#ffe9db);
  border:1px dashed #ffb992; border-radius:var(--radius); padding:12px 14px;
  display:flex; justify-content:space-between; align-items:center; gap:10px; font-size:13px;
}
.upsell b{display:block; font-size:14px}
.btn{
  border:0; border-radius:12px; padding:12px 16px; font-size:14px; font-weight:700;
  cursor:pointer; background:var(--brand); color:#fff; width:100%;
}
.btn.ghost{background:#fff; color:var(--ink); border:1px solid var(--line)}
.btn.accent{background:var(--accent)}
.btn:disabled{opacity:.5; cursor:not-allowed}
.btn.sm{width:auto; padding:8px 12px; font-size:13px; border-radius:10px}
/* cart bar */
.cart{
  position:fixed; bottom:0; left:0; right:0; max-width:460px; margin:0 auto;
  background:#fff; border-top:1px solid var(--line); padding:12px 14px 16px;
  box-shadow:0 -8px 24px rgba(16,24,40,.08); display:none; z-index:20;
}
.cart.show{display:block}
.cart-row{display:flex; justify-content:space-between; align-items:center; margin-bottom:10px}
.cart-row span{font-size:12px; color:var(--muted)}
.cart-row b{font-size:18px}
/* modal / sheet */
.mask{
  position:fixed; inset:0; background:rgba(10,15,25,.45); display:none;
  align-items:flex-end; justify-content:center; z-index:50;
}
.mask.show{display:flex}
.sheet{
  width:100%; max-width:460px; background:#fff; border-radius:22px 22px 0 0;
  padding:18px 18px 22px; max-height:92vh; overflow:auto;
  animation:up .18s ease-out;
}
@keyframes up{from{transform:translateY(20px);opacity:.6}to{transform:none;opacity:1}}
.sheet h2{font-size:18px; margin-bottom:4px}
.sheet p.hint{font-size:13px; color:var(--muted); margin-bottom:14px}
.chips{display:flex; flex-wrap:wrap; gap:8px; margin:6px 0 14px}
.chip{
  border:1px solid var(--line); border-radius:999px; padding:8px 12px; font-size:13px;
  background:#fff; cursor:pointer; color:var(--ink);
}
.chip.on{background:#eaf7f1; border-color:var(--brand); color:var(--brand); font-weight:600}
textarea,input[type=text]{
  width:100%; border:1px solid var(--line); border-radius:12px; padding:11px 12px;
  font:inherit; font-size:14px; resize:vertical; background:#fbfcfd;
}
.field{margin-bottom:12px}
.field label{display:block; font-size:12px; color:var(--muted); margin-bottom:5px}
.sum{border-top:1px dashed var(--line); margin:14px 0; padding-top:12px}
.sum div{display:flex; justify-content:space-between; font-size:14px; padding:4px 0}
.sum div b{font-size:16px}
/* pay screen */
.pay{text-align:center}
.qr{
  width:150px; height:150px; margin:10px auto 14px; border-radius:16px;
  background:repeating-conic-gradient(#14181f 0 25%,#fff 0 50%) 0 0/20px 20px;
  border:10px solid #fff; box-shadow:var(--shadow);
}
.badge{display:inline-block; background:#eaf7f1; color:var(--brand); font-weight:700;
  font-size:12px; padding:4px 10px; border-radius:999px}
.ok{font-size:46px; margin:6px 0}
/* kitchen */
.k-wrap{width:100%; padding:0 0 40px; max-width:1100px}
.k-head{background:#14181f; color:#fff; padding:16px 20px; border-radius:0 0 18px 18px;
  display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px}
.k-head h1{font-size:18px}
.k-head small{opacity:.7; font-size:12px}
.k-stats{display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:10px; padding:14px}
.stat{background:#fff; border:1px solid var(--line); border-radius:14px; padding:12px 14px}
.stat b{display:block; font-size:20px}
.stat span{font-size:12px; color:var(--muted)}
.k-list{padding:0 14px; display:flex; flex-direction:column; gap:10px}
.order{background:#fff; border:1px solid var(--line); border-left:4px solid var(--accent);
  border-radius:14px; padding:12px 14px}
.order.paid{border-left-color:var(--brand)}
.order.done{opacity:.55}
.order-top{display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; font-size:13px}
.order-id{font-weight:700}
.order-items{font-size:13px; color:var(--muted); margin:6px 0}
.order-foot{display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap}
.tag{font-size:12px; font-weight:700; padding:3px 9px; border-radius:999px}
.tag.wait{background:#fff1e6; color:#c2410c}
.tag.pay{background:#eaf7f1; color:#0f8a5f}
.tag.vip{background:#fff7e0; color:#946200}
.empty{text-align:center; color:var(--muted); padding:40px 20px; font-size:14px}
/* вкладки кухни */
.k-tabs{display:flex; gap:8px; padding:14px 14px 0}
.k-tab{
  border:1px solid var(--line); background:#fff; border-radius:999px; padding:9px 16px;
  font:inherit; font-size:13px; font-weight:700; color:var(--muted); cursor:pointer;
}
.k-tab.on{background:var(--ink); border-color:var(--ink); color:#fff}
/* карточка клиента */
.k-settings{background:#fff; border:1px solid var(--line); border-radius:14px; margin:14px;
  padding:12px 14px; display:flex; flex-direction:column; gap:10px}
.k-settings > b{font-size:14px}
.set-row{display:flex; gap:12px; flex-wrap:wrap}
.set-row label{font-size:12px; color:var(--muted); display:flex; flex-direction:column; gap:4px}
.set-row input[type=number]{width:70px; padding:8px 10px; border:1px solid var(--line);
  border-radius:10px; font:inherit; font-size:13px}
.set-row input[type=text]{width:130px; padding:8px 10px; border:1px solid var(--line);
  border-radius:10px; font:inherit; font-size:13px}
.scope-title{font-size:14px; margin:0 0 8px}
.adm-table{width:100%; border-collapse:collapse; background:#fff; border:1px solid var(--line);
  border-radius:14px; overflow:hidden; font-size:13px; margin-bottom:16px}
.adm-table th{background:#f4f6f8; text-align:left; font-size:12px; color:var(--muted);
  padding:10px 12px; font-weight:700}
.adm-table td{padding:10px 12px; border-top:1px solid var(--line)}
.set-check{flex-direction:row !important; align-items:center; gap:6px !important}
.set-check input{width:16px; height:16px; accent-color:var(--brand)}
.client{background:#fff; border:1px solid var(--line); border-radius:14px; padding:12px 14px;
  display:flex; flex-direction:column; gap:8px}
.client-top{display:flex; gap:10px; align-items:flex-start}
.rank{width:26px; height:26px; border-radius:9px; background:#eef3f8; color:#37436b;
  display:grid; place-items:center; font-size:12px; font-weight:800; flex:0 0 auto}
.client-metrics{display:flex; gap:16px; flex-wrap:wrap; font-size:12px; color:var(--muted)}
.client-metrics b{display:block; font-size:14px; color:var(--ink)}
.client-action{border-top:1px dashed var(--line); padding-top:8px; display:flex;
  flex-direction:column; gap:8px}
.why{font-size:12px; color:var(--muted)}
.acts{display:flex; gap:8px; flex-wrap:wrap}
.act-result{font-size:12px; color:var(--brand); font-weight:600}
.client.needs{border-color:#ffb992; box-shadow:0 0 0 2px rgba(255,122,69,.12)}
.wait-today{background:#fff4ec; border:1px solid #ffd6bd; color:#b45309; font-size:12px;
  font-weight:700; padding:6px 10px; border-radius:10px}
.tag.seg-vip{background:#fff7e0; color:#946200}
.tag.seg-new{background:#e8f0ff; color:#1d4ed8}
.tag.seg-risk{background:#fff1e6; color:#c2410c}
.tag.seg-sleeping{background:#fdeaea; color:#b91c1c}
.tag.seg-regular{background:#eef3f8; color:#37436b}
.foot-link{padding:14px; text-align:center; font-size:13px}
.foot-link a{color:var(--brand); font-weight:600; text-decoration:none}
