
:root{
 --bg:#f5f7fb;--card:#fff;--text:#152033;--muted:#728097;--line:#e6ebf2;
 --accent:#ee4d2d;--accent2:#ff775d;--sidebar:#111827;--sidebar2:#1f2937;
 --ok:#138a5b;--okbg:#e8f8f1;--warn:#b7791f;--warnbg:#fff6df;--bad:#c53b3b;--badbg:#fff0f0;
}
*{box-sizing:border-box}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--text)}
a{color:inherit;text-decoration:none}.shell{display:flex;min-height:100vh}.sidebar{width:255px;background:var(--sidebar);color:#dbe3ef;padding:22px 16px;position:fixed;top:0;bottom:0;overflow:auto}
.brand{display:flex;gap:12px;align-items:center;padding:0 8px 22px}.brand b{display:block;color:#fff}.brand span{display:block;font-size:12px;color:#8ea0b7;margin-top:2px}.brand-mark{width:48px;height:48px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(135deg,var(--accent),#ff8a6f);color:white;font-weight:800;font-size:24px;box-shadow:0 10px 25px rgba(238,77,45,.25)}.brand-mark.small{width:39px;height:39px;border-radius:11px;font-size:20px}
nav a{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:9px;font-size:14px;color:#b8c4d3;margin:2px 0}nav a:hover{background:#1b2637;color:#fff}nav a.active{background:#293548;color:#fff}.nav-group{font-size:10px;letter-spacing:.13em;color:#62738a;margin:21px 12px 7px;font-weight:800}.num{display:inline-grid;place-items:center;width:20px;height:20px;border:1px solid #49586e;border-radius:6px;font-size:11px}.sidebar-footer{margin-top:24px;padding:16px 12px;border-top:1px solid #283548}.sidebar-footer a{color:#9fb0c5;font-size:13px}
.main{margin-left:255px;width:calc(100% - 255px)}.topbar{height:88px;background:#fff;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;padding:0 30px;position:sticky;top:0;z-index:5}.topbar h1{font-size:21px;margin:0 0 5px}.topbar p{margin:0;color:var(--muted);font-size:12px}.content{padding:26px 30px 60px}
.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:18px}.card{background:var(--card);border:1px solid var(--line);border-radius:15px;padding:20px;box-shadow:0 2px 8px rgba(23,35,55,.03);margin-bottom:18px}.metric span{display:block;color:var(--muted);font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}.metric strong{font-size:34px;display:block;margin:7px 0}.metric small{color:#9aa6b6}.grid.two{display:grid;grid-template-columns:1fr 1fr;gap:18px}.card-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:16px}.card-head h2{margin:0 0 5px;font-size:16px}.card-head p{margin:0;color:var(--muted);font-size:12px}.card-head a{font-size:12px;color:var(--accent);font-weight:700}.mini-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.mini-grid div{padding:14px;background:#f8fafc;border-radius:11px}.mini-grid b{display:block;font-size:21px}.mini-grid span{font-size:11px;color:var(--muted)}.best-box{margin-top:12px;padding:11px 13px;background:#fff7f4;border:1px solid #ffe0d8;border-radius:10px;font-size:12px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;white-space:nowrap}th{font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:#8492a6;text-align:left;background:#f8fafc}th,td{padding:11px 12px;border-bottom:1px solid #eef1f5;font-size:12px}tbody tr:hover{background:#fbfcfe}.badge,.pill{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;font-size:10px;font-weight:800}.badge.ok,.pill.ok{color:var(--ok);background:var(--okbg)}.badge.warn,.pill.warn{color:var(--warn);background:var(--warnbg)}.badge.bad,.pill.bad{color:var(--bad);background:var(--badbg)}.badge.neutral,.pill.neutral{color:#5d6878;background:#eef2f6}.empty{text-align:center;color:var(--muted);padding:28px}.notice{padding:14px 16px;border:1px solid #ffd8cf;background:#fff7f4;border-radius:11px;font-size:12px;line-height:1.6;margin-bottom:18px}.notice.soft{background:#f8fafc;border-color:#e6ebf2;color:#5f6d81}.feature-list>div{padding:13px 0;border-bottom:1px solid #edf1f5}.feature-list>div:last-child{border-bottom:0}.feature-list b{display:block;font-size:13px;margin-bottom:4px}.feature-list span{font-size:12px;color:var(--muted);line-height:1.5}
.terminal{background:#0b1220;border:1px solid #243047;border-radius:12px;min-height:350px;color:#b7f7c9;overflow:auto;position:relative}.terminal.tall{min-height:420px}.terminal.fullscreen{height:62vh}.terminal pre{margin:0;padding:38px 16px 16px;font:12px/1.55 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:pre-wrap}.terminal-status{position:sticky;top:0;background:#111a2b;color:#8fa3bf;padding:9px 13px;font:11px ui-monospace,monospace;border-bottom:1px solid #243047;z-index:1}.console-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.console-tabs button,.btn{border:1px solid #dce3ec;background:#fff;padding:9px 12px;border-radius:9px;cursor:pointer;font-weight:700;font-size:12px}.console-tabs button.active,.btn.primary{background:var(--accent);border-color:var(--accent);color:white}.fake-form label{display:block;font-size:12px;font-weight:700;margin:14px 0 7px}.fake-form textarea,input{width:100%;border:1px solid #dce3ec;border-radius:9px;padding:11px;font:inherit}.fake-form textarea{min-height:180px}.fake-form button{margin-top:10px}
.login-body{display:grid;place-items:center;min-height:100vh;background:#f3f5f9}.login-card{width:min(92vw,390px);background:white;border:1px solid var(--line);border-radius:18px;padding:30px;box-shadow:0 18px 55px rgba(31,41,55,.08)}.login-card .brand-mark{margin-bottom:22px}.login-card h1{font-size:21px;margin:0 0 7px}.login-card p{color:var(--muted);font-size:12px;margin:0 0 24px}.login-card label{display:block;font-size:12px;font-weight:700;margin:12px 0 6px}.login-card .btn{width:100%;margin-top:17px}.alert{padding:10px 12px;border-radius:8px;font-size:12px}.alert.bad{background:var(--badbg);color:var(--bad)}
code{background:#f1f4f8;border-radius:5px;padding:2px 5px;font-size:11px}
@media(max-width:1100px){.cards{grid-template-columns:repeat(2,1fr)}.grid.two{grid-template-columns:1fr}.sidebar{width:215px}.main{margin-left:215px;width:calc(100% - 215px)}}
@media(max-width:760px){.sidebar{position:static;width:100%;height:auto}.shell{display:block}.main{margin:0;width:100%}.topbar{position:static;padding:0 18px}.content{padding:18px}.cards{grid-template-columns:1fr 1fr}.mini-grid{grid-template-columns:1fr 1fr}.sidebar nav{display:grid;grid-template-columns:1fr 1fr}.nav-group{grid-column:1/-1}.sidebar-footer{display:none}}

/* ===== PM2 LIVE STATUS ===== */
.pm2-panel{
  background:#fff;
  border:1px solid var(--line);
  border-radius:15px;
  padding:18px 20px;
  margin-bottom:18px;
  box-shadow:0 2px 8px rgba(23,35,55,.03);
}
.pm2-panel-head{
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:flex-start;
  margin-bottom:15px;
}
.pm2-panel-head h2{
  margin:0 0 4px;
  font-size:16px;
}
.pm2-panel-head p{
  margin:0;
  color:var(--muted);
  font-size:12px;
}
.pm2-live-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border-radius:999px;
  padding:6px 10px;
  font-size:10px;
  font-weight:800;
}
.pm2-live-badge.ok{
  color:var(--ok);
  background:var(--okbg);
}
.pm2-live-badge.bad{
  color:var(--bad);
  background:var(--badbg);
}
.pm2-live-badge.neutral{
  color:#5d6878;
  background:#eef2f6;
}
.pm2-stats{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
}
.pm2-stat{
  background:#f8fafc;
  border:1px solid #eef2f6;
  border-radius:11px;
  padding:13px 14px;
}
.pm2-stat span{
  display:block;
  color:var(--muted);
  font-size:10px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
  margin-bottom:6px;
}
.pm2-stat strong{
  display:block;
  font-size:17px;
}
.pm2-foot{
  display:flex;
  justify-content:space-between;
  gap:12px;
  color:#8b98aa;
  font-size:10px;
  padding-top:11px;
}
@media(max-width:900px){
  .pm2-stats{grid-template-columns:repeat(2,1fr)}
  .pm2-foot{display:block}
  .pm2-foot span{display:block;margin-top:4px}
}

/* ===== V3 MONITORING COMPLETE ===== */
.section-title-row{display:flex;align-items:end;justify-content:space-between;margin:4px 0 12px}
.section-title-row h2{font-size:16px;margin:0 0 4px}
.section-title-row p{font-size:11px;color:var(--muted);margin:0}
.compact-cards{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:18px}
.tester-cards{grid-template-columns:repeat(4,minmax(0,1fr));}
.bot-status-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px}
.bot-status-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:15px;text-decoration:none;color:inherit;display:grid;grid-template-columns:1fr auto;gap:8px;align-items:start;box-shadow:0 2px 8px rgba(23,35,55,.03)}
.bot-status-card:hover{border-color:#cfd8e5;transform:translateY(-1px)}
.bot-status-card span{font-weight:800;font-size:13px;display:block}
.bot-status-card small{color:var(--muted);font-size:10px;display:block;margin-top:3px}
.bot-status-card>small{grid-column:1/-1;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.best-service-card{display:grid;grid-template-columns:2fr repeat(3,1fr);gap:10px;background:linear-gradient(135deg,#fff7f2,#fff);border:1px solid #ffd9c9;border-radius:14px;padding:15px 18px;margin-bottom:16px}
.best-service-card div{display:flex;flex-direction:column;gap:3px}
.best-service-card span{font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);font-weight:800}
.best-service-card strong{font-size:17px}
.console-toolbar{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:12px 0}
.console-toolbar input[type=search]{flex:1;min-width:240px;border:1px solid var(--line);border-radius:10px;padding:10px 12px;font:inherit;background:#fff}
.console-toolbar button{border:1px solid var(--line);background:#fff;border-radius:9px;padding:9px 12px;font-weight:700;cursor:pointer}
.console-toolbar button.active{background:#fff0ea;color:#f4512a;border-color:#ffc8b8}
.console-check{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:11px;font-weight:700;padding:0 5px}
.console-foot{display:flex;justify-content:space-between;color:var(--muted);font-size:10px;margin-top:8px}
@media(max-width:1100px){.bot-status-grid,.compact-cards,.tester-cards{grid-template-columns:repeat(2,1fr)}.best-service-card{grid-template-columns:repeat(2,1fr)}}
@media(max-width:650px){.bot-status-grid,.compact-cards,.tester-cards,.best-service-card{grid-template-columns:1fr}.console-toolbar{align-items:stretch}.console-toolbar input[type=search]{min-width:0;width:100%}}


/* ===== V4.3 · MENU 4 MODAL DIRECT PROCESS ===== */
body.menu4-modal-open{overflow:hidden}

#menu4-orders-table td:nth-child(4){
  max-width:390px;
  overflow:hidden;
  text-overflow:ellipsis;
}
.wrap-cell{
  white-space:normal;
  min-width:220px;
  max-width:420px;
  line-height:1.45;
}

.menu4-modal[hidden]{display:none!important}
.menu4-modal{
  position:fixed;
  inset:0;
  z-index:5000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.menu4-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(8,18,34,.60);
  backdrop-filter:blur(3px);
}
.menu4-modal-dialog{
  position:relative;
  z-index:1;
  width:min(900px, calc(100vw - 48px));
  max-height:calc(100vh - 48px);
  overflow:auto;
  background:#fff;
  border-radius:18px;
  box-shadow:0 28px 80px rgba(10,24,45,.30);
  border:1px solid rgba(255,255,255,.7);
  padding:0 26px 26px;
}
.menu4-modal-head{
  position:sticky;
  top:0;
  z-index:3;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
  margin:0 -26px 22px;
  padding:22px 26px 18px;
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
  border-radius:18px 18px 0 0;
}
.menu4-modal-head h2{
  margin:3px 0 5px;
  font-size:22px;
}
.menu4-modal-head p{
  margin:0;
  color:var(--muted);
  font-size:12px;
}
.menu4-modal-kicker{
  color:#f05235;
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
}
.menu4-modal-close{
  width:38px;
  height:38px;
  flex:0 0 38px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#f8fafc;
  color:#445164;
  font-size:26px;
  line-height:32px;
  cursor:pointer;
}
.menu4-modal-close:hover{background:#eef2f6}

.menu4-summary-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-bottom:18px;
}
.menu4-summary-grid>div{
  background:#f7f9fc;
  border:1px solid #e8edf3;
  border-radius:11px;
  padding:11px 12px;
  min-width:0;
}
.menu4-summary-grid span{
  display:block;
  color:var(--muted);
  font-size:9px;
  font-weight:900;
  letter-spacing:.05em;
  text-transform:uppercase;
  margin-bottom:4px;
}
.menu4-summary-grid strong{
  display:block;
  font-size:12px;
  word-break:break-word;
}

.menu4-detail-block{margin-top:13px}
.operation-form label{
  display:block;
  font-size:11px;
  font-weight:800;
  color:#4e5d70;
  margin:0 0 6px;
}
.readonly-field{
  background:#f7f9fc;
  border:1px solid var(--line);
  border-radius:10px;
  padding:11px 12px;
  font-size:12px;
  line-height:1.45;
}
.menu4-product-field{min-height:43px}
.field-help{
  display:block;
  color:var(--muted);
  font-size:10px;
  margin-top:6px;
}

.menu4-preview-panel{
  margin-top:18px;
  border:1px solid #dfe6ee;
  border-radius:13px;
  background:#fbfcfe;
  overflow:hidden;
}
.menu4-preview-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  padding:13px 15px;
  border-bottom:1px solid #e6ebf1;
  background:#f6f8fb;
}
.menu4-preview-head>div>span{
  display:block;
  color:#7e8da0;
  font-size:9px;
  font-weight:900;
  letter-spacing:.07em;
  margin-bottom:2px;
}
.menu4-preview-head>div>strong{font-size:13px}
#menu4-preview-body{padding:15px}

.menu4-preview-checks{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
  margin-bottom:14px;
}
.menu4-preview-checks>div{
  padding:10px;
  border:1px solid #e8edf2;
  border-radius:9px;
  background:#fff;
}
.menu4-preview-checks span{
  display:block;
  color:var(--muted);
  font-size:9px;
  font-weight:800;
  text-transform:uppercase;
  margin-bottom:4px;
}
.menu4-preview-checks strong{font-size:12px}
.good-text{color:#16945d}
.bad-text{color:#cf3d4a}

.menu4-preview-services table{
  width:100%;
  border-collapse:collapse;
  font-size:11px;
}
.menu4-preview-services th,
.menu4-preview-services td{
  padding:8px 9px;
  border-bottom:1px solid #edf1f5;
  text-align:left;
}
.menu4-preview-services th{
  color:#77869a;
  text-transform:uppercase;
  font-size:9px;
  letter-spacing:.04em;
}
.menu4-preview-safe{
  margin-top:13px;
  padding:10px 12px;
  border-radius:9px;
  background:var(--okbg);
  color:var(--ok);
  font-size:10px;
  font-weight:700;
}
.menu4-blockers{
  margin-top:13px;
  padding:10px 12px;
  border-radius:9px;
  background:var(--badbg);
  color:var(--bad);
  font-size:10px;
}
.menu4-blockers b{display:block;margin-bottom:5px}
.menu4-blockers span{display:block;margin:3px 0}
.menu4-preview-loading,
.menu4-preview-error{
  padding:12px;
  border-radius:9px;
  background:#f6f8fb;
  color:#66778b;
  font-size:11px;
}
.menu4-preview-error{
  background:var(--badbg);
  color:var(--bad);
}

.operation-message{
  padding:10px 12px;
  border-radius:9px;
  font-size:11px;
  line-height:1.5;
  margin:14px 0 0;
}
.operation-message.ok{
  background:var(--okbg);
  color:var(--ok);
  border:1px solid #bfe9cc;
}
.operation-message.warn{
  background:var(--warnbg);
  color:var(--warn);
  border:1px solid #f2dfb1;
}
.operation-message.bad{
  background:var(--badbg);
  color:var(--bad);
  border:1px solid #f2c4c9;
}

.menu4-action-buttons{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:11px;
  margin-top:18px;
}
.menu4-action-buttons .btn{
  min-height:43px;
  font-weight:850;
}
.menu4-preview-btn{
  border-color:#b9c9dc;
  background:#edf4fc;
  color:#26629d;
}
.menu4-preview-btn:hover{background:#e3eefb}
.danger-action{
  margin:0!important;
  width:100%;
}
.danger-action:disabled,
.menu4-preview-btn:disabled{
  opacity:.48;
  cursor:not-allowed;
}
.menu4-process-hint{
  display:block;
  margin-top:9px;
  color:#8290a2;
  text-align:center;
  font-size:9px;
}

@media(max-width:850px){
  .menu4-summary-grid{grid-template-columns:repeat(2,1fr)}
  .menu4-preview-checks{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:600px){
  .menu4-modal{padding:0}
  .menu4-modal-dialog{
    width:100vw;
    max-height:100vh;
    min-height:100vh;
    border-radius:0;
    padding:0 16px 22px;
  }
  .menu4-modal-head{
    margin:0 -16px 18px;
    padding:18px 16px 14px;
    border-radius:0;
  }
  .menu4-summary-grid{grid-template-columns:1fr 1fr}
  .menu4-preview-checks{grid-template-columns:1fr 1fr}
  .menu4-action-buttons{grid-template-columns:1fr}
}



/* V4.3 direct-process cleanup */
.menu4-preview-panel,
.menu4-preview-btn{
  display:none!important;
}
.menu4-action-buttons-single{
  grid-template-columns:1fr!important;
}


/* ===== V5 · MENU 9 MULTI LINK ===== */
body.menu9-modal-open{overflow:hidden}

.menu9-modal[hidden]{display:none!important}
.menu9-modal{
  position:fixed;
  inset:0;
  z-index:5100;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.menu9-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(8,18,34,.62);
  backdrop-filter:blur(3px);
}
.menu9-modal-dialog{
  position:relative;
  z-index:1;
  width:min(980px,calc(100vw - 48px));
  max-height:calc(100vh - 48px);
  overflow:auto;
  background:#fff;
  border-radius:18px;
  box-shadow:0 28px 85px rgba(10,24,45,.32);
  border:1px solid rgba(255,255,255,.7);
  padding:0 26px 26px;
}
.menu9-modal-head{
  position:sticky;
  top:0;
  z-index:3;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
  margin:0 -26px 22px;
  padding:22px 26px 18px;
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
  border-radius:18px 18px 0 0;
}
.menu9-modal-head h2{
  margin:3px 0 5px;
  font-size:22px;
}
.menu9-modal-head p{
  margin:0;
  color:var(--muted);
  font-size:12px;
}
.menu9-modal-kicker{
  color:#f05235;
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
}
.menu9-modal-close{
  width:38px;
  height:38px;
  flex:0 0 38px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#f8fafc;
  color:#445164;
  font-size:26px;
  line-height:32px;
  cursor:pointer;
}
.menu9-modal-close:hover{background:#eef2f6}

.menu9-summary-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-bottom:14px;
}
.menu9-summary-grid>div,
.menu9-product-box,
.menu9-format-box>div{
  background:#f7f9fc;
  border:1px solid #e8edf3;
  border-radius:11px;
  padding:11px 12px;
  min-width:0;
}
.menu9-summary-grid span,
.menu9-product-box span,
.menu9-format-box span{
  display:block;
  color:var(--muted);
  font-size:9px;
  font-weight:900;
  letter-spacing:.05em;
  text-transform:uppercase;
  margin-bottom:4px;
}
.menu9-summary-grid strong,
.menu9-product-box strong,
.menu9-format-box strong{
  display:block;
  font-size:12px;
  word-break:break-word;
}
.menu9-product-box{margin-bottom:10px}
.menu9-format-box{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-bottom:16px;
}
.menu9-format-box code{
  font-size:12px;
  font-weight:800;
}
#menu9-process-form label{
  display:block;
  font-size:11px;
  font-weight:800;
  color:#4e5d70;
  margin:0 0 6px;
}
#menu9-targets{
  width:100%;
  resize:vertical;
  min-height:210px;
  border:1px solid #cad5e2;
  border-radius:11px;
  padding:12px 13px;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:11px;
  line-height:1.6;
  background:#fbfcfe;
}
#menu9-targets:focus{
  outline:none;
  border-color:#3777c9;
  box-shadow:0 0 0 3px rgba(55,119,201,.11);
}

.menu9-preview{
  margin-top:14px;
  border:1px solid #dfe6ee;
  border-radius:13px;
  background:#fbfcfe;
  overflow:hidden;
}
.menu9-preview-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding:12px 14px;
  border-bottom:1px solid #e6ebf1;
  background:#f6f8fb;
}
.menu9-preview-head>div>span{
  display:block;
  color:#7e8da0;
  font-size:9px;
  font-weight:900;
  letter-spacing:.07em;
  margin-bottom:2px;
}
.menu9-preview-head>div>strong{font-size:13px}

.menu9-preview-stats{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
  padding:14px;
}
.menu9-preview-stats>div{
  border:1px solid #e8edf2;
  border-radius:9px;
  background:#fff;
  padding:10px;
}
.menu9-preview-stats span{
  display:block;
  color:var(--muted);
  font-size:9px;
  font-weight:800;
  text-transform:uppercase;
  margin-bottom:4px;
}
.menu9-preview-stats strong{font-size:13px}

.menu9-preview-message{
  margin:0 14px 14px;
  padding:10px 12px;
  border-radius:9px;
  background:#f3f6fa;
  color:#64758a;
  font-size:10px;
}
.menu9-preview-message.ok{
  background:var(--okbg);
  color:var(--ok);
}
.menu9-preview-message.warn{
  background:var(--warnbg);
  color:var(--warn);
}
.menu9-preview-message.bad{
  background:var(--badbg);
  color:var(--bad);
}
.menu9-line-errors{
  margin:0 14px 14px;
  max-height:145px;
  overflow:auto;
  border-radius:9px;
  background:var(--badbg);
  color:var(--bad);
  padding:10px 12px;
  font-size:10px;
  line-height:1.5;
}
.menu9-process-button{
  width:100%;
  min-height:45px;
  margin-top:16px;
  font-weight:850;
}
.menu9-process-button:disabled{
  opacity:.48;
  cursor:not-allowed;
}
.menu9-process-hint{
  display:block;
  margin-top:8px;
  color:#8290a2;
  text-align:center;
  font-size:9px;
}

#menu9-orders-table td:nth-child(4){
  max-width:390px;
  overflow:hidden;
  text-overflow:ellipsis;
}

@media(max-width:850px){
  .menu9-summary-grid,
  .menu9-preview-stats{
    grid-template-columns:repeat(2,1fr);
  }
}
@media(max-width:600px){
  .menu9-modal{padding:0}
  .menu9-modal-dialog{
    width:100vw;
    max-height:100vh;
    min-height:100vh;
    border-radius:0;
    padding:0 16px 22px;
  }
  .menu9-modal-head{
    margin:0 -16px 18px;
    padding:18px 16px 14px;
    border-radius:0;
  }
  .menu9-summary-grid,
  .menu9-preview-stats,
  .menu9-format-box{
    grid-template-columns:1fr;
  }
}


/* ===== V5.5 · MENU 3 AI CONTROL ===== */
.ai-control-card{
  margin-bottom:18px;
  border:1px solid #dde5ef;
  background:linear-gradient(180deg,#ffffff 0%,#fbfcfe 100%);
}
.ai-control-main{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:24px;
}
.ai-control-kicker{
  color:#617289;
  font-size:9px;
  font-weight:900;
  letter-spacing:.08em;
  margin-bottom:5px;
}
.ai-control-title-row{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:4px;
}
.ai-control-title-row h2{
  margin:0;
  font-size:20px;
}
.ai-control-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:54px;
  padding:5px 9px;
  border-radius:999px;
  font-size:9px;
  font-weight:900;
  letter-spacing:.04em;
}
.ai-control-status.ok{
  background:var(--okbg);
  color:var(--ok);
}
.ai-control-status.bad{
  background:var(--badbg);
  color:var(--bad);
}
.ai-control-status.neutral{
  background:#edf1f6;
  color:#66768a;
}
.ai-control-card p{
  margin:0;
  color:var(--muted);
  font-size:11px;
  line-height:1.55;
}
.ai-control-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px 14px;
  margin-top:12px;
  color:#7c8a9c;
  font-size:9px;
}
.ai-control-meta b{
  color:#445368;
}
.ai-control-main #ai-control-toggle{
  flex:0 0 auto;
  min-width:175px;
  min-height:42px;
  font-weight:850;
}
.ai-disable-btn{
  background:#fff0f1;
  color:#be3441;
  border:1px solid #efc3c8;
}
.ai-disable-btn:hover{
  background:#ffe4e7;
}
.ai-control-foot{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding-top:13px;
  margin-top:15px;
  border-top:1px solid #edf1f5;
  color:#8794a5;
  font-size:9px;
}
@media(max-width:700px){
  .ai-control-main{
    align-items:stretch;
    flex-direction:column;
  }
  .ai-control-main #ai-control-toggle{
    width:100%;
  }
  .ai-control-foot{
    display:block;
  }
  .ai-control-foot span{
    display:block;
    margin-top:4px;
  }
}


/* ===== V6 · MENU 8 AI ADMIN QUEUE ===== */
.menu8-stat-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.menu8-main-card{
  margin-top:18px;
}
.menu8-head{
  align-items:flex-start;
}
.menu8-sync-state{
  display:flex;
  align-items:center;
  gap:8px;
}
.menu8-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:4px 0 14px;
}
.menu8-filter-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.menu8-filter-tabs button{
  border:1px solid #dde5ef;
  background:#fff;
  color:#617289;
  border-radius:9px;
  padding:7px 10px;
  font-size:9px;
  font-weight:850;
  cursor:pointer;
}
.menu8-filter-tabs button.active{
  background:#111827;
  border-color:#111827;
  color:#fff;
}
.menu8-search{
  width:min(360px,100%);
}
.btn.mini{
  padding:6px 9px;
  min-height:auto;
  font-size:9px;
}
.menu8-modal{
  width:min(860px,calc(100vw - 28px));
  max-height:90vh;
  overflow:auto;
}
.menu8-modal-kicker{
  color:#718096;
  font-size:9px;
  font-weight:900;
  letter-spacing:.06em;
  margin-bottom:4px;
}
.menu8-detail-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.menu8-detail-grid > div{
  padding:11px;
  border:1px solid #e7edf4;
  background:#fbfcfe;
  border-radius:10px;
  min-width:0;
}
.menu8-detail-grid span,
.menu8-detail-block > span{
  display:block;
  color:#8190a2;
  font-size:9px;
  font-weight:800;
  margin-bottom:5px;
}
.menu8-detail-grid strong{
  display:block;
  color:#26364a;
  font-size:10px;
  overflow-wrap:anywhere;
}
.menu8-detail-block{
  margin-top:12px;
}
.menu8-summary-box{
  border:1px solid #e4eaf1;
  background:#fff;
  border-radius:10px;
  padding:12px;
  color:#43536a;
  font-size:10px;
  line-height:1.65;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}
.menu8-summary-box.muted-box{
  background:#fbfcfe;
}
.menu8-time-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px 16px;
  margin-top:12px;
  color:#8190a2;
  font-size:9px;
}
.menu8-time-row b{
  color:#536176;
}
.menu8-resolve-form{
  position:relative;
  margin-top:14px;
  padding:12px;
  border:1px solid #e1e8f0;
  border-radius:10px;
  background:#fbfcfe;
}
.menu8-resolve-form label{
  display:block;
  color:#425168;
  font-size:10px;
  font-weight:850;
  margin-bottom:7px;
}
.menu8-resolve-form label small{
  color:#8492a5;
  font-weight:600;
}
.menu8-resolve-form textarea{
  width:100%;
  resize:vertical;
  border:1px solid #dce4ed;
  background:#fff;
  border-radius:9px;
  padding:10px;
  color:#26364a;
  font:inherit;
  font-size:10px;
  outline:none;
}
.menu8-resolve-form textarea:focus{
  border-color:#9baabd;
}
.menu8-note-count{
  margin-top:5px;
  text-align:right;
  color:#8a98a9;
  font-size:9px;
}
.menu8-action-message{
  margin-top:12px;
}
.menu8-action-message.bad{
  background:#fff1f2;
  color:#b42332;
  border-color:#f2c6cb;
}
.menu8-modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
}
@media(max-width:900px){
  .menu8-stat-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .menu8-detail-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:650px){
  .menu8-toolbar{
    align-items:stretch;
    flex-direction:column;
  }
  .menu8-search{
    width:100%;
  }
  .menu8-detail-grid{
    grid-template-columns:1fr;
  }
  .menu8-modal-actions{
    flex-wrap:wrap;
  }
  .menu8-modal-actions .btn{
    flex:1 1 45%;
  }
}


/* ===== V7 · MENU 7 SYSTEM HEALTH CHECK ===== */
.menu7-hero{
  margin-bottom:18px;
}
.menu7-hero-main{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}
.menu7-kicker{
  color:#68798e;
  font-size:9px;
  font-weight:900;
  letter-spacing:.08em;
  margin-bottom:5px;
}
.menu7-title-line{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
}
.menu7-title-line h2{
  margin:0;
}
.menu7-hero-main p{
  max-width:760px;
  margin:7px 0 0;
  color:var(--muted);
  font-size:11px;
  line-height:1.55;
}
.menu7-run-btn{
  flex:0 0 auto;
  min-width:190px;
  min-height:42px;
}
.menu7-hero-foot{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px 16px;
  margin-top:15px;
  padding-top:13px;
  border-top:1px solid #edf1f5;
  color:#7c8a9c;
  font-size:9px;
}
.menu7-hero-foot .pill{
  margin-left:auto;
}
.menu7-summary-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.menu7-section-grid{
  display:grid;
  grid-template-columns:minmax(0,1.55fr) minmax(300px,.75fr);
  gap:18px;
  margin-top:18px;
}
.menu7-metric-pairs{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-bottom:12px;
}
.menu7-metric-pairs > div,
.menu7-tracking-grid > div{
  padding:13px;
  border:1px solid #e6ecf3;
  background:#fbfcfe;
  border-radius:10px;
}
.menu7-metric-pairs span,
.menu7-tracking-grid span{
  display:block;
  color:#8090a2;
  font-size:9px;
  font-weight:800;
  margin-bottom:4px;
}
.menu7-metric-pairs strong{
  display:block;
  color:#26364a;
  font-size:18px;
}
.menu7-tracking-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
.menu7-tracking-grid strong{
  display:block;
  color:#26364a;
  font-size:15px;
}
.notice.warn{
  background:#fff9e8;
  color:#8b6817;
  border-color:#f0dfaa;
}
.notice.bad{
  background:#fff1f2;
  color:#b42332;
  border-color:#f2c6cb;
}
.menu7-security-note{
  margin-top:18px;
}
@media(max-width:1000px){
  .menu7-summary-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .menu7-section-grid{
    grid-template-columns:1fr;
  }
}
@media(max-width:650px){
  .menu7-hero-main{
    align-items:stretch;
    flex-direction:column;
  }
  .menu7-run-btn{
    width:100%;
  }
  .menu7-hero-foot .pill{
    margin-left:0;
  }
  .menu7-summary-grid{
    grid-template-columns:1fr;
  }
  .menu7-tracking-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}


/* ===== V8 · MENU 6 TRACKING SMM ===== */
.menu6-stat-grid{
  grid-template-columns:repeat(5,minmax(0,1fr));
}
.menu6-main-card{
  margin-top:18px;
}
.menu6-head{
  align-items:flex-start;
}
.menu6-head-actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px;
}
.menu6-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:5px 0 10px;
}
.menu6-filters{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.menu6-filters button{
  border:1px solid #dce4ed;
  background:#fff;
  color:#637388;
  border-radius:9px;
  padding:7px 10px;
  font-size:9px;
  font-weight:850;
  cursor:pointer;
}
.menu6-filters button.active{
  border-color:#111827;
  background:#111827;
  color:#fff;
}
.menu6-toolbar-right{
  display:flex;
  align-items:center;
  gap:8px;
  width:min(520px,100%);
}
.menu6-search{
  flex:1 1 auto;
}
.menu6-page-size{
  flex:0 0 130px;
}
.menu6-result-meta{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-bottom:9px;
  color:#8694a5;
  font-size:9px;
}
.menu6-service-cell{
  min-width:150px;
}
.menu6-service-cell b{
  display:block;
  color:#33445a;
  font-size:10px;
}
.menu6-service-cell span{
  display:block;
  margin-top:3px;
  color:#8a98aa;
  font-size:9px;
}
.menu6-pagination{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  margin-top:14px;
}
.menu6-pagination span{
  min-width:110px;
  color:#6f7f92;
  font-size:9px;
  text-align:center;
}
.menu6-readonly-note{
  margin-top:18px;
}
.menu6-modal{
  width:min(900px,calc(100vw - 28px));
  max-height:90vh;
  overflow:auto;
}
.menu6-modal-kicker{
  color:#748499;
  font-size:9px;
  font-weight:900;
  letter-spacing:.07em;
  margin-bottom:4px;
}
.menu6-detail-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
}
.menu6-detail-grid > div,
.menu6-time-grid > div{
  min-width:0;
  padding:11px;
  border:1px solid #e6ecf3;
  border-radius:10px;
  background:#fbfcfe;
}
.menu6-detail-grid span,
.menu6-time-grid span,
.menu6-target-head > span{
  display:block;
  margin-bottom:5px;
  color:#8290a2;
  font-size:9px;
  font-weight:800;
}
.menu6-detail-grid strong,
.menu6-time-grid strong{
  display:block;
  color:#33445a;
  font-size:10px;
  overflow-wrap:anywhere;
}
.menu6-target-block{
  margin-top:12px;
}
.menu6-target-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
}
.menu6-target-head > span{
  margin-bottom:0;
}
.menu6-target-box{
  padding:12px;
  border:1px solid #e0e7ef;
  border-radius:10px;
  background:#fff;
  color:#3f5066;
  font-size:10px;
  line-height:1.55;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.menu6-time-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
  margin-top:12px;
}
.menu6-modal-foot{
  display:flex;
  justify-content:flex-end;
  gap:8px;
}
@media(max-width:1100px){
  .menu6-stat-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
@media(max-width:850px){
  .menu6-toolbar{
    align-items:stretch;
    flex-direction:column;
  }
  .menu6-toolbar-right{
    width:100%;
  }
  .menu6-detail-grid,
  .menu6-time-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:650px){
  .menu6-stat-grid{
    grid-template-columns:1fr;
  }
  .menu6-toolbar-right{
    flex-direction:column;
  }
  .menu6-page-size,
  .menu6-search{
    width:100%;
    flex:1 1 auto;
  }
  .menu6-detail-grid,
  .menu6-time-grid{
    grid-template-columns:1fr;
  }
}


/* ===== V10 · MENU 10 CUSTOMER CRM ===== */
.menu10-stat-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.menu10-main-card{
  margin-top:18px;
}
.menu10-head{
  align-items:flex-start;
}
.menu10-head-actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
}
.menu10-consent-note{
  margin-bottom:14px;
}
.menu10-toolbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  margin-bottom:10px;
}
.menu10-filters{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.menu10-filters button{
  border:1px solid #dce4ed;
  background:#fff;
  color:#637388;
  border-radius:9px;
  padding:7px 10px;
  font-size:9px;
  font-weight:850;
  cursor:pointer;
}
.menu10-filters button.active{
  border-color:#111827;
  background:#111827;
  color:#fff;
}
.menu10-search{
  width:min(420px,100%);
}
.menu10-result-meta{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-bottom:9px;
  color:#8694a5;
  font-size:9px;
}
.menu10-buyer b{
  display:block;
  color:#33445a;
  font-size:10px;
}
.menu10-buyer span{
  display:block;
  margin-top:3px;
  color:#8a98aa;
  font-size:9px;
}
.menu10-info{
  margin-top:18px;
}
@media(max-width:900px){
  .menu10-stat-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .menu10-toolbar{
    align-items:stretch;
    flex-direction:column;
  }
  .menu10-search{
    width:100%;
  }
}
@media(max-width:600px){
  .menu10-stat-grid{
    grid-template-columns:1fr;
  }
}


/* ===== V11 · MENU 11 TWO SAME PRODUCT ===== */
.menu11-stat-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.menu11-scope{
  margin-bottom:18px;
}
.menu11-item-cell{
  min-width:160px;
}
.menu11-item-cell b{
  display:block;
  color:#34455b;
  font-size:10px;
  line-height:1.4;
}
.menu11-item-cell span{
  display:block;
  margin-top:4px;
  color:#8997a8;
  font-size:9px;
}
.menu11-modal-dialog{
  width:min(920px,calc(100vw - 28px));
}
.menu11-items-preview{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.menu11-preview-card{
  padding:14px;
  border:1px solid #e4eaf1;
  border-radius:11px;
  background:#fbfcfe;
}
.menu11-preview-card > span{
  display:block;
  color:#8996a7;
  font-size:9px;
  font-weight:900;
  letter-spacing:.05em;
  margin-bottom:6px;
}
.menu11-preview-card > strong{
  display:block;
  color:#293a50;
  font-size:11px;
  line-height:1.45;
}
.menu11-preview-card > small{
  display:block;
  margin-top:7px;
  color:#64758a;
  line-height:1.4;
}
.menu11-group-box{
  margin-top:12px;
  padding:14px;
  border:1px solid #cfe8dc;
  border-radius:12px;
  background:#f8fffb;
}
.menu11-group-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.menu11-group-head > div > span{
  display:block;
  color:#739080;
  font-size:9px;
  font-weight:900;
  letter-spacing:.05em;
}
.menu11-group-head > div > strong{
  display:block;
  margin-top:4px;
  color:#2b4337;
  font-size:11px;
}
.menu11-group-list{
  display:grid;
  gap:8px;
}
.menu11-group-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:11px 12px;
  border:1px solid #dcefe5;
  border-radius:9px;
  background:#fff;
}
.menu11-group-row span{
  display:block;
  color:#324c3e;
  font-weight:900;
  font-size:11px;
}
.menu11-group-row small{
  display:block;
  margin-top:3px;
  color:#7b9185;
  font-size:9px;
}
.menu11-group-row strong{
  color:#173d2b;
  font-size:18px;
}
.menu11-target-full{
  overflow-wrap:anywhere;
  word-break:break-word;
}
@media(max-width:900px){
  .menu11-stat-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:650px){
  .menu11-stat-grid{
    grid-template-columns:1fr;
  }
  .menu11-items-preview{
    grid-template-columns:1fr;
  }
  .menu11-group-head{
    flex-direction:column;
  }
}



/* ===== V11.1 · MENU 11 WAITING TARGET ===== */
.menu11-stat-grid-v111{
  grid-template-columns:repeat(5,minmax(0,1fr));
}
.menu11-head-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
#menu11-target-input[readonly]{
  background:#f5f7fa;
  color:#637388;
}
@media(max-width:1100px){
  .menu11-stat-grid-v111{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
@media(max-width:700px){
  .menu11-stat-grid-v111{
    grid-template-columns:1fr;
  }
}


/* ===== V12 · MENU 5 NOTIFIER & REFILL CENTER ===== */
.menu5-metrics{
  grid-template-columns:repeat(5,minmax(0,1fr));
}
.menu5-safe-notice{
  margin-bottom:18px;
}
.menu5-toolbar-head{
  gap:16px;
}
.menu5-head-right{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.menu5-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.menu5-toolbar input[type="search"]{
  width:min(420px,100%);
  min-width:260px;
}
.menu5-filter-group{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.menu5-filter-group .btn.active{
  border-color:#2f6fed;
  box-shadow:0 0 0 2px rgba(47,111,237,.08);
}
.menu5-table-foot{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-top:10px;
  color:#8895a7;
  font-size:10px;
}
.menu5-terminal{
  min-height:330px;
}
.menu5-log-stats{
  margin-bottom:12px;
}
.menu5-modal-dialog{
  width:min(900px,calc(100vw - 28px));
}
.menu5-detail-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.menu5-detail-card{
  padding:14px;
  border:1px solid #e5eaf1;
  border-radius:11px;
  background:#fbfcfe;
}
.menu5-detail-card > span{
  display:block;
  margin-bottom:10px;
  color:#8795a7;
  font-size:9px;
  font-weight:900;
  letter-spacing:.06em;
}
.menu5-detail-card > div{
  display:grid;
  grid-template-columns:120px minmax(0,1fr);
  gap:10px;
  align-items:center;
  min-height:30px;
}
.menu5-detail-card label{
  color:#8795a7;
  font-size:9px;
}
.menu5-detail-card strong{
  color:#304257;
  font-size:10px;
  overflow-wrap:anywhere;
}
.menu5-target{
  overflow-wrap:anywhere;
  word-break:break-word;
}
@media(max-width:1200px){
  .menu5-metrics{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .menu5-toolbar{
    align-items:flex-start;
    flex-direction:column;
  }
  .menu5-filter-group{
    justify-content:flex-start;
  }
}
@media(max-width:720px){
  .menu5-metrics{
    grid-template-columns:1fr;
  }
  .menu5-toolbar input[type="search"]{
    min-width:0;
    width:100%;
  }
  .menu5-detail-grid{
    grid-template-columns:1fr;
  }
}


/* ===== V13 · MENU 2 AUTO PROCESSOR MONITOR ===== */
.menu2-heartbeat-bar{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr)) auto;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  margin-bottom:16px;
  border:1px solid #e5eaf1;
  border-radius:12px;
  background:#fff;
}
.menu2-heartbeat-bar > div:not(.menu2-heartbeat-action){
  min-width:0;
}
.menu2-heartbeat-bar span{
  display:block;
  color:#8a97a8;
  font-size:9px;
  font-weight:800;
}
.menu2-heartbeat-bar strong{
  display:block;
  margin-top:4px;
  color:#304257;
  font-size:12px;
}
.menu2-heartbeat-action{
  display:flex;
  justify-content:flex-end;
}
.menu2-main-metrics{
  grid-template-columns:repeat(6,minmax(0,1fr));
}
.menu2-monitor-note{
  margin-bottom:18px;
}
.menu2-monitor-grid{
  align-items:stretch;
}
.menu2-pipeline-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.menu2-pipeline-grid > div{
  padding:13px;
  border:1px solid #e7ebf1;
  border-radius:10px;
  background:#fbfcfe;
}
.menu2-pipeline-grid span{
  display:block;
  color:#8996a7;
  font-size:9px;
  font-weight:800;
}
.menu2-pipeline-grid strong{
  display:block;
  margin-top:5px;
  color:#2e4056;
  font-size:20px;
}
.menu2-reason-list{
  display:grid;
  gap:7px;
}
.menu2-reason-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border:1px solid #e8ecf2;
  border-radius:9px;
  background:#fbfcfe;
}
.menu2-reason-row span{
  color:#57697e;
  font-size:10px;
  font-weight:700;
}
.menu2-reason-row strong{
  min-width:32px;
  text-align:right;
  color:#263b54;
  font-size:15px;
}
.menu2-table-head{
  gap:16px;
}
.menu2-event-filters{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  flex-wrap:wrap;
}
.menu2-event-filters .btn.active{
  border-color:#2f6fed;
  box-shadow:0 0 0 2px rgba(47,111,237,.08);
}
.menu2-category{
  display:inline-block;
  margin-right:3px;
  color:#75859a;
  font-size:8px;
  font-weight:900;
  letter-spacing:.03em;
}
.menu2-console{
  min-height:360px;
}
@media(max-width:1300px){
  .menu2-main-metrics{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
@media(max-width:900px){
  .menu2-heartbeat-bar{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .menu2-heartbeat-action{
    justify-content:flex-start;
  }
  .menu2-pipeline-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:650px){
  .menu2-main-metrics{
    grid-template-columns:1fr;
  }
  .menu2-heartbeat-bar{
    grid-template-columns:1fr;
  }
  .menu2-pipeline-grid{
    grid-template-columns:1fr;
  }
  .menu2-event-filters{
    justify-content:flex-start;
  }
}


/* ===== V14 · MENU 5 MANUAL REFILL ===== */
.menu5-refill-history-card{
  margin-bottom:18px;
}
.menu5-refill-eligibility{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:12px 14px;
  margin-top:12px;
  border:1px solid #e5eaf1;
  border-radius:10px;
  background:#fbfcfe;
}
.menu5-refill-eligibility > span{
  color:#8795a7;
  font-size:9px;
  font-weight:900;
  letter-spacing:.04em;
}
.menu5-refill-eligibility > strong{
  max-width:70%;
  text-align:right;
  font-size:10px;
  line-height:1.5;
}
.menu5-refill-eligible{
  color:#18794e;
}
.menu5-refill-blocked{
  color:#b54747;
}
.menu5-action-buttons{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.menu5-action-buttons .btn{
  width:100%;
}
@media(max-width:650px){
  .menu5-refill-eligibility{
    flex-direction:column;
  }
  .menu5-refill-eligibility > strong{
    max-width:none;
    text-align:left;
  }
  .menu5-action-buttons{
    grid-template-columns:1fr;
  }
}

/* ===== V15 · MENU 11 MIXED PRODUCTS SAME PLATFORM ===== */
.menu11-item-cell > small:first-child{
  display:block;
  margin-bottom:3px;
  color:#66778c;
  font-size:8px;
  font-weight:800;
  line-height:1.35;
}



/* ===== V17 · GLOBAL ALERT CENTER ===== */
.nav-alert-link{
  display:flex !important;
  align-items:center;
  gap:8px;
}
.nav-alert-count{
  margin-left:auto;
  min-width:20px;
  height:20px;
  padding:0 6px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#d92d20;
  color:white;
  font-size:10px;
  font-weight:900;
}
.nav-alert-count[hidden]{display:none !important;}
.alert-hero{
  border-left:4px solid #7c3aed;
}
.alert-hero-main{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:22px;
}
.alert-kicker{
  color:#7c3aed;
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
  margin-bottom:7px;
}
.alert-title-line{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
}
.alert-title-line h2{margin:0;}
.alert-hero-main p{
  margin:8px 0 0;
  max-width:850px;
  color:#677489;
  line-height:1.6;
}
.alert-hero-foot{
  border-top:1px solid #edf0f4;
  margin-top:18px;
  padding-top:13px;
  display:flex;
  align-items:center;
  gap:18px;
  flex-wrap:wrap;
  color:#7b8798;
  font-size:11px;
}
.alert-hero-foot .pill{margin-left:auto;}
.alert-safety-note{margin-top:16px;}
.alert-summary-grid{
  grid-template-columns:repeat(5,minmax(0,1fr));
}
.alert-stat-critical strong{color:#d92d20;}
.alert-stat-warning strong{color:#b54708;}
.alert-stat-review strong{color:#6941c6;}
.alert-toolbar-card{padding:14px 16px;}
.alert-toolbar{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.alert-filter-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}
.alert-toolbar-fields{
  display:grid;
  grid-template-columns:220px minmax(260px,1fr);
  gap:10px;
}
.alert-toolbar-fields input,
.alert-source-select{
  width:100%;
  border:1px solid #d8dee8;
  background:white;
  border-radius:9px;
  padding:10px 12px;
  font:inherit;
}
.alerts-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.alert-empty{padding:28px 12px;}
.alert-row{
  position:relative;
  display:grid;
  grid-template-columns:4px minmax(0,1fr);
  gap:14px;
  border:1px solid #e6eaf0;
  border-radius:12px;
  background:#fff;
  padding:14px 16px 14px 0;
  overflow:hidden;
}
.alert-row-marker{
  width:4px;
  height:100%;
  border-radius:0 999px 999px 0;
  background:#98a2b3;
}
.alert-row-critical .alert-row-marker{background:#d92d20;}
.alert-row-warning .alert-row-marker{background:#f79009;}
.alert-row-review .alert-row-marker{background:#7f56d9;}
.alert-row-info .alert-row-marker{background:#667085;}
.alert-row-resolved{
  opacity:.67;
  background:#fafafa;
}
.alert-row-main{min-width:0;}
.alert-row-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.alert-row-badges{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
}
.alert-row-head time{
  color:#98a2b3;
  font-size:10px;
  white-space:nowrap;
}
.alert-row h3{
  margin:11px 0 5px;
  font-size:14px;
}
.alert-row-meta{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  color:#7b8798;
  font-size:10px;
}
.alert-row-meta code{font-size:10px;}
.alert-row p{
  margin:8px 0 0;
  color:#5e6b7e;
  line-height:1.55;
  font-size:11px;
  word-break:break-word;
}
.alert-row-actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
  margin-top:12px;
}
.badge.review{
  background:#f4f0ff;
  color:#6941c6;
  border-color:#e9d7fe;
}
@media(max-width:1000px){
  .alert-summary-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media(max-width:720px){
  .alert-hero-main{flex-direction:column;}
  .alert-hero-main .btn{width:100%;}
  .alert-hero-foot .pill{margin-left:0;}
  .alert-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .alert-toolbar-fields{grid-template-columns:1fr;}
  .alert-row-head{align-items:flex-start; flex-direction:column;}
}


/* ===== V18 · PROFIT ANALYZER ===== */
.profit-analyzer{display:flex;flex-direction:column;gap:18px}
.profit-top-grid{align-items:stretch}
.profit-upload-box{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:14px;border:1px dashed #cfd8e3;border-radius:12px;background:#fbfcfe}
.profit-upload-box input[type=file]{flex:1;min-width:240px}
.profit-meta-list{display:grid;gap:9px;margin-top:14px}
.profit-meta-list>div{display:flex;justify-content:space-between;gap:16px;border-bottom:1px solid #eef2f6;padding-bottom:8px}
.profit-meta-list span{color:#7c899a;font-size:11px}
.profit-meta-list strong{text-align:right;font-size:12px;word-break:break-word}
.profit-settings-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.profit-settings-grid label{display:flex;flex-direction:column;gap:6px}
.profit-settings-grid label>span{font-size:10px;font-weight:800;color:#6f7d8f;letter-spacing:.02em}
.profit-settings-grid input,.profit-settings-grid select{width:100%;border:1px solid #dce3eb;border-radius:9px;padding:10px 11px;background:#fff;font:inherit}
.profit-settings-action{display:flex;align-items:flex-end}
.profit-settings-action .btn{width:100%}
.profit-table-head{gap:12px;align-items:center}
.profit-head-actions{display:flex;gap:8px}
.profit-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.profit-toolbar input[type=search]{min-width:280px;flex:1;border:1px solid #dce3eb;border-radius:9px;padding:10px 12px}
.profit-table-wrap{max-height:68vh}
#profit-table{min-width:1400px}
#profit-table th{position:sticky;top:0;z-index:2;background:#f7f9fc}
.profit-product-name{font-weight:800;max-width:360px}
.profit-variation-name{margin-top:4px;color:#44546a;max-width:360px}
.profit-row small{display:block;color:#8a97a8;margin-top:5px;line-height:1.4}
.profit-component{display:grid;grid-template-columns:auto auto 1fr;align-items:center;gap:6px 8px;margin-bottom:5px;font-size:10px}
.profit-component b{font-size:10px}
.profit-component code{font-size:9px}
.profit-component span{color:#6f7d8f}
.profit-num{text-align:right;white-space:nowrap}
.profit-value.negative{color:#b42318;font-weight:900}
.profit-value.positive{color:#18794e;font-weight:900}
.profit-status-detail{max-width:220px}
.profit-loss{background:rgba(254,226,226,.24)}
.profit-low_margin{background:rgba(254,243,199,.20)}
.profit-unmapped_product,.profit-rate_missing,.profit-qty_parse_error,.profit-fx_missing,.profit-manual_service{background:rgba(241,245,249,.5)}
@media(max-width:1100px){
  .profit-settings-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:650px){
  .profit-settings-grid{grid-template-columns:1fr}
  .profit-upload-box{align-items:stretch}
  .profit-upload-box input[type=file],.profit-upload-box .btn{width:100%}
  .profit-meta-list>div{flex-direction:column;gap:4px}
  .profit-meta-list strong{text-align:left}
  .profit-toolbar input[type=search]{min-width:100%}
}


/* ===== V18.2 · GROUPED PROFIT + DETAIL MODAL ===== */
.profit-modal-dialog{
  width:min(1500px,96vw);
  max-width:1500px;
}
.profit-modal-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin:14px 0;
}
.profit-modal-summary>div{
  border:1px solid #e5eaf1;
  border-radius:10px;
  padding:12px 14px;
  background:#fbfcfe;
}
.profit-modal-summary span{
  display:block;
  color:#8795a7;
  font-size:9px;
  font-weight:900;
  letter-spacing:.04em;
  margin-bottom:5px;
}
.profit-modal-summary strong{
  font-size:13px;
}
.profit-modal-table-wrap{
  max-height:65vh;
}
#profit-modal-table{
  min-width:1650px;
}
#profit-modal-table th{
  position:sticky;
  top:0;
  z-index:2;
  background:#f7f9fc;
}
.profit-recommended{
  color:#5b42d6;
  font-weight:900;
}
.profit-price-up{
  color:#b54747;
  font-weight:800;
}
.profit-price-ok{
  color:#18794e;
  font-weight:800;
}
.profit-100-note{
  margin:0 0 14px;
}
.profit-detail-btn{
  min-width:82px;
}
@media(max-width:800px){
  .profit-modal-summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:520px){
  .profit-modal-summary{
    grid-template-columns:1fr;
  }
}


/* ======================================================================
   V18.3 · FULL RESPONSIVE AUDIT / HARDENING
   Audited: Dashboard, Alerts, Accounts, Menu 2-11, Profit, Tester, Logs.
   Goals: no visual overlap, safe horizontal data-table scrolling,
   fluid toolbars/cards, usable full-screen mobile modals.
   ====================================================================== */

html,body{
  max-width:100%;
}
body{
  overflow-x:hidden;
}
.main,.content,.card,.cards,.grid,.grid>*{
  min-width:0;
}
img,svg,canvas,video{
  max-width:100%;
  height:auto;
}
input,select,textarea,button{
  min-width:0;
  max-width:100%;
}
.grid.four{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
  margin-bottom:18px;
}
.card-head>div,
.pm2-panel-head>div,
.section-title-row>div,
.topbar>div{
  min-width:0;
}
.card-head h2,
.card-head p,
.pm2-panel-head h2,
.pm2-panel-head p,
.section-title-row h2,
.section-title-row p,
.topbar h1,
.topbar p{
  overflow-wrap:anywhere;
}

/* Data tables: let content determine a safe width and scroll INSIDE card.
   This avoids the old behavior where long cells painted over the next cell. */
.table-wrap{
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  overflow-x:auto;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-inline:contain;
  scrollbar-gutter:stable;
}
.table-wrap>table{
  width:max-content;
  min-width:100%;
  max-width:none;
}
.table-wrap th,
.table-wrap td{
  vertical-align:middle;
}

/* Long-description cells wrap rather than overlap neighbouring columns. */
#menu2-events-table td:nth-child(4),
#menu2-events-table td:nth-child(7),
#menu2-failures-table td:nth-child(4),
#menu4-history-table td:nth-child(5),
#menu4-history-table td:nth-child(8),
#menu5-refill-history-table td:nth-child(8),
#menu7-files-table td:nth-child(5),
#menu7-shopee-table td:nth-child(7),
#menu8-history-table td:nth-child(6),
#menu9-history-table td:nth-child(5),
#menu9-history-table td:nth-child(9),
#menu11-history-table td:nth-child(4),
#menu11-history-table td:nth-child(7){
  white-space:normal;
  min-width:180px;
  max-width:360px;
  overflow-wrap:anywhere;
  word-break:break-word;
  line-height:1.45;
}

#menu11-orders-table td:nth-child(5),
#menu11-orders-table td:nth-child(6),
#menu11-orders-table td:nth-child(7),
#menu11-orders-table td:nth-child(8){
  white-space:normal;
  min-width:170px;
  max-width:300px;
  overflow-wrap:anywhere;
  word-break:break-word;
}

/* Generic modal used by Menu 6 and Menu 8. It previously had no complete
   base modal layout, so it is hardened here as well. */
.modal-backdrop[hidden]{display:none!important}
.modal-backdrop{
  position:fixed;
  inset:0;
  z-index:5200;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(8,18,34,.62);
  backdrop-filter:blur(3px);
}
.modal{
  position:relative;
  width:min(900px,calc(100vw - 48px));
  max-height:calc(100vh - 48px);
  overflow:auto;
  background:#fff;
  border:1px solid rgba(255,255,255,.75);
  border-radius:18px;
  box-shadow:0 28px 85px rgba(10,24,45,.32);
}
.modal-head{
  position:sticky;
  top:0;
  z-index:3;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:18px 20px;
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.modal-head>div{min-width:0}
.modal-head h2{
  margin:3px 0 0;
  font-size:20px;
  overflow-wrap:anywhere;
}
.modal-close{
  flex:0 0 38px;
  width:38px;
  height:38px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#f8fafc;
  color:#445164;
  font-size:26px;
  line-height:32px;
  cursor:pointer;
}
.modal-body{padding:18px 20px}
.modal-foot{
  position:sticky;
  bottom:0;
  z-index:2;
  padding:14px 20px 18px;
  background:rgba(255,255,255,.97);
  border-top:1px solid var(--line);
}

/* Profit main list: fixed, predictable columns on desktop; product name wraps.
   This specifically fixes long names visually covering Variation / Price. */
.profit-table-wrap{
  width:100%;
  max-width:100%;
}
#profit-table{
  width:100%;
  min-width:1180px;
  table-layout:fixed;
}
#profit-table th,
#profit-table td{
  overflow:hidden;
  text-overflow:ellipsis;
}
#profit-table th:nth-child(1),#profit-table td:nth-child(1){width:300px}
#profit-table th:nth-child(2),#profit-table td:nth-child(2){width:90px}
#profit-table th:nth-child(3),#profit-table td:nth-child(3){width:135px}
#profit-table th:nth-child(4),#profit-table td:nth-child(4){width:185px}
#profit-table th:nth-child(5),#profit-table td:nth-child(5){width:135px}
#profit-table th:nth-child(6),#profit-table td:nth-child(6){width:145px}
#profit-table th:nth-child(7),#profit-table td:nth-child(7){width:90px}
#profit-table th:nth-child(8),#profit-table td:nth-child(8){width:125px}
#profit-table th:nth-child(9),#profit-table td:nth-child(9){width:85px}
#profit-table td:first-child{
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
  line-height:1.35;
}
#profit-table .profit-product-name{
  max-width:none;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
}
#profit-table td:nth-child(2),
#profit-table td:nth-child(3),
#profit-table td:nth-child(4),
#profit-table td:nth-child(5),
#profit-table td:nth-child(6),
#profit-table td:nth-child(7),
#profit-table td:nth-child(8),
#profit-table td:nth-child(9){
  white-space:nowrap;
}
.profit-modal-dialog{
  max-width:calc(100vw - 32px);
}
.profit-modal-table-wrap{
  width:100%;
  max-width:100%;
  overflow:auto;
}
#profit-modal-table{
  width:max-content;
  min-width:1500px;
}
#profit-modal-table td:first-child{
  white-space:normal;
  min-width:220px;
  max-width:320px;
  overflow-wrap:anywhere;
}

/* Shared toolbar/action hardening */
.menu5-toolbar,
.menu6-toolbar,
.menu8-toolbar,
.menu10-toolbar,
.profit-toolbar,
.console-toolbar{
  max-width:100%;
}
.menu5-filter-group,
.menu6-filters,
.menu8-filter-tabs,
.menu10-filters,
.filter-tabs,
.console-tabs,
.alert-filter-tabs{
  max-width:100%;
}
.menu6-pagination{
  flex-wrap:wrap;
}
.menu7-hero-main>div,
.alert-hero-main>div,
.ai-control-main>div{
  min-width:0;
}
.menu11-group-row>div{
  min-width:0;
}

/* 1280-ish laptops: reclaim usable content width without making cards cramped. */
@media(max-width:1280px){
  .content{padding:22px 20px 52px}
  .card{padding:18px}
  .topbar{padding-left:22px;padding-right:22px}
  .grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}
  .card-head{gap:14px}
  .profit-settings-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* Tablet / narrow laptop */
@media(max-width:900px){
  .grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}
  .card-head,
  .pm2-panel-head,
  .section-title-row{
    flex-wrap:wrap;
  }
  .card-head>*:last-child,
  .pm2-panel-head>*:last-child{
    max-width:100%;
  }
  .menu6-head-actions,
  .menu10-head-actions,
  .menu11-head-actions,
  .menu5-head-right{
    justify-content:flex-start;
  }
  .profit-settings-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .profit-table-head{align-items:flex-start;flex-direction:column}
  .profit-head-actions{width:100%}
  .profit-head-actions .btn{width:100%}
}

/* Mobile navigation + content */
@media(max-width:760px){
  .sidebar{
    position:relative;
    top:auto;
    bottom:auto;
    width:100%;
    height:auto;
    padding:12px 12px 10px;
    overflow:visible;
  }
  .brand{
    padding:0 4px 10px;
  }
  .brand-mark.small{
    width:36px;
    height:36px;
    font-size:18px;
  }
  .sidebar nav{
    display:flex;
    grid-template-columns:none;
    gap:6px;
    overflow-x:auto;
    overflow-y:hidden;
    padding:0 0 5px;
    scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch;
  }
  .sidebar nav a{
    flex:0 0 auto;
    margin:0;
    padding:9px 11px;
    white-space:nowrap;
    scroll-snap-align:start;
    border:1px solid rgba(255,255,255,.06);
  }
  .sidebar .nav-group{
    display:none;
  }
  .main{
    margin:0;
    width:100%;
    min-width:0;
  }
  .topbar{
    position:static;
    height:auto;
    min-height:74px;
    padding:13px 14px;
    gap:10px;
  }
  .topbar h1{font-size:19px}
  .topbar p{font-size:11px}
  .content{padding:14px 12px 38px}
  .card{padding:15px;border-radius:12px}
  .notice{padding:12px 13px}
  .grid.four{grid-template-columns:1fr}
  .card-head,
  .pm2-panel-head,
  .section-title-row{
    align-items:stretch;
    flex-direction:column;
  }
  .card-head .btn,
  .pm2-panel-head .btn,
  .section-title-row .btn{
    width:100%;
  }
  .menu5-table-foot,
  .menu6-result-meta,
  .menu10-result-meta{
    align-items:flex-start;
    flex-direction:column;
  }
  .menu6-pagination .btn{
    flex:1 1 140px;
  }
  .menu8-modal-actions .btn,
  .menu6-modal-foot .btn{
    flex:1 1 150px;
  }
  .profit-toolbar{
    align-items:stretch;
    flex-direction:column;
  }
  .profit-toolbar input[type=search]{
    width:100%;
    min-width:0;
  }
  .profit-toolbar .filter-tabs{
    width:100%;
  }
  .profit-toolbar .filter-tabs button{
    flex:1 1 auto;
  }
  .profit-upload-box input[type=file]{
    min-width:0;
    width:100%;
  }
}

/* Phone: cards become one column, modals become full-screen. */
@media(max-width:600px){
  .cards,
  .compact-cards,
  .tester-cards,
  .bot-status-grid,
  .mini-grid,
  .grid.four{
    grid-template-columns:1fr!important;
  }
  .metric strong{font-size:29px}
  .pm2-stats{grid-template-columns:1fr}
  .pm2-panel{padding:15px}
  .top-actions .pill{font-size:9px;padding:4px 7px}

  .modal-backdrop{
    padding:0;
    align-items:stretch;
  }
  .modal{
    width:100vw!important;
    max-width:100vw!important;
    max-height:100vh!important;
    min-height:100vh;
    border-radius:0!important;
  }
  .modal-head{
    padding:16px;
  }
  .modal-body{
    padding:16px;
  }
  .modal-foot{
    padding:12px 16px 16px;
  }

  .menu4-modal-dialog,
  .menu9-modal-dialog,
  .menu5-modal-dialog,
  .menu11-modal-dialog,
  .profit-modal-dialog{
    width:100vw!important;
    max-width:100vw!important;
    max-height:100vh!important;
    min-height:100vh;
    border-radius:0!important;
  }
  .profit-modal-summary{grid-template-columns:1fr 1fr}
  .profit-settings-grid{grid-template-columns:1fr}

  .menu5-detail-card>div{
    grid-template-columns:1fr;
    gap:3px;
    align-items:start;
    padding:5px 0;
  }
  .menu11-group-row{
    align-items:flex-start;
    flex-direction:column;
  }
  .menu11-group-row strong{
    font-size:16px;
  }
  .menu6-target-head{
    align-items:stretch;
    flex-direction:column;
  }
  .menu6-target-head .btn{
    width:100%;
  }
  .menu7-tracking-grid{
    grid-template-columns:1fr;
  }
  .menu8-modal-actions,
  .menu6-modal-foot{
    align-items:stretch;
    flex-direction:column;
  }
  .menu8-modal-actions .btn,
  .menu6-modal-foot .btn{
    width:100%;
    flex:auto;
  }

  /* Profit main table turns into readable cards on phones. */
  .profit-table-wrap{
    max-height:none;
    overflow:visible;
  }
  #profit-table{
    display:block;
    width:100%;
    min-width:0;
    table-layout:auto;
  }
  #profit-table thead{display:none}
  #profit-table tbody{display:grid;gap:10px}
  #profit-table tr{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:9px 12px;
    padding:13px;
    border:1px solid #e7ebf1;
    border-radius:12px;
    background:#fff;
  }
  #profit-table td{
    display:block;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    padding:0;
    border:0;
    white-space:normal!important;
    overflow:visible;
    text-overflow:clip;
    text-align:left;
  }
  #profit-table td:nth-child(1),
  #profit-table td:nth-child(8),
  #profit-table td:nth-child(9){
    grid-column:1/-1;
  }
  #profit-table td::before{
    display:block;
    margin-bottom:3px;
    color:#8a97a8;
    font-size:8px;
    font-weight:900;
    letter-spacing:.05em;
    text-transform:uppercase;
  }
  #profit-table td:nth-child(2)::before{content:'Variasi'}
  #profit-table td:nth-child(3)::before{content:'Harga Saat Ini'}
  #profit-table td:nth-child(4)::before{content:'Rekomendasi 100%'}
  #profit-table td:nth-child(5)::before{content:'SMM Cost'}
  #profit-table td:nth-child(6)::before{content:'Profit Bersih'}
  #profit-table td:nth-child(7)::before{content:'Margin'}
  #profit-table td:nth-child(8)::before{content:'Status'}
  #profit-table td:nth-child(9)::before{content:'Aksi'}
  #profit-table td:nth-child(9) .btn{width:100%}
}

@media(max-width:420px){
  .content{padding-left:10px;padding-right:10px}
  .topbar{padding-left:12px;padding-right:12px}
  .top-actions{display:none}
  .brand span{display:none}
  .console-tabs button,
  .filter-tabs button,
  .menu5-filter-group .btn,
  .menu6-filters button,
  .menu8-filter-tabs button,
  .menu10-filters button{
    flex:1 1 calc(50% - 6px);
    text-align:center;
  }
  .profit-modal-summary{grid-template-columns:1fr}
  #profit-table tr{grid-template-columns:1fr}
  #profit-table td{grid-column:1/-1!important}
}


/* ===== V18.4 · SHOPEE DEFAULT FEE PRESET ===== */
.profit-settings-actions{
  display:flex;
  gap:8px;
}
.profit-settings-actions .btn{
  flex:1;
  min-width:0;
}
@media(max-width:650px){
  .profit-settings-actions{
    flex-direction:column;
  }
}


/* ===== V18.5 · SHOPEE MASS UPDATE EXPORT ===== */
.profit-head-actions{
  flex-wrap:wrap;
  justify-content:flex-end;
}
.profit-head-actions .btn{
  white-space:nowrap;
}
.profit-head-actions .is-disabled{
  opacity:.45;
  cursor:not-allowed;
}
.profit-mass-export-note{
  margin:0 0 12px;
  padding:10px 12px;
  border:1px solid #e4e9f0;
  border-radius:10px;
  background:#fbfcfe;
  color:#65758a;
  font-size:10px;
  line-height:1.55;
}
@media(max-width:760px){
  .profit-table-head{
    align-items:stretch;
  }
  .profit-head-actions{
    width:100%;
    display:grid;
    grid-template-columns:1fr;
  }
  .profit-head-actions .btn{
    width:100%;
    text-align:center;
  }
}


/* ===== V18.6 · PROFIT @ RECOMMENDED PRICE ===== */
.profit-modal-summary-five{
  grid-template-columns:repeat(5,minmax(0,1fr));
}
.profit-summary-highlight{
  border-color:#cfc7ff !important;
  background:#f7f5ff !important;
}
.profit-summary-highlight strong,
.profit-profit100{
  color:#5b42d6;
  font-weight:900;
}
.profit-profit100 small{
  display:block;
  margin-top:4px;
  color:#7d72bd;
  font-weight:700;
  white-space:normal;
}
#profit-modal-table{
  min-width:1820px;
}
@media(max-width:1200px){
  .profit-modal-summary-five{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
@media(max-width:800px){
  .profit-modal-summary-five{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:520px){
  .profit-modal-summary-five{
    grid-template-columns:1fr;
  }
}


/* ===== V19 · DYNAMIC PROFIT TARGETS ===== */
.profit-target-card{
  overflow:visible;
}
.profit-target-controls{
  display:grid;
  grid-template-columns:minmax(320px,1fr) 220px auto auto;
  gap:12px;
  align-items:end;
}
.profit-target-presets{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.profit-target-presets .btn.active{
  border-color:#6d5ce7;
  background:#f2efff;
  color:#5846cf;
  font-weight:900;
}
.profit-global-target-input{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.profit-global-target-input>span{
  font-size:10px;
  font-weight:800;
  color:#6f7d8f;
}
.profit-global-target-input input{
  width:100%;
  border:1px solid #dce3eb;
  border-radius:9px;
  padding:10px 11px;
  background:#fff;
  font:inherit;
}
.profit-target-note{
  margin-top:14px;
}
.profit-product-target-select{
  width:150px;
  max-width:100%;
  border:1px solid #dce3eb;
  border-radius:8px;
  padding:8px 9px;
  background:#fff;
  font:inherit;
  font-size:10px;
  font-weight:800;
}
.profit-target-source{
  display:block;
  margin-top:5px;
  color:#8a97a8;
  font-size:8px;
  font-weight:900;
  letter-spacing:.04em;
}
.profit-modal-summary-six{
  grid-template-columns:repeat(6,minmax(0,1fr));
}
#profit-table{
  min-width:1660px;
}
#profit-modal-table{
  min-width:1820px;
}
@media(max-width:1280px){
  .profit-target-controls{
    grid-template-columns:1fr 220px;
  }
  .profit-target-controls>.btn{
    width:100%;
  }
  .profit-modal-summary-six{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
@media(max-width:760px){
  .profit-target-controls{
    grid-template-columns:1fr;
  }
  .profit-target-presets{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .profit-target-presets .btn{
    width:100%;
  }
  .profit-modal-summary-six{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  /* V19 mobile cards: keep target selector usable. */
  #profit-table td:nth-child(3){
    white-space:normal !important;
  }
  .profit-product-target-select{
    width:100%;
  }
}
@media(max-width:520px){
  .profit-target-presets{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .profit-modal-summary-six{
    grid-template-columns:1fr;
  }
}


/* ===== V20 · MENU 11 MULTI LINK EXCEPTION ===== */
.menu11-stat-grid-v111{
  grid-template-columns:repeat(6,minmax(0,1fr));
}
.menu11-mismatch-cell{
  border-left:3px solid #f0a43c;
  padding-left:9px;
}
.menu11-per-target{
  display:inline-block;
  margin-left:4px;
  color:#8a97a8;
  font-size:9px;
  font-weight:800;
}
#menu11-targets-input{
  width:100%;
  min-height:180px;
  resize:vertical;
  border:1px solid #dce3eb;
  border-radius:9px;
  padding:11px 12px;
  background:#fff;
  font:inherit;
  line-height:1.55;
  overflow-wrap:anywhere;
}
#menu11-targets-input:focus{
  outline:none;
  border-color:#8f83e7;
  box-shadow:0 0 0 3px rgba(111,91,214,.08);
}
@media(max-width:1250px){
  .menu11-stat-grid-v111{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
@media(max-width:700px){
  .menu11-stat-grid-v111{
    grid-template-columns:1fr;
  }
  #menu11-targets-input{
    min-height:240px;
  }
}


/* ===== V21 · MENU 11 CONTROL CENTER ===== */
.menu11-v21-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.menu11-v21-filters{display:flex;gap:6px;flex-wrap:wrap}
.menu11-v21-filters .btn.active{border-color:#2f6fed;box-shadow:0 0 0 2px rgba(47,111,237,.08)}
#menu11-search{width:min(430px,100%);border:1px solid #dce4ed;border-radius:9px;padding:9px 11px;font:inherit}
.menu11-v21-bulkbar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;margin-bottom:12px;border:1px solid #e1e7ef;border-radius:11px;background:#fafcff}
.menu11-v21-bulkbar strong{display:block;color:#304257;font-size:11px}
.menu11-v21-bulkbar small{display:block;margin-top:4px;color:#8391a3;font-size:9px;line-height:1.45}
.menu11-v21-bulk-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.menu11-select-col{width:34px;text-align:center}.menu11-bulk-check{width:16px;height:16px;cursor:pointer}.menu11-no-bulk{color:#c1c8d2}
.menu11-v21-preview{margin-bottom:14px;padding:14px;border:1px solid #f0d59f;border-radius:12px;background:#fffaf0}
.menu11-v21-preview-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}
.menu11-v21-preview-head span:first-child{display:block;color:#9b6a19;font-size:9px;font-weight:900;letter-spacing:.05em}
.menu11-v21-preview-head strong{display:block;margin-top:4px;color:#5e471f;font-size:11px}
.menu11-v21-preview-list{display:grid;gap:7px}
.menu11-v21-preview-row{display:grid;grid-template-columns:minmax(180px,.8fr) minmax(240px,1.3fr) auto;gap:12px;align-items:center;padding:10px 11px;border:1px solid #f0dfbb;border-radius:9px;background:#fff}
.menu11-v21-preview-row strong,.menu11-v21-preview-row b{display:block;color:#38495e;font-size:10px}.menu11-v21-preview-row span,.menu11-v21-preview-row small{display:block;margin-top:3px;color:#8795a6;font-size:9px}
@media(max-width:900px){.menu11-v21-toolbar,.menu11-v21-bulkbar{align-items:stretch;flex-direction:column}#menu11-search{width:100%}.menu11-v21-bulk-actions{justify-content:flex-start}.menu11-v21-preview-row{grid-template-columns:1fr}}
@media(max-width:600px){.menu11-v21-filters,.menu11-v21-bulk-actions{display:grid;grid-template-columns:1fr;width:100%}.menu11-v21-filters .btn,.menu11-v21-bulk-actions .btn{width:100%}}


/* ===== V22 · SERVICE MAPPING HEALTH + ACCOUNT ISOLATION ===== */
.menu7-mapping-health-card{overflow:hidden}.menu7-mapping-metrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin:0 0 12px}.menu7-mapping-metrics>div{padding:10px 11px;border:1px solid #e5eaf0;border-radius:9px;background:#fbfcfe}.menu7-mapping-metrics span{display:block;color:#8996a7;font-size:9px;font-weight:800}.menu7-mapping-metrics strong{display:block;margin-top:5px;color:#304257;font-size:16px}#menu7-mapping-table{min-width:1180px}#menu7-mapping-table td:nth-child(2){min-width:220px;white-space:normal}#menu7-mapping-table td:last-child{min-width:260px;white-space:normal}.menu7-isolation-note{margin-bottom:12px}@media(max-width:1100px){.menu7-mapping-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:650px){.menu7-mapping-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* ===== V23 · WEB ACCOUNT & COOKIE MANAGER ===== */
.account-manager-head{
  align-items:flex-start;
}
.account-manager-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.account-security-strip{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  padding:10px 12px;
  margin:0 0 12px;
  border:1px solid #e3e9f0;
  border-radius:10px;
  background:#fafcff;
  color:#68778a;
  font-size:10px;
}
.account-security-strip #account-pending-badge{
  margin-left:auto;
}
#account-manager-table{
  min-width:1120px;
}
.account-cookie-hidden{
  letter-spacing:2px;
  color:#8090a3;
  font-weight:900;
}
.account-error-cell{
  max-width:260px;
  white-space:normal;
  color:#738297;
}
.account-row-actions{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.account-cookie-dialog{
  width:min(760px,calc(100vw - 28px));
}
.account-cookie-body{
  padding:16px;
}
.account-cookie-field{
  display:flex;
  flex-direction:column;
  gap:7px;
}
.account-cookie-field>span{
  color:#66768a;
  font-size:10px;
  font-weight:900;
}
.account-cookie-input{
  width:100%;
  min-height:145px;
  resize:vertical;
  border:1px solid #d8e0e9;
  border-radius:10px;
  padding:12px;
  background:#fff;
  font:500 11px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  overflow-wrap:anywhere;
}
.account-cookie-input.is-masked{
  -webkit-text-security:disc;
  text-security:disc;
}
.account-cookie-tools{
  display:flex;
  align-items:center;
  gap:10px;
  margin:9px 0 12px;
}
.account-cookie-tools span{
  color:#8895a6;
  font-size:9px;
}
#account-history-table{
  min-width:980px;
}
@media(max-width:760px){
  .account-manager-actions{
    display:grid;
    grid-template-columns:1fr;
    width:100%;
  }
  .account-manager-actions .btn{
    width:100%;
  }
  .account-security-strip{
    align-items:flex-start;
    flex-direction:column;
  }
  .account-security-strip #account-pending-badge{
    margin-left:0;
  }
  .account-cookie-tools{
    align-items:flex-start;
    flex-direction:column;
  }
}


/* ===== V23.1 · MENU2 EVENT DEDUP ===== */
.menu2-repeat-badge{
  display:inline-flex;
  align-items:center;
  margin-right:5px;
  padding:2px 6px;
  border:1px solid #f0d49a;
  border-radius:999px;
  background:#fff8e8;
  color:#9a6715;
  font-size:8px;
  font-weight:900;
  white-space:nowrap;
}



/* ===== V24 · SAFE RECOVERY CENTER ===== */
.recovery-head{align-items:flex-start}.recovery-head-actions{display:flex;gap:8px;flex-wrap:wrap}.recovery-head-actions input{min-width:320px;border:1px solid #dce4ed;border-radius:9px;padding:9px 11px;font:inherit}.recovery-filters{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:12px}.recovery-filters .btn.active{border-color:#2f6fed;box-shadow:0 0 0 2px rgba(47,111,237,.08)}#recovery-table{min-width:1500px}.recovery-smm-row{display:flex;flex-direction:column;gap:2px;margin-bottom:5px}.recovery-smm-row span{font-size:9px;color:#8190a2}.recovery-stage-error{display:block;margin-top:4px;color:#9c6b22;white-space:normal;max-width:200px}.recovery-error-cell{max-width:260px;white-space:normal}.recovery-actions{display:flex;gap:6px;flex-wrap:wrap}.recovery-actions .btn{white-space:nowrap}.recovery-resolve{border-color:#d4dbe4;color:#6d7989}#recovery-history-table{min-width:1100px}@media(max-width:760px){.recovery-head-actions{display:grid;grid-template-columns:1fr;width:100%}.recovery-head-actions input,.recovery-head-actions .btn{width:100%;min-width:0}.recovery-filters{display:grid;grid-template-columns:1fr 1fr}.recovery-filters .btn{width:100%}}


/* ===== V24.1 · ACCOUNT LIFECYCLE + SYNC WATCH ===== */
.account-lifecycle-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px}
.account-lifecycle-filters{display:flex;gap:6px;flex-wrap:wrap}
.account-lifecycle-filters .btn.active{border-color:#2f6fed;box-shadow:0 0 0 2px rgba(47,111,237,.08)}
.account-lifecycle-note{color:#7b8899;font-size:9px;text-align:right}
.account-sync-warning{margin-bottom:12px}
.account-row-disabled{opacity:.68;background:#fafbfc}
.account-disable-btn{border-color:#ead4d0;color:#b85a4e}
#account-sync-badge{margin-left:auto}
@media(max-width:760px){.account-lifecycle-toolbar{align-items:stretch;flex-direction:column}.account-lifecycle-filters{display:grid;grid-template-columns:1fr 1fr}.account-lifecycle-filters .btn{width:100%}.account-lifecycle-note{text-align:left}#account-sync-badge{margin-left:0}}


/* ===== V25.0 · OMNICHANNEL CHAT HUB ===== */
.page-chat-hub .content{padding:12px}.page-chat-hub .topbar{padding-bottom:10px}.chat-hub-intro{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:10px;padding:10px 13px;border:1px solid #e1e7ef;border-radius:12px;background:#fff}.chat-hub-intro>div{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.chat-hub-intro b{color:#243247;font-size:11px}.chat-hub-intro span:not(.badge){color:#8090a3;font-size:9px}.chat-hub-live{justify-content:flex-end}.chat-hub-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:10px}.chat-hub-kpis>div{padding:9px 12px;border:1px solid #e2e8f0;border-radius:10px;background:#fff;display:flex;align-items:center;justify-content:space-between}.chat-hub-kpis span{font-size:9px;color:#8795a8;font-weight:800}.chat-hub-kpis strong{font-size:16px;color:#223148}.chat-hub-shell{height:calc(100vh - 238px);min-height:640px;display:grid;grid-template-columns:minmax(280px,340px) minmax(520px,1fr) minmax(260px,310px);overflow:hidden;border:1px solid #dfe6ee;border-radius:15px;background:#fff;box-shadow:0 12px 34px rgba(29,45,70,.06)}.chat-inbox-pane,.chat-main-pane,.chat-info-pane{min-width:0;min-height:0}.chat-inbox-pane{display:flex;flex-direction:column;border-right:1px solid #e5eaf0;background:#fbfcfe}.chat-pane-head,.chat-main-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 15px;border-bottom:1px solid #e6ebf1;background:#fff}.chat-pane-head h2,.chat-main-head h2{margin:0;color:#1d2a3e;font-size:15px}.chat-pane-head p,.chat-main-head p{margin:3px 0 0;color:#8997a9;font-size:9px}.chat-icon-btn{width:32px;height:32px;border:1px solid #dce4ec;border-radius:9px;background:#fff;color:#617087;font-weight:900;cursor:pointer}.chat-icon-btn:disabled{opacity:.45;cursor:not-allowed}.chat-search-wrap{display:flex;align-items:center;gap:7px;margin:10px 11px 8px;padding:0 10px;border:1px solid #e0e6ed;border-radius:10px;background:#fff}.chat-search-wrap span{color:#97a3b3;font-size:15px}.chat-search-wrap input{width:100%;border:0;outline:0;padding:9px 0;background:transparent;font:inherit;font-size:10px;color:#2b3b50}.chat-account-filters{display:flex;gap:6px;overflow-x:auto;padding:0 11px 7px;scrollbar-width:none}.chat-account-filters::-webkit-scrollbar{display:none}.chat-filter-pill,.chat-state-pill{border:1px solid #dde4ec;border-radius:999px;background:#fff;padding:6px 9px;color:#67768a;font-size:8px;font-weight:900;white-space:nowrap;cursor:pointer}.chat-filter-pill.active,.chat-state-pill.active{border-color:#f05235;background:#fff4f1;color:#e9472c}.chat-filter-pill small{opacity:.7}.chat-account-dot{display:inline-block;width:6px;height:6px;margin-right:5px;border-radius:50%;background:#6e83a3}.chat-account-dot.account-0{background:#ef5a3c}.chat-account-dot.account-1{background:#5b7ce2}.chat-account-dot.account-2{background:#27a67a}.chat-account-dot.account-3{background:#a66bd1}.chat-state-filters{display:flex;gap:5px;padding:0 11px 9px;border-bottom:1px solid #e8edf2}.chat-conversation-list{flex:1;overflow-y:auto;padding:6px}.chat-conversation-item{width:100%;display:grid;grid-template-columns:39px minmax(0,1fr);gap:9px;padding:10px 9px;border:0;border-radius:10px;background:transparent;text-align:left;cursor:pointer}.chat-conversation-item:hover{background:#f3f6f9}.chat-conversation-item.active{background:#fff1ed;box-shadow:inset 3px 0 0 #ef4d2d}.chat-avatar{display:flex;align-items:center;justify-content:center;width:38px;height:38px;overflow:hidden;border-radius:50%;background:#edf1f5;color:#617086;font-size:11px;font-weight:900;flex:0 0 auto}.chat-avatar.large{width:42px;height:42px}.chat-avatar.xlarge{width:58px;height:58px;margin:auto;font-size:15px}.chat-avatar.has-image{background:#fff}.chat-avatar img{width:100%;height:100%;object-fit:cover}.chat-conversation-body{min-width:0}.chat-conversation-top,.chat-conversation-bottom{display:flex;align-items:center;justify-content:space-between;gap:6px}.chat-conversation-top b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#26364a;font-size:10px}.chat-conversation-top time{color:#96a2b1;font-size:8px;white-space:nowrap}.chat-conversation-preview{margin:4px 0 6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#7c8999;font-size:9px}.chat-account-tag{display:inline-flex;align-items:center;min-width:0;max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#8794a5;font-size:7px;font-weight:800}.chat-conversation-signals{display:flex;align-items:center;gap:4px}.chat-need-reply{padding:2px 5px;border-radius:999px;background:#fff0d2;color:#aa6d0a;font-size:7px;font-weight:900}.chat-unread-count{display:flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#ef4d2d;color:#fff;font-size:7px;font-weight:900}.chat-main-pane{display:flex;flex-direction:column;background:#f6f8fa}.chat-main-head{min-height:70px}.chat-person{display:flex;align-items:center;gap:10px;min-width:0}.chat-main-actions{display:flex;gap:6px;align-items:center}.chat-message-area{flex:1;overflow-y:auto;padding:18px 22px;background:linear-gradient(180deg,#f7f9fb 0%,#f4f7f9 100%)}.chat-welcome-state,.chat-history-loading{height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;color:#8a97a8}.chat-welcome-state h3,.chat-history-loading b{margin:8px 0 5px;color:#405069}.chat-welcome-state p,.chat-history-loading span{max-width:420px;margin:0;font-size:9px;line-height:1.6}.chat-welcome-icon{font-size:34px}.chat-spinner{width:24px;height:24px;border:3px solid #e1e7ed;border-top-color:#ef4d2d;border-radius:50%;animation:chatSpin .8s linear infinite}@keyframes chatSpin{to{transform:rotate(360deg)}}.chat-history-loading.error b{color:#a9564c}.chat-history-loading .btn{margin-top:12px}.chat-history-stale{width:max-content;margin:0 auto 12px;padding:5px 9px;border-radius:999px;background:#fff4d8;color:#9d711b;font-size:8px;font-weight:900}.chat-bubble-row{display:flex;margin:7px 0}.chat-bubble-row.incoming{justify-content:flex-start}.chat-bubble-row.outgoing{justify-content:flex-end}.chat-bubble{max-width:min(72%,650px);padding:9px 11px;border:1px solid #e0e6ec;border-radius:13px 13px 13px 4px;background:#fff;box-shadow:0 2px 7px rgba(31,47,70,.03)}.chat-bubble-row.outgoing .chat-bubble{border-color:#bfe8df;border-radius:13px 13px 4px 13px;background:#dff6f0}.chat-bubble.special{border-style:dashed}.chat-message-kind{margin-bottom:5px;color:#708096;font-size:8px;font-weight:900;text-transform:uppercase}.chat-bubble-text{white-space:pre-wrap;overflow-wrap:anywhere;color:#27364a;font-size:10px;line-height:1.55}.chat-bubble-meta{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:6px;color:#8996a6;font-size:7px}.chat-bubble-meta span{max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-quoted{display:flex;flex-direction:column;gap:2px;margin-bottom:6px;padding:6px 8px;border-left:3px solid #93a4b8;border-radius:6px;background:rgba(255,255,255,.55)}.chat-quoted b{font-size:7px;color:#69798d}.chat-quoted span{font-size:8px;color:#758498}.chat-product-context{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:7px;padding:6px 8px;border-radius:7px;background:rgba(255,255,255,.65);font-size:8px;color:#6f7e90}.chat-product-context code{font-size:8px}.chat-system-message{width:max-content;max-width:75%;margin:8px auto;padding:5px 9px;border-radius:999px;background:#e9edf1;color:#748195;font-size:8px}.chat-system-message time{margin-left:8px;opacity:.7}.chat-composer{padding:10px 13px 12px;border-top:1px solid #e3e8ee;background:#fff}.chat-composer.readonly{background:#fbfcfd}.chat-quick-preview{display:flex;align-items:center;gap:6px;margin-bottom:7px;overflow-x:auto}.chat-quick-preview>span{margin-right:3px;color:#8794a5;font-size:8px;font-weight:900}.chat-quick-preview button{border:1px solid #e0e6ec;border-radius:999px;padding:5px 8px;background:#f8fafb;color:#9aa5b3;font-size:8px}.chat-composer-row{display:grid;grid-template-columns:34px minmax(0,1fr) 72px;gap:7px;align-items:end}.chat-composer textarea{width:100%;resize:none;border:1px solid #dfe5ec;border-radius:10px;padding:9px 10px;background:#f4f6f8;color:#98a4b2;font:inherit;font-size:9px}.chat-composer small{display:block;margin-top:6px;color:#a0aab7;font-size:7px;text-align:center}.chat-info-pane{overflow-y:auto;border-left:1px solid #e5eaf0;background:#fff}.chat-info-head{display:flex;align-items:center;justify-content:space-between;padding:14px;border-bottom:1px solid #e7ecf1;color:#7c899a;font-size:8px;font-weight:900}.chat-customer-card{text-align:center;padding:19px 14px 15px;border-bottom:1px solid #edf0f4}.chat-customer-card h3{margin:9px 0 3px;color:#26364b;font-size:13px}.chat-customer-card p{margin:0;color:#8b98a9;font-size:8px}.chat-info-section{padding:13px 14px;border-bottom:1px solid #edf0f4}.chat-info-section h4{margin:0 0 10px;color:#6d7c8f;font-size:8px;letter-spacing:.06em;text-transform:uppercase}.chat-info-grid{display:grid;grid-template-columns:90px minmax(0,1fr);gap:8px 7px;align-items:center}.chat-info-grid span{color:#8a97a8;font-size:8px}.chat-info-grid b,.chat-info-grid code{min-width:0;overflow:hidden;text-overflow:ellipsis;color:#34445a;font-size:9px;white-space:nowrap}.chat-roadmap-row{display:flex;align-items:center;justify-content:space-between;padding:6px 0;color:#8190a2;font-size:8px}.chat-roadmap-row b{padding:2px 5px;border-radius:5px;background:#f1f4f7;color:#8794a5;font-size:7px}.chat-safety-note{margin:12px 14px;font-size:8px;line-height:1.5}.chat-empty-state{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;min-height:160px;padding:20px;color:#909cab;font-size:9px;text-align:center}.chat-empty-state b{color:#526279}.chat-empty-state.error b{color:#a94e45}
@media(max-width:1280px){.chat-hub-shell{grid-template-columns:290px minmax(480px,1fr) 260px}.chat-bubble{max-width:80%}}
@media(max-width:1050px){.page-chat-hub .content{padding:8px}.chat-hub-shell{height:auto;min-height:700px;grid-template-columns:280px minmax(0,1fr)}.chat-info-pane{grid-column:1/-1;display:grid;grid-template-columns:220px repeat(3,minmax(0,1fr));border-top:1px solid #e5eaf0;border-left:0}.chat-info-head{display:none}.chat-customer-card,.chat-info-section{border-bottom:0;border-right:1px solid #edf0f4}.chat-safety-note{display:none}}
@media(max-width:760px){.page-chat-hub .topbar{display:none}.chat-hub-intro{align-items:flex-start;flex-direction:column}.chat-hub-live{width:100%;justify-content:flex-start}.chat-hub-kpis{grid-template-columns:1fr 1fr}.chat-hub-shell{display:block;min-height:0;height:auto;border-radius:12px}.chat-inbox-pane{height:360px;border-right:0;border-bottom:1px solid #e5eaf0}.chat-main-pane{min-height:620px}.chat-info-pane{display:block}.chat-info-head{display:flex}.chat-customer-card,.chat-info-section{border-right:0;border-bottom:1px solid #edf0f4}.chat-bubble{max-width:88%}.chat-main-head{padding:10px}.chat-message-area{min-height:390px;padding:13px 10px}.chat-main-actions .badge:first-child{display:none}.chat-info-pane{max-height:none}.chat-composer-row{grid-template-columns:32px minmax(0,1fr)}.chat-composer-row .btn.primary{display:none}}

/* V26.3 Chat Hub Commerce Sidebar */
.chat-customer-card.compact{display:flex;align-items:center;gap:10px;padding:11px 13px;text-align:left}.chat-customer-card.compact h3{margin:0 0 3px}.chat-commerce-tabs{display:grid;grid-template-columns:.8fr 1fr 1.3fr;position:sticky;top:0;z-index:3;border-bottom:1px solid #e7ebf0;background:#fff}.chat-commerce-tab{padding:11px 5px;border:0;border-bottom:2px solid transparent;background:#fff;color:#7c8796;font-size:8px;font-weight:900;cursor:pointer}.chat-commerce-tab.active{border-bottom-color:#ee4d2d;color:#ee4d2d}.chat-commerce-panel{padding:10px}.chat-commerce-panel[hidden]{display:none}.chat-commerce-toolbar{display:flex;gap:6px;margin-bottom:8px}.chat-commerce-toolbar input{min-width:0;flex:1;padding:8px 9px;border:1px solid #dfe5ec;border-radius:8px;font:inherit;font-size:9px}.chat-commerce-count{display:flex;align-items:center;justify-content:space-between;margin:5px 1px 9px;color:#8793a2;font-size:8px}.chat-commerce-list{display:flex;flex-direction:column;gap:8px}.chat-commerce-empty{padding:25px 12px;border:1px dashed #dfe5ec;border-radius:10px;color:#8d98a7;font-size:9px;text-align:center}.chat-commerce-card{display:grid;grid-template-columns:52px minmax(0,1fr);gap:9px;padding:9px;border:1px solid #e5e9ef;border-radius:10px;background:#fff;box-shadow:0 2px 8px rgba(25,39,60,.04)}.chat-commerce-thumb{width:52px;height:52px;overflow:hidden;border-radius:7px;background:#f3f5f7}.chat-commerce-thumb img{width:100%;height:100%;object-fit:cover}.chat-commerce-image-fallback{display:flex;align-items:center;justify-content:center;width:100%;height:100%;color:#a0aaba}.chat-commerce-card-body{min-width:0;display:flex;flex-direction:column;gap:3px}.chat-commerce-card-body b,.chat-commerce-order-item b{display:-webkit-box;overflow:hidden;color:#344258;font-size:9px;line-height:1.35;-webkit-line-clamp:2;-webkit-box-orient:vertical}.chat-commerce-card-body small,.chat-commerce-order-item small{color:#8d98a7;font-size:7px}.chat-commerce-card-body strong{color:#ee4d2d;font-size:9px}.chat-commerce-card>.chat-send-card{grid-column:1/-1;width:100%}.chat-order-filters{display:flex;gap:5px;overflow-x:auto;padding-bottom:8px}.chat-order-filters button{flex:0 0 auto;padding:5px 7px;border:1px solid #e0e5eb;border-radius:999px;background:#fff;color:#7b8797;font-size:7px;cursor:pointer}.chat-order-filters button.active{border-color:#ee4d2d;background:#fff3ef;color:#ee4d2d;font-weight:800}.chat-commerce-card.order{display:flex;flex-direction:column}.chat-commerce-order-top,.chat-commerce-order-meta{display:flex;align-items:center;justify-content:space-between;gap:8px}.chat-commerce-order-top time{color:#949eab;font-size:7px}.chat-commerce-order-item{display:grid;grid-template-columns:52px minmax(0,1fr);gap:9px;align-items:center}.chat-commerce-order-item>div:last-child{display:flex;min-width:0;flex-direction:column;gap:4px}.chat-commerce-order-meta{padding-top:8px;border-top:1px solid #edf0f3}.chat-commerce-order-meta code{font-size:8px}.chat-commerce-order-meta strong{color:#ee4d2d;font-size:10px}.chat-commerce-template-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;margin-bottom:10px}.chat-commerce-template-head p{margin:0;color:#8793a2;font-size:8px;line-height:1.45}.chat-commerce-template-list{display:flex;flex-direction:column;gap:7px}.chat-commerce-template-list>button{display:flex;flex-direction:column;gap:3px;padding:9px;border:1px solid #e3e8ee;border-radius:9px;background:#fff;text-align:left;cursor:pointer}.chat-commerce-template-list>button:hover{border-color:#ef806a;background:#fff8f6}.chat-commerce-template-list b{color:#3a485b;font-size:9px}.chat-commerce-template-list span{display:-webkit-box;overflow:hidden;color:#8a95a4;font-size:7px;line-height:1.4;-webkit-line-clamp:2;-webkit-box-orient:vertical}.chat-customer-details{margin:3px 10px 12px;border:1px solid #e7ebf0;border-radius:9px}.chat-customer-details summary{padding:9px 10px;color:#788597;font-size:8px;font-weight:900;cursor:pointer}.chat-customer-details .chat-info-section{padding:10px}.chat-customer-details .chat-safety-note{margin:8px}
@media(max-width:1050px){.chat-info-pane{display:block;grid-column:1/-1;max-height:620px}.chat-commerce-panel{min-height:300px}.chat-customer-card.compact{border-right:0}}


/* ===== V25.1 · CHAT HUB MANUAL REPLY ===== */
.chat-composer{
  border-top:1px solid #e7ebf0;
  background:#fff;
}
.chat-reply-alert{
  margin:0 14px 8px;
  padding:8px 10px;
  border-radius:8px;
  font-size:9px;
  font-weight:700;
}
.chat-reply-alert.ok{
  background:#eef9f2;
  border:1px solid #ccebd7;
  color:#397a50;
}
.chat-reply-alert.warn{
  background:#fff8e8;
  border:1px solid #f1dda8;
  color:#8c691f;
}
.chat-reply-alert.bad{
  background:#fff1ef;
  border:1px solid #f1c7c1;
  color:#a84b42;
}
.chat-composer-row textarea{
  min-height:48px;
  max-height:150px;
  resize:vertical;
}
.chat-composer-row textarea:focus{
  outline:none;
  border-color:#ee4d2d;
  box-shadow:0 0 0 2px rgba(238,77,45,.08);
}
.chat-composer-foot{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:0 14px 10px;
  color:#7e8a99;
  font-size:8px;
}
.chat-composer-foot small{
  line-height:1.45;
}
#chat-char-count{
  white-space:nowrap;
  font-weight:800;
}
.chat-bot3-warning{
  margin:0 14px 12px;
  font-size:8px;
}
@media(max-width:760px){
  .chat-composer-foot{
    flex-direction:column;
    gap:5px;
  }
}


/* ===== V25.2 · CHAT HUB HUMAN TAKEOVER ===== */
#chat-takeover-button{
  min-width:94px;
}
#chat-takeover-button.takeover{
  border-color:#efb047;
}
#chat-takeover-button.return-ai{
  border-color:#8eb89b;
}
.chat-human-tag{
  display:inline-flex;
  align-items:center;
  padding:2px 5px;
  border-radius:999px;
  background:#fff4dc;
  border:1px solid #efd39a;
  color:#8b651e;
  font-size:7px;
  font-weight:900;
  letter-spacing:.04em;
}
#chat-takeover-status.badge.warn{
  background:#fff4dc;
  border-color:#efd39a;
  color:#8b651e;
}
.chat-composer textarea:disabled{
  background:#f6f8fa;
  color:#9aa4b2;
  cursor:not-allowed;
}
.chat-bot3-warning{
  line-height:1.45;
}
@media(max-width:760px){
  .chat-main-actions{
    flex-wrap:wrap;
    justify-content:flex-end;
  }
  #chat-takeover-button{
    min-width:86px;
  }
}


/* V25.3 LIVE */
#chat-return-ai-button[hidden]{display:none!important}.badge.bad{background:#fff1ef;color:#a84b42;border-color:#f1c7c1}


/* ===== V25.3.1 · CHAT HUB UI REGRESSION FIX ===== */
/* Compatibility fallback for V25.3 live renderer. */
.chat-conversation{
  width:100%;
  display:grid;
  grid-template-columns:39px minmax(0,1fr);
  gap:9px;
  padding:10px 9px;
  border:0;
  border-radius:10px;
  background:transparent;
  text-align:left;
  cursor:pointer;
  font:inherit;
  color:inherit;
}
.chat-conversation:hover{background:#f3f6f9}
.chat-conversation.active{background:#fff1ed;box-shadow:inset 3px 0 0 #ef4d2d}
.chat-bubble > time{
  display:none;
}


/* ===== V25.4 · SMART CHAT PRODUCT + ORDER CONTEXT ===== */
.chat-quick-live button{
  cursor:pointer;
  opacity:1;
}
.chat-quick-live button:hover{
  transform:translateY(-1px);
  border-color:#f1a18d;
  background:#fff4f0;
}
.chat-product-card-stack{
  display:grid;
  gap:6px;
  margin:6px 0 8px;
}
.chat-product-card{
  display:grid;
  grid-template-columns:30px minmax(0,1fr);
  gap:8px;
  padding:8px;
  border:1px solid rgba(0,0,0,.08);
  border-radius:10px;
  background:rgba(255,255,255,.72);
}
.chat-product-card-icon,
.chat-product-side-icon{
  width:30px;
  height:30px;
  border-radius:9px;
  display:grid;
  place-items:center;
  background:#fff1ed;
  color:#ee4d2d;
  font-weight:900;
}
.chat-product-card b{
  display:block;
  font-size:10px;
  line-height:1.3;
}
.chat-product-card small{
  display:block;
  margin-top:2px;
  font-size:8px;
  color:#7a8798;
}
.chat-section-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.chat-section-title-row h4{margin:0}
.chat-product-side-list,
.chat-order-side-list{
  display:grid;
  gap:8px;
  margin-top:9px;
}
.chat-product-side-empty,
.chat-order-side-empty{
  margin-top:8px;
  padding:10px;
  border:1px dashed #dce3ea;
  border-radius:10px;
  color:#8490a1;
  font-size:8px;
  line-height:1.45;
  background:#fafbfd;
}
.chat-product-side-card{
  display:grid;
  grid-template-columns:32px minmax(0,1fr);
  gap:9px;
  padding:9px;
  border:1px solid #e4eaf0;
  border-radius:11px;
  background:#fff;
}
.chat-product-side-card.latest{
  border-color:#ffd0c5;
  background:#fffaf8;
}
.chat-product-side-card b{
  display:block;
  font-size:9px;
  line-height:1.35;
  overflow-wrap:anywhere;
}
.chat-product-side-card span,
.chat-product-side-card small{
  display:block;
  margin-top:2px;
  font-size:7.5px;
  color:#7f8b9b;
  overflow-wrap:anywhere;
}
.chat-order-side-card{
  padding:9px;
  border:1px solid #e4eaf0;
  border-radius:11px;
  background:#fff;
}
.chat-order-side-card.latest{
  border-color:#cfe8d9;
  background:#fbfffc;
}
.chat-order-side-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}
.chat-order-side-top b{
  font-size:8.5px;
  line-height:1.35;
  max-width:68%;
}
.chat-order-side-grid{
  display:grid;
  grid-template-columns:72px minmax(0,1fr);
  gap:5px 7px;
  align-items:center;
  font-size:7.5px;
}
.chat-order-side-grid>span:first-child{}
.chat-order-side-grid code{
  min-width:0;
  overflow-wrap:anywhere;
  white-space:normal;
}
@media(max-width:1100px){
  .chat-product-side-list,
  .chat-order-side-list{grid-template-columns:1fr}
}


/* ===== V25.5 · OPERATOR MODE ===== */
.chat-search-wrap kbd{
  margin-left:auto;
  padding:2px 5px;
  border:1px solid #dbe2e9;
  border-bottom-width:2px;
  border-radius:5px;
  background:#fff;
  color:#8591a0;
  font-size:7px;
  font-weight:800;
  white-space:nowrap;
}
.chat-search-status{
  min-height:14px;
  padding:0 11px 4px;
  color:#8a95a5;
  font-size:7px;
}
.chat-history-top-state{
  display:block;
  width:max-content;
  max-width:80%;
  margin:8px auto 12px;
  padding:6px 10px;
  border-radius:999px;
  font-size:8px;
  font-weight:800;
}
.chat-history-top-state.load{
  border:1px solid #dfe5eb;
  background:#fff;
  color:#687586;
  cursor:pointer;
}
.chat-history-top-state.load:hover{
  border-color:#f0a28f;
  color:#dd4b2d;
  background:#fff8f5;
}
.chat-history-top-state.end{
  background:#f4f6f8;
  color:#98a2af;
}
.chat-quick-live{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}
.chat-quick-buttons{
  display:flex;
  align-items:center;
  gap:5px;
  flex-wrap:wrap;
}
.chat-quick-manage{
  border:1px dashed #cfd8e1;
  background:#fff;
  color:#657385;
  border-radius:7px;
  padding:5px 8px;
  font-size:8px;
  font-weight:800;
  cursor:pointer;
}
.chat-quick-manage:hover{
  border-color:#ee4d2d;
  color:#ee4d2d;
}
.chat-copy-line{
  display:flex;
  align-items:center;
  gap:5px;
  min-width:0;
}
.chat-copy-line code{
  flex:1 1 auto;
  min-width:0;
}
.chat-copy-btn{
  flex:0 0 auto;
  border:1px solid #dbe2e8;
  background:#fff;
  border-radius:5px;
  padding:2px 5px;
  font-size:6.5px;
  font-weight:900;
  color:#677587;
  cursor:pointer;
}
.chat-copy-btn:hover{
  border-color:#ee4d2d;
  color:#ee4d2d;
}
body.chat-modal-open{
  overflow:hidden;
}
.chat-modal-backdrop{
  position:fixed;
  inset:0;
  z-index:9999;
  display:grid;
  place-items:center;
  padding:24px;
  background:rgba(16,23,34,.56);
  backdrop-filter:blur(2px);
}
.chat-modal-backdrop[hidden]{
  display:none !important;
}
.chat-modal-card{
  width:min(900px,96vw);
  max-height:86vh;
  overflow:auto;
  border:1px solid #e0e6ec;
  border-radius:16px;
  background:#fff;
  box-shadow:0 25px 70px rgba(18,27,39,.25);
}
.chat-modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  padding:18px 20px;
  border-bottom:1px solid #edf0f3;
}
.chat-modal-head h3{
  margin:6px 0 3px;
  font-size:17px;
}
.chat-modal-head p{
  margin:0;
  color:#7d8998;
  font-size:9px;
}
.chat-modal-close{
  border:0;
  background:transparent;
  font-size:28px;
  line-height:1;
  color:#7a8795;
  cursor:pointer;
}
.chat-quick-manager-layout{
  display:grid;
  grid-template-columns:300px minmax(0,1fr);
  min-height:420px;
}
.chat-quick-manager-list{
  padding:16px;
  border-right:1px solid #edf0f3;
  background:#fafbfd;
}
#chat-quick-manager-items{
  display:grid;
  gap:7px;
  margin-top:10px;
}
.chat-quick-manager-item{
  width:100%;
  border:1px solid #e1e7ed;
  border-radius:10px;
  padding:9px 10px;
  background:#fff;
  text-align:left;
  cursor:pointer;
}
.chat-quick-manager-item.active{
  border-color:#f3a28d;
  background:#fff6f2;
  box-shadow:inset 3px 0 0 #ee4d2d;
}
.chat-quick-manager-item b{
  display:block;
  font-size:9px;
}
.chat-quick-manager-item span{
  display:block;
  margin-top:3px;
  color:#85909f;
  font-size:7px;
  line-height:1.4;
}
.chat-quick-editor{
  padding:18px;
}
.chat-quick-editor label{
  display:block;
  margin:0 0 6px;
  font-size:8px;
  font-weight:900;
  color:#546274;
}
.chat-quick-editor input,
.chat-quick-editor textarea{
  width:100%;
  box-sizing:border-box;
  margin:0 0 14px;
  border:1px solid #dce3ea;
  border-radius:9px;
  padding:9px 10px;
  background:#fff;
  font:inherit;
  font-size:10px;
}
.chat-quick-editor textarea{
  min-height:180px;
  resize:vertical;
  line-height:1.5;
}
.chat-placeholder-help{
  display:flex;
  align-items:center;
  gap:5px;
  flex-wrap:wrap;
  margin:-2px 0 16px;
  color:#7e8997;
  font-size:7px;
}
.chat-placeholder-help code{
  border-radius:5px;
  padding:2px 4px;
  background:#f2f5f8;
}
.chat-modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:7px;
  flex-wrap:wrap;
}
@media(max-width:760px){
  .chat-quick-manager-layout{
    grid-template-columns:1fr;
  }
  .chat-quick-manager-list{
    border-right:0;
    border-bottom:1px solid #edf0f3;
  }
  .chat-modal-backdrop{
    padding:10px;
  }
}

/* ===== V26 · OPERATIONS CENTER ===== */
.operations-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.operations-hero>div{display:flex;flex-direction:column;gap:4px}
.operations-hero b{font-size:14px}
.operations-hero span:not(.pill){color:#6e7b8c}
.operations-tabs{
  display:flex;
  gap:8px;
  margin:0 0 18px;
  padding:6px;
  border:1px solid #e3e8ef;
  border-radius:13px;
  background:#f7f9fc;
}
.operations-tabs button{
  flex:1;
  border:0;
  border-radius:9px;
  padding:11px 14px;
  background:transparent;
  color:#697789;
  cursor:pointer;
  font:inherit;
  font-size:12px;
  font-weight:800;
}
.operations-tabs button.active{
  background:#fff;
  color:var(--accent);
  box-shadow:0 2px 8px rgba(26,39,58,.09);
}
.operations-panel{display:none}
.operations-panel.active{display:block}
.operations-stat-grid{grid-template-columns:repeat(6,minmax(0,1fr))}
.operations-card-head{align-items:center}
.operations-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.operations-actions a.btn{text-decoration:none;color:inherit}
.operations-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:10px;
}
.operations-filter-tabs{display:flex;gap:7px;flex-wrap:wrap}
.operations-filter-tabs button{
  border:1px solid #dce3ec;
  border-radius:999px;
  padding:7px 11px;
  background:#fff;
  color:#697789;
  cursor:pointer;
  font-size:10px;
  font-weight:800;
}
.operations-filter-tabs button.active{
  border-color:var(--accent);
  background:#fff5f1;
  color:var(--accent);
}
#operations-order-search{width:min(390px,100%)}
.operations-result-meta{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin:0 0 10px;
  color:#8491a2;
  font-size:10px;
}
#operations-orders-table{min-width:1240px}
#operations-orders-table td:nth-child(6){max-width:240px;white-space:normal}
.operations-target-preview{
  display:block;
  max-width:230px;
  overflow:hidden;
  color:#657487;
  text-overflow:ellipsis;
}
.operations-lower-grid{align-items:stretch}
.operations-lower-grid>.card{min-width:0}
.operations-small-table{max-height:360px}
.operations-small-table table{min-width:560px}
.operations-small-table td:last-child{white-space:normal;min-width:190px}
.operations-resource-meta{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:9px;
  color:#8390a1;
  font-size:10px;
}
.operations-mapping-layout{
  display:grid;
  grid-template-columns:minmax(280px,34%) minmax(0,1fr);
  min-height:540px;
  overflow:hidden;
  border:1px solid #e3e8ef;
  border-radius:12px;
}
.operations-product-pane{
  border-right:1px solid #e3e8ef;
  background:#f8fafc;
}
.operations-product-tools{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  padding:12px;
  border-bottom:1px solid #e3e8ef;
}
.operations-product-list{
  max-height:610px;
  overflow:auto;
  padding:7px;
}
.operations-product-item{
  display:block;
  width:100%;
  margin:0 0 5px;
  border:1px solid transparent;
  border-radius:9px;
  padding:10px 11px;
  background:transparent;
  text-align:left;
  cursor:pointer;
}
.operations-product-item:hover{background:#fff}
.operations-product-item.active{
  border-color:#f0b09f;
  background:#fff5f1;
  box-shadow:inset 3px 0 0 var(--accent);
}
.operations-product-item b{
  display:block;
  overflow:hidden;
  color:#354356;
  font-size:11px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.operations-product-item span{
  display:block;
  margin-top:4px;
  color:#8b97a6;
  font-size:9px;
}
.operations-mapping-editor{padding:20px}
.operations-mapping-editor>label{
  display:block;
  margin:0 0 7px;
  color:#526176;
  font-size:11px;
  font-weight:800;
}
.operations-mapping-editor>.input{width:100%;box-sizing:border-box}
.operations-editor-row-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin:22px 0 10px;
}
.operations-editor-row-head b{display:block;font-size:12px}
.operations-editor-row-head span{
  display:block;
  margin-top:4px;
  color:#8692a2;
  font-size:9px;
}
.operations-service-rows{display:grid;gap:8px}
.operations-service-row{
  display:grid;
  grid-template-columns:minmax(150px,1fr) minmax(140px,.7fr) auto;
  gap:8px;
  align-items:center;
  padding:9px;
  border:1px solid #e4e9ef;
  border-radius:10px;
  background:#fafbfd;
}
.operations-service-row input{box-sizing:border-box}
.operations-remove-service{
  width:34px;
  height:34px;
  border:1px solid #f0d3d0;
  border-radius:8px;
  background:#fff;
  color:#c94b43;
  cursor:pointer;
  font-weight:900;
}
.operations-form-message{
  min-height:18px;
  margin-top:12px;
  color:#7c899a;
  font-size:10px;
  line-height:1.5;
}
.operations-form-message.ok{color:var(--ok)}
.operations-form-message.bad{color:var(--bad)}
.operations-form-message.warn{color:var(--warn)}
.operations-editor-actions{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-top:14px;
}
.btn.danger{
  border-color:#efcfcb;
  color:#be433b;
  background:#fff;
}
.btn:disabled,.operations-tabs button:disabled{
  opacity:.5;
  cursor:not-allowed;
}
.operations-knowledge-toolbar,
.operations-knowledge-foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.operations-knowledge-toolbar{
  margin-bottom:10px;
  color:#7e8a9a;
  font-size:10px;
}
.operations-knowledge-text{
  box-sizing:border-box;
  width:100%;
  min-height:540px;
  resize:vertical;
  border:1px solid #dce3ec;
  border-radius:11px;
  padding:16px;
  background:#fbfcfe;
  color:#263448;
  font:12px/1.7 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}
.operations-knowledge-text:focus{
  outline:0;
  border-color:#efa48f;
  box-shadow:0 0 0 3px rgba(238,77,45,.08);
}
.operations-knowledge-foot{margin-top:10px}
.operations-knowledge-foot>div>span{color:#8390a0;font-size:10px}
.operations-knowledge-foot .operations-form-message{margin-top:3px}
.operations-history-card{margin-top:18px}
#operations-history-table{min-width:900px}
#operations-history-table td:last-child{white-space:normal;min-width:260px}
.operations-safety-note{margin-top:14px}
.operations-auto-route-switch{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin:18px 0;
  padding:18px;
  border:1px solid #e1e7ef;
  border-radius:12px;
  background:#fbfcfe;
}
.operations-auto-route-switch>div{display:grid;gap:5px}
.operations-auto-route-switch b{font-size:14px;color:#223047}
.operations-auto-route-switch span{font-size:11px;line-height:1.5;color:#718095}
#operations-auto-route-table{min-width:720px}
#operations-auto-route-table .operations-auto-route-code{box-sizing:border-box;min-width:140px;width:100%}
.operations-route-checkbox{
  display:inline-flex;
  align-items:center;
  gap:7px;
  color:#536276;
  cursor:pointer;
  font-size:10px;
  font-weight:800;
}
.operations-route-checkbox input{
  flex:0 0 auto;
  width:16px;
  height:16px;
  margin:0;
  padding:0;
  accent-color:var(--accent);
}
.operations-auto-route-editor-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-top:12px;
}
.operations-auto-route-editor-actions>div{display:flex;gap:8px;flex-wrap:wrap}
.operations-auto-route-meta{color:#7e8a9a;font-size:10px}
.operations-audit-stat-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
#operations-audit-search{width:min(430px,100%)}
#operations-auto-route-audit-table{min-width:1420px}
#operations-auto-route-audit-table td:nth-child(5){max-width:260px;white-space:normal}
.operations-route-path{white-space:nowrap;font-weight:800;color:#44546a}

@media(max-width:1180px){
  .operations-stat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .operations-audit-stat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .operations-mapping-layout{grid-template-columns:minmax(240px,38%) minmax(0,1fr)}
}
@media(max-width:900px){
  .operations-toolbar,.operations-card-head{align-items:flex-start;flex-direction:column}
  .operations-actions,.operations-resource-meta{justify-content:flex-start}
  #operations-order-search,#operations-audit-search{width:100%}
  .operations-mapping-layout{grid-template-columns:1fr}
  .operations-product-pane{border-right:0;border-bottom:1px solid #e3e8ef}
  .operations-product-list{max-height:250px}
}
@media(max-width:650px){
  .operations-hero{align-items:flex-start;flex-direction:column}
  .operations-tabs{display:grid;grid-template-columns:1fr}
  .operations-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .operations-audit-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .operations-filter-tabs{display:grid;grid-template-columns:repeat(2,1fr);width:100%}
  .operations-filter-tabs button{width:100%}
  .operations-actions{display:grid;grid-template-columns:1fr;width:100%}
  .operations-actions .btn{width:100%;box-sizing:border-box;text-align:center}
  .operations-service-row{grid-template-columns:1fr 1fr}
  .operations-remove-service{grid-column:1/-1;width:100%}
  .operations-editor-actions,.operations-knowledge-toolbar,.operations-knowledge-foot{align-items:stretch;flex-direction:column}
  .operations-editor-actions .btn,.operations-knowledge-foot .btn{width:100%}
  .operations-knowledge-text{min-height:430px}
  .operations-auto-route-switch{align-items:stretch;flex-direction:column}
  .operations-auto-route-switch .btn{width:100%}
  .operations-auto-route-editor-actions{align-items:stretch;flex-direction:column}
  .operations-auto-route-editor-actions>div{display:grid;grid-template-columns:1fr}
  .operations-auto-route-editor-actions .btn{width:100%}
}

/* V26.4.1: Shopee-style received cards. Text bubbles keep their existing styles. */
.chat-card-bubble{width:440px;min-width:0;max-width:88%;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
.chat-card-bubble .chat-bubble-meta{padding:5px 8px;justify-content:flex-end}
.chat-product-card-stack{width:100%;max-width:100%;min-width:0;margin:0}
.chat-viewer-card{width:100%;max-width:100%;box-sizing:border-box;border:1px solid #e5e5e5;border-radius:12px;background:#fff;overflow:hidden;color:#333;box-shadow:0 1px 1px rgba(0,0,0,.04)}
.chat-viewer-label{padding:11px 14px 0;color:#666;font-size:14px;font-weight:400}
.chat-viewer-product-item,.chat-viewer-order-item{display:flex;gap:10px;padding:12px 14px}
.chat-viewer-thumb{position:relative;width:72px;height:72px;flex:0 0 72px;background:#f2f3f4;border-radius:5px;overflow:hidden}
.chat-viewer-thumb span{display:flex;align-items:center;justify-content:center;height:100%;color:#9aa5b3;font-size:22px}
.chat-viewer-thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.chat-viewer-body{display:flex;flex:1;flex-direction:column;gap:5px;min-width:0;overflow-wrap:anywhere}
.chat-viewer-body b{font-size:14px;font-weight:400;line-height:1.45}
.chat-viewer-body small{font-size:12px;color:#666}.chat-viewer-body strong{font-size:14px;font-weight:500;color:#ee4d2d}
.chat-viewer-body .chat-viewer-delivery{color:#16aa98}
.chat-viewer-order-item{margin:9px 14px 0;padding:9px;background:#f6f6f6;border-radius:5px}
.chat-viewer-order-item .chat-viewer-body b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-viewer-order-meta{padding:10px 14px 13px;display:flex;flex-direction:column;gap:8px;font-size:12px;color:#666}
.chat-viewer-order-meta>div{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.chat-viewer-order-meta>div>span:last-child{color:#333;text-align:right;min-width:0;overflow-wrap:anywhere}
@media(max-width:760px){.chat-card-bubble{max-width:100%}.chat-viewer-thumb{width:64px;height:64px;flex-basis:64px}.chat-viewer-order-meta>div{flex-wrap:wrap;gap:4px}}

/* Menu 9: total-order multi-link allocation. */
.menu9-allocation{margin:16px 0;padding:12px;border:1px solid var(--border,#e2e8f0);border-radius:10px}
.menu9-allocation-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:8px}
#menu9-allocation-table{min-width:520px}
#menu9-allocation-table input{width:100%;box-sizing:border-box}
#menu9-allocation-table td:first-child{min-width:230px}
#menu9-allocation-table td:not(:first-child){min-width:90px}
