/* V377 public advisor UI - scoped to asa372 only */
.asa372-fab{position:fixed;right:22px;bottom:22px;z-index:9997;border:0;border-radius:999px;background:#17603d;color:#fff;padding:12px 17px 12px 12px;font:700 14px/1.2 inherit;box-shadow:0 12px 34px #0b3d282f;cursor:pointer;display:flex;align-items:center;gap:9px}.asa372-fab:hover{background:#124d31;transform:translateY(-1px)}.asa372-fab-icon{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#fff;color:#17603d}.asa372-fab i{width:8px;height:8px;border-radius:50%;background:#55d879;box-shadow:0 0 0 3px #ffffff25}
.asa372-box{display:none;position:fixed;right:22px;bottom:82px;width:min(430px,calc(100vw - 24px));height:min(700px,calc(100vh - 105px));z-index:9998;background:#fff;border:1px solid #cddfd5;border-radius:20px;box-shadow:0 26px 70px #0b2f2038;overflow:hidden;flex-direction:column;font-family:inherit;color:#163b2b}.asa372-box.open{display:flex;animation:asaIn .18s ease-out}@keyframes asaIn{from{opacity:0;transform:translateY(10px) scale(.985)}to{opacity:1;transform:none}}
.asa372-head{min-height:72px;padding:11px 12px 11px 14px;background:linear-gradient(135deg,#17603d,#0e7a45);color:#fff;display:flex;align-items:center;gap:10px}.asa372-brand-avatar,.asa372-mini-avatar{flex:0 0 auto;border-radius:50%;display:grid;place-items:center;font-weight:900;background:#fff;color:#187344;border:2px solid #dff4e7}.asa372-brand-avatar{width:43px;height:43px;font-size:20px}.asa372-mini-avatar{width:30px;height:30px;font-size:12px}.asa372-head-copy{display:grid;gap:3px;min-width:0;flex:1}.asa372-head-copy b{font-size:16px;white-space:nowrap}.asa372-head-copy b em{font-style:normal;color:#bde8c9}.asa372-head-copy small{font-size:12px;color:#eaf8ef;display:flex;align-items:center;gap:5px;white-space:nowrap}.asa372-head-copy small i{width:7px;height:7px;border-radius:50%;background:#6ee58b}.asa372-head button{width:30px;height:30px;border:0;border-radius:50%;background:#ffffff12;color:#fff;display:grid;place-items:center;cursor:pointer;font:700 20px/1 inherit}.asa372-head button:hover{background:#ffffff24}.asa372-more{font-size:13px!important;letter-spacing:1px}.asa372-min{font-size:22px!important}
.asa372-msgs{flex:1;overflow:auto;padding:16px 14px 10px;background:#f7faf8;display:flex;flex-direction:column;gap:12px;scrollbar-width:thin;scrollbar-color:#b7c8be transparent}.asa372-row{display:flex;gap:8px;align-items:flex-end}.asa372-row-bot{align-self:flex-start;max-width:92%}.asa372-row-user{align-self:flex-end;justify-content:flex-end;max-width:88%}.asa372-bot,.asa372-user{padding:11px 13px;border-radius:16px;white-space:pre-wrap;font-size:14px;line-height:1.55;box-shadow:0 1px 2px #102c2010}.asa372-bot{background:#fff;border:1px solid #dfe9e3;border-bottom-left-radius:5px}.asa372-user{background:#dff4df;color:#17442e;border:1px solid #c8e9ce;border-bottom-right-radius:5px}.asa372-time{display:block;margin-top:5px;font-size:10px;color:#829087;text-align:right}
.asa372-quick{padding:4px 14px 10px;background:#f7faf8;display:flex;gap:7px;overflow:auto;scrollbar-width:none}.asa372-quick::-webkit-scrollbar{display:none}.asa372-quick button{flex:0 0 auto;border:1px solid #b9ddc4;background:#f4fff7;color:#17603d;border-radius:999px;padding:8px 11px;font:600 12px/1 inherit;cursor:pointer}.asa372-quick button:hover{background:#e8f8ed}
.asa372-products{display:flex;gap:9px;overflow:auto;padding:0 14px 12px;background:#f7faf8;scroll-snap-type:x proximity;scrollbar-width:thin}.asa372-product{scroll-snap-align:start;min-width:174px;max-width:174px;background:#fff;border:1px solid #dce7e0;border-radius:13px;padding:7px;text-decoration:none;color:#183b2b;box-shadow:0 2px 8px #0d3b2610}.asa372-product img{width:100%;height:104px;object-fit:cover;border-radius:9px;background:#eef3ef}.asa372-product b{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:13px;line-height:1.35;margin:7px 2px 4px;min-height:35px}.asa372-product span{display:block;color:#c3261d;font-size:13px;font-weight:800;margin:0 2px 7px}.asa372-product strong{display:block;background:#197344;color:#fff;border-radius:8px;padding:8px 6px;text-align:center;font-size:12px}.asa372-status{display:none;padding:6px 16px;background:#f7faf8;color:#708078;font-size:12px}.asa372-status.show{display:block}.asa372-status:before{content:'';display:inline-block;width:6px;height:6px;border-radius:50%;background:#2ca963;margin-right:7px;animation:asaPulse 1s infinite}@keyframes asaPulse{50%{opacity:.3}}
.asa372-box form{display:flex;align-items:flex-end;gap:7px;padding:10px 12px 7px;background:#fff;border-top:1px solid #e5ece8}.asa372-box textarea{flex:1;resize:none;min-height:42px;max-height:100px;box-sizing:border-box;border:1px solid #cddbd3;border-radius:14px;padding:11px 12px;font:14px/1.4 inherit;outline:0}.asa372-box textarea:focus{border-color:#4a9d6d;box-shadow:0 0 0 3px #2f9b5c12}.asa372-attach{width:40px;height:42px;border:0;background:transparent;color:#61736a;font-size:18px;cursor:pointer}.asa372-send{width:44px;height:44px;border:0;border-radius:13px;background:#17603d;color:#fff;font-size:18px;cursor:pointer}.asa372-send:hover{background:#104c30}.asa372-note{padding:0 14px 10px;background:#fff;color:#7c8881;font-size:10.5px;text-align:center}
/* Admin area retained */
.asa-admin{max-width:1500px;margin:auto}.asa-admin .asa-head{background:none;color:inherit;min-height:0;padding:0}.asa-admin .asa-head{display:flex;justify-content:space-between;gap:20px;align-items:center}.asa-admin .asa-head h1{margin:0}.asa-admin .asa-head p{color:#69736d}.asa-admin .asa-head a,.asa-card button{background:#174a31;color:#fff;border:0;border-radius:9px;padding:10px 14px;text-decoration:none;font-weight:700}.asa-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:18px 0}.asa-stats article,.asa-card{background:#fff;border:1px solid #e1e6e3;border-radius:14px;padding:18px}.asa-stats b{font-size:24px;display:block}.asa-stats span{color:#69736d}.asa-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:14px}.asa-card h2{margin-top:0}.asa-card label{display:grid;gap:7px;margin:12px 0;font-weight:700}.asa-card .asa-check{display:block}.asa-card textarea{width:100%;box-sizing:border-box;padding:10px;border:1px solid #ccd7d0;border-radius:8px}.asa-rules{margin-top:18px;padding:14px;background:#f4f8f5;border-radius:10px}.asa-rule-list p{display:grid;gap:4px;border-bottom:1px solid #eee;padding:10px 0}.asa-rule-list span{color:#66736b}.asa-table{margin-top:14px;overflow:auto}.asa-table table{width:100%;border-collapse:collapse}.asa-table th,.asa-table td{text-align:left;padding:11px;border-bottom:1px solid #edf0ee}.asa-lead{background:#e8f6ed;color:#176b38;padding:5px 8px;border-radius:999px;font-weight:700}
@media(max-width:800px){.asa-stats{grid-template-columns:1fr 1fr}.asa-grid{grid-template-columns:1fr}.asa372-fab{right:12px;bottom:12px}.asa372-fab span:not(.asa372-fab-icon){display:none}.asa372-fab{padding:9px}.asa372-box{right:0;bottom:0;width:100vw;height:100dvh;max-height:none;border:0;border-radius:0}.asa372-head{padding-top:max(11px,env(safe-area-inset-top));min-height:66px}.asa372-head-copy b{font-size:15px}.asa372-head-copy small span{display:none}.asa372-more,.asa372-min{display:none!important}.asa372-msgs{padding:14px 12px 8px}.asa372-row-bot{max-width:94%}.asa372-bot,.asa372-user{font-size:14px}.asa372-quick{display:grid;grid-template-columns:1fr 1fr;overflow:visible;padding:4px 12px 10px}.asa372-quick button{text-align:left;padding:10px 12px}.asa372-products{padding:0 12px 10px}.asa372-product{min-width:164px;max-width:164px}.asa372-product img{height:98px}.asa372-box form{padding:9px 10px max(8px,env(safe-area-inset-bottom))}.asa372-note{display:none}}
/* V387 AI Draft Order */
.asa387-order{display:none;margin:0 12px 10px;border:1px solid #bcdccc;border-radius:15px;background:#fff;box-shadow:0 8px 22px #123b2812;overflow:hidden}.asa387-order.show{display:block}.asa387-order-head{display:flex;justify-content:space-between;align-items:center;padding:11px 13px;background:#eef8f2;border-bottom:1px solid #dbeae2}.asa387-order-head b{font-size:14px;color:#145a39}.asa387-order-head span{font-size:11px;padding:4px 7px;border-radius:7px;background:#fff0ed;color:#d53c28;font-weight:700}.asa387-order-body{padding:10px 13px;font-size:12px}.asa387-order-row{display:flex;justify-content:space-between;gap:12px;padding:5px 0;border-bottom:1px dashed #edf1ef}.asa387-order-row:last-child{border:0}.asa387-order-row strong{text-align:right}.asa387-order-total{font-size:14px;color:#c62828}.asa387-order-warn{margin:8px 0;padding:8px;border-radius:9px;background:#eef6ff;color:#315a7c;font-size:11px;line-height:1.45}.asa387-order-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:0 13px 12px}.asa387-order-actions button{border:1px solid #16804e;border-radius:9px;padding:9px 7px;background:#fff;color:#17603d;font:700 11px inherit;cursor:pointer}.asa387-order-actions .confirm{background:#16804e;color:#fff}.asa387-order-actions .cancel{border-color:#e35b50;color:#c93c31}.asa387-edit{display:none;padding:0 13px 12px}.asa387-edit.show{display:grid;gap:7px}.asa387-edit input,.asa387-edit textarea{width:100%;box-sizing:border-box;border:1px solid #cfded6;border-radius:8px;padding:8px;font:12px inherit}.asa387-edit .save{border:0;border-radius:8px;background:#17603d;color:#fff;padding:9px;font-weight:700;cursor:pointer}
/* V389: chưa đủ trường bắt buộc thì không cho xác nhận đơn. */
.asa387-order-actions .confirm:disabled{opacity:.45;cursor:not-allowed;filter:grayscale(.15)}
/* V390 - Smart Product Clarification + draft order minimize */
.asa390-order-head-right{display:flex;align-items:center;gap:7px}.asa390-order-hide{width:27px;height:27px;border:0;border-radius:8px;background:#fff;color:#46665a;font:700 19px/1 inherit;cursor:pointer;box-shadow:0 1px 3px #123b2818}.asa390-order-hide:hover{background:#e5f3eb;color:#145a39}.asa390-order-toggle{display:block;margin:0 12px 9px;border:1px solid #bcdccc;border-radius:10px;background:#eef8f2;color:#145a39;padding:8px 12px;font:700 12px inherit;cursor:pointer}.asa390-order-toggle[hidden]{display:none!important}.asa390-order-toggle:hover{background:#dff1e7}
/* V392.1 Staff message delivery notification */
.asa392-toast{position:fixed;right:22px;bottom:88px;z-index:10001;max-width:min(360px,calc(100vw - 28px));border:1px solid #cfe1d6;border-radius:16px;background:#fff;color:#173d2c;box-shadow:0 18px 48px rgba(12,53,35,.24);padding:12px 14px;text-align:left;font:600 13px/1.45 inherit;cursor:pointer}.asa392-toast::before{content:'💬';display:inline-grid;place-items:center;width:28px;height:28px;margin-right:8px;border-radius:50%;background:#17603d;color:#fff;vertical-align:middle}.asa392-toast[hidden]{display:none!important}.asa372-fab[data-unread]::after{content:attr(data-unread);position:absolute;right:-4px;top:-5px;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:#d92d20;color:#fff;border:2px solid #fff;font:800 11px/16px Arial,sans-serif;text-align:center;box-sizing:border-box}.asa391-staff .asa372-bot{border-color:#b9dbc7;background:#f0faf4}.asa391-staff .asa372-mini-avatar{background:#17603d;color:#fff}
@media(max-width:800px){.asa392-toast{right:12px;bottom:74px;max-width:calc(100vw - 24px)}}

/* V405 Product Discovery */
.asa405-meta{display:block;min-height:34px;margin:0 2px 6px;color:#66776e;font-size:11px;line-height:1.4}.asa405-card-actions{display:grid;gap:6px}.asa405-card-actions button,.asa405-card-actions a{border:0;border-radius:8px;padding:8px 6px;text-align:center;font-size:12px;font-weight:700;text-decoration:none;cursor:pointer}.asa405-card-actions .asa405-choose{background:#197344;color:#fff}.asa405-card-actions a{background:#edf6f1;color:#17643d}.asa372-product>span{margin-top:4px}

/* V419 - Draft order UI bám sát mẫu người dùng: rõ 5 bước, tối ưu desktop/mobile */
.asa387-order{margin:0 8px 10px;border:1px solid #d8e4de;border-radius:14px;background:#fff;box-shadow:0 10px 30px rgba(16,58,39,.12);max-height:74vh;overflow:auto}.asa419-order-title{position:relative;display:grid;grid-template-columns:38px 1fr auto 28px;gap:9px;align-items:center;padding:13px 12px;border-bottom:1px solid #e7eeea}.asa419-order-icon{width:34px;height:34px;display:grid;place-items:center;border:2px solid #13704a;border-radius:9px;color:#13704a;font-weight:900}.asa419-order-title>div:nth-child(2){display:grid}.asa419-order-title b{font-size:16px;color:#172d3d}.asa419-order-title small{font-size:10px;color:#7a8982;margin-top:2px}.asa419-status{padding:6px 8px;border-radius:8px;background:#ffe9e5;color:#e43d31;font-size:10px;font-weight:800}.asa419-section{margin:10px 10px 0;border:1px solid #dfe8e3;border-radius:8px;overflow:visible}.asa419-section-head{position:relative;min-height:36px;display:flex;align-items:center;gap:8px;padding:0 10px 0 34px;background:linear-gradient(90deg,#effaf4,#f7fbf9);color:#11633f}.asa419-section-head i{position:absolute;left:-9px;top:-4px;width:31px;height:31px;border-radius:50%;display:grid;place-items:center;background:#f44336;color:#fff;font-style:normal;font-weight:900;font-size:17px;box-shadow:0 2px 5px #0002}.asa419-section-head b{font-size:12px}.asa419-section-head button{margin-left:auto;border:0;background:transparent;color:#1769c2;text-decoration:underline;font:700 10px inherit;cursor:pointer}.asa419-customer{padding:8px 12px}.asa419-customer p{display:grid;grid-template-columns:20px 88px 1fr;gap:5px;margin:6px 0;align-items:start;font-size:11px}.asa419-customer p span{color:#08784c;font-size:15px}.asa419-customer p em{font-style:normal;color:#697a72}.asa419-customer p strong{color:#263b48}.asa419-product-head,.asa419-product-row{display:grid;grid-template-columns:minmax(150px,1.65fr) .7fr .62fr .8fr;align-items:stretch}.asa419-product-head{background:#f8fbf9;border-top:1px solid #e6eeea;border-bottom:1px solid #e6eeea}.asa419-product-head span{padding:6px 5px;text-align:center;font-size:9px;font-weight:700;color:#53655d;border-right:1px solid #e6eeea}.asa419-product-row>strong{display:grid;place-items:center;padding:7px 4px;border-left:1px solid #e6eeea;font-size:10px;text-align:center;color:#1d3140}.asa419-product-main{display:flex;gap:7px;align-items:center;padding:7px}.asa419-product-img{width:56px;height:56px;flex:0 0 56px;object-fit:cover;border-radius:7px;background:#f0f4f1}.asa419-noimg{display:grid;place-items:center;color:#167247;font-weight:900}.asa419-product-main>div{min-width:0}.asa419-product-main b{display:block;font-size:10px;line-height:1.35;color:#1f3340}.asa419-product-main small{display:block;margin-top:2px;font-size:8.5px;color:#75837c}.asa419-summary{padding:4px 10px}.asa419-summary p{display:flex;justify-content:space-between;gap:10px;margin:0;padding:6px 0;border-bottom:1px solid #edf1ef;font-size:10.5px}.asa419-summary p:last-child{border:0}.asa419-summary .total{font-weight:800}.asa419-summary .total strong{color:#e02020;font-size:15px}.asa419-note{padding:9px 12px;font-size:10.5px}.asa419-info{margin:10px;padding:10px;border:1px solid #b9d9f7;border-radius:8px;background:#eef7ff;color:#285b89;font-size:9.5px;line-height:1.45}.asa419-info b{font-size:11px}.asa419-info ul{margin:6px 0 0;padding-left:17px}.asa419-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:0 10px 10px}.asa419-actions button{min-height:50px;display:flex;align-items:center;justify-content:center;gap:7px;border:1px solid #16804e;border-radius:8px;background:#fff;color:#126440;font-size:18px;cursor:pointer}.asa419-actions button span{display:grid;text-align:left}.asa419-actions button b{font-size:10.5px}.asa419-actions button small{font-size:8.5px;font-weight:400;margin-top:2px}.asa419-actions .confirm{background:#15924f;color:#fff}.asa419-actions .cancel{border-color:#ef5350;color:#e12c2c}.asa419-actions .confirm:disabled{opacity:.45;cursor:not-allowed}.asa419-support{margin:0 10px 10px;padding:9px;text-align:center;border-radius:8px;background:#edf9f2;color:#11633f;display:grid}.asa419-support b{font-size:11px}.asa419-support small{font-size:8.5px;margin-top:2px}.asa387-edit{margin:0 10px 10px;padding:10px;border:1px solid #dce8e1;border-radius:8px;background:#fbfdfc}.asa390-order-hide{width:26px;height:26px;border:0;border-radius:7px;background:#f2f7f4;color:#547067;font-size:17px;cursor:pointer}
@media(max-width:430px){.asa387-order{margin-left:5px;margin-right:5px;max-height:76vh}.asa419-order-title{grid-template-columns:34px 1fr auto 25px;padding:10px 8px;gap:6px}.asa419-order-title b{font-size:14px}.asa419-status{font-size:9px;padding:5px}.asa419-section{margin-left:7px;margin-right:7px}.asa419-product-head,.asa419-product-row{grid-template-columns:minmax(132px,1.55fr) .68fr .58fr .75fr}.asa419-product-img{width:48px;height:48px;flex-basis:48px}.asa419-product-row>strong{font-size:9px}.asa419-actions{padding-left:7px;padding-right:7px}.asa419-info,.asa419-support{margin-left:7px;margin-right:7px}}
/* V423 Clean Chat Controller: compact persistent cart bar; full invoice opens only on demand. */
.asa390-order-toggle{position:sticky;bottom:72px;z-index:8;width:calc(100% - 24px);margin:8px 12px;padding:11px 14px;border:1px solid #d8e8df;border-radius:12px;background:#fff;color:#174a31;font-weight:800;box-shadow:0 6px 18px rgba(23,74,49,.10);text-align:left}
.asa390-order-toggle:not([hidden]){display:block}
.asa372-products:empty{display:none}
.asa405-choose{white-space:nowrap}
@media(max-width:640px){.asa390-order-toggle{bottom:66px;margin:6px 8px;width:calc(100% - 16px);font-size:13px}.asa419-product-head{display:none}.asa419-product-row{grid-template-columns:1fr;gap:7px}.asa419-product-row>strong{padding-left:58px}}
