/* Tiên Giới Truyện 3D — CSKH V4.7.3: Hội thoại / ticket-style list
   Works on existing real chats. No assignment / ticket backend is implied. */
#app .hd-tickets-panel{min-width:0!important;display:flex!important;flex-direction:column!important;background:#fff!important;overflow:hidden!important}
#app .hd-tickets-head{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;min-height:69px;padding:16px 15px 11px;background:#fff;border-bottom:1px solid #e9edf3}
#app .hd-tickets-heading{min-width:0;display:flex;flex-direction:column;gap:4px}
#app .hd-tickets-heading h2{font:800 16px/1.3 var(--hd-font)!important;letter-spacing:-.015em;color:#1e293b!important;margin:0!important}
#app .hd-tickets-heading small{font:600 10px/1.4 var(--hd-font)!important;color:#64748b!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#app .hd-tickets-tools{display:flex;align-items:center;gap:6px;flex:0 0 auto}
#app .hd-tickets-icon-btn{width:32px;height:32px;display:grid;place-items:center;padding:6px;border:1px solid transparent;border-radius:8px;background:#fff;color:#344054;cursor:pointer}
#app .hd-tickets-icon-btn svg{width:18px;height:18px;display:block}
#app .hd-tickets-icon-btn:hover,#app .hd-tickets-icon-btn[aria-expanded="true"],#app .hd-tickets-icon-btn.active{background:#eaf2ff!important;border-color:#bfd8f7!important;color:#1e5a99!important}
#app .hd-tickets-icon-btn:disabled{opacity:.42;cursor:not-allowed}
#app .hd-tickets-search{display:flex;align-items:center;position:relative;gap:8px;margin:14px 12px 9px;padding:0 10px;height:40px;border:1px solid #cbd4df;border-radius:10px;background:#fff;min-width:0}
#app .hd-tickets-search:focus-within{border-color:#4c87ca;box-shadow:0 0 0 3px #4b90df1a}
#app .hd-tickets-search>svg{width:18px;height:18px;flex:0 0 18px;color:#4b5563}
#app .hd-tickets-search .input{min-width:0;flex:1;box-shadow:none!important;border:none!important;border-radius:0!important;height:37px!important;background:transparent!important;padding:4px 0!important;font:600 12px/1.4 var(--hd-font)!important;color:#1f2937!important}
#app .hd-tickets-search .input:focus{outline:none!important;box-shadow:none!important}
#app .hd-tickets-search .input::placeholder{color:#697586!important;opacity:1!important;font-weight:500!important}
#app .hd-tickets-clear{width:22px;height:25px;flex:0 0 22px;border:0;background:transparent;color:#6b7280;font-size:18px;line-height:1;cursor:pointer}
#app .hd-tickets-clear[hidden]{display:none!important}
#app .hd-ticket-filter-options[hidden]{display:none!important}
#app .hd-ticket-filter-options{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 12px 9px;padding:10px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px}
#app .hd-ticket-filter-options label{min-width:0;display:flex;flex-direction:column;gap:5px;font-size:10px!important;color:#475569!important;font-weight:800!important}
#app .hd-ticket-filter-options select{display:block;width:100%;min-width:0;height:34px;padding:6px 5px;border:1px solid #cfd8e3;border-radius:7px;font-size:11px!important;font-weight:600!important;background:#fff!important;color:#182a42!important}
/* Existing inbox/archive buttons remain in DOM for working sidebar navigation;
   the new panel shows status and data count instead of duplicated navigation tabs. */
