:root{
  --bg:#f5e7cf;
  --panel:#fff8ec;
  --card:#fdf2df;
  --line:#d2a66f;
  --text:#4f321f;
  --muted:#8c6748;
  --accent:#c46826;
  --accent2:#6c9437;
  --danger:#cb4738;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:Georgia,"Trebuchet MS",serif;
  background:radial-gradient(circle at top,#fff8ef 0%,#f5e5c7 36%,#ebcfa3 100%);
  color:var(--text);
}

.hidden{display:none!important}
.app{display:grid;grid-template-columns:280px minmax(0,1fr);min-height:100vh}
.sidebar{
  border-right:1px solid rgba(143,91,40,.18);
  padding:20px;
  position:sticky;
  top:0;
  height:100vh;
  overflow:hidden;
  background:linear-gradient(180deg,#f0cf98 0%,#ebc48b 30%,#edd3ac 100%);
  box-shadow:inset -1px 0 0 rgba(122,88,49,.1);
  display:flex;
  flex-direction:column;
}
.brand h1{margin:0 0 8px;font-size:30px}
.brand p{margin:0 0 22px;color:var(--muted)}

.menu{
  display:grid;
  gap:8px;
  margin:16px 0 20px;
  overflow-y:auto;
  overflow-x:hidden;
  padding-right:6px;
  flex:1;
  min-height:0;
  align-content:start;
  grid-auto-rows:max-content;
  scrollbar-width:none;
  -ms-overflow-style:none;
}
.menu::-webkit-scrollbar{width:0;height:0}
.menu button{
  border:1px solid var(--line);
  background:#fff4e3;
  color:var(--text);
  padding:14px 16px;
  border-radius:16px;
  font-size:18px;
  text-align:left;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(136,102,63,.08);
}
.menu button.active{outline:3px solid #5f3214;transform:translateX(4px) scale(1.01)}
.menu-layer{
  position:relative;
  display:flex;
  flex-direction:column;
  justify-content:center;
  overflow:hidden;
  padding:16px 20px 14px;
  min-height:68px;
  border-width:2px;
  transition:transform .18s ease,box-shadow .18s ease,filter .18s ease;
}
.menu-layer:hover{transform:translateX(3px);box-shadow:0 14px 28px rgba(122,88,49,.18);filter:saturate(1.08)}
.menu-layer-main{position:relative;display:block;font-size:17px;font-weight:800;letter-spacing:.01em;line-height:1.1;z-index:2}
.menu-layer-note{position:relative;display:block;margin-top:5px;font-size:11px;line-height:1;text-transform:uppercase;letter-spacing:.12em;opacity:.9;z-index:2}
.menu-layer::before,.menu-layer::after{content:"";position:absolute;pointer-events:none}

.menu-layer-bun-top,.menu-layer-bun-bottom{
  background:linear-gradient(180deg,#efb15c 0%,#df8f35 48%,#ca7421 100%);
  border-color:#ad6219;
  color:#553112;
  box-shadow:inset 0 2px 0 rgba(255,242,204,.56),0 12px 20px rgba(160,106,41,.18);
}
.menu-layer-bun-top{border-radius:28px 28px 18px 18px;min-height:74px}
.menu-layer-bun-bottom{border-radius:18px 18px 26px 26px;min-height:60px}
.menu-layer-bun-top::before{
  top:14px;left:22px;width:8px;height:4px;border-radius:50%;background:#fff1d6;
  box-shadow:26px 8px 0 #fdf1d8,55px 2px 0 #fff3dc,87px 10px 0 #f7ead1,126px 4px 0 #fff3dc,164px 12px 0 #f8ead0,204px 6px 0 #fff1d6;
}
.menu-layer-bun-bottom::after{
  left:0;right:0;bottom:10px;height:8px;
  background:linear-gradient(180deg,rgba(116,72,26,.08),rgba(116,72,26,.22));
  border-radius:999px;
}

.menu-layer-lettuce,.menu-layer-lettuce-dark{
  background:linear-gradient(180deg,#8fd34a 0%,#69b232 45%,#4a8b24 100%);
  border-color:#3f721d;
  color:#fffdf5;
}
.menu-layer-lettuce-dark{background:linear-gradient(180deg,#73ab36 0%,#507e28 100%)}
.menu-layer-lettuce::before,.menu-layer-lettuce-dark::before{
  left:-8px;right:-8px;top:-10px;height:28px;
  background:
    radial-gradient(circle at 10px 18px,#b6e47d 0 13px,transparent 14px),
    radial-gradient(circle at 42px 14px,#abde72 0 15px,transparent 16px),
    radial-gradient(circle at 78px 20px,#c3ec8a 0 13px,transparent 14px),
    radial-gradient(circle at 120px 13px,#abde72 0 16px,transparent 17px),
    radial-gradient(circle at 164px 19px,#b8e27f 0 14px,transparent 15px),
    radial-gradient(circle at 210px 15px,#abde72 0 16px,transparent 17px);
}

.menu-layer-tomato{
  background:linear-gradient(180deg,#f26b57 0%,#de4029 100%);
  border-color:#b52e1b;
  color:#fff7f4;
}
.menu-layer-tomato::before{
  top:10px;left:18px;right:18px;height:12px;border-radius:999px;background:rgba(255,201,188,.42);
}

.menu-layer-meat,.menu-layer-meat-double{
  background:linear-gradient(180deg,#7a4528 0%,#5c2e19 52%,#432010 100%);
  border-color:#34170c;
  color:#fff8ef;
}
.menu-layer-bacon{
  background:
    linear-gradient(180deg,#a54c2d 0%,#7e311a 100%),
    repeating-linear-gradient(
      -12deg,
      rgba(246,186,142,.94) 0 14px,
      rgba(132,53,27,.98) 14px 28px,
      rgba(241,173,130,.94) 28px 40px,
      rgba(110,39,18,.98) 40px 54px
    );
  border-color:#64260f;
  color:#fff8ef;
  box-shadow:inset 0 1px 0 rgba(255,222,196,.35),0 12px 20px rgba(122,63,34,.2);
}
.menu-layer-bacon::before{
  top:10px;
  left:14px;
  right:14px;
  bottom:10px;
  border-radius:18px;
  background:
    repeating-linear-gradient(
      -10deg,
      rgba(255,214,183,.52) 0 10px,
      transparent 10px 24px,
      rgba(84,26,10,.22) 24px 36px,
      transparent 36px 50px
    );
  opacity:.95;
}
.menu-layer-bacon::after{
  left:18px;
  right:18px;
  bottom:8px;
  height:7px;
  border-radius:999px;
  background:rgba(255,214,183,.18);
}
.menu-layer-meat-double::after{
  left:14px;right:14px;bottom:9px;height:7px;border-radius:999px;background:rgba(255,202,153,.17);
}
.menu-layer-meat::before,.menu-layer-meat-double::before{
  top:15px;left:16px;right:16px;height:2px;
  background:linear-gradient(90deg,transparent,rgba(255,210,170,.28),transparent);
  box-shadow:0 10px 0 rgba(255,210,170,.12),0 20px 0 rgba(255,210,170,.18);
}

.menu-layer-cheese{
  background:linear-gradient(180deg,#ffd64f 0%,#f2b817 100%);
  border-color:#c98f10;
  color:#65440e;
}
.menu-layer-cheese::after{
  width:28px;height:18px;right:26px;bottom:-2px;background:#efbf34;border-radius:0 0 12px 12px;transform:skewX(-16deg);
}

.menu-layer-pineapple{
  background:linear-gradient(180deg,#f5dc6d 0%,#e1b83b 100%);
  border-color:#c28f23;
  color:#674d14;
}
.menu-layer-pineapple::before{
  top:0;bottom:0;left:0;right:0;
  background:
    linear-gradient(45deg,transparent 46%,rgba(255,244,183,.22) 47%,rgba(255,244,183,.22) 53%,transparent 54%),
    linear-gradient(-45deg,transparent 46%,rgba(161,122,36,.12) 47%,rgba(161,122,36,.12) 53%,transparent 54%);
  background-size:28px 28px;
}

.menu-layer-chorizo{
  background:linear-gradient(180deg,#cf6840 0%,#b34221 100%);
  border-color:#8c2f16;
  color:#fff3ee;
}
.menu-layer-chorizo::before{
  top:12px;left:16px;right:16px;height:8px;border-radius:999px;background:rgba(255,196,171,.18);box-shadow:0 14px 0 rgba(255,196,171,.12);
}

.menu-layer-ham{
  background:linear-gradient(180deg,#eba9a0 0%,#d98377 100%);
  border-color:#b96559;
  color:#60342f;
}
.menu-layer-ham::after{
  left:14px;right:14px;bottom:8px;height:10px;border-radius:999px;background:rgba(255,238,236,.3);
}

.menu-layer-mustard{
  background:linear-gradient(180deg,#efc72e 0%,#d9a215 100%);
  border-color:#b37d0d;
  color:#61460d;
}
.menu-layer-mustard::before{
  top:18px;left:20px;right:20px;height:12px;
  background:radial-gradient(circle at 0 6px,transparent 5px,#d4961f 6px 8px,transparent 9px) 0 0/26px 12px repeat-x;
  opacity:.9;
}

.menu-layer-pickle{
  background:linear-gradient(180deg,#9ac15b 0%,#78983d 100%);
  border-color:#5d7627;
  color:#f8fff0;
}
.menu-layer-pickle::before{
  top:14px;left:16px;width:34px;height:18px;border-radius:999px;background:rgba(225,246,170,.28);
  box-shadow:46px 6px 0 rgba(225,246,170,.24),96px 0 0 rgba(225,246,170,.28),144px 5px 0 rgba(225,246,170,.24),190px 1px 0 rgba(225,246,170,.28);
}

.menu-layer-hot{
  background:linear-gradient(180deg,#e76a34 0%,#cc411b 100%);
  border-color:#a42f12;
  color:#fff5ef;
}
.menu-layer-hot::after{
  right:18px;top:10px;width:18px;height:28px;
  background:linear-gradient(180deg,#f7d06f 0%,#f08a31 52%,#c84124 100%);
  border-radius:16px 16px 16px 2px;
  transform:rotate(18deg);
}

.menu-layer-ketchup{
  background:linear-gradient(180deg,#e24637 0%,#c9261c 100%);
  border-color:#9c1c15;
  color:#fff6f4;
}
.menu-layer-ketchup::before{
  top:16px;left:20px;right:20px;height:14px;border-radius:999px;background:rgba(255,193,187,.2);
}
.menu-layer-meat .menu-layer-main,
.menu-layer-meat-double .menu-layer-main,
.menu-layer-meat .menu-layer-note,
.menu-layer-meat-double .menu-layer-note,
.menu-layer-bacon .menu-layer-main,
.menu-layer-bacon .menu-layer-note{
  color:#fff8ef;
  text-shadow:0 1px 2px rgba(0,0,0,.28);
}

.main{padding:16px;min-width:0;overflow-x:hidden}
.topbar{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:16px}
.topbar h2{font-size:36px;margin:0 0 8px}
.muted{color:var(--muted)}
.badge{padding:10px 14px;border-radius:999px;border:1px solid var(--line);background:#f2d39f;color:#5c3d23}
.card,.metric{
  background:rgba(255,248,236,.82);
  border:1px solid rgba(208,167,109,.62);
  border-radius:22px;
  padding:20px;
  box-shadow:0 12px 28px rgba(165,111,52,.08);
}
.metric .big{font-size:26px;font-weight:700}
.grid{display:grid;grid-template-columns:repeat(12,1fr);gap:16px}
.col-3{grid-column:span 3}
.col-4{grid-column:span 4}
.col-5{grid-column:span 5}
.col-6{grid-column:span 6}
.col-7{grid-column:span 7}
.col-8{grid-column:span 8}
.col-12{grid-column:span 12}

input,select,textarea,button{
  width:100%;
  border-radius:14px;
  border:1px solid var(--line);
  background:var(--card);
  color:var(--text);
  padding:14px 16px;
  font-size:16px;
}
select[multiple]{min-height:120px}
textarea{min-height:102px;resize:vertical}
button{
  background:linear-gradient(180deg,#d7732c 0%,#bf5b1c 100%);
  border:none;
  cursor:pointer;
  color:#fff7ee;
  font-weight:700;
}
button.secondary{background:linear-gradient(180deg,#916233 0%,#74491d 100%)}
button.danger{background:linear-gradient(180deg,#d7644a 0%,#bb4228 100%)}

.main button:not(.menu-layer){
  color:#2f1d12;
}
.main button.secondary,
.main button.danger,
.main .assistant-confirm,
.main .inline.ok{
  color:#2f1d12;
}

.menu button.menu-layer{
  color:inherit;
}
.menu button.menu-layer.menu-layer-bun-top,
.menu button.menu-layer.menu-layer-bun-bottom{
  background:linear-gradient(180deg,#efb15c 0%,#df8f35 48%,#ca7421 100%) !important;
  border:2px solid #ad6219 !important;
}
.menu button.menu-layer.menu-layer-lettuce{
  background:linear-gradient(180deg,#8fd34a 0%,#69b232 45%,#4a8b24 100%) !important;
  border:2px solid #3f721d !important;
}
.menu button.menu-layer.menu-layer-lettuce-dark{
  background:linear-gradient(180deg,#73ab36 0%,#507e28 100%) !important;
  border:2px solid #3f721d !important;
}
.menu button.menu-layer.menu-layer-tomato{
  background:linear-gradient(180deg,#f26b57 0%,#de4029 100%) !important;
  border:2px solid #b52e1b !important;
}
.menu button.menu-layer.menu-layer-meat,
.menu button.menu-layer.menu-layer-meat-double{
  background:linear-gradient(180deg,#7a4528 0%,#5c2e19 52%,#432010 100%) !important;
  border:2px solid #34170c !important;
}
.menu button.menu-layer.menu-layer-bacon{
  background:
    linear-gradient(180deg,#a54c2d 0%,#7e311a 100%),
    repeating-linear-gradient(
      -12deg,
      rgba(246,186,142,.94) 0 14px,
      rgba(132,53,27,.98) 14px 28px,
      rgba(241,173,130,.94) 28px 40px,
      rgba(110,39,18,.98) 40px 54px
    ) !important;
  border:2px solid #64260f !important;
}
.menu button.menu-layer.menu-layer-cheese{
  background:linear-gradient(180deg,#ffd64f 0%,#f2b817 100%) !important;
  border:2px solid #c98f10 !important;
}
.menu button.menu-layer.menu-layer-pineapple{
  background:linear-gradient(180deg,#f5dc6d 0%,#e1b83b 100%) !important;
  border:2px solid #c28f23 !important;
}
.menu button.menu-layer.menu-layer-chorizo{
  background:linear-gradient(180deg,#cf6840 0%,#b34221 100%) !important;
  border:2px solid #8c2f16 !important;
}
.menu button.menu-layer.menu-layer-ham{
  background:linear-gradient(180deg,#eba9a0 0%,#d98377 100%) !important;
  border:2px solid #b96559 !important;
}
.menu button.menu-layer.menu-layer-mustard{
  background:linear-gradient(180deg,#efc72e 0%,#d9a215 100%) !important;
  border:2px solid #b37d0d !important;
}
.menu button.menu-layer.menu-layer-pickle{
  background:linear-gradient(180deg,#9ac15b 0%,#78983d 100%) !important;
  border:2px solid #5d7627 !important;
}
.menu button.menu-layer.menu-layer-hot{
  background:linear-gradient(180deg,#e76a34 0%,#cc411b 100%) !important;
  border:2px solid #a42f12 !important;
}
.menu button.menu-layer.menu-layer-ketchup{
  background:linear-gradient(180deg,#e24637 0%,#c9261c 100%) !important;
  border:2px solid #9c1c15 !important;
}

.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.full{grid-column:1/-1}
.row{display:flex;gap:12px;align-items:center}
.between{justify-content:space-between}
.wrap{flex-wrap:wrap}
.inline{width:auto;padding:10px 14px}
.list{display:grid;gap:12px}
.item{border:1px solid rgba(166,127,83,.42);border-radius:18px;padding:14px 16px;background:rgba(255,250,240,.82)}
.section-help{color:var(--muted);margin-bottom:12px}
.check-inline{display:flex;align-items:center;gap:10px;font-size:16px}
.check-inline input{width:auto}
.tab-pills,.chip-grid{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.pill,.chip-check span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#f6ecda;
  color:#2f1d12;
  cursor:pointer;
}
.pill.active{background:#fff5e7;outline:2px solid #b7844c;color:#2f1d12}
.chip-check input{display:none}
.chip-check input:checked + span{outline:2px solid #b7844c;background:#fff5e7;color:#2f1d12}

.login-wrap{min-height:100vh;display:grid;place-items:center;padding:24px}
.login-card{width:min(560px,100%)}
.label{font-size:14px;color:var(--muted);margin-bottom:8px}
.phone-field{display:flex;align-items:center;gap:0}
.phone-prefix{display:flex;align-items:center;justify-content:center;padding:14px 16px;border:1px solid var(--line);border-right:none;border-radius:14px 0 0 14px;background:#efe1c6;color:var(--muted);min-width:76px;font-weight:700}
.phone-field input{border-radius:0 14px 14px 0}
.otp-preview-label{font-size:13px;color:var(--muted);margin-bottom:8px}
.otp-preview-code{font-size:28px;font-weight:800;letter-spacing:.22em;text-align:center;padding:16px;border:1px dashed var(--accent);border-radius:16px;background:#fff3df;color:#7e5730}

.tag{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;font-size:13px;border:1px solid var(--line);background:#efdfbf;color:#5e4328}
.tag.info{background:#ecd8b1}
.tag.warn{background:#d7953d;color:#fff7ea}
.tag.ok{background:#7f9b45;color:#fff7ea}
.tag.simulation-tag{background:#8f6740;border-color:#d8b582;color:#fff4de;font-weight:700;letter-spacing:.04em}
.inline.ok{background:linear-gradient(180deg,#8d9d46 0%,#6c7c30 100%)}
.top-gap{margin-top:12px}
.compact .item{padding:12px 14px}
.simulation-order{border-color:#d5ad73;background:linear-gradient(180deg,#fff8ea 0%,#f4e5ca 100%);box-shadow:0 0 0 1px rgba(181,131,76,.16),inset 0 1px 0 rgba(255,255,255,.5)}
.orders-metrics{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:10px;
  margin:16px 0 14px;
}
.orders-metric{
  position:relative;
  overflow:hidden;
  min-height:92px;
  padding:14px 15px;
  border:1px solid rgba(166,127,83,.36);
  border-radius:18px;
  background:linear-gradient(180deg,#fff8ea 0%,#f1dfbf 100%);
  box-shadow:0 10px 24px rgba(122,88,49,.08);
}
.orders-metric:after{
  content:"";
  position:absolute;
  right:-18px;
  bottom:-22px;
  width:72px;
  height:72px;
  border-radius:999px;
  background:rgba(196,104,38,.12);
}
.orders-metric span{display:block;color:#7b5738;font-size:13px;font-weight:800;text-transform:uppercase;letter-spacing:.07em}
.orders-metric strong{display:block;margin-top:6px;font-size:30px;color:#432817;line-height:1}
.orders-metric small{display:block;margin-top:7px;color:#8c6748;font-weight:700}
.orders-metric.tone-grill{background:linear-gradient(180deg,#fff2df 0%,#edc69b 100%)}
.orders-metric.tone-drink{background:linear-gradient(180deg,#f0fbff 0%,#d6ecf1 100%)}
.orders-metric.tone-sweet{background:linear-gradient(180deg,#fff1f6 0%,#efd0d9 100%)}
.orders-metric.tone-route{background:linear-gradient(180deg,#f4f9e9 0%,#d9e8b8 100%)}
.orders-metric.tone-ok{background:linear-gradient(180deg,#eef4d6 0%,#d2df9a 100%)}
.area-order-item,
.delivery-order-item,
.summary-order-item,
.incident-order-item{position:relative;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.area-order-item.order-active,
.delivery-order-item.order-active,
.summary-order-item.order-active,
.incident-order-item.order-active{
  border-color:#c46826;
  background:linear-gradient(180deg,#fff9ed 0%,#f6dfba 100%);
  box-shadow:0 14px 30px rgba(150,88,35,.13),inset 4px 0 0 #c46826;
}
.area-order-item.order-active:before,
.delivery-order-item.order-active:before,
.summary-order-item.order-active:before,
.incident-order-item.order-active:before{
  content:"Activo";
  position:absolute;
  top:12px;
  right:14px;
  padding:4px 9px;
  border-radius:999px;
  background:#c46826;
  color:#fff8ec;
  font-size:11px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.area-order-item.order-queued{
  border-style:dashed;
  background:linear-gradient(180deg,#fffaf1 0%,#f3e7d1 100%);
  opacity:.92;
}
.area-order-item.order-done,
.delivery-order-item.order-done,
.summary-order-item.order-done,
.incident-order-item.order-done{opacity:.82}
.area-order-item:hover,
.delivery-order-item:hover,
.summary-order-item:hover,
.incident-order-item:hover{transform:translateY(-1px);box-shadow:0 16px 30px rgba(122,88,49,.11)}
.incident-order-item.order-active:before{content:"Atencion"}
.order-incident-box{
  margin-top:12px;
  padding:12px 14px;
  border:1px solid rgba(196,104,38,.24);
  border-radius:14px;
  background:rgba(255,248,236,.78);
}
.order-incident-box strong{display:block;margin-bottom:6px;color:#442818}
.sim-chat-box{display:grid;gap:12px;max-height:420px;overflow:auto;padding:8px;border:1px solid var(--line);border-radius:20px;background:linear-gradient(180deg,#fffaf1 0%,#f2e1c6 100%)}
.sim-chat-row{display:flex}
.sim-chat-row.is-user{justify-content:flex-end}
.sim-chat-bubble{max-width:88%;padding:12px 14px;border-radius:18px;border:1px solid rgba(102,67,26,.16);background:#fffdf8;color:#2b1f14;box-shadow:0 8px 18px rgba(88,58,20,.08)}
.sim-chat-row.is-user .sim-chat-bubble{background:#d76d2e;color:#fff8f0;border-color:#c55e22}
.sim-chat-author{font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;opacity:.8;margin-bottom:4px}
.simulation-miniapp-frame{width:100%;min-height:980px;border:1px solid var(--line);border-radius:24px;background:#fff8ec}
.simulation-chat-card .form-grid{grid-template-columns:1fr}
.simulation-chat-card .row.wrap button{width:auto}
.simulation-workspace{display:grid;gap:16px}
.simulation-status-strip{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px 18px;
  border:1px solid rgba(208,167,109,.62);
  border-radius:22px;
  background:rgba(255,248,236,.86);
  box-shadow:0 12px 28px rgba(165,111,52,.08);
}
.simulation-status-main{display:flex;align-items:center;gap:12px}
.simulation-status-dot{
  width:14px;
  height:14px;
  border-radius:999px;
  background:#b68b55;
  box-shadow:0 0 0 5px rgba(182,139,85,.18);
}
.simulation-status-strip.is-active .simulation-status-dot{
  background:#25d366;
  box-shadow:0 0 0 5px rgba(37,211,102,.18);
}
.simulation-status-actions button{width:auto}
.simulation-lab{
  display:grid;
  grid-template-columns:minmax(330px,440px) minmax(0,1fr);
  gap:18px;
  align-items:start;
}
.simulation-phone-card,
.simulation-miniapp-card{
  border:1px solid rgba(208,167,109,.62);
  border-radius:26px;
  background:rgba(255,248,236,.82);
  box-shadow:0 18px 42px rgba(116,72,26,.12);
}
.simulation-phone-card{padding:18px}
.simulation-miniapp-card{padding:20px;min-width:0}
.whatsapp-device{
  overflow:hidden;
  border-radius:30px;
  border:8px solid #2b2119;
  background:#efe1c7;
  box-shadow:0 20px 38px rgba(58,38,21,.24);
}
.wa-header{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  background:linear-gradient(180deg,#075e54 0%,#064f47 100%);
  color:#fff;
}
.wa-avatar{
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  border-radius:999px;
  background:#e8c38b;
  color:#3f2a19;
  font-weight:800;
}
.wa-title{display:grid;line-height:1.15}
.wa-title span{font-size:12px;color:#cdece5}
.wa-menu-dot{
  margin-left:auto;
  width:4px;
  height:4px;
  border-radius:999px;
  background:#d8f5ef;
  box-shadow:0 8px 0 #d8f5ef,0 -8px 0 #d8f5ef;
}
.wa-customer-fields{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
  padding:12px;
  background:#fff8ec;
  border-bottom:1px solid rgba(116,72,26,.14);
}
.wa-customer-fields input{
  padding:10px 12px;
  border-radius:12px;
  font-size:14px;
}
.simulation-workspace .sim-chat-box{
  position:relative;
  display:grid;
  align-content:start;
  gap:10px;
  max-height:none;
  min-height:540px;
  height:58vh;
  overflow:auto;
  padding:16px 12px;
  border:0;
  border-radius:0;
  background:
    radial-gradient(circle at 16px 16px,rgba(255,255,255,.18) 0 2px,transparent 3px) 0 0/28px 28px,
    linear-gradient(180deg,#e6ddd1 0%,#d9cbb8 100%);
}
.wa-day-pill{
  justify-self:center;
  padding:5px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.62);
  color:#6e5c4c;
  font-size:12px;
  box-shadow:0 3px 10px rgba(69,43,22,.08);
}
.simulation-workspace .sim-chat-row{display:flex}
.simulation-workspace .sim-chat-row.is-user{justify-content:flex-end}
.simulation-workspace .sim-chat-bubble{
  position:relative;
  max-width:82%;
  padding:9px 10px 7px;
  border:0;
  border-radius:12px;
  background:#fff;
  color:#1f1b16;
  box-shadow:0 2px 7px rgba(65,45,24,.14);
}
.simulation-workspace .sim-chat-row.is-bot .sim-chat-bubble{border-top-left-radius:3px}
.simulation-workspace .sim-chat-row.is-user .sim-chat-bubble{
  background:#dcf8c6;
  color:#1f1b16;
  border-top-right-radius:3px;
}
.simulation-workspace .sim-chat-author{
  margin-bottom:4px;
  color:#128c7e;
  font-size:11px;
  letter-spacing:.04em;
}
.sim-chat-text{font-size:14px;line-height:1.25}
.wa-message-time{
  margin-top:4px;
  text-align:right;
  color:#7d766e;
  font-size:10px;
}
.wa-action-list{
  display:grid;
  gap:6px;
  margin-top:8px;
  padding-top:8px;
  border-top:1px solid rgba(18,140,126,.2);
}
.wa-chat-action{
  width:100%;
  padding:8px 10px;
  border-radius:10px;
  background:#fff;
  color:#128c7e;
  border:1px solid rgba(18,140,126,.24);
  font-size:14px;
  box-shadow:none;
}
.wa-quickbar{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:10px 12px;
  background:#f7ecd9;
  border-top:1px solid rgba(116,72,26,.12);
}
.wa-quick{
  width:auto;
  padding:8px 10px;
  border-radius:999px;
  background:#ffffff;
  color:#075e54;
  border:1px solid rgba(7,94,84,.2);
  font-size:13px;
  box-shadow:none;
}
.wa-quick.ghost{color:#6f5137;background:#f2dfc0}
.wa-composer{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 12px 14px;
  background:#efe1c7;
}
.wa-composer span{
  flex:1;
  padding:11px 14px;
  border-radius:999px;
  background:#fff;
  color:#8c8175;
  font-size:14px;
}
.wa-composer button{
  width:auto;
  min-width:74px;
  padding:10px 13px;
  border-radius:999px;
  background:#128c7e;
  color:#fff;
}
.miniapp-panel-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:14px;
}
.miniapp-panel-head h3{margin:0 0 4px}
.miniapp-panel-head p{margin:0}
.miniapp-webview{
  overflow:hidden;
  border:1px solid rgba(208,167,109,.62);
  border-radius:26px;
  background:#fff8ec;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.6);
}
.simulation-workspace .simulation-miniapp-frame{
  display:block;
  width:100%;
  min-height:860px;
  border:0;
  border-radius:0;
}
.miniapp-placeholder{
  display:grid;
  place-items:center;
  min-height:360px;
  border:1px dashed rgba(159,107,55,.42);
  border-radius:26px;
  background:
    radial-gradient(circle at top right,rgba(37,211,102,.12),transparent 34%),
    linear-gradient(180deg,#fff8ec 0%,#f3dec0 100%);
}
.miniapp-link-card{
  width:min(420px,92%);
  padding:24px;
  border-radius:24px;
  background:rgba(255,255,255,.72);
  text-align:center;
  box-shadow:0 14px 32px rgba(116,72,26,.14);
}
.miniapp-link-card p{margin:8px 0 16px}
.miniapp-link-card button{width:auto}
.miniapp-external-card{
  display:grid;
  place-items:center;
  gap:12px;
  min-height:360px;
  padding:28px;
  border:1px dashed rgba(159,107,55,.42);
  border-radius:26px;
  background:
    radial-gradient(circle at top right,rgba(37,211,102,.12),transparent 34%),
    linear-gradient(180deg,#fff8ec 0%,#f3dec0 100%);
  text-align:center;
}
.miniapp-external-card > p{max-width:520px;margin:0}
.miniapp-demo-steps{
  display:flex;
  justify-content:center;
  gap:8px;
  flex-wrap:wrap;
}
.miniapp-demo-steps span{
  padding:8px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.76);
  border:1px solid rgba(208,167,109,.52);
  color:#5d4127;
  font-size:13px;
  font-weight:700;
}
.miniapp-inline-preview{
  width:100%;
  max-width:720px;
  margin-top:4px;
  text-align:left;
}
.miniapp-inline-preview summary{
  cursor:pointer;
  color:#7b4a24;
  font-weight:800;
  text-align:center;
  list-style-position:inside;
}
.miniapp-inline-preview .miniapp-webview{margin-top:12px}
.miniapp-link-icon{
  display:grid;
  place-items:center;
  width:54px;
  height:54px;
  margin:0 auto 12px;
  border-radius:18px;
  background:#25d366;
  color:#073b32;
  font-size:26px;
  font-weight:800;
}
.simulation-orders-panel{
  margin-top:16px;
  padding-top:14px;
  border-top:1px solid rgba(208,167,109,.48);
}
.simulation-orders-panel h3{margin:0}
.simulation-device-stage{
  margin-top:18px;
  padding:20px;
  border:1px solid rgba(208,167,109,.62);
  border-radius:26px;
  background:
    radial-gradient(circle at 10% 0%,rgba(215,109,46,.18),transparent 32%),
    radial-gradient(circle at 92% 16%,rgba(83,132,43,.16),transparent 30%),
    linear-gradient(180deg,#fff8ea 0%,#efd5aa 100%);
  box-shadow:0 18px 42px rgba(110,72,33,.12);
}
.simulation-device-stage h3{margin:0 0 4px}
.sim-device-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:14px;
  margin-top:16px;
}
.sim-device-card{
  position:relative;
  overflow:hidden;
  min-height:360px;
  padding:12px;
  border-radius:30px;
  border:2px solid #3b2516;
  background:#20140e;
  box-shadow:0 20px 34px rgba(74,42,17,.24), inset 0 0 0 1px rgba(255,255,255,.08);
}
.sim-device-card:before{
  content:"";
  position:absolute;
  inset:7px;
  border-radius:23px;
  background:
    radial-gradient(circle at 80% 0%,rgba(37,211,102,.18),transparent 32%),
    linear-gradient(180deg,#e9f6de 0%,#d8edcd 100%);
  pointer-events:none;
}
.sim-device-card.tone-grill:before{background:linear-gradient(180deg,#fff3dc 0%,#f3d0a7 100%)}
.sim-device-card.tone-drink:before{background:linear-gradient(180deg,#eef8ff 0%,#c9e7f2 100%)}
.sim-device-card.tone-sweet:before{background:linear-gradient(180deg,#fff1f4 0%,#efd0d7 100%)}
.sim-device-card.tone-route:before{background:linear-gradient(180deg,#eef5df 0%,#d9e7bd 100%)}
.sim-device-card.tone-pay:before{background:linear-gradient(180deg,#fff7dc 0%,#ecd59d 100%)}
.sim-device-top,
.sim-device-header,
.sim-device-screen,
.sim-device-footer{
  position:relative;
  z-index:1;
}
.sim-device-top{
  height:14px;
  display:flex;
  justify-content:center;
  align-items:center;
  margin-bottom:6px;
}
.sim-device-speaker{
  width:62px;
  height:5px;
  border-radius:999px;
  background:rgba(255,255,255,.28);
}
.sim-device-header{
  display:flex;
  align-items:center;
  gap:9px;
  padding:10px;
  border-radius:18px 18px 10px 10px;
  background:#075e54;
  color:#fff;
}
.sim-device-header strong{display:block;color:#fff;font-size:15px;line-height:1.05}
.sim-device-header span{display:block;color:#d8fff1;font-size:11px;line-height:1.1;margin-top:2px}
.sim-device-avatar{
  flex:0 0 auto;
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  border-radius:50%;
  background:#25d366;
  color:#093d34;
  font-weight:900;
  font-size:12px;
}
.sim-device-screen{
  display:grid;
  align-content:start;
  gap:8px;
  min-height:220px;
  margin-top:10px;
  padding:10px;
  border-radius:12px;
  background:
    linear-gradient(135deg,rgba(255,255,255,.22) 25%,transparent 25%) 0 0/22px 22px,
    rgba(255,251,243,.72);
}
.sim-device-msg{
  width:fit-content;
  max-width:94%;
  padding:9px 10px;
  border-radius:13px;
  background:#fffef9;
  color:#2f2115;
  border:1px solid rgba(99,70,38,.14);
  font-size:13px;
  line-height:1.25;
  box-shadow:0 6px 12px rgba(70,45,18,.08);
}
.sim-device-msg.is-user{
  justify-self:end;
  background:#dcf8c6;
}
.sim-device-actions{
  position:relative;
  z-index:1;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:10px;
  padding:8px;
  border-radius:14px;
  background:rgba(255,255,255,.62);
  border:1px solid rgba(99,70,38,.12);
}
.sim-device-actions button{
  width:auto;
  flex:1 1 auto;
  min-width:86px;
  padding:8px 9px;
  border-radius:999px;
  border:1px solid rgba(7,94,84,.22);
  background:#25d366;
  color:#073b32;
  font-size:12px;
  font-weight:900;
  box-shadow:none;
}
.sim-device-actions button:hover{filter:saturate(1.05) brightness(.98);transform:translateY(-1px)}
.sim-device-actions button:disabled{
  opacity:.5;
  cursor:not-allowed;
  transform:none;
}
.sim-device-footer{
  margin-top:10px;
  padding:8px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.72);
  color:#5d4127;
  font-size:12px;
  font-weight:800;
  text-align:center;
}
.order-lines,
.order-area-items{
  display:grid;
  gap:8px;
}
.order-line{
  padding:10px 12px;
  border:1px solid rgba(166,127,83,.26);
  border-radius:12px;
  background:#fffaf1;
}
.order-line strong{display:block;color:#3f2a19}
.order-line span{
  display:inline-block;
  margin-top:3px;
  color:#8c6748;
  font-size:13px;
  font-weight:800;
}
.order-area-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:12px;
}
.order-area-card{
  padding:13px;
  border:1px solid rgba(166,127,83,.36);
  border-radius:16px;
  background:linear-gradient(180deg,#fffaf1,#f8ead4);
}
.order-area-card .tag{white-space:nowrap}
.sync-indicator{min-width:118px;text-align:center;font-weight:700}
.sync-indicator.sync-auto{background:#d9c380;border-color:#b58a39;color:#4d3824}
.sync-indicator.sync-manual{background:#ead6b4;border-color:#c7a16c;color:#5d4127}
.sync-indicator.sync-paused{background:#d8a66b;border-color:#a97744;color:#fff4e6}

.check-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:8px;margin-top:8px}
.inventory-workbook,
.category-workbook,
.product-workbook,
.extra-workbook,
.payment-workbook,
.worker-workbook,
.access-workbook{
  background:rgba(255,248,236,.86);
  border:1px solid rgba(208,167,109,.62);
  border-radius:18px;
  padding:18px;
  box-shadow:0 12px 28px rgba(165,111,52,.08);
  max-width:100%;
  min-width:0;
}
.access-stack{
  display:grid;
  gap:18px;
}
.workbook-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}
.workbook-head h3{margin:0 0 6px;font-size:24px}
.workbook-head p{margin:0}
.sheet-guide{
  margin-top:8px !important;
  max-width:760px;
  color:#6f4a2d;
  font-size:14px;
  line-height:1.35;
  background:#fff3df;
  border:1px dashed rgba(166,127,83,.52);
  border-radius:10px;
  padding:9px 11px;
}
.inventory-tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:12px 0 14px;
}
.inventory-tab{
  width:auto;
  padding:10px 14px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#f6ecda;
  color:#2f1d12;
}
.inventory-tab.active{
  background:#fff5e7;
  outline:2px solid #b7844c;
}
.inventory-tab.ghost{
  background:#ead6b4;
  color:#5d4127;
}
.inventory-sheet-wrap{
  width:100%;
  max-width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  border:1px solid rgba(166,127,83,.42);
  border-radius:12px;
  background:#fffaf1;
  scrollbar-gutter:stable;
}
.inventory-sheet{
  width:100%;
  min-width:1320px;
  border-collapse:separate;
  border-spacing:0;
  font-size:14px;
}
.inventory-sheet th{
  position:sticky;
  top:0;
  z-index:1;
  background:#ecd5ae;
  color:#3f2a19;
  text-align:left;
  padding:10px 8px;
  border-bottom:1px solid rgba(166,127,83,.5);
  white-space:nowrap;
}
.inventory-sheet td{
  padding:6px;
  border-bottom:1px solid rgba(166,127,83,.22);
  background:#fffaf1;
  vertical-align:middle;
}
.inventory-sheet tr:nth-child(even) td{background:#fcf0dd}
.inventory-sheet input,
.inventory-sheet select{
  min-width:104px;
  border-radius:8px;
  padding:9px 10px;
  font-size:14px;
  background:#fffdf8;
}
.inventory-sheet input[data-field="name"]{min-width:170px}
.inventory-sheet input[data-field="itemKind"]{min-width:140px}
.inventory-sheet input[data-field="componentsText"]{min-width:180px}
.inventory-sheet .check-cell{text-align:center}
.inventory-sheet .check-cell input{
  min-width:0;
  width:18px;
  height:18px;
}
.inventory-sheet button.inline{
  padding:9px 10px;
  border-radius:8px;
  white-space:nowrap;
}
.inventory-sheet button:disabled{
  opacity:.48;
  cursor:not-allowed;
}
.inventory-sheet .empty-sheet{
  padding:24px;
  text-align:center;
  color:var(--muted);
}
.product-sheet{min-width:1420px}
.category-sheet{min-width:760px}
.extra-sheet{min-width:1540px}
.payment-sheet{min-width:1180px}
.worker-sheet{min-width:1120px}
.access-sheet{min-width:1040px}
.worker-access-sheet{min-width:980px}
.product-sheet input[data-product-field="name"]{min-width:180px}
.extra-sheet input[data-extra-field="name"]{min-width:210px}
.payment-sheet input[data-payment-field="name"]{min-width:210px}
.worker-sheet input[data-worker-field="name"]{min-width:190px}
.worker-sheet input[data-worker-field="phone"]{min-width:160px}
.worker-sheet input[data-worker-field="area"]{min-width:190px}
.worker-sheet select[data-worker-field="branchId"]{min-width:210px}
.access-sheet input[data-access-field="name"]{min-width:210px}
.access-sheet input[data-access-field="phone"]{min-width:170px}
.access-sheet select[data-access-field="branchIds"]{
  min-width:230px;
  min-height:76px;
  height:76px;
}
.access-role-pill{
  min-width:170px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 12px;
  border:1px solid rgba(166,127,83,.52);
  border-radius:10px;
  background:#fff3df;
  color:#3f2a19;
  font-weight:700;
}
.sheet-checks{
  display:grid;
  gap:5px;
  min-width:220px;
}
.sheet-check{
  display:flex;
  align-items:center;
  gap:7px;
  color:#3f2a19;
  font-size:13px;
  line-height:1.15;
  white-space:nowrap;
}
.sheet-check input{
  min-width:0;
  width:16px;
  height:16px;
}
.sheet-hint{
  margin-top:4px;
  color:var(--muted);
  font-size:12px;
  line-height:1.2;
}
.worker-sheet textarea[data-worker-field="notes"]{
  min-width:280px;
  min-height:58px;
  height:58px;
  padding:9px 10px;
  font-size:14px;
  background:#fffdf8;
}
.team-list{
  display:grid;
  gap:12px;
  width:100%;
  max-width:100%;
  overflow-x:auto;
  overflow-y:visible;
  padding:0 0 12px;
  scrollbar-gutter:stable;
}
.team-list::-webkit-scrollbar{
  height:12px;
}
.team-list::-webkit-scrollbar-track{
  border-radius:999px;
  background:#f0ddbd;
}
.team-list::-webkit-scrollbar-thumb{
  border:2px solid #f0ddbd;
  border-radius:999px;
  background:#a87947;
}
.team-empty{
  padding:24px;
  border:1px dashed rgba(166,127,83,.48);
  border-radius:14px;
  background:#fffaf1;
  color:var(--muted);
  text-align:center;
}
.team-card{
  display:grid;
  grid-template-columns:minmax(190px,1fr) minmax(220px,1fr) minmax(300px,1.35fr) minmax(160px,.78fr) minmax(220px,1fr) minmax(92px,.44fr) auto;
  gap:14px;
  align-items:start;
  width:100%;
  min-width:1480px;
  padding:14px;
  border:1px solid rgba(166,127,83,.34);
  border-radius:14px;
  background:linear-gradient(180deg,#fffdf8 0%,#fff5e7 100%);
  box-shadow:0 10px 22px rgba(116,72,26,.08);
}
.team-card-section{
  display:grid;
  gap:8px;
  min-width:0;
}
.team-section-title{
  color:#6f4a2d;
  font-size:12px;
  font-weight:800;
}
.team-card input,
.team-card select,
.team-card textarea{
  width:100%;
  min-width:0;
  border-radius:10px;
  padding:10px 11px;
  background:#fffdf8;
  font-size:14px;
}
.team-card textarea{
  min-height:104px;
  resize:vertical;
}
.team-card .sheet-checks{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px 10px;
  min-width:0;
}
.team-card .sheet-check{
  align-items:flex-start;
  white-space:normal;
  line-height:1.25;
}
.team-card .sheet-check input,
.team-check-line input{
  flex:0 0 auto;
  width:18px;
  height:18px;
  min-width:0;
  margin-top:1px;
  padding:0;
}
.team-check-line{
  display:flex;
  align-items:flex-start;
  gap:8px;
  color:#3f2a19;
  font-size:14px;
  font-weight:700;
  line-height:1.25;
}
.team-card-actions{
  display:flex;
  justify-content:flex-end;
  align-self:start;
}
.team-card-actions button.inline{
  width:auto;
  padding:10px 13px;
  border-radius:10px;
  white-space:nowrap;
}
.team-access .sheet-hint,
.team-summary .sheet-hint,
.team-state .sheet-hint{
  max-width:260px;
}
.chat-search-row{
  display:grid;
  grid-template-columns:minmax(220px,1fr) auto;
  gap:10px;
  align-items:center;
  margin:12px 0 16px;
}
.chat-search-row button{width:auto}
.chat-workspace{
  display:grid;
  grid-template-columns:minmax(280px,360px) minmax(0,1fr);
  gap:16px;
  min-height:620px;
}
.chat-thread-list{
  display:grid;
  align-content:start;
  gap:8px;
  max-height:620px;
  overflow:auto;
  padding-right:4px;
}
.chat-thread{
  display:grid;
  grid-template-columns:1fr auto;
  gap:6px 10px;
  width:100%;
  padding:12px;
  border:1px solid rgba(166,127,83,.34);
  border-radius:12px;
  background:#fffdf8;
  color:#2b1609;
  text-align:left;
  box-shadow:none;
}
.chat-thread.active{
  border-color:#a45a23;
  background:#fff1dc;
}
.chat-thread-main,
.chat-thread-meta{
  display:grid;
  gap:2px;
  min-width:0;
}
.chat-thread-main strong,
.chat-thread-main small,
.chat-thread-preview{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.chat-thread-meta{
  justify-items:end;
  color:var(--muted);
}
.chat-thread-preview{
  grid-column:1 / -1;
  color:var(--muted);
  font-size:13px;
}
.chat-thread-lock{
  grid-column:1 / -1;
  width:max-content;
  max-width:100%;
  padding:3px 8px;
  border-radius:999px;
  background:#f1d29d;
  color:#6f3a14;
  font-size:12px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.chat-detail{
  min-width:0;
  border:1px solid rgba(166,127,83,.34);
  border-radius:16px;
  overflow:hidden;
  background:#f6ead8;
}
.chat-detail-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  padding:14px 16px;
  background:#fffdf8;
  border-bottom:1px solid rgba(166,127,83,.28);
}
.chat-detail-head h3{margin:0 0 4px}
.chat-reply-panel{
  display:grid;
  gap:10px;
  padding:14px 16px;
  border-bottom:1px solid rgba(166,127,83,.28);
  background:#fff8ec;
}
.chat-reply-panel.is-active{
  background:#fff2dc;
}
.chat-reply-panel button{width:auto}
.chat-reply-panel input,
.chat-reply-panel textarea{
  width:100%;
  min-width:0;
  border-radius:10px;
  background:#fffdf8;
}
.chat-reply-panel input[readonly]{
  background:#f3e7d4;
  color:#6a4f38;
}
.chat-history-box{
  display:grid;
  align-content:start;
  gap:10px;
  height:560px;
  overflow:auto;
  padding:16px 14px;
  background:
    radial-gradient(circle at 16px 16px,rgba(255,255,255,.18) 0 2px,transparent 3px) 0 0/28px 28px,
    linear-gradient(180deg,#e6ddd1 0%,#d9cbb8 100%);
}
.chat-history-row{display:flex}
.chat-history-row.is-outbound{justify-content:flex-end}
.chat-history-bubble{
  max-width:78%;
  padding:9px 10px 7px;
  border-radius:12px;
  background:#fff;
  color:#1f1b16;
  box-shadow:0 2px 7px rgba(65,45,24,.14);
}
.chat-history-row.is-inbound .chat-history-bubble{border-top-left-radius:3px}
.chat-history-row.is-outbound .chat-history-bubble{
  background:#dcf8c6;
  border-top-right-radius:3px;
}
@media (max-width:900px){
  .workbook-head{
    display:grid;
  }
}
.payment-sheet textarea[data-payment-field="instructions"]{
  min-width:340px;
  min-height:58px;
  height:58px;
  padding:9px 10px;
  font-size:14px;
  background:#fffdf8;
}
.payment-sheet select[data-payment-field="branchIds"]{
  min-width:230px;
  min-height:58px;
  height:58px;
}
.extra-sheet select[data-extra-field="productIds"],
.extra-sheet select[data-extra-field="branchIds"]{
  min-width:230px;
  min-height:58px;
  height:58px;
}
.extra-sheet select[data-extra-field="linkedInventoryId"]{min-width:220px}
.extra-sheet .sheet-hint{
  margin-top:4px;
  color:var(--muted);
  font-size:12px;
  line-height:1.2;
}
.product-sheet select[data-product-field="branchIds"]{
  min-height:48px;
  height:48px;
}
.product-image-cell{
  display:grid;
  gap:4px;
  min-width:190px;
}
.product-image-cell input[type="file"]{
  min-width:180px;
  padding:8px;
}
.product-image-cell span{font-size:12px}
.product-actions{gap:6px}
.product-builder-panel{
  margin-top:16px;
  border:1px solid rgba(166,127,83,.42);
  border-radius:14px;
  padding:16px;
  background:rgba(255,250,240,.82);
}
.product-builder-panel h3{margin:0 0 6px}
.product-builder-panel p{margin:0}
.topbar-right{display:flex;gap:12px;align-items:flex-start}
.assistant-box{min-width:430px;max-width:560px;background:rgba(255,248,236,.78);border:1px solid var(--line);border-radius:18px;padding:12px 14px;box-shadow:0 10px 24px rgba(142,106,64,.08)}
.assistant-title{font-size:13px;color:var(--muted);margin-bottom:8px}
.assistant-row{display:flex;gap:8px;align-items:center}
.assistant-row input{flex:1}
.assistant-btn{width:auto;white-space:nowrap}
.assistant-panel{margin-top:10px;padding-top:10px;border-top:1px solid var(--line)}
.assistant-summary{font-weight:600;margin-bottom:8px}
.assistant-warning{font-size:14px;color:#9a6130;margin:6px 0}
.assistant-examples ul{margin:8px 0 0 18px;padding:0}
.assistant-examples li{margin:4px 0;color:var(--muted)}
.assistant-actions{display:flex;gap:8px;margin-top:10px}
.assistant-actions button{width:auto}
.assistant-confirm{background:linear-gradient(180deg,#86a042 0%,#667d2c 100%)}
.assistant-clear{background:linear-gradient(180deg,#d6bb87 0%,#b89360 100%);color:#4f3822}

@media (max-width: 980px){
  .app{grid-template-columns:1fr}
  .sidebar{position:static;height:auto}
  .col-3,.col-4,.col-5,.col-6,.col-7,.col-8{grid-column:span 12}
  .form-grid{grid-template-columns:1fr}
  .topbar{flex-direction:column;gap:12px}
  .topbar-right{width:100%;flex-direction:column}
  .assistant-box{min-width:0;max-width:none;width:100%}
  .assistant-row{flex-direction:column}
  .assistant-btn,.assistant-actions button{width:100%}
  .chat-search-row{grid-template-columns:1fr}
  .chat-search-row button{width:100%}
  .chat-workspace{grid-template-columns:1fr;min-height:0}
  .chat-thread-list{max-height:320px}
  .chat-history-box{height:520px}
  .chat-history-bubble{max-width:88%}
  .menu-layer-main{font-size:16px}
  .menu-layer-note{font-size:10px}
  .simulation-status-strip{flex-direction:column;align-items:stretch}
  .simulation-lab{grid-template-columns:1fr}
  .simulation-phone-card,.simulation-miniapp-card{padding:12px}
  .whatsapp-device{border-width:5px;border-radius:24px}
  .simulation-workspace .sim-chat-box{height:560px;min-height:460px}
  .miniapp-panel-head{flex-direction:column}
  .simulation-workspace .simulation-miniapp-frame{min-height:760px}
}
