/* Tiên Giới Truyện 3D — CSKH Staff Sidebar V4.7.2
   Screenshot-inspired split rail + scrollable Inbox groups.
   Backend-neutral presentation only. Existing chat filters, archive and controls remain functional. */
#app .app-shell{grid-template-columns:64px 242px minmax(0,1fr)!important}
#app .sidebar.hd-iconrail{padding:12px 5px 10px!important;gap:5px!important;background:#eff0f2!important}
#app .hd-rail-mark{margin-bottom:6px!important;width:39px!important;height:39px!important;background:#1f2937!important;color:#f6d58e!important}
#app .hd-rail-button{width:51px!important;min-height:51px!important;height:auto!important;display:flex!important;align-items:center;justify-content:center;flex-direction:column;gap:4px!important;border-radius:10px!important;color:#58616e!important;font-weight:700!important;padding:6px 1px!important}
#app .hd-rail-button .hd-rail-glyph{font-size:19px;line-height:20px}
#app .hd-rail-button .hd-rail-label{font-size:9px;line-height:12px;text-align:center;font-weight:750;white-space:nowrap;max-width:49px;overflow:hidden;text-overflow:ellipsis}
#app .hd-rail-button.active,#app .hd-rail-button:hover{background:#dde8f6!important;color:#224c7c!important}
#app .hd-rail-button.hd-rail-inactive{opacity:.68}
#app .hd-rail-button.hd-rail-inactive:hover{background:#e9edf3!important;color:#58616e!important}
#app .hd-rail-spacer{min-height:10px!important}
#app .hd-rail-avatar{width:34px!important;height:34px!important;min-width:34px!important;margin:7px auto 0!important}
#app .hd-folders{padding:0!important;background:#f8f9fa!important;overflow:hidden!important}
#app .hd-folder-brand{min-height:66px!important;flex:0 0 66px!important;padding:12px 14px!important;margin:0!important;background:#f8f9fb!important}
#app .hd-folder-brand strong{font-size:12px!important;font-weight:900!important;color:#243044!important}
#app .hd-folder-brand small{font-size:10px!important;color:#617085!important;font-weight:650!important}
#app .hd-side-inbox-heading{height:57px;flex:0 0 57px;display:flex;align-items:center;justify-content:space-between;padding:0 14px;background:#f8f9fb}
#app .hd-side-inbox-heading strong{font-size:16px;color:#1d2939;font-weight:850}
#app .hd-side-refresh{width:30px;height:30px;border:0;border-radius:9px;background:#1e293b!important;color:#fff!important;font-size:21px;font-weight:700;line-height:1;display:grid;place-items:center;cursor:pointer}
#app .hd-side-refresh:hover{background:#325a87!important}
#app .hd-side-menu-scroll{flex:1 1 auto;min-height:0;min-width:0;overflow-y:auto;overflow-x:hidden;padding:2px 11px 15px;scrollbar-width:thin;scrollbar-color:#b9c3d0 transparent}
#app .hd-side-section{margin:9px 0 16px;min-width:0}
#app .hd-side-section-head{display:flex;align-items:center;justify-content:space-between;gap:5px;min-height:35px;width:100%;padding:5px 8px;border:0;background:transparent;color:#354354;font-size:12px;font-weight:850;text-align:left;cursor:pointer}
#app .hd-side-section-head .hd-group-chevron{font-size:18px;line-height:1;color:#69798c;transform:rotate(0);transition:transform .15s}
#app .hd-side-section-head[aria-expanded="false"] .hd-group-chevron{transform:rotate(-90deg)}
#app .hd-side-section-body[hidden]{display:none!important}
#app .hd-side-section-body{display:flex;flex-direction:column;gap:2px}
#app .hd-folders .hd-folder-item{min-height:35px!important;padding:7px 9px!important;margin:0!important;font-size:11.5px!important;gap:8px!important;color:#3f4c5d!important;font-weight:720!important;line-height:1.4;border-radius:8px!important}
#app .hd-folders .hd-folder-item .hd-side-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 15px;min-width:15px;height:17px;color:#718093;font-size:13px;font-weight:800}
#app .hd-folders .hd-folder-item>span:nth-child(2){flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#app .hd-folders .hd-folder-item b{border-radius:9px!important;background:#e7ebf0!important;color:#43566b!important;min-width:22px;padding:2px 5px;font-weight:850!important}
#app .hd-folders .hd-folder-item.active{background:#e1eafb!important;color:#174b85!important;font-weight:850!important}
#app .hd-folders .hd-folder-item.active .hd-side-icon{color:#1f5f9b!important}
#app .hd-side-disabled{cursor:not-allowed!important;opacity:.64}
#app .hd-folders .hd-side-disabled:hover{background:transparent!important;color:#5a6778!important}
#app .hd-disabled-mark{font-size:11px;color:#9aa5b3;flex:0 0 auto}
#app .hd-channel-dot{display:inline-flex;flex:0 0 8px;min-width:8px;height:8px;background:var(--channel-color);border-radius:50%;margin-left:2px}
#app .hd-folder-bottom{flex:0 0 auto!important;padding:12px!important;margin-top:0!important;background:#f8f9fb!important;border-top:1px solid #e1e5eb!important}
#app .hd-folder-bottom strong{font-size:10px!important;color:#35485a!important;font-weight:750!important}
#app .hd-folder-bottom small{font-size:9px!important;color:#637287!important;line-height:1.4!important}
/* Contrast, including light-on-dark alternate theme in employee portal */
html:not([data-cskh-theme-resolved="dark"]) #app .hd-side-inbox-heading strong{color:#1d2939!important}
html:not([data-cskh-theme-resolved="dark"]) #app .hd-side-section-head{color:#2b3a4d!important}
html:not([data-cskh-theme-resolved="dark"]) #app .hd-folders .hd-folder-item{color:#334155!important}
html:not([data-cskh-theme-resolved="dark"]) #app .hd-folders .hd-folder-item.active{color:#174b85!important}
html[data-cskh-theme-resolved="dark"] #app .sidebar.hd-iconrail,
html[data-cskh-theme-resolved="dark"] #app .hd-folders,
html[data-cskh-theme-resolved="dark"] #app .hd-folder-brand,
html[data-cskh-theme-resolved="dark"] #app .hd-side-inbox-heading,
html[data-cskh-theme-resolved="dark"] #app .hd-folder-bottom{background:#141c28!important;border-color:#303d4f!important}
html[data-cskh-theme-resolved="dark"] #app .hd-side-section-head,
html[data-cskh-theme-resolved="dark"] #app .hd-side-inbox-heading strong,
html[data-cskh-theme-resolved="dark"] #app .hd-folders .hd-folder-item{color:#e8f0fb!important}
html[data-cskh-theme-resolved="dark"] #app .hd-side-disabled{color:#b5c3d7!important}
html[data-cskh-theme-resolved="dark"] #app .hd-folder-item.active{background:#293c55!important;color:#f0f6ff!important}
html[data-cskh-theme-resolved="dark"] #app .hd-side-section-head .hd-group-chevron,
html[data-cskh-theme-resolved="dark"] #app .hd-side-icon{color:#a8bad1!important}
html[data-cskh-theme-resolved="dark"] #app .hd-folder-bottom strong{color:#e0eaf7!important}
html[data-cskh-theme-resolved="dark"] #app .hd-folder-bottom small{color:#b6c5d7!important}
html[data-cskh-theme-resolved="dark"] #app .hd-rail-button{color:#bac8d9!important}
html[data-cskh-theme-resolved="dark"] #app .hd-rail-button.active{color:#d8e8ff!important}
/* Density improvements: responsive collapses the folder column instead of truncating chat content. */
@media(min-width:1441px){#app .app-shell{grid-template-columns:64px 242px minmax(0,1fr)!important}}
@media(max-width:1440px) and (min-width:981px){#app .app-shell{grid-template-columns:60px 210px minmax(0,1fr)!important}}
@media(max-width:1200px) and (min-width:981px){#app .app-shell{grid-template-columns:56px 194px minmax(0,1fr)!important}}
@media(max-width:980px){#app .app-shell{grid-template-columns:54px minmax(0,1fr)!important}#app .hd-folders{display:none!important}#app .hd-rail-button{width:43px!important;min-height:44px!important}#app .hd-rail-button .hd-rail-label{font-size:8px!important;max-width:41px!important}}
@media(max-width:540px){#app .sidebar.hd-iconrail{padding-inline:4px!important}#app .hd-rail-button{width:40px!important;min-height:42px!important}#app .hd-rail-avatar{width:32px!important;height:32px!important}}
html.hd-hide-labels #app .app-shell{grid-template-columns:64px minmax(0,1fr)!important}
html.hd-hide-labels #app .hd-folders{display:none!important}
html.hd-hide-labels #app .work{grid-column:2!important}

@media(max-width:980px){html.hd-hide-labels #app .app-shell{grid-template-columns:54px minmax(0,1fr)!important}}
