/* Workspace Tab Rail (Phase 2) — tab của workspace đang mở hiện ở rail trái */
body.ws-tabmode .app-sidebar .sidebar-nav { display: none; }   /* danh sách workspace đã vào ⊞ launcher */
.ws-tabrail { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-bottom: 6px; }
.ws-tabrail::-webkit-scrollbar { width: 6px; }
.ws-tabrail::-webkit-scrollbar-thumb { background: #4b5563; border-radius: 3px; }
.wtr-app { display: flex; align-items: center; gap: 9px; padding: 11px 14px 9px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 6px; }
.wtr-app-ic { font-size: 19px; flex-shrink: 0; }
.wtr-app-nm { font-size: 13px; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wtr-list { display: flex; flex-direction: column; gap: 1px; }
.wtr-item { display: flex; align-items: center; gap: 11px; padding: 9px 15px; background: transparent; border: none; border-left: 3px solid transparent; color: #cbd5e1; cursor: pointer; font-size: 13.5px; text-align: left; width: 100%; }
.wtr-item:hover { background: #374151; color: #fff; }
.wtr-item.active { background: #1f2937; color: #fff; border-left-color: #6366f1; font-weight: 700; }
.wtr-ic { width: 20px; text-align: center; font-size: 16px; flex-shrink: 0; }
.wtr-lb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Kho vận: ★ yêu thích + kéo thả sắp xếp (super_admin) */
.wtr-star { margin-left: auto; flex-shrink: 0; font-size: 15px; line-height: 1; color: #8a94a6; opacity: .55; cursor: pointer; padding: 2px 4px; border-radius: 4px; transition: opacity .12s, color .12s; }
.wtr-item:hover .wtr-star { opacity: 1; }
.wtr-star.on { opacity: 1; color: #f5c518; }
.wtr-star:hover { color: #f5c518; background: rgba(255,255,255,.08); }
body.ws-sidebar-collapsed .wtr-star { display: none; }
.wtr-item[draggable="true"] { cursor: grab; }
.wtr-item.wtr-dragging { opacity: .4; }
.wtr-item.wtr-over { box-shadow: inset 0 2px 0 #6366f1; }
/* Rail mini + RÊ CHUỘT bung (ĐẨY nội dung sang phải, không đè); rê ra tự thu. ☰ ẩn. */
.app-sidebar .sidebar-toggle { display: none !important; }
body.ws-sidebar-collapsed .wtr-app-nm,
body.ws-sidebar-collapsed .wtr-lb { display: none; }
body.ws-sidebar-collapsed .wtr-item,
body.ws-sidebar-collapsed .wtr-app { justify-content: center; padding-left: 0; padding-right: 0; }
body.ws-sidebar-collapsed.ws-rail-hover { margin-left: var(--ws-sidebar-width, 220px); }
body.ws-sidebar-collapsed.ws-rail-hover .app-sidebar { width: var(--ws-sidebar-width, 220px); }
body.ws-sidebar-collapsed.ws-rail-hover .wtr-app-nm,
body.ws-sidebar-collapsed.ws-rail-hover .wtr-lb { display: inline; }
body.ws-sidebar-collapsed.ws-rail-hover .wtr-item,
body.ws-sidebar-collapsed.ws-rail-hover .wtr-app { justify-content: flex-start; padding-left: 15px; padding-right: 15px; }
body.ws-sidebar-collapsed.ws-rail-hover .sidebar-brand { opacity: 1 !important; pointer-events: auto; }
/* ẩn thanh tab gốc trong content (đã mirror sang rail trái) */
.wtr-src-hidden { display: none !important; }

/* 3 kho (warehouse domain) mirror lên rail trái — trên các tab */
.wtr-domwrap { display: flex; flex-direction: column; gap: 1px; padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,.08); }
.wtr-domhd { font-size: 10px; font-weight: 700; letter-spacing: .6px; color: #94a3b8; padding: 5px 15px 2px; text-transform: uppercase; }
.wtr-dom.active { background: rgba(220,38,38,.2); color: #fff; border-left-color: #dc2626; }
body.ws-sidebar-collapsed .wtr-domhd { display: none; }
.wtr-grouphd { font-size: 10px; font-weight: 700; letter-spacing: .6px; color: #94a3b8; padding: 9px 15px 3px; text-transform: uppercase; }
.wtr-list > .wtr-grouphd:first-child { padding-top: 2px; }
body.ws-sidebar-collapsed .wtr-grouphd { display: none; }

/* SVG icon (RTM OS tab) trong rail: size + stroke trắng */
.wtr-ic svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
