*{box-sizing:border-box}body{margin:0;font-family:Inter,"Segoe UI",Arial,sans-serif;background:radial-gradient(circle at 20% 0%,#dbeafe,#eef3f8 35%,#f8fafc);color:#0f172a}.hidden{display:none!important}.layout{display:flex;min-height:100vh}.sidebar{width:270px;background:linear-gradient(180deg,#06253f,#005d86 58%,#064e6a);color:white;padding:24px 18px;position:fixed;height:100vh;box-shadow:10px 0 30px rgba(2,8,23,.18);z-index:10}.logo{font-size:25px;font-weight:900;letter-spacing:1px}.sublogo{font-size:12px;opacity:.8;margin:6px 0 28px}.nav button{width:100%;margin:7px 0;padding:14px;border:0;border-radius:15px;background:rgba(255,255,255,.12);color:white;font-size:15px;text-align:left;cursor:pointer;font-weight:800;transition:.2s}.nav button:hover{background:rgba(255,255,255,.25);transform:translateX(4px)}.main{margin-left:270px;width:calc(100% - 270px);padding:24px}.topbar{background:rgba(255,255,255,.84);backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,.8);border-radius:24px;padding:18px 24px;display:flex;justify-content:space-between;align-items:center;box-shadow:0 14px 45px rgba(15,23,42,.08);margin-bottom:22px}.eyebrow{font-size:11px;font-weight:900;color:#0284c7;letter-spacing:1.7px}.page-title{font-size:27px;font-weight:950}.user-pill{background:#e0f2fe;color:#075985;padding:10px 15px;border-radius:999px;font-weight:900}.card,.hero-card{background:rgba(255,255,255,.92);border:1px solid rgba(255,255,255,.82);border-radius:24px;padding:24px;margin-bottom:22px;box-shadow:0 20px 55px rgba(15,23,42,.08);overflow:visible}.section-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:18px}.section-head h2{margin:0;font-size:25px}.section-head p{margin:4px 0 0;color:#64748b}.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:17px}.stat{position:relative;overflow:hidden;background:linear-gradient(135deg,#fff,#e0f2fe);border:1px solid #dbeafe;border-radius:22px;padding:20px;box-shadow:0 18px 40px rgba(14,116,144,.08)}.stat span{font-size:26px}.stat .num{font-size:34px;font-weight:950;color:#075985}.stat .label{font-size:13px;color:#64748b;font-weight:800}.hero-card{display:flex;justify-content:space-between;align-items:center;background:linear-gradient(135deg,#04375a,#0588b6);color:white}.hero-card h2{font-size:31px;margin:0}.hero-card p{opacity:.85}.hero-orb{width:105px;height:105px;border-radius:31px;background:linear-gradient(135deg,#ffffff55,#ffffff11);display:grid;place-items:center;font-size:30px;font-weight:950;box-shadow:inset 0 2px 6px #fff5,0 20px 45px #0026;transform:rotate(-8deg)}.dashboard-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.notice-list{display:grid;gap:8px}.notice-item{padding:12px;border-radius:14px;background:#fff1f2;color:#9f1239;font-weight:800}.mini-chart{height:210px;display:flex;align-items:end;gap:18px;padding:20px;background:linear-gradient(180deg,#f8fafc,#e0f2fe);border-radius:18px}.mini-chart div{flex:1;border-radius:18px 18px 4px 4px;background:linear-gradient(180deg,#0ea5e9,#075985);box-shadow:0 14px 25px rgba(14,116,144,.2)}.toolbar,.form-grid{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-bottom:16px}.form-grid input,.form-grid select,.toolbar input,.toolbar select,input,select,textarea{padding:13px 14px;border:1px solid #cbd5e1;border-radius:14px;background:white;min-width:170px;font-size:14px;outline:none}input:focus,select:focus,textarea:focus{border-color:#0284c7;box-shadow:0 0 0 4px #bae6fd}button{background:#03658e;color:white;border:0;padding:13px 17px;border-radius:13px;cursor:pointer;font-weight:900;margin:3px;box-shadow:0 8px 18px rgba(3,101,142,.16)}button:hover{background:#064e6a;transform:translateY(-1px)}.danger{background:#b91c1c}.success{background:#15803d}.warning{background:#b7791f}.ghost{background:#e0f2fe;color:#075985}table{width:100%;border-collapse:separate;border-spacing:0;margin-top:16px;border-radius:18px;overflow:hidden}th{background:#064767;color:white;padding:14px;text-align:left;font-size:13px}td{padding:14px;border-bottom:1px solid #e2e8f0;background:rgba(255,255,255,.86);font-size:13px;vertical-align:middle}tr:hover td{background:#f8fafc}.badge{padding:7px 11px;border-radius:999px;font-size:11px;font-weight:950;display:inline-block}.badge-way,.badge-pending{background:#dbeafe;color:#1d4ed8}.badge-rec,.badge-accepted,.badge-good{background:#dcfce7;color:#166534}.badge-low,.badge-rejected{background:#fee2e2;color:#991b1b}.badge-inquiry{background:#fef3c7;color:#92400e}.product-photo,.inventory-photo{width:72px;height:58px;object-fit:contain;border-radius:14px;background:#f8fafc}.wide{grid-column:1/-1}.permission-box{display:flex;gap:10px;flex-wrap:wrap;background:#f8fafc;border:1px dashed #94a3b8;border-radius:16px;padding:13px}.temp-box{background:#f8fafc;border:1px dashed #94a3b8;padding:18px;border-radius:18px;margin:14px 0}.action-menu{position:relative;display:inline-block}.dots-btn{width:42px;height:38px;padding:0!important;border-radius:12px;font-size:20px}.menu-box{position:absolute;right:0;top:42px;background:white;border:1px solid #dbe5ee;border-radius:14px;box-shadow:0 18px 45px rgba(0,0,0,.16);z-index:99999;min-width:170px;padding:9px}.menu-box button{width:100%;text-align:left;margin:3px 0}.incoming-cell{background:#fce7f3!important;color:#831843;font-weight:900;text-align:center}.balance-cell{background:#fed7aa!important;color:#7c2d12;font-weight:900;text-align:center}.login-shell{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#06253f,#0ea5e9)}.login-card{width:min(430px,92vw);background:white;border-radius:28px;padding:34px;box-shadow:0 25px 80px #0004}.brand-mark{width:68px;height:68px;border-radius:22px;background:linear-gradient(135deg,#075985,#0ea5e9);display:grid;place-items:center;color:white;font-weight:950;font-size:34px}.login-card input,.login-card button{width:100%;margin:8px 0}.error-text{color:#b91c1c;font-weight:800}@media(max-width:900px){.sidebar{position:relative;width:100%;height:auto}.layout{display:block}.main{margin-left:0;width:100%}.grid,.dashboard-grid{grid-template-columns:1fr}}
.product-preview-card{display:flex;gap:16px;align-items:center;background:linear-gradient(135deg,#f8fbff,#eef8ff);border:1px solid #d5e7f4;border-radius:18px;padding:14px 16px;margin:12px 0;box-shadow:0 10px 25px rgba(0,75,115,.08)}
.preview-photo{width:86px;height:76px;object-fit:contain;border-radius:14px;background:white;box-shadow:0 8px 18px rgba(0,0,0,.08)}
.preview-metrics{display:flex;gap:10px;flex-wrap:wrap;margin-left:auto}.preview-metrics span{background:white;border-radius:999px;padding:8px 12px;border:1px solid #d8e7f2;font-size:12px}.empty-state{background:#f8fbff;border:1px dashed #aac5d8;border-radius:16px;padding:18px;margin:12px 0;color:#42677a}.notice.error{background:#fee2e2;color:#991b1b;border-radius:14px;padding:14px;margin:10px 0}.avatar-dot{width:48px;height:48px;border-radius:18px;background:linear-gradient(135deg,#00618f,#17a2b8);color:white;display:grid;place-items:center;font-weight:900;font-size:22px;box-shadow:0 10px 20px rgba(0,97,143,.25)}.avatar-dot.warehouse{background:linear-gradient(135deg,#b7791f,#f59e0b)}.permission-box.mini{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}.permission-box.mini span{background:#f8fafc;border-radius:10px;padding:7px 9px;font-size:12px}
.logo{letter-spacing:.3px}.hidden-row{display:none}.inline-detail{margin:8px 0;background:#f8fbff;border:1px dashed #9bb7cc;border-radius:14px}.print-button-note{font-size:12px;color:#54708a}

/* PO inquiry chat drawer */
.chat-drawer.hidden { display: none; }
.chat-drawer { position: fixed; inset: 0; z-index: 999999; }
.chat-backdrop { position:absolute; inset:0; background:rgba(4,19,31,.48); backdrop-filter: blur(3px); }
.chat-panel { position:absolute; right:0; top:0; width:min(1080px,94vw); height:100vh; background:#f7fbff; box-shadow:-18px 0 45px rgba(0,0,0,.25); display:flex; flex-direction:column; border-radius:26px 0 0 26px; overflow:hidden; }
.chat-header { display:flex; justify-content:space-between; align-items:center; padding:22px 26px; background:linear-gradient(135deg,#003b5c,#0076a8); color:#fff; }
.chat-header h2 { margin:4px 0 0; font-size:24px; }
.chat-body { flex:1; display:grid; grid-template-columns: 1fr 330px; gap:16px; padding:18px; overflow:hidden; }
.chat-messages { overflow:auto; padding:18px; background:#fff; border-radius:22px; box-shadow: inset 0 0 0 1px #dbeafe; }
.chat-side { overflow:auto; }
.side-card { background:#fff; border-radius:22px; padding:16px; box-shadow:0 14px 30px rgba(0,61,92,.1); border:1px solid #dbeafe; }
.chat-product-photo { width:100%; height:180px; object-fit:contain; background:#f1f7fb; border-radius:18px; margin-bottom:12px; }
.meta-row { display:flex; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid #eef3f8; font-size:13px; }
.chat-bubble { max-width:72%; margin:0 0 14px; padding:13px 15px; border-radius:18px; box-shadow:0 8px 20px rgba(0,0,0,.07); }
.chat-bubble.mine { margin-left:auto; background:linear-gradient(135deg,#00618f,#0088bd); color:#fff; border-bottom-right-radius:5px; }
.chat-bubble.theirs { background:#eef6ff; color:#0f172a; border-bottom-left-radius:5px; }
.chat-name { font-weight:800; margin-bottom:4px; }
.chat-name small { font-weight:500; opacity:.75; margin-left:8px; }
.chat-bubble p { margin:6px 0; white-space:pre-wrap; }
.chat-attach { display:inline-block; margin-top:8px; padding:8px 10px; border-radius:10px; background:rgba(255,255,255,.65); color:inherit; text-decoration:none; font-weight:700; }
.seen { font-size:11px; opacity:.75; text-align:right; margin-top:4px; }
.chat-compose { display:grid; grid-template-columns: 1fr 240px auto; gap:10px; padding:14px 18px 18px; background:#fff; border-top:1px solid #dbeafe; }
.chat-inbox { margin:12px 0 18px; padding:14px; background:linear-gradient(135deg,#f8fbff,#eef7ff); border:1px dashed #9bb8d1; border-radius:18px; }
.chat-inbox h3 { margin:0 0 12px; }
.chat-inbox-grid { display:grid; grid-template-columns: repeat(auto-fit,minmax(230px,1fr)); gap:10px; }
.chat-inbox-card { text-align:left; display:grid; grid-template-columns:48px 1fr; gap:8px; align-items:center; background:#fff; color:#0f172a; border:1px solid #dbeafe; box-shadow:0 6px 18px rgba(0,61,92,.08); }
.chat-inbox-card:hover { transform:translateY(-1px); }
.chat-inbox-card.unread { border-color:#f59e0b; box-shadow:0 8px 24px rgba(245,158,11,.18); }
.chat-inbox-card small, .chat-inbox-card em { grid-column:2; display:block; color:#475569; font-style:normal; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-inbox-card strong { grid-column:2; color:#b45309; font-size:12px; }
.chat-thumb { width:42px; height:42px; object-fit:contain; border-radius:10px; background:#f1f5f9; }
.preview-photo { width:72px; height:72px; object-fit:contain; background:#f8fafc; border-radius:14px; }
@media (max-width: 850px){ .chat-body{grid-template-columns:1fr;} .chat-side{display:none;} .chat-compose{grid-template-columns:1fr;} .chat-panel{width:100vw;border-radius:0;} }

/* Message Center v8 */
.message-center-list{margin-top:18px}.message-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(360px,1fr));gap:14px}.message-card{display:grid;grid-template-columns:74px 1fr;gap:14px;text-align:left;background:linear-gradient(135deg,#ffffff,#f5fbff);color:#0f172a;border:1px solid #dbeafe;border-radius:22px;padding:16px;box-shadow:0 14px 36px rgba(3,101,142,.09);min-height:116px}.message-card:hover{background:#fff;transform:translateY(-2px);box-shadow:0 18px 42px rgba(3,101,142,.15)}.message-card.unread{border-color:#f59e0b;box-shadow:0 18px 42px rgba(245,158,11,.18)}.message-card.closed{opacity:.82;background:#f8fafc}.message-img img,.message-img .chat-thumb{width:64px;height:64px;object-fit:contain;border-radius:16px;background:#f1f5f9}.message-main{min-width:0}.message-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:5px}.message-product{font-weight:900;color:#075985;margin-bottom:4px}.message-meta{font-size:12px;color:#64748b;margin-bottom:8px}.message-last{font-size:13px;color:#334155;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.status-none{background:#e5e7eb;color:#374151}.chat-compose button:disabled,.chat-compose input:disabled{opacity:.6;cursor:not-allowed}.chat-header .badge{margin-right:8px}

.chat-header-actions{display:flex;gap:10px;align-items:center}.chat-header-actions button{box-shadow:none}.chat-header-actions .danger{background:#dc2626}.chat-header-actions .badge{background:#fee2e2;color:#991b1b}
.message-card.closed{opacity:.72}.chat-compose button:disabled,.chat-compose input:disabled{opacity:.55;cursor:not-allowed}
.invoice-meta{display:grid;grid-template-columns:repeat(5,minmax(140px,1fr));gap:12px;background:#f2f8fc;border:1px solid #d6e8f3;border-radius:14px;padding:14px;margin:14px 0}.invoice-meta>div{background:#fff;border-radius:12px;padding:12px;box-shadow:0 5px 18px rgba(0,40,70,.05)}
textarea{min-height:72px;resize:vertical}


/* V10 polish */
.advanced-permissions{border:1px dashed #93b4cf;border-radius:16px;padding:12px;background:#f8fbff}.advanced-permissions summary{font-weight:900;color:#074968;cursor:pointer}.column-perm-group{margin:10px 0;background:#fff;border:1px solid #e0edf7;border-radius:12px;padding:8px}.column-perm-group div{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px}.column-perm-group label{font-size:12px;text-transform:capitalize}.preview-card{display:grid;grid-template-columns:82px 1fr;gap:12px;align-items:center;background:#fff;border:1px solid #dbeafe;border-radius:18px;padding:10px;box-shadow:0 12px 30px rgba(3,83,124,.08)}.preview-photo{width:76px;height:70px;object-fit:contain;border-radius:14px;background:#f1f5f9}.container-item-preview{grid-column:1/-1}.message-center-page{max-width:none}.message-layout{display:grid;grid-template-columns:340px minmax(420px,1fr) 320px;gap:14px;min-height:650px}.message-left,.message-thread,.message-order-side{background:#fff;border:1px solid #dbeafe;border-radius:18px;box-shadow:0 12px 28px rgba(3,83,124,.08);overflow:hidden}.toolbar.compact{padding:10px;margin:0;display:grid;grid-template-columns:1fr 110px auto;gap:8px}.message-list-panel{height:590px;overflow:auto;border-top:1px solid #e8f2fb}.msg-row{width:100%;display:grid;grid-template-columns:28px 1fr;text-align:left;background:#fff;color:#0f172a;border:0;border-bottom:1px solid #e5eef7;border-radius:0;margin:0;padding:13px 12px;box-shadow:none}.msg-row:hover,.msg-row.unread{background:#eaf8ff}.msg-row.closed{opacity:.65}.msg-flag{font-size:16px}.msg-text b{display:block;color:#0f172a}.msg-text small{float:right;color:#64748b;font-size:11px}.msg-text span{display:block;margin-top:7px;color:#0f172a}.msg-text em{display:block;font-style:normal;color:#475569;margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.msg-text strong{display:block;color:#00618f;font-size:11px;margin-top:5px}.mc-thread-head{display:flex;justify-content:space-between;align-items:center;padding:18px 20px;border-bottom:1px solid #e5eef7;background:#f8fbff}.mc-thread-head h2{margin:4px 0;font-size:20px}.mc-thread-head p{margin:0;color:#64748b}.mc-messages{height:485px;border-radius:0;box-shadow:none;border:0;background:#f7fbff}.mc-compose{grid-template-columns:1fr 180px auto}.order-panel{padding:16px}.order-panel h3{margin-top:0}.order-panel .chat-product-photo{height:150px}.message-card-grid{display:block}.message-card{margin-bottom:10px}@media(max-width:1100px){.message-layout{grid-template-columns:1fr}.message-left,.message-thread,.message-order-side{min-height:auto}.message-list-panel{height:auto;max-height:360px}.mc-messages{height:420px}}


/* V11 Message Center premium layout fix */
#messageCenter.card{padding:0;overflow:hidden;background:#f4f8fc;border:1px solid #dbeafe;box-shadow:0 22px 60px rgba(15,23,42,.10)}
#messageCenter .section-head{padding:20px 24px;margin:0;background:linear-gradient(135deg,#ffffff,#eaf6ff);border-bottom:1px solid #dbeafe;align-items:center}
#messageCenter .section-head h2{font-size:28px;letter-spacing:-.5px}
#messageCenter .section-head p{font-size:14px;color:#4b6b82}
.message-layout{display:grid;grid-template-columns:380px minmax(560px,1fr) 360px;gap:0;min-height:calc(100vh - 170px);height:calc(100vh - 170px);border-radius:0;background:#e8f2fa}
.message-left,.message-thread,.message-order-side{border:0;border-radius:0;box-shadow:none;background:#fff;min-height:0}
.message-left{border-right:1px solid #d7e8f3;display:flex;flex-direction:column;background:#f8fbff}
.message-thread{display:flex;flex-direction:column;background:#f5f9fd;border-right:1px solid #d7e8f3}
.message-order-side{background:#fff;overflow:auto}
.toolbar.compact{padding:14px;background:#ffffff;border-bottom:1px solid #d7e8f3;display:grid;grid-template-columns:1fr 118px 44px;gap:8px;margin:0;flex:none}
.toolbar.compact input,.toolbar.compact select{min-width:0;width:100%;height:42px;border-radius:12px;font-size:13px}
.toolbar.compact button{width:44px;height:42px;padding:0;border-radius:12px;font-size:0;position:relative;margin:0}.toolbar.compact button:after{content:'↻';font-size:18px}
.message-list-panel{height:auto;flex:1;overflow:auto;border-top:0;padding:8px;background:#f8fbff}
.msg-row{width:100%;display:grid;grid-template-columns:58px 1fr;gap:10px;align-items:start;text-align:left;background:transparent;color:#0f172a;border:0;border-radius:16px;margin:4px 0;padding:12px;box-shadow:none;transition:.16s}
.msg-row:hover{background:#eef8ff;transform:none}.msg-row.unread{background:#e6f6ff;border-left:4px solid #0284c7}.msg-row.active{background:#dff3ff;border-left:4px solid #03658e}.msg-row.closed{opacity:.72;background:#f1f5f9}.msg-row .msg-flag{width:54px;height:54px;border-radius:14px;background:#fff;display:grid;place-items:center;overflow:hidden;box-shadow:0 6px 16px rgba(2,74,105,.08);font-size:20px}.msg-row .msg-flag img{width:100%;height:100%;object-fit:contain}.msg-text{min-width:0}.msg-text b{display:block;font-size:13px;color:#0b3550;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.msg-text small{float:none;display:block;color:#7c8da1;font-size:11px;margin-top:2px}.msg-text span{display:block;margin-top:6px;font-size:13px;font-weight:900;color:#063b5a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.msg-text em{display:block;font-style:normal;color:#334155;margin-top:5px;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.msg-text strong{display:inline-flex;align-items:center;gap:4px;color:#047857;background:#dcfce7;border-radius:999px;font-size:10px;padding:3px 8px;margin-top:7px}.msg-row.closed .msg-text strong{color:#475569;background:#e2e8f0}.msg-unread-pill{background:#ef4444;color:#fff;border-radius:999px;padding:2px 6px;font-size:10px;margin-left:6px}
.mc-thread-head{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid #d7e8f3;background:#fff;flex:none}.mc-thread-head h2{margin:4px 0 0;font-size:19px;color:#082f49}.mc-thread-head p{margin:3px 0 0;color:#64748b;font-size:12px}.mc-thread-head .danger{padding:10px 14px;border-radius:999px;background:#dc2626}
.mc-messages.chat-messages{flex:1;height:auto;border-radius:0;box-shadow:none;border:0;background:linear-gradient(180deg,#f6fbff,#eef7fc);padding:24px;overflow:auto}.chat-bubble{max-width:76%;margin-bottom:16px;padding:12px 14px;border-radius:18px;box-shadow:0 8px 22px rgba(15,23,42,.08)}.chat-bubble.mine{background:linear-gradient(135deg,#00769e,#0096b7);color:#fff;border-bottom-right-radius:6px}.chat-bubble.theirs{background:#fff;color:#0f172a;border:1px solid #e2edf6;border-bottom-left-radius:6px}.chat-name{font-size:12px}.chat-name small{display:block;margin:2px 0 0;font-size:10px}.chat-bubble p{font-size:14px;line-height:1.45}.seen{font-size:10px}.mc-compose.chat-compose{flex:none;display:grid;grid-template-columns:1fr 170px 74px;gap:8px;padding:12px 14px;background:#fff;border-top:1px solid #d7e8f3}.mc-compose input{min-width:0;height:42px;border-radius:12px}.mc-compose button{height:42px;border-radius:12px;margin:0;padding:0 14px}
.order-panel{padding:18px}.order-panel h3{margin:0 0 14px;font-size:19px;color:#082f49}.order-panel .chat-product-photo{height:190px;background:linear-gradient(135deg,#f8fafc,#e0f2fe);border:1px solid #dbeafe;border-radius:20px;padding:10px}.meta-row{display:grid;grid-template-columns:96px 1fr;gap:10px;align-items:start;padding:11px 0;border-bottom:1px solid #eef3f8;font-size:12px}.meta-row b{color:#64748b}.meta-row span{font-weight:800;color:#0f172a;word-break:break-word}.empty-state{margin:18px;border-radius:18px;background:#fff;border:1px dashed #b8d0e2;color:#48677d}.message-order-summary{margin-top:14px;padding:12px;border-radius:16px;background:#f8fbff;border:1px solid #e2edf6}.message-order-summary .summary-title{font-weight:950;margin-bottom:8px;color:#075985}
@media(max-width:1250px){.message-layout{grid-template-columns:320px minmax(480px,1fr);height:auto;min-height:680px}.message-order-side{display:none}}
@media(max-width:900px){.message-layout{grid-template-columns:1fr;height:auto}.message-left{max-height:360px}.message-order-side{display:block}.toolbar.compact{grid-template-columns:1fr}.toolbar.compact button{width:100%;font-size:13px}.toolbar.compact button:after{content:''}.mc-compose.chat-compose{grid-template-columns:1fr}.message-list-panel{max-height:300px}.mc-messages.chat-messages{height:420px;flex:none}}


/* V12 costing calculation workspace */
.costing-workspace{background:#fff;border-radius:24px;padding:22px;box-shadow:0 18px 45px rgba(0,44,80,.10);margin-top:18px;overflow:auto}
.costing-title-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}.costing-title-row h3{margin:0;font-size:24px}.costing-title-row p{margin:4px 0 0;color:#58708a}
.costing-input-grid{display:grid;grid-template-columns:repeat(6,minmax(150px,1fr));gap:12px;margin:14px 0 18px}.costing-input-grid label{font-weight:800;color:#0b2f4a;font-size:12px}.costing-input-grid input{width:100%;margin:6px 0 0;background:#f8fbff}
.cost-summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:12px 0 18px}.cost-summary-grid div{background:linear-gradient(135deg,#eef9ff,#ffffff);border:1px solid #d6edf8;border-radius:16px;padding:14px}.cost-summary-grid b{display:block;color:#49647b;font-size:12px}.cost-summary-grid span{font-size:20px;font-weight:900;color:#005a7e}
.costing-table{min-width:1500px}.costing-table th{white-space:nowrap}.costing-table td{white-space:nowrap}.green-col{background:#d9f8df!important;color:#064e20!important;font-weight:800}
@media(max-width:1000px){.costing-input-grid,.cost-summary-grid{grid-template-columns:1fr 1fr}}

/* V12.1 costing calculation modal fixes */
.costing-modal{position:fixed;inset:0;background:rgba(6,25,41,.62);z-index:999999;display:flex;align-items:stretch;justify-content:center;padding:22px;backdrop-filter:blur(4px)}
.costing-modal-shell{background:#fff;border-radius:24px;box-shadow:0 24px 80px rgba(0,0,0,.28);width:min(1600px,100%);height:calc(100vh - 44px);overflow:auto;padding:22px}
.costing-sticky-head{position:sticky;top:0;background:#fff;z-index:20;border-bottom:1px solid #dbe7f3;padding-bottom:14px}
.costing-modal .costing-table{min-width:1500px}
.costing-modal input{min-width:0}
@media print{.sidebar,.topbar,.nav,.costing-modal{position:static;background:white;padding:0}.costing-modal-shell{box-shadow:none;height:auto;overflow:visible}.costing-sticky-head button,.costing-sticky-head .danger{display:none!important}}


/* V13 UK cost sheet and costing modal polish */
.costing-full-container{margin-top:16px;border:1px dashed #aac3d8;border-radius:18px;padding:14px;background:#f8fbff;overflow:auto}
.costing-full-container h3{margin:0 0 10px;color:#073b59}.costing-full-container table{min-width:1450px}
.uk-cost-sheet{overflow:auto}.uk-cost-sheet table{min-width:1100px}.uk-cost-photo{width:70px;height:58px;object-fit:contain;border-radius:12px;background:#f8fafc}.uk-cost-select{min-width:220px}.uk-cost-highlight{font-size:18px;font-weight:900;color:#00618f}.costing-save-note{padding:10px 14px;border-radius:14px;background:#eef9f1;color:#166534;font-weight:800;margin:10px 0;display:inline-block}

/* Warehouse Racking / WMS */
.warehouse-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 18px}.warehouse-tabs button{background:#0f4c81;padding:10px 13px;border-radius:999px}.wh-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:14px}.wh-metric{background:linear-gradient(135deg,#fff,#eaf7ff);border:1px solid #d7edf8;border-radius:18px;padding:18px;box-shadow:0 10px 22px rgba(15,76,129,.08)}.wh-metric b{font-size:28px;color:#004b73;display:block}.wh-metric span{font-size:12px;color:#64748b;text-transform:uppercase;font-weight:800}.warehouse-designer-head{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:12px}.warehouse-workspace{display:grid;grid-template-columns:minmax(640px,1fr) 330px;gap:16px;align-items:start}.warehouse-canvas{position:relative;min-height:620px;border:1px solid #cfe0eb;border-radius:22px;background-image:linear-gradient(#e8f1f8 1px,transparent 1px),linear-gradient(90deg,#e8f1f8 1px,transparent 1px);background-size:24px 24px;background-color:#fbfdff;overflow:auto;box-shadow:inset 0 0 30px rgba(0,80,130,.06)}.warehouse-side-panel{background:#fff;border:1px solid #dbe7ef;border-radius:18px;padding:16px;box-shadow:0 8px 25px rgba(0,0,0,.06);max-height:700px;overflow:auto}.warehouse-side-panel label{display:block;margin:8px 0;font-weight:700}.warehouse-side-panel input{width:100%;min-width:0}.warehouse-block{position:absolute;border-radius:14px;padding:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;box-shadow:0 8px 20px rgba(0,0,0,.14);cursor:move;user-select:none;border:2px solid rgba(255,255,255,.75);transition:.18s}.warehouse-block b{font-size:14px}.warehouse-block small{font-size:11px;text-transform:uppercase;opacity:.8}.warehouse-block span{font-weight:900;margin-top:5px;background:rgba(255,255,255,.8);border-radius:999px;padding:3px 8px}.warehouse-block.selected{outline:4px solid #fbbf24}.warehouse-block.wh-highlight{box-shadow:0 0 0 5px #fde047,0 0 30px #facc15;animation:whPulse 1s infinite alternate}.wh-rack{background:linear-gradient(135deg,#dbeafe,#60a5fa);color:#0f172a}.wh-floor{background:linear-gradient(135deg,#ede9fe,#a78bfa);color:#1e1b4b}.wh-staging{background:linear-gradient(135deg,#fef3c7,#f59e0b);color:#451a03}.wh-dispatch{background:linear-gradient(135deg,#dcfce7,#22c55e);color:#052e16}.wh-aisle{background:#f8fafc;color:#334155;border:2px dashed #94a3b8;box-shadow:none}.warehouse-map .warehouse-block{cursor:pointer}.wh-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px;margin-top:14px}.wh-site-card,.wh-put-card,.wh-loc-card,.wh-result-card{background:#fff;border:1px solid #dbe7ef;border-radius:18px;padding:14px;box-shadow:0 8px 20px rgba(15,76,129,.06)}.wh-site-card b{display:block;font-size:18px;color:#003b5c}.wh-site-card span,.wh-site-card small{display:block;color:#64748b}.wh-put-card,.wh-result-card{display:grid;grid-template-columns:70px 1fr;gap:12px;align-items:start}.warehouse-thumb{width:64px;height:58px;object-fit:contain;background:#f8fafc;border-radius:12px}.wh-location-line{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;align-items:center;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:9px;margin-top:8px;cursor:pointer}.wh-location-line b{color:#005a8d}.wh-location-line em{font-style:normal;color:#334155;font-weight:700}.wh-loc-card.rack{border-left:6px solid #3b82f6}.wh-loc-card.floor_zone{border-left:6px solid #8b5cf6}.wh-loc-card.staging{border-left:6px solid #f59e0b}.wh-loc-card.dispatch{border-left:6px solid #22c55e}@keyframes whPulse{from{filter:brightness(1)}to{filter:brightness(1.18)}}@media(max-width:1050px){.warehouse-workspace{grid-template-columns:1fr}.warehouse-canvas{min-height:520px}.wh-location-line{grid-template-columns:1fr}}

/* WMS v15 simplified rack -> bay -> level -> product flow */
.wh-simple-workspace{grid-template-columns:minmax(700px,1fr) 420px;align-items:stretch}
.warehouse-canvas{min-height:640px;background:linear-gradient(135deg,#f8fbff,#eef7ff);border:1px solid #dbe8f5;border-radius:22px;position:relative;overflow:auto;box-shadow:inset 0 0 0 1px rgba(255,255,255,.65)}
.warehouse-block{position:absolute;border-radius:18px;padding:14px;box-shadow:0 14px 28px rgba(15,23,42,.14);cursor:grab;user-select:none;border:2px solid rgba(255,255,255,.8);display:flex;flex-direction:column;justify-content:center;gap:4px;text-align:center;transition:.18s ease;background:#0f766e;color:#fff}
.warehouse-block:active{cursor:grabbing}.warehouse-block small{font-size:12px;opacity:.85}.warehouse-block em{font-style:normal;background:rgba(255,255,255,.2);border-radius:999px;padding:4px 8px;font-size:12px}.warehouse-block.selected{outline:4px solid rgba(59,130,246,.25)}
.wh-rack{background:linear-gradient(135deg,#0f766e,#14b8a6)}.wh-floor{background:linear-gradient(135deg,#7c3aed,#a855f7)}.wh-dispatch{background:linear-gradient(135deg,#ea580c,#f97316)}.wh-aisle{background:linear-gradient(135deg,#64748b,#94a3b8)}.wh-highlight{animation:whPulse 1s infinite;box-shadow:0 0 0 6px rgba(250,204,21,.35),0 18px 34px rgba(15,23,42,.2)}
@keyframes whPulse{0%,100%{filter:brightness(1)}50%{filter:brightness(1.22)}}
.warehouse-side-panel{background:#fff;border:1px solid #e2e8f0;border-radius:22px;padding:18px;box-shadow:0 14px 35px rgba(15,23,42,.08);overflow:auto;max-height:680px}.wh-panel-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;border-bottom:1px solid #e5eef7;margin-bottom:14px;padding-bottom:12px}.wh-panel-head h3{margin:0}.wh-panel-head p{margin:4px 0 0;color:#64748b}.wh-action-row{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.bay-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px}.bay-card{background:#f8fafc;border:1px solid #dbe7f3;border-radius:18px;padding:12px}.bay-title{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:8px}.bay-title button{padding:7px 9px;font-size:12px}.level-card{background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:10px;margin:8px 0;cursor:pointer;transition:.15s}.level-card:hover{transform:translateY(-1px);box-shadow:0 10px 20px rgba(15,23,42,.08)}.level-card.occupied{border-color:#22c55e;background:#f0fdf4}.level-card span{display:block;font-size:12px;color:#475569;margin-top:4px}.empty-state{background:#f8fafc;border:1px dashed #94a3b8;border-radius:16px;padding:18px;text-align:center;color:#64748b}.modal-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:99999;display:flex;align-items:center;justify-content:center}.wh-assign-modal{background:#fff;border-radius:24px;padding:22px;width:min(560px,92vw);box-shadow:0 24px 80px rgba(15,23,42,.35)}.wh-assign-modal select,.wh-assign-modal input{width:100%;margin:6px 0}.assign-preview{display:flex;gap:12px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:16px;padding:12px;margin:8px 0}.warehouse-thumb{width:64px;height:58px;object-fit:contain;background:#fff;border-radius:12px;border:1px solid #e2e8f0}.wh-no-img{display:inline-flex;align-items:center;justify-content:center;width:64px;height:58px;background:#f1f5f9;border-radius:12px;color:#94a3b8;font-size:11px}.floor-stock-list{display:grid;gap:10px;margin-top:12px}.stock-line,.found-card{display:flex;gap:12px;align-items:center;background:#f8fafc;border:1px solid #e2e8f0;border-radius:16px;padding:10px}.found-card{cursor:pointer}.found-card:hover{background:#eff6ff;border-color:#93c5fd}.found-card p,.stock-line p{margin:3px 0;color:#475569}.warehouse-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}.warehouse-designer-head{display:flex;justify-content:space-between;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:12px}.warehouse-designer-head input{min-width:260px}
@media(max-width:1000px){.wh-simple-workspace{grid-template-columns:1fr}.warehouse-side-panel{max-height:none}.warehouse-canvas{min-height:520px}}

/* WMS v16 final warehouse-friendly rack -> bay -> level flow */
#warehouse .warehouse-designer-head{justify-content:flex-start;gap:12px;background:#f8fbff;border:1px solid #dbeafe;border-radius:18px;padding:12px}
#warehouse .warehouse-designer-head label{font-weight:800;color:#0f3654}#warehouse .warehouse-designer-head select,#warehouse .warehouse-designer-head input{height:42px;border-radius:12px}
.wh-simple-workspace{grid-template-columns:minmax(760px,1fr) 520px!important;gap:18px}.warehouse-canvas{min-height:700px!important;background-color:#f8fbff!important;background-image:linear-gradient(#e6f0f8 1px,transparent 1px),linear-gradient(90deg,#e6f0f8 1px,transparent 1px)!important;background-size:28px 28px!important;overflow:auto!important}.warehouse-block{min-width:130px;min-height:70px}.warehouse-block b{font-size:15px}.warehouse-block em{font-size:12px;font-weight:900}.wh-layout-edit{display:grid;grid-template-columns:1fr 90px 90px 90px;gap:8px;margin:12px 0;background:#f8fafc;border:1px solid #e2e8f0;border-radius:16px;padding:12px}.wh-layout-edit label{font-size:11px;font-weight:900;color:#476074}.wh-layout-edit input{width:100%;min-width:0;margin:3px 0 0}.wh-layout-edit button{align-self:end;margin:0;padding:10px}.final-bay-grid{grid-template-columns:1fr!important}.final-bay-card{border:2px solid #d8eaf8;background:linear-gradient(135deg,#ffffff,#f8fbff);box-shadow:0 10px 24px rgba(15,76,129,.08)}.final-bay-card .bay-title{border-bottom:1px solid #e5eef7;padding-bottom:8px}.bay-title small{display:block;color:#64748b;font-weight:800;margin-top:3px}.rack-level-stack{display:flex;flex-direction:column;gap:8px}.level-shelf{border:2px solid #dbeafe;border-radius:16px;background:#fff;min-height:82px;padding:10px;display:grid;grid-template-columns:90px 1fr;gap:10px;align-items:center;cursor:pointer;transition:.15s}.level-shelf:hover{border-color:#0ea5e9;box-shadow:0 12px 24px rgba(14,165,233,.12);transform:translateY(-1px)}.level-shelf.occupied{background:linear-gradient(135deg,#ecfdf5,#ffffff);border-color:#34d399}.level-label{background:#0f4c81;color:white;border-radius:12px;display:grid;place-items:center;height:58px;font-weight:900;text-align:center}.level-products{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.mini-product{display:flex;gap:7px;align-items:center;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:6px;min-width:180px}.mini-product .warehouse-thumb,.mini-product .wh-no-img{width:42px;height:38px;border-radius:9px}.mini-product b{display:block;font-size:12px;max-width:130px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mini-product small{color:#0f766e;font-weight:900}.floor-stock-list{margin-top:14px}.stock-line .warehouse-thumb,.found-card .warehouse-thumb{width:58px;height:54px}.wh-map-empty{position:absolute;top:20px;left:20px;right:20px}.warehouse-side-panel{max-height:760px!important}.warehouse-tabs button{box-shadow:0 8px 18px rgba(0,97,143,.16)}
@media(max-width:1150px){.wh-simple-workspace{grid-template-columns:1fr!important}.wh-layout-edit{grid-template-columns:1fr 1fr}.warehouse-canvas{min-height:560px!important}}
.import-panel{margin:12px 0;padding:14px;border:1px solid #d7e7f1;background:linear-gradient(135deg,#f8fcff,#eef8ff);border-radius:16px;display:flex;gap:10px;align-items:center;flex-wrap:wrap}.import-panel input[type=file],.import-panel input{background:white}.admin-reset-panel{border:1px solid #fed7aa;background:#fff7ed}.admin-reset-panel .danger{background:#991b1b}.admin-reset-panel .warning{background:#b45309}


/* =========================================================
   v32 Mobile / Tablet Responsive UI
   Keeps desktop design intact and auto-adjusts on small screens
   ========================================================= */

.mobile-menu-btn{
  display:none;
  position:fixed;
  top:10px;
  left:10px;
  z-index:1001;
  border:0;
  border-radius:14px;
  background:#075985;
  color:#fff;
  padding:10px 12px;
  font-weight:900;
  box-shadow:0 10px 30px rgba(2,8,23,.25);
}

.sidebar-backdrop{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.45);
  z-index:999;
}

.table-scroll{
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}

/* Tablet */
@media (max-width: 1180px){
  .grid{grid-template-columns:repeat(2,1fr)}
  .dashboard-grid{grid-template-columns:1fr}
  .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .toolbar{flex-wrap:wrap}
  .toolbar input,.toolbar select,.toolbar button{min-width:160px}
  table{font-size:12px}
  th,td{padding:10px 8px}
}

/* Mobile */
@media (max-width: 820px){
  html,body{
    width:100%;
    max-width:100%;
    overflow-x:hidden;
  }

  .mobile-menu-btn{
    display:block;
  }

  .sidebar{
    transform:translateX(-105%);
    transition:transform .25s ease;
    width:min(82vw,310px);
    padding-top:58px;
    overflow-y:auto;
  }

  body.sidebar-open .sidebar{
    transform:translateX(0);
  }

  body.sidebar-open .sidebar-backdrop{
    display:block;
  }

  .main{
    margin-left:0!important;
    width:100%!important;
    padding:58px 10px 14px!important;
  }

  .topbar{
    border-radius:18px;
    padding:12px 14px;
    margin-bottom:12px;
    gap:10px;
    align-items:flex-start;
  }

  .page-title{
    font-size:18px;
    line-height:1.15;
  }

  .eyebrow{
    font-size:9px;
  }

  .userbox{
    display:flex;
    gap:6px;
    align-items:center;
    flex-wrap:wrap;
    justify-content:flex-end;
  }

  .user-pill{
    padding:7px 9px;
    font-size:11px;
  }

  .topbar button,
  .topbar .danger{
    padding:8px 10px;
    font-size:11px;
    border-radius:11px;
  }

  .card,.hero-card{
    border-radius:18px;
    padding:12px;
    margin-bottom:12px;
  }

  .section-head{
    flex-direction:column;
    gap:6px;
    margin-bottom:12px;
  }

  .section-head h2{
    font-size:20px;
  }

  .section-head p{
    font-size:12px;
  }

  .hero-card{
    display:block;
  }

  .hero-card h2{
    font-size:22px;
  }

  .hero-orb{
    display:none;
  }

  .grid{
    grid-template-columns:1fr;
    gap:10px;
  }

  .stat{
    border-radius:16px;
    padding:14px;
  }

  .stat .num{
    font-size:25px;
  }

  .dashboard-grid{
    grid-template-columns:1fr;
    gap:12px;
  }

  .form-grid{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:9px!important;
  }

  .toolbar{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
    align-items:stretch!important;
  }

  .toolbar input,
  .toolbar select,
  .toolbar button,
  .form-grid input,
  .form-grid select,
  .form-grid textarea,
  .form-grid button,
  .import-panel input,
  .import-panel select,
  .import-panel button{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    font-size:13px!important;
    padding:11px 12px!important;
    border-radius:12px!important;
  }

  .import-panel{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
    padding:10px!important;
    border-radius:14px!important;
    overflow:hidden!important;
  }

  .import-panel b,
  .import-panel span,
  .import-panel .muted{
    display:block;
    margin:0!important;
    font-size:12px!important;
  }

  .permission-box,
  .advanced-permissions,
  .temp-box,
  .product-preview-card{
    width:100%!important;
    overflow-x:auto;
  }

  .product-preview-card{
    display:grid!important;
    grid-template-columns:64px 1fr!important;
    gap:8px!important;
  }

  .preview-metrics{
    grid-column:1/-1;
    display:grid!important;
    grid-template-columns:repeat(2,1fr)!important;
    gap:6px!important;
  }

  .product-photo,
  .inventory-photo,
  .preview-photo{
    max-width:58px!important;
    max-height:58px!important;
    object-fit:contain!important;
  }

  /* Tables remain desktop-like but scroll horizontally on mobile */
  table{
    min-width:900px;
    font-size:11px!important;
  }

  th,td{
    padding:8px 7px!important;
    white-space:nowrap;
  }

  .card > table,
  .card div > table,
  #productsTable,
  #inventoryTable,
  #poTable,
  #poItemsTable,
  #balanceGoodsTable,
  #containersTable,
  #containerItemsTable,
  #warehouseUsersTable,
  #suppliersTable,
  #localTrackingTable,
  #ukCostSheetTable,
  #receivedCostingTable{
    width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }

  #productsTable table,
  #inventoryTable table,
  #poTable table,
  #poItemsTable table,
  #balanceGoodsTable table,
  #containersTable table,
  #containerItemsTable table{
    min-width:1050px;
  }

  .action-menu .menu-box{
    right:0;
    left:auto;
    min-width:135px;
    z-index:50;
  }

  button{
    min-height:38px;
  }

  .nav button{
    font-size:14px;
    padding:12px;
    margin:6px 0;
  }

  .logo{
    font-size:21px;
  }

  .sublogo{
    margin-bottom:16px;
  }

  /* Warehouse map mobile adjustments */
  .warehouse-layout,
  .map-canvas,
  #warehouseCanvas,
  #warehouseMap,
  .layout-canvas{
    max-width:100%!important;
    overflow:auto!important;
  }

  .warehouse-panel,
  .map-side-panel,
  .selected-block-panel{
    width:100%!important;
    max-width:100%!important;
  }

  /* Message center mobile */
  .message-layout,
  .message-center-grid,
  .chat-layout{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
  }

  .chat-list,
  .chat-window,
  .order-panel{
    width:100%!important;
    max-width:100%!important;
  }
}

/* Small phones */
@media (max-width: 430px){
  .main{padding-left:7px!important;padding-right:7px!important}
  .card,.hero-card{padding:10px;border-radius:15px}
  .page-title{font-size:16px}
  .section-head h2{font-size:18px}
  .topbar{padding:10px}
  .toolbar input,
  .toolbar select,
  .toolbar button,
  .form-grid input,
  .form-grid select,
  .form-grid textarea,
  .form-grid button{
    font-size:12px!important;
    padding:10px!important;
  }
  table{font-size:10.5px!important}
  th,td{padding:7px 6px!important}
}

/* Amazon Vendor EDI */
.amazon-edi-detail{margin-top:18px;background:#f8fbff;border:1px solid #dbeafe;border-radius:18px;padding:14px;overflow-x:auto}.amazon-edi-detail table{min-width:1100px}.amazon-edi-detail .section-head{gap:12px}.amazon-edi-detail .section-head>div:last-child{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.amazon-edi-detail input{min-width:80px}.amz-status-new{background:#dbeafe;color:#1e40af}.amz-status-uploaded{background:#dcfce7;color:#166534}.amz-status-failed{background:#fee2e2;color:#991b1b}
@media(max-width:820px){#amazonEdi .section-head{display:block}#amazonEdi button{width:100%;margin:4px 0}.amazon-edi-detail .section-head>div:last-child{display:grid;grid-template-columns:1fr}.amazon-edi-detail{padding:8px}}

/* v36 Amazon Vendor Central style PO list + detail view */
.amz-orders-wrap,.amz-items-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid #dbe5ee;border-radius:12px;background:#fff}
.amz-orders-table{min-width:1450px;margin-top:0!important}.amz-orders-table th{background:#f8fafc!important;color:#0f172a!important;border-bottom:1px solid #cbd5e1;font-size:12px}.amz-orders-table td{font-size:12px;vertical-align:middle}.amz-po-row{cursor:pointer}.amz-po-row:hover td{background:#eaf6ff!important}.amz-link{color:#0369a1;text-decoration:underline}.amz-help-text{font-size:12px;margin:8px 2px 0}.amz-detail-head{display:flex;justify-content:space-between;align-items:flex-start;gap:15px;margin-bottom:12px}.amz-detail-head h3{margin:6px 0 2px;font-size:20px}.amz-primary-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}.amz-primary-actions button{margin:0}.amz-back-btn{background:#e2e8f0!important;color:#0f172a!important}.amz-summary-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin:12px 0}.amz-summary-grid div{background:#f0f9ff;border:1px solid #bae6fd;border-radius:12px;padding:10px}.amz-summary-grid span{display:block;color:#64748b;font-size:11px;font-weight:800}.amz-summary-grid b{font-size:16px;color:#075985}.amz-advanced-actions{display:flex;gap:8px;flex-wrap:wrap;background:#f8fafc;border:1px dashed #94a3b8;border-radius:14px;padding:10px;margin:10px 0}.amz-advanced-actions a{padding:10px 12px;background:#e0f2fe;border-radius:10px;font-weight:800;color:#075985;text-decoration:none}.amz-items-table{min-width:1200px;margin-top:0!important}.amz-items-table th{font-size:12px}.amz-items-table td{font-size:12px;vertical-align:middle}.amz-qty-input{width:90px!important;min-width:80px!important;text-align:center;font-weight:900}.amz-low-stock{background:#fee2e2!important;color:#991b1b!important;font-weight:900}.amz-unmatched td{background:#fff7ed}.amazon-edi-detail{border:1px solid #bfdbfe;border-radius:16px;background:#fff;padding:14px;margin:14px 0;box-shadow:0 12px 28px rgba(15,23,42,.06)}
@media(max-width:820px){.amz-detail-head{display:block}.amz-primary-actions{justify-content:flex-start;margin-top:10px}.amz-summary-grid{grid-template-columns:1fr 1fr}.amz-orders-table{min-width:1300px}.amz-items-table{min-width:1050px}}