#app .hd-tickets-panel .inbox-tabs{display:none!important}
#app .hd-tickets-results{display:flex;justify-content:space-between;align-items:center;gap:6px;padding:11px 13px 7px;background:#fff;flex:0 0 auto}
#app .hd-tickets-results strong{font-size:12px!important;font-weight:850!important;color:#283445!important}
#app .hd-tickets-results span{font-size:11px!important;color:#5c6776!important;font-weight:750!important}
#app .hd-tickets-panel .thread-list{padding:4px 8px 12px!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;flex:1 1 auto!important}
#app .hd-tickets-panel .thread-row{margin:4px 0 8px!important;overflow:visible!important;border-radius:11px!important}
#app .hd-tickets-panel .thread{display:flex!important;align-items:flex-start!important;position:relative;min-width:0!important;width:100%!important;min-height:102px!important;border-radius:10px!important;border:1px solid #edf0f4!important;background:#fff!important;padding:15px 10px 12px!important;gap:10px!important;text-align:left!important;box-sizing:border-box!important}
#app .hd-tickets-panel .thread:hover{border-color:#d4e4fa!important;background:#f8fbff!important}
#app .hd-tickets-panel .thread.selected{padding-left:10px!important;background:#e8eef7!important;border-color:#dbe5f3!important}
#app .hd-tickets-panel .thread .avatar{width:37px!important;height:37px!important;min-width:37px!important;flex:0 0 37px!important;margin-top:2px!important}
#app .hd-tickets-panel .thread .thread-info{display:flex!important;flex:1;min-width:0!important;flex-direction:column!important;gap:5px!important}
#app .hd-tickets-panel .hd-ticket-person{display:flex;align-items:center;min-width:0;gap:6px;justify-content:space-between}
#app .hd-tickets-panel .thread .hd-ticket-person strong{font-weight:850!important;font-size:12px!important;color:#253348!important;min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#app .hd-tickets-panel .thread .hd-ticket-person time{flex:0 0 auto;font-size:10px!important;color:#68778b!important;font-weight:650!important}
#app .hd-tickets-panel .thread .hd-ticket-preview{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#4c5d70!important;font-size:11px!important;font-weight:600!important;margin:0!important}
#app .hd-tickets-panel .thread .thread-meta{display:flex!important;align-items:center;margin:3px 0 0!important;gap:5px!important}
#app .hd-tickets-panel .thread .badge{color:#546275!important;background:#eff2f6!important;border:1px solid #e1e7ee!important;padding:3px 6px;font-weight:750!important}
#app .hd-tickets-panel .thread.selected .badge:not(.closed){color:#1d5a9d!important;background:#e0ebff!important;border-color:#c4dafb!important}
#app .hd-tickets-panel .thread .unread{position:absolute;right:10px;bottom:13px!important;font-size:10px!important;min-width:20px!important;height:20px!important;display:grid!important;place-items:center!important;border-radius:50%!important}
#app .hd-tickets-panel .empty{font-size:12px!important;color:#66788d!important;padding:25px 16px!important;text-align:center!important}
#app .hd-tickets-panel .archive-pager{padding:9px!important;flex:0 0 auto!important}
/* Dark mode - only employee portal, keep the novel website's mode separate. */
html[data-cskh-theme-resolved="dark"] #app .hd-tickets-panel,
html[data-cskh-theme-resolved="dark"] #app .hd-tickets-head,
html[data-cskh-theme-resolved="dark"] #app .hd-tickets-results,
html[data-cskh-theme-resolved="dark"] #app .hd-tickets-search{background:#192331!important;border-color:#344256!important}
html[data-cskh-theme-resolved="dark"] #app .hd-tickets-heading h2,
html[data-cskh-theme-resolved="dark"] #app .hd-tickets-results strong,
html[data-cskh-theme-resolved="dark"] #app .hd-tickets-search .input{color:#edf3ff!important}
html[data-cskh-theme-resolved="dark"] #app .hd-tickets-heading small,
html[data-cskh-theme-resolved="dark"] #app .hd-tickets-results span,
html[data-cskh-theme-resolved="dark"] #app .hd-tickets-search .input::placeholder{color:#b5c3d4!important}
html[data-cskh-theme-resolved="dark"] #app .hd-tickets-search svg,
html[data-cskh-theme-resolved="dark"] #app .hd-tickets-icon-btn{color:#b7c6da!important}
html[data-cskh-theme-resolved="dark"] #app .hd-tickets-icon-btn{background:transparent!important}
html[data-cskh-theme-resolved="dark"] #app .hd-tickets-icon-btn:hover,
html[data-cskh-theme-resolved="dark"] #app .hd-tickets-icon-btn.active{background:#283e5a!important;color:#deebff!important}
html[data-cskh-theme-resolved="dark"] #app .hd-ticket-filter-options{background:#202d3e!important;border-color:#3b5068!important}
html[data-cskh-theme-resolved="dark"] #app .hd-ticket-filter-options label{color:#c8d5e7!important}
html[data-cskh-theme-resolved="dark"] #app .hd-ticket-filter-options select{background:#141d2a!important;color:#eef4ff!important;border-color:#43546a!important}
html[data-cskh-theme-resolved="dark"] #app .hd-tickets-panel .thread-list{background:#182231!important}
html[data-cskh-theme-resolved="dark"] #app .hd-tickets-panel .thread{background:#212e40!important;border-color:#34465b!important}
html[data-cskh-theme-resolved="dark"] #app .hd-tickets-panel .thread.selected{background:#2a4464!important;border-color:#50749d!important}
html[data-cskh-theme-resolved="dark"] #app .hd-tickets-panel .thread .hd-ticket-person strong{color:#f0f6ff!important}
html[data-cskh-theme-resolved="dark"] #app .hd-tickets-panel .thread .hd-ticket-person time,
html[data-cskh-theme-resolved="dark"] #app .hd-tickets-panel .thread .hd-ticket-preview{color:#c8d5e7!important}
html[data-cskh-theme-resolved="dark"] #app .hd-tickets-panel .thread .badge{color:#dce8fa!important;background:#304258!important;border-color:#52667f!important}
html[data-cskh-theme-resolved="dark"] #app .hd-tickets-clear{color:#b9cbe0!important}
@media(max-width:380px){#app .hd-ticket-filter-options{grid-template-columns:1fr}}
