/* Tiên Giới Truyện 3D • CSKH V4.2 • Layout-only overrides for original V4.1 staff app.
   Keep original CSS and all database permissions; do not move images to public URLs. */
:root{--v42-ink:#081727;--v42-navy:#10253b;--v42-navy-soft:#173149;--v42-gold:#e4b86a;--v42-fg:#f5ecdc;--v42-muted:#acbfd1}
.chat-panel{background:#0c1b2d!important;border:1px solid #44516b!important}
.conv-head{background:linear-gradient(110deg,#142c45,#0e2034)!important;border-bottom:1px solid #916e42!important;color:var(--v42-fg)!important}
.conv-head .conv-title{color:#f2c77a!important}.conv-head small{color:var(--v42-muted)!important}
.conv-head .btn{background:#203750!important;border:1px solid #6a7890!important;color:#f4eadb!important}
.conv-head .btn.danger{background:#403038!important;color:#ffd2b3!important;border-color:#9d6261!important}
.messages{background:radial-gradient(circle at 82% 16%,#1c3450 0,transparent 38%),radial-gradient(circle at 19% 81%,#132b44 0,transparent 41%),linear-gradient(180deg,#0b1c2f,#071522)!important;scrollbar-color:#96784e #0a1929!important;padding:18px 33px 24px!important}
.messages .empty{color:#b5c9d8!important}
.messages .bubble{background:linear-gradient(140deg,#213c58,#172e49)!important;border:1px solid #4b6881!important;color:#f8efe5!important;box-shadow:0 8px 20px #0003!important;border-radius:15px 15px 15px 5px!important}
.messages .bubble.staff{background:linear-gradient(135deg,#e5c98e,#f1e0bb)!important;border:1px solid #c99e53!important;color:#332819!important;border-radius:15px 15px 5px 15px!important}
.messages .bubble .bubble-head{color:#c8d8e9!important}.messages .bubble.staff .bubble-head{color:#5b4827!important}
.messages .bubble time{color:#aebed2!important}.messages .bubble.staff time{color:#735d3b!important}
.messages .bubble .bubble-body{color:#f8efe5!important;white-space:pre-wrap!important;line-height:1.6;overflow-wrap:anywhere}
.messages .bubble.staff .bubble-body{color:#34281c!important}
.messages .bubble .manage button{color:#dfbf7e!important}.messages .bubble.staff .manage button{color:#644c2f!important}
.messages .bubble .tg-media-anchor{display:block!important;width:fit-content;max-width:100%;margin:3px 0 8px!important;background:#091d31!important;border:1px solid #64829d!important;border-radius:12px!important;padding:4px!important;overflow:hidden}
.messages .bubble.staff .tg-media-anchor{background:#e9d6ac!important;border-color:#b99962!important}
.messages .bubble .tg-chat-image{display:block!important;max-width:min(100%,330px)!important;max-height:330px!important;width:auto!important;height:auto!important;object-fit:contain!important;border-radius:9px!important;cursor:zoom-in}
.composer{background:linear-gradient(180deg,#10263d,#0c1d31)!important;border-top:1px solid #8f7047!important;padding:12px 15px 14px!important;gap:10px!important}
.composer .shortcut{background:#1e354e!important;color:#e5eaf0!important;border:1px solid #4c617a!important}
.composer .shortcut:hover{background:#2b4561!important;border-color:#c6a068!important}
.composer .compose-input{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:stretch;gap:8px;min-width:0}
.composer textarea{grid-column:1;grid-row:1;background:#0b1a2b!important;color:#f9efdc!important;border:1px solid #997b50!important;border-radius:12px!important;min-height:66px!important;max-height:150px;font-size:14px!important;padding:12px 14px!important;outline:none!important}
.composer textarea:focus{border-color:#ecc885!important;box-shadow:0 0 0 2px #e8b96a25!important}
.composer textarea::placeholder{color:#a9b8c8!important}
.composer .tg-photo-button{grid-column:2;grid-row:1;background:#1b354f!important;border:1px solid #aa8654!important;color:#f4ce8a!important;min-width:104px!important;min-height:66px!important;border-radius:11px!important;white-space:normal!important}
.composer .tg-photo-button:hover{background:#29445d!important}
.composer .tg-photo-preview{grid-column:1/-1;grid-row:2;display:none!important;align-items:center;gap:12px;margin:0!important;padding:9px 11px!important;background:#132b43!important;border:1px dashed #a48a61!important;border-radius:11px!important;color:#dfebf5!important}
.composer .tg-photo-preview.has-file{display:flex!important}
.composer .tg-photo-preview img{flex:0 0 auto;width:72px!important;height:64px!important;max-width:72px!important;max-height:64px!important;object-fit:contain;background:#0b1a2b!important;border-radius:8px}
.composer .tg-photo-preview span{flex:1;min-width:0;color:#d7e1eb!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.composer .preview-remove{color:#ffd5be!important;background:#3c2e38!important;border:1px solid #a37168!important}
.composer .composer-actions small{color:#b6c9dc!important;line-height:1.4}
.composer .composer-actions .btn{background:linear-gradient(115deg,#d1a151,#f0cb81)!important;color:#292016!important;border:1px solid #e2b66e!important;border-radius:10px;font-weight:800}
.archive-closed-banner{background:#223349!important;color:#ebd4a2!important;border-top:1px solid #947147!important}
@media (max-width:880px){.messages{padding:12px 14px 18px!important}.composer{padding:9px!important}.messages .bubble,.messages .bubble.staff{max-width:91%!important}}
@media (max-width:430px){.composer .tg-photo-button{min-width:60px!important;font-size:0!important;padding:6px!important}.composer .tg-photo-button::before{content:'📎';font-size:21px;display:block}.composer textarea{min-height:56px!important;font-size:13px!important}.messages .bubble .tg-chat-image{max-height:240px!important}.composer .tg-photo-preview img{width:60px!important;height:58px!important}.composer .composer-actions small{display:none!important}}
