/* Tiên Giới Truyện 3D – Fchat-inspired compact support workspace; Times New Roman */
:root{--cskh-font:'Times New Roman','Noto Serif SC','Songti SC','SimSun',serif}
html,body,#app,#app *{font-family:var(--cskh-font)!important}
.app-shell{grid-template-columns:76px minmax(0,1fr);min-height:620px}
.sidebar{padding:18px 7px;gap:20px;background:linear-gradient(#0d192a,#101f32)}
.sidebar .brand{gap:6px}.sidebar .brand-title{font-size:9px;letter-spacing:0;word-break:break-word}.sidebar .brand-sub,.sidebar .nav-note,.sidebar .side-bottom{display:none}
.sidebar .crest{height:43px;min-width:43px;font-size:24px}.sidebar .nav-button{font-size:0;padding:14px 7px;text-align:center;min-height:46px}
.sidebar .nav-button:before{content:'☷';font-size:22px;color:#f0d196}
.sidebar .nav-button.active{border-color:#a88650;background:#26364a}
.header{min-height:66px;padding:9px 18px;background:linear-gradient(95deg,#0c2d61,#0a2758 57%,#102646);box-shadow:0 3px 10px #0004}
.header h1{font-size:23px}.header small{font-size:11px;color:#d4e4f3}
.main{padding:9px 12px}.kpis{gap:8px;margin-bottom:9px}.kpi{min-height:56px;padding:9px 9px 8px 45px;background:#12233b;border-radius:8px}
.kpi:before{width:29px;height:29px;left:9px;top:13px;font-size:16px}.kpi small{font-size:11px}.kpi strong{font-size:20px;margin-top:1px}
.dashboard,.dashboard.info-open{grid-template-columns:minmax(245px,300px) minmax(0,1fr) minmax(230px,275px);gap:8px}
.dashboard.info-closed{grid-template-columns:minmax(245px,300px) minmax(0,1fr)}
.dashboard.info-closed .customer-panel{display:none}
.panel{border-radius:9px;background:#112033}.list-panel{background:#f7fafc;color:#223248;border-color:#94a2b7}
.list-panel .panel-head{background:#f3f6fb;border-color:#dce2ec}.list-panel .panel-head h2{color:#233d5f}
.list-panel .search-wrap{padding:8px;border-color:#dce2ec}.list-panel .input,.list-panel select{background:#fff;color:#243c56;border-color:#b9c8d7;border-radius:7px}
.list-panel .input::placeholder{color:#687b90}.list-panel .thread{background:#fff;color:#23374e;border-bottom:1px solid #e4e9ef;padding:11px 8px;min-height:69px}
.list-panel .thread:hover{background:#eaf2fb}.list-panel .thread.selected{background:#cfe5ff;border-left:3px solid #1d68bc;padding-left:5px;box-shadow:none}
.list-panel .thread-info strong{color:#233d62}.list-panel .thread-info small{color:#60768c}.list-panel .avatar{border-radius:50%;background:#207bb8;color:#fff;border:0;width:35px;min-width:35px;height:35px;font-size:15px}
.list-panel .unread{background:#bf8d37;color:#fff}
.chat-panel{background:#dfe8ef;border-color:#8fa3b8}
.conv-head{background:#f8fafc;border-bottom:1px solid #cbd5e1;color:#213a51;min-height:56px;padding:8px 13px}
.conv-title{color:#1b405d;font-size:19px}.conv-title:before{background:#1e8bbb;border-color:#1e8bbb;color:#fff}
.conv-head small{color:#53687f}.toolbar .btn{border-color:#b1bfcc;background:#e9eff6;color:#2b4862}.toolbar .btn.danger{background:#fff4ed;color:#a85642;border-color:#e6c0ad}
.messages{background:#607d94;gap:10px;padding:14px 33px 18px}
.bubble{max-width:min(76%,660px);background:#f1f6fd;border:1px solid #cad9e8;border-radius:13px 13px 13px 4px;box-shadow:0 2px 7px #1b344326;color:#23374b;padding:8px 10px}
.bubble.staff{background:#e6edc8;border:1px solid #bacf91;color:#233e23;border-radius:13px 13px 4px 13px}
.bubble p,.bubble.staff p{color:#223647}.bubble.staff p{color:#233b25}
.bubble .bubble-head{color:#53677d}.bubble.staff .bubble-head{color:#567145}.bubble time,.bubble.staff time{color:#627887}
.bubble:before{background:#1b8cc0;border-color:#a9d4e8;color:#fff}.bubble.staff:before{background:#77973c;border-color:#d2e4a1;color:#fff}
.bubble .manage{opacity:.75}.bubble .manage button{color:#647c94}.bubble.staff .manage button{color:#5c7445}
.composer{background:#fbfdff;border-top:1px solid #c3d0df;padding:9px 11px;gap:7px;grid-template-columns:minmax(0,1fr) 90px 44px}
.composer .shortcuts{grid-column:1/-1;grid-row:1}.shortcut{background:#e6f0fa;border:1px solid #c7d7e6;color:#405d79}
.composer textarea{background:#fff;border:1px solid #9eb0c3;color:#21364b;grid-column:1;grid-row:2;border-radius:8px;height:61px;min-height:61px;padding:11px}
.composer textarea::placeholder{color:#71849a}.composer-actions{grid-column:2;grid-row:2}.composer-actions .btn{background:#166eb2;border-color:#135c92;color:white;font-size:12px}
.tg-photo-button{grid-column:3;grid-row:2;display:grid;place-items:center;border:1px solid #abbdd2;border-radius:8px;background:#e5f0fa;color:#175b87;cursor:pointer;font-size:20px}
.tg-photo-button:disabled{opacity:.45;cursor:not-allowed}.tg-photo-field{display:none!important}.tg-photo-preview{grid-column:1/-1;display:none;gap:9px;align-items:center;padding:8px;background:#eef5fb;border:1px solid #cad7e5;border-radius:8px;color:#24394f}
.tg-photo-preview.has-file{display:flex}.tg-photo-preview img{max-height:75px;max-width:130px;border-radius:6px;object-fit:contain}
.tg-photo-preview .btn{font-size:12px;background:#1e78b9;color:#fff;border:0}
.customer-panel{display:flex;background:#f8fbff;color:#21384c;border-color:#95a5b8}
.customer-panel .panel-head{background:#eff4fa;border-bottom:1px solid #d0dae5}.customer-panel .panel-head h2{color:#2a4764}.customer{padding:15px;gap:0}
.customer h3{color:#1e4260!important}.customer-avatar{background:#e5edf5;border-color:#7b9ab8;color:#315c7a;box-shadow:none}
.customer .info-row{border-color:#d7e1eb}.customer .info-row small{color:#647e95}.customer .info-row div{color:#223b52}
.customer .customer-note{font-size:11px;line-height:1.5;color:#6f7f8f;padding:11px 2px}
.profile-toggle,.profile-close{border:1px solid #bfcedd;background:#eaf0f7;color:#1e5375;border-radius:8px;padding:8px 10px;font-size:12px;cursor:pointer}
.profile-close{margin-left:auto}.tg-chat-image{max-width:min(100%,320px);max-height:265px;display:block;object-fit:contain;border-radius:8px;border:1px solid #abc1d0;background:white}
.tg-media-anchor{display:block;max-width:100%;text-decoration:none}.tg-media-loading{display:block;color:#51677c;font-size:11px}
.bubble.staff .tg-media-loading{color:#5e784b}
@media(max-width:1250px){.dashboard,.dashboard.info-open,.dashboard.info-closed{grid-template-columns:minmax(225px,275px) minmax(0,1fr)}.customer-panel{display:none!important}
.dashboard.info-open .customer-panel{display:flex!important;position:fixed;right:12px;top:70px;bottom:12px;width:min(320px,calc(100vw - 24px));z-index:90;box-shadow:0 8px 40px #0008}}
@media(max-width:880px){.app-shell{display:block}.sidebar{display:none}.header{min-height:56px}
.dashboard,.dashboard.info-open,.dashboard.info-closed{grid-template-columns:1fr}.dashboard.info-open .customer-panel{top:10px;right:10px;bottom:10px}
.dashboard.show-detail .chat-panel{min-height:68dvh;max-height:calc(100dvh - 180px)}
.composer{grid-template-columns:minmax(0,1fr) 74px 40px}.messages{padding:12px 27px}.bubble{max-width:85%}}
@media(max-width:430px){.composer{grid-template-columns:minmax(0,1fr) 70px 39px}.tg-chat-image{max-width:225px}}

@media(max-width:1250px){.header .top-actions .pill:nth-child(2){display:none!important}.header .top-actions{flex-wrap:wrap}.header #notify-btn{font-size:0;min-width:34px;padding:8px}.header #notify-btn:before{content:'🔔';font-size:14px}.customer-panel .profile-close{position:relative;z-index:91}}
@media(max-width:880px){.header .top-actions .pill:nth-child(1){display:none}.header .top-actions{width:100%}.header #profile-toggle{font-size:11px}.header .language{max-width:120px}}

/* V3.1: make the screenshot button clearly visible, rather than a 39–44px icon. */
.composer{grid-template-columns:minmax(0,1fr) 92px 112px}
.tg-photo-button{font-family:'Times New Roman',serif!important;font-size:13px!important;font-weight:700;padding:8px 9px;white-space:nowrap;min-height:56px;line-height:1.15}
.tg-photo-button:not(:disabled):hover{background:#d0e8fb;box-shadow:0 0 0 2px #1c6c9a22}
.tg-photo-button:disabled{opacity:.68;background:#e1e6eb;color:#626d78}
@media(max-width:880px){.composer{grid-template-columns:minmax(0,1fr) 82px 101px}.tg-photo-button{font-size:12px!important;padding:6px}}
@media(max-width:430px){.composer{grid-template-columns:minmax(0,1fr) 71px 91px}.tg-photo-button{font-size:11px!important;padding:5px 4px}}
