/* Tiên Giới Truyện 3D · CSKH V4.5 — Thiết kế trắng kem / sơn thủy / vàng đồng.
   Giao diện בלבד: không thay đổi Supabase Auth, RLS, RPC, Storage hay quyền CSKH. */
:root{
 color-scheme:light;
 --bg:#f9f6f1; --panel:#fffdfa; --card:#fff9ef; --card2:#fff7e7;
 --gold:#bc863b; --gold2:#a56d24; --line:#e4cba4; --text:#332419; --muted:#73695f;
 --green:#2c783f; --red:#b8433a; --blue:#966528;
 --silk:#fffdf9; --cskh-font:'Times New Roman','Noto Serif SC','Songti SC','SimSun',serif;
}
html,body,#app{background:#f9f7f2!important;color:#38271b!important}
#app{height:100%}
.app-shell{display:block!important;background:linear-gradient(180deg,#fffdf9 0,#faf6ed 100%)!important;height:100dvh;min-height:675px;overflow:hidden}
.sidebar{display:none!important}
.work{display:flex;flex-direction:column;height:100%;min-height:0;min-width:0}
.header{position:relative;min-height:62px!important;height:62px!important;flex:0 0 62px;display:flex;align-items:center;gap:22px;padding:6px 20px 6px 22px!important;
 background:linear-gradient(90deg,#fffdfa 0%,#fffdfaf7 30%,#fffdfaa8 61%,#fffdfa 100%),url('/assets/tien-gioi-landscape.svg') right center/auto 150px no-repeat,#fffaf3!important;
 border-bottom:1px solid #e9d3b8!important;box-shadow:0 2px 12px #6d492719!important;color:#3e2b1c!important;z-index:5}
.header-identity{display:flex;align-items:center;flex:0 0 auto;min-width:0;gap:18px}
.header-brand{display:flex;align-items:center;gap:10px;text-decoration:none!important;color:#965d17!important;min-width:0}
.header-brand-logo{display:block;flex:0 0 auto;width:56px;height:54px;background:url('/assets/tien-gioi-emblem.svg') center/contain no-repeat}
.header-brand-name{font-size:18px;font-weight:800;line-height:1.01;letter-spacing:.01em;color:#935916!important;white-space:nowrap}
.header-brand-name small{display:block;color:#935916!important;font-size:18px!important;line-height:1.04;margin:0!important}
.header-brand-separator{height:35px;width:1px;background:#d6ba91;flex:0 0 1px}
.header-workspace{font-size:19px;font-weight:800;color:#4e3220;white-space:nowrap}
.header .top-actions{margin-left:auto;display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:nowrap;min-width:0}
.header .pill{background:#fffaf1!important;border:1px solid #e7caa5!important;border-radius:999px!important;color:#65452b!important;padding:7px 10px!important;font-size:11px!important;max-width:195px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.header .pill .dot{background:#3c9651}
.header .pill .dot.off{background:#c3913e}
.header .top-actions .pill:nth-child(2){max-width:175px!important}
.header .language{max-width:104px;min-width:92px;background:#fffaf2!important;color:#62472a!important;border:1px solid #e0c39a!important;padding:7px 5px!important;border-radius:9px;font-size:11px!important}
.header .btn{background:#fffaf2!important;color:#73522c!important;border:1px solid #e2c79f!important;padding:8px 10px!important;border-radius:9px!important;font-size:11px!important;white-space:nowrap;min-height:32px}
.header #notify-btn{font-size:0!important;position:relative;min-width:34px}
.header #notify-btn:after{content:'♧';display:block;font-size:17px;color:#aa742d}
.header #logout-btn{color:#91682d!important}
.main{padding:11px 9px 9px!important;display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
.kpis{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important;margin:0 0 12px!important;flex:0 0 auto}
.kpi{height:80px;min-height:80px!important;border:1px solid #e4c49b!important;border-radius:16px!important;
 background:linear-gradient(130deg,#fffffffd,#fffdfadd 78%,#ffecc67a),url('/assets/gold-cloud-waves.svg') right bottom/200px 70px no-repeat!important;
 box-shadow:0 4px 12px #a46e321d!important;padding:11px 12px 10px 96px!important;position:relative!important;color:#322317!important}
.kpi:before{position:absolute!important;content:'▤';top:12px!important;left:25px!important;width:49px!important;height:49px!important;display:grid!important;place-items:center!important;border-radius:50%!important;
 background:radial-gradient(circle at 33% 23%,#fffdfa,#fbe5be)!important;border:1px solid #eed6ac!important;color:#ab7428!important;font-size:27px!important;box-shadow:0 2px 6px #a9793520}
.kpi:nth-child(2):before{content:'♙'}
.kpi:nth-child(3):before{content:'✉'}
.kpi:nth-child(4):before{content:'✓'}
.kpi small{color:#332821!important;font-size:14px!important;margin:1px 0 0!important;font-weight:700;line-height:1.1}
.kpi strong{color:#915a1f!important;font-size:35px!important;margin-top:3px!important;line-height:1.05;font-weight:800}
.dashboard,.dashboard.info-open{display:grid!important;grid-template-columns:minmax(292px,352px) minmax(0,1fr) minmax(262px,310px)!important;gap:10px!important;align-items:stretch;flex:1;min-height:0!important;max-height:none!important;height:auto!important}
.dashboard.info-closed{grid-template-columns:minmax(292px,352px) minmax(0,1fr)!important}
.dashboard.info-closed .customer-panel{display:none!important}
.panel{background:#fffdfb!important;color:#32291e!important;border:1px solid #e4c9a4!important;border-radius:17px!important;box-shadow:0 3px 10px #88552218!important;min-width:0;min-height:0;overflow:hidden}
.panel-head{border-color:#eadfcd!important;background:#fffdfb!important;color:#593820!important;padding:12px 14px!important;min-height:61px;flex:0 0 auto}
.panel-head h2{font-size:21px!important;color:#683e17!important;font-weight:800!important;line-height:1.2}
.list-panel{background:#fffdfb!important;border-color:#e3c49a!important}
.list-panel .panel-head h2:before{content:'☏';display:inline-block;margin-right:9px;color:#b17b2f;font-size:23px;vertical-align:middle}
.list-panel #refresh-btn{font-size:20px!important;min-width:43px;min-height:40px;color:#fff6e0!important;background:linear-gradient(130deg,#e9c280,#b17e2f)!important;border:1px solid #deb47c!important;box-shadow:0 3px 8px #a0773a33}
.inbox-tabs{gap:8px!important;padding:10px 12px 8px!important;border-color:#e8d7bf!important;background:#fffdfa!important}
.inbox-tab{background:linear-gradient(#fffefd,#fff9f1)!important;border:1px solid #e1c49e!important;border-radius:10px!important;color:#77512f!important;font-size:13px!important;min-height:40px!important;padding:7px 4px!important;font-weight:800!important}
.inbox-tab.active{color:#fff9ef!important;border-color:#b88544!important;background:linear-gradient(125deg,#d9b16a,#aa7229)!important;box-shadow:0 2px 8px #a4722940!important}
.inbox-tab #archive-badge{background:#e3a744!important;color:#fff!important;border-radius:999px;font-weight:800}
.search-wrap{background:#fffdfb!important;border:0!important;padding:8px 12px 12px!important;gap:7px!important}
.list-panel .search-wrap .input,.list-panel .search-wrap select{background:#fff!important;color:#4f3c2a!important;border:1px solid #dcc5ac!important;border-radius:10px!important;min-height:40px!important;padding:9px 12px!important;font-size:13px!important}
.list-panel .search-wrap .input::placeholder{color:#9b8e81!important}
.thread-list{flex:1;min-height:0;max-height:none!important;overflow-y:auto;overscroll-behavior:contain;scrollbar-color:#d2b177 #fffdfa}
.thread-row{border-color:#eee5dc!important;background:#fffdfb!important}
.list-panel .thread-row .thread{padding:12px 10px!important;min-height:83px!important;background:transparent!important;color:#453224!important;border:0!important;align-items:center!important;gap:11px!important}
.list-panel .thread-row .thread:hover{background:#fff3df!important}
.list-panel .thread-row .thread.selected{padding-left:10px!important;background:linear-gradient(95deg,#fff3d8,#fffdfa)!important;border-left:5px solid #e6ae45!important;box-shadow:inset 0 0 0 1px #fff4e3!important}
.list-panel .avatar{background:linear-gradient(140deg,#fef7e8,#e7b56a)!important;border:1px solid #f1d2a0!important;width:42px!important;min-width:42px!important;height:42px!important;border-radius:50%!important;color:#89551d!important;font-size:20px!important;box-shadow:0 2px 5px #bd9b6f26}
.list-panel .thread.selected .avatar{background:linear-gradient(135deg,#edc77f,#b37b31)!important;color:#fff!important}
.list-panel .thread-info strong{font-size:15px!important;color:#30241e!important;display:block;margin-bottom:3px}
.list-panel .thread-info small{font-size:12px!important;color:#6b6056!important;margin:3px 0!important;max-width:100%!important;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.thread-meta{display:flex;gap:6px;align-items:center;justify-content:space-between;min-width:0;flex-wrap:wrap;margin-top:4px;font-size:11px}
.thread-meta time{color:#837569;white-space:nowrap}
.thread-meta .badge{font-size:10px;padding:2px 7px}
.list-panel .unread{color:white!important;background:#d79b34!important;border-radius:999px!important;padding:4px 7px!important}
.archive-pager{background:#fffaf3!important;border-color:#ead8bc!important;color:#765537!important}
.archive-closed-banner{background:#fff7e6!important;color:#825625!important;border-color:#dfc296!important}
.chat-panel{display:flex!important;flex-direction:column!important;background:#fffdfb!important;border-color:#e1c49e!important;min-height:0!important}
.conv-head{position:relative;display:flex;align-items:center;justify-content:space-between;min-height:78px!important;padding:8px 17px!important;
 background:linear-gradient(90deg,#fff8edf9 0%,#fffdfaef 45%,#fff9eaf0 100%),url('/assets/tien-gioi-landscape.svg') right center/auto 153px no-repeat!important;
 border-bottom:1px solid #ead5b5!important;color:#463121!important;flex:0 0 auto;z-index:1}
.conv-identity{display:flex;align-items:center;gap:12px;min-width:0}
.conv-avatar{background:linear-gradient(130deg,#e6bb73,#b7792b);border-radius:50%;height:43px;width:43px;min-width:43px;display:grid;place-items:center;color:white;font-size:22px;font-weight:700;box-shadow:0 3px 8px #ac803b25}
.conv-person{min-width:0;display:block}
.conv-head .conv-title{font-size:20px!important;color:#6b431e!important;font-weight:800!important;display:block!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.conv-head small{color:#5f5148!important;font-size:12px!important;margin-top:3px!important;white-space:nowrap}
.conv-head .toolbar{gap:7px!important;flex-wrap:nowrap!important}
.conv-head .btn{background:#fffaf4!important;color:#8d6337!important;border:1px solid #dabc98!important;border-radius:10px!important;padding:8px 12px!important;white-space:nowrap;font-size:12px!important}
.conv-head .btn.danger{border-color:#c74d40!important;background:#fff8f3!important;color:#a3352f!important}
.conv-head .btn:hover{background:#fff0da!important}
.badge{border:1px solid #b8d9a3!important;background:#e5f6da!important;color:#2b703d!important;border-radius:999px!important;font-weight:700!important}
.badge.closed{background:#f1f1f1!important;border-color:#d0d0d0!important;color:#666!important}
.messages{display:flex!important;flex:1!important;flex-direction:column!important;gap:13px!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;padding:18px 58px 20px!important;
 background:linear-gradient(180deg,#fffdfbcc,#fffdfa92 70%,#fffdfbda),url('/assets/tien-gioi-landscape.svg') left bottom/auto 150px no-repeat,#fffdfb!important;
 scrollbar-color:#e3caa5 #fffbf5!important;overscroll-behavior:contain}
.messages .empty{color:#98836d!important}
.messages .bubble{position:relative;align-self:flex-start!important;max-width:min(69%,620px)!important;padding:12px 15px!important;min-width:125px!important;
 border:1px solid #ebe1d7!important;background:linear-gradient(140deg,#fffefd,#f9f7f5)!important;color:#352a22!important;
 border-radius:16px 16px 16px 5px!important;box-shadow:0 4px 16px #72513716!important;line-height:1.45}
.messages .bubble.staff{align-self:flex-end!important;background:linear-gradient(145deg,#fff5e2,#fdf0d6)!important;border:1px solid #e9bc78!important;color:#382719!important;border-radius:16px 16px 5px 16px!important;box-shadow:0 4px 13px #9868321b!important}
.messages .bubble-avatar{position:absolute;top:4px;left:-40px;display:grid;place-items:center;width:29px;height:29px;border-radius:50%;background:linear-gradient(140deg,#e5be76,#bf8636);color:white;font-weight:800;font-size:13px;box-shadow:0 2px 7px #aa773b26}
.messages .bubble.staff .bubble-avatar{left:auto;right:-40px;font-size:16px}
.messages .bubble:before,.messages .bubble.staff:before{display:none!important}
.messages .bubble-head{color:#6c5540!important;display:flex;justify-content:space-between;gap:12px;font-size:12px!important;margin:0 0 7px!important}
.messages .bubble.staff .bubble-head{color:#7b501b!important}
.messages .bubble time,.messages .bubble.staff time{color:#776b60!important;font-size:11px!important;white-space:nowrap}
.messages .bubble-body,.messages .bubble.staff .bubble-body{color:#31251b!important;white-space:pre-wrap!important;line-height:1.55;font-size:13px!important;overflow-wrap:anywhere}
.messages .bubble .manage{opacity:.7!important;margin:7px 0 0!important}
.messages .bubble .manage button{color:#806345!important}
.messages .bubble .tg-media-anchor{display:block!important;width:fit-content;max-width:100%;margin:6px 0!important;padding:3px!important;border:1px solid #e1c9a7!important;background:#fffbf3!important;border-radius:12px!important}
.messages .bubble .tg-chat-image{display:block;max-width:min(100%,320px)!important;max-height:320px!important;border-radius:9px!important;object-fit:contain}
.composer{position:relative;display:flex!important;flex-direction:column!important;gap:8px!important;background:#fffcf7!important;border-top:1px solid #ead7b7!important;padding:12px 14px 10px!important;flex:0 0 auto}
.composer .shortcuts{padding:0!important;display:flex!important;flex-wrap:nowrap!important;gap:8px!important;white-space:nowrap;overflow-x:auto;min-height:34px;max-height:34px;scrollbar-width:thin;scrollbar-color:#ddbd88 transparent}
.composer .shortcut{flex:0 0 auto;background:#fffaf4!important;color:#64472f!important;border:1px solid #e1c49e!important;border-radius:999px!important;padding:7px 13px!important;font-size:12px!important}
.composer .shortcut:hover{background:#fff0d4!important}
.composer .compose-input{display:grid!important;grid-template-columns:minmax(0,1fr) 140px 145px!important;grid-template-rows:minmax(58px,auto) auto auto;gap:8px!important;min-width:0;align-items:stretch;position:relative;
 background:#fffcf8!important;border:1px solid #d8b587!important;border-radius:12px!important;padding:8px 9px 0!important}
.composer textarea{grid-column:1!important;grid-row:1!important;align-self:stretch;min-height:58px!important;height:58px!important;max-height:140px!important;min-width:0;resize:vertical!important;
 border:0!important;border-radius:8px!important;background:transparent!important;color:#3c3025!important;font-size:14px!important;line-height:1.5;padding:8px 6px!important;box-shadow:none!important}
.composer textarea:focus{box-shadow:inset 0 0 0 1px #daa95535!important;outline:none!important}
.composer textarea::placeholder{color:#928173!important}
.composer #photo-pick{grid-column:2!important;grid-row:1!important;background:#fffdfa!important;color:#9a632a!important;border:1px solid #dfbb8b!important;min-height:49px!important;height:auto!important;min-width:0!important;white-space:nowrap!important;font-size:13px!important;font-weight:800!important;border-radius:10px!important;padding:6px 9px!important}
.composer #photo-pick:hover{background:#fff2df!important}
.composer .composer-actions{display:contents!important}
.composer .composer-actions .btn{grid-column:3!important;grid-row:1!important;align-self:stretch;width:100%!important;min-width:0!important;min-height:48px!important;margin:0!important;padding:9px!important;
 color:#fff9ea!important;border:1px solid #b88537!important;border-radius:10px!important;background:linear-gradient(125deg,#dfb36a,#a66c24)!important;box-shadow:0 2px 6px #a0753850!important;font-size:13px!important;font-weight:800}
.composer .tg-photo-preview{grid-column:1/-1!important;grid-row:2!important;margin:0!important;display:none!important;gap:10px!important;padding:8px!important;background:#fff6e8!important;border:1px dashed #d3ad79!important;color:#5a3e22!important;border-radius:9px!important}
.composer .tg-photo-preview.has-file{display:flex!important}
.composer .tg-photo-preview img{width:65px!important;height:56px!important;max-width:65px!important;max-height:56px!important;border-radius:7px!important;background:white}
.composer .tg-photo-preview span{color:#67513a!important}
.composer .preview-remove{color:#9b453b!important;background:#fff!important;border:1px solid #dbb09e!important}
.composer .composer-actions small{grid-column:1/-1!important;grid-row:3!important;display:block!important;text-align:left;flex:auto!important;margin:0!important;padding:2px 0 5px!important;color:#866f58!important;font-size:11px!important;line-height:1.3}
.customer-panel{display:flex!important;background:#fffdfb!important;border-color:#e1c49e!important;color:#413024!important;min-height:0}
.customer-panel .panel-head{background:#fffdfa!important}
.customer-panel .panel-head h2:before{content:'♙';display:inline-block;color:#b98131;margin-right:10px;font-size:22px}
.customer-panel .profile-close{background:#fffaf2!important;border:1px solid #dfbd93!important;border-radius:11px!important;color:#b17c33!important;min-height:33px;min-width:33px}
.customer-panel .customer{display:flex!important;flex-direction:column;align-items:stretch;gap:0!important;overflow-y:auto;padding:18px 18px!important;color:#3e2f23!important;min-height:0}
.customer-panel .customer-avatar{align-self:center;width:82px!important;height:82px!important;min-width:82px!important;border-radius:50%!important;background:radial-gradient(circle at 36% 20%,#fffefa,#f5d6a2,#cd9651)!important;border:5px solid #fff8eb!important;box-shadow:0 0 0 1px #edc88f,0 3px 12px #ac844339!important;font-size:37px!important;color:#996021!important;margin:8px 0 14px}
.customer-panel .customer h3{font-size:21px!important;line-height:1.3;color:#643a18!important;text-align:center!important;margin-bottom:23px!important;padding-bottom:20px!important;position:relative}
.customer-panel .customer h3:after{content:'◇';position:absolute;left:10%;right:10%;bottom:2px;color:#bc863b;display:block;height:14px;text-align:center;font-size:21px;line-height:10px;border-bottom:1px solid #e2be90}
.customer-panel .info-row{border-bottom:1px solid #eee1d2!important;padding:10px 0 11px!important;width:100%;color:#3f3026!important}
.customer-panel .info-row small{font-size:13px!important;font-weight:600;color:#7b6956!important;margin-bottom:5px!important}
.customer-panel .info-row div{font-size:13px!important;line-height:1.5;color:#38291e!important;overflow-wrap:anywhere}
.customer-panel .info-row:nth-of-type(1) small:before{content:'✉';color:#a37433;margin-right:8px}
.customer-panel .info-row:nth-of-type(2) small:before{content:'↝';color:#a37433;margin-right:8px}
.customer-panel .info-row:nth-of-type(3) small:before{content:'◷';color:#a37433;margin-right:8px}
.customer-panel .info-row:nth-of-type(4) small:before{content:'♙';color:#a37433;margin-right:8px}
.customer-panel .info-row:nth-of-type(5) small:before{content:'#';color:#a37433;margin-right:8px}
.customer-panel .customer-note{font-size:12px!important;line-height:1.5!important;color:#7a6857!important;background:#faf8f3;border:1px solid #e6dcd2;border-radius:11px;padding:9px 11px!important;margin-top:12px!important}
.footer-note{display:none!important}
.archive-delete{background:#fffaf7!important;border-color:#e5c6b0!important;color:#a34532!important}
.archive-pager{color:#8e6643!important}
.toast{background:#fffaf0!important;color:#64452a!important;border-color:#d3a966!important;box-shadow:0 10px 30px #6b482133!important}
.login-page{background:linear-gradient(160deg,#fffdf8,#f9ecd6),url('/assets/tien-gioi-landscape.svg') right bottom/auto 250px no-repeat!important}
.login-card{background:#fffaf2!important;color:#3e2b18!important;border:1px solid #d1ab77!important;box-shadow:0 22px 75px #6c44172b!important}
.login-card h1{color:#995f20!important}.login-card p{color:#72583e!important}.login-card .field{color:#805629!important}.login-card .brand-title{color:#a16a2b!important}.login-card .brand-sub{color:#9b7852!important}
.login-card .crest{background:linear-gradient(120deg,#fffcf6,#f3dfb7)!important}
.login-card .input{background:#fff!important;color:#3b281a!important;border-color:#e2c7a6!important}
.login-card .btn.primary{background:linear-gradient(110deg,#e6ba71,#b77d2c)!important;color:#fff9ea!important}
/* Tablet: preserve existing sliding customer details. */
@media(max-width:1260px){
 .dashboard,.dashboard.info-open,.dashboard.info-closed{grid-template-columns:minmax(242px,298px) minmax(0,1fr)!important}
 .dashboard .customer-panel{display:none!important}
 .dashboard.info-open .customer-panel{display:flex!important;position:fixed!important;right:12px!important;top:73px!important;bottom:12px!important;width:min(325px,calc(100vw - 24px))!important;z-index:90;box-shadow:0 16px 45px #6b492c3b!important}
 .header .top-actions .pill:nth-child(2){display:none!important}
 .kpi{padding-left:68px!important}.kpi:before{left:13px!important;width:40px!important;height:40px!important;font-size:23px!important}
 .composer .compose-input{grid-template-columns:minmax(0,1fr) 107px 115px!important}
}
@media(max-width:980px){
 .header-identity{gap:9px}.header-brand-logo{width:42px;height:42px}.header-brand-name,.header-brand-name small{font-size:15px!important}.header-workspace{font-size:15px}
 .header .top-actions .pill:first-child{display:none!important}
 .header #profile-toggle{padding:7px 9px!important;font-size:10px!important}
 .header #logout-btn{padding:7px!important}
 .kpi small{font-size:12px!important}.kpi strong{font-size:27px!important}
}
@media(max-width:880px){
 .app-shell{height:auto!important;min-height:100dvh!important;overflow:visible!important}
 .work{height:auto!important;min-height:100dvh!important}
 .main{overflow:visible!important;padding:9px!important;flex:auto}
 .header{height:auto!important;min-height:66px!important;flex:0 0 auto;flex-wrap:wrap;justify-content:space-between;padding:9px 12px!important;gap:8px}
 .header .top-actions{width:100%;margin-left:0;justify-content:flex-start;overflow-x:auto;scrollbar-width:none}
 .header #profile-toggle{display:inline-flex}
 .kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;margin-bottom:9px!important}
 .kpi{height:69px;min-height:69px!important;padding:11px 5px 10px 62px!important;border-radius:12px!important}
 .kpi:before{left:12px!important;top:12px!important;width:36px!important;height:36px!important;font-size:20px!important}
 .kpi small{font-size:12px!important}.kpi strong{font-size:25px!important}
 .dashboard,.dashboard.info-open,.dashboard.info-closed{display:grid!important;grid-template-columns:minmax(0,1fr)!important;min-height:65dvh!important;gap:0!important}
 .dashboard:not(.show-detail) .chat-panel{display:none!important}
 .dashboard.show-detail .list-panel{display:none!important}
 .dashboard.show-detail .chat-panel{display:flex!important;height:calc(100dvh - 195px)!important;min-height:455px!important;max-height:none!important}
 .list-panel{min-height:60dvh!important}
 .thread-list{max-height:none!important}
 .dashboard.show-detail .messages{max-height:none!important;min-height:0!important;flex:1!important;padding:14px 46px!important}
 .bubble,.bubble.staff{max-width:88%!important}
 .conv-head{flex-wrap:wrap!important;min-height:75px!important;padding:10px!important}
 .conv-identity{flex:1;min-width:0;gap:8px}
 .conv-avatar{width:35px;height:35px;min-width:35px;font-size:17px}
 .conv-person{min-width:0}.conv-head .conv-title{font-size:16px!important}.conv-head small{font-size:11px!important}
 .conv-head .toolbar{flex-wrap:wrap!important}
 .messages .bubble-avatar{left:-33px;width:25px;height:25px}.messages .bubble.staff .bubble-avatar{right:-33px}
 .composer{padding:10px!important}
 .composer .compose-input{grid-template-columns:minmax(0,1fr) 92px 108px!important}
 .composer #photo-pick{font-size:11px!important;min-width:0!important}
 .composer .composer-actions .btn{font-size:12px!important;min-width:0!important}
}
@media(max-width:540px){
 .header-brand-logo{width:38px;height:38px}
 .header-brand-name,.header-brand-name small{font-size:13px!important}
 .header-brand-separator{height:27px}.header-workspace{font-size:14px}
 .header .top-actions{gap:5px}
 .header .language{max-width:104px!important}.header .btn{font-size:10px!important}
 .kpi{padding-left:53px!important}.kpi:before{left:8px!important;width:34px!important;height:34px!important}
 .kpi strong{font-size:23px!important}
 .dashboard.show-detail .chat-panel{height:calc(100dvh - 170px)!important;min-height:430px!important}
 .dashboard.show-detail .messages{padding:12px 41px!important}
 .composer{padding:8px!important;gap:5px!important}
 .composer .shortcuts{min-height:30px;max-height:30px}
 .composer .shortcut{font-size:11px!important;padding:6px 8px!important}
 .composer .compose-input{grid-template-columns:minmax(0,1fr) 43px 70px!important;gap:5px!important;padding:6px 7px 0!important}
 .composer #photo-pick{font-size:0!important;padding:4px!important;white-space:nowrap!important}
 .composer #photo-pick:before{content:'▧';font-size:21px;color:#a56e2d;display:block}
 .composer .composer-actions .btn{font-size:11px!important;padding:5px!important}
 .composer textarea{font-size:12px!important;min-height:53px!important;height:53px!important;padding:6px!important}
 .composer .composer-actions small{font-size:10px!important}
 .messages .bubble{font-size:12px!important;min-width:102px!important;max-width:93%!important;padding:9px 10px!important}
 .messages .bubble-head{font-size:10px!important}
 .customer-panel .panel-head h2{font-size:18px!important}
}
/* Resolve strong legacy V4.2 selectors on visitor bubble text. */
.messages .bubble .bubble-body{color:#33271d!important}
.messages .bubble.staff .bubble-body{color:#33271d!important}
.messages .bubble .bubble-head{color:#674d36!important}
.messages .bubble.staff .bubble-head{color:#725028!important}
.messages .bubble time{color:#76675a!important}
.conv-title:before{content:none!important;display:none!important}
@media(max-width:880px){
 .conv-head .mobile-back{font-size:0!important;min-width:35px!important;max-width:35px!important;width:35px!important;min-height:34px!important;height:34px!important;padding:0!important;margin:0!important;flex:0 0 35px!important;display:inline-flex!important;align-items:center;justify-content:center;line-height:1}
 .conv-head .mobile-back:after{content:'←'!important;color:#ae7835!important;font-size:20px!important;line-height:1!important}
 .conv-head .mobile-back:hover{background:#fff0dc!important}
}
/* Final density and visual contrast refinements. */
.messages{gap:10px!important}
.messages .bubble,.messages .bubble.staff{padding:9px 12px!important}
.messages .bubble .bubble-head{margin-bottom:4px!important}
.messages .bubble .manage{margin-top:3px!important}
.messages .bubble.staff>small{color:#846c4d!important}
.header #notify-btn:after{content:'🔔'!important;font-size:16px!important}
/* Hide legacy notification icon injected as :before at tablet widths. */
.header #notify-btn:before{content:none!important;display:none!important}
