/* لایهٔ فضای کاری چله — رِیل آیکونی + سایدبار متنی. روی style.css سوار می‌شود. */
:root { --pl-rail-w: 60px; --pl-sidebar-w: 300px; }
html.sidebar-collapsed { --pl-sidebar-w: var(--pl-rail-w); }

.app-sidebar { flex-direction: row; }

.ws-rail {
    width: var(--pl-rail-w);
    flex-shrink: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 0;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.24);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
}
.ws-rail::-webkit-scrollbar { width: 0; }

.sidebar-panel {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
html.sidebar-collapsed .sidebar-panel { display: none; }

.ws-rail-brand {
    width: 42px; height: 42px; border-radius: 12px;
    background: var(--pl-gradient); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.2rem; text-decoration: none; flex-shrink: 0; margin-bottom: 2px;
}
.ws-rail-item {
    width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    color: rgba(255, 255, 255, 0.62); font-size: 1.15rem; text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.ws-rail-item:hover { background: rgba(255, 255, 255, 0.09); color: #fff; }
.ws-rail-item.active {
    background: var(--ws-accent, var(--pl-primary));
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.32);
}
.ws-rail-sep { width: 26px; height: 1px; background: rgba(255, 255, 255, 0.10); margin: 3px 0; flex-shrink: 0; }
.ws-rail-spacer { flex: 1 1 auto; }
.ws-rail-toggle {
    width: 42px; height: 38px; border: none; background: transparent; cursor: pointer;
    color: rgba(255, 255, 255, 0.55); border-radius: 10px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}
.ws-rail-toggle:hover { background: rgba(255, 255, 255, 0.09); color: #fff; }
html.sidebar-collapsed .ws-rail-toggle i { transform: rotate(180deg); }
.ws-rail-toggle i { transition: transform 0.25s ease; }

.ws-panel-title { display: flex; align-items: center; gap: 9px; min-width: 0; color: #fff; text-decoration: none; }
.ws-panel-title .ws-ic {
    width: 30px; height: 30px; border-radius: 9px; background: rgba(255, 255, 255, 0.10);
    display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0;
}
.ws-panel-title .ws-nm { font-size: 1.02rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* موبایل: رِیل و پنل همیشه با هم (بدون حالت جمع‌شده) */
@media (max-width: 991.98px) {
    html.sidebar-collapsed { --pl-sidebar-w: 300px; }
    .app-sidebar { width: 300px; }
    html.sidebar-collapsed .sidebar-panel { display: flex; }
}
