.ftree {
    --ftree-row-right-edge: 10px;
    --ftree-marker-size: 12px;
    --ftree-marker-half: 6px;
    --ftree-action-size: 26px;
    --ftree-action-half: 13px;
    --ftree-action-gap: 2px;
    --ftree-rail-center-offset: calc(var(--ftree-row-right-edge) + var(--ftree-marker-half));
    --ftree-action-right-edge: calc(var(--ftree-rail-center-offset) - var(--ftree-action-half));
    padding: 4px 0 8px;
}

.ftree-section-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
}

.ftree-section-header > span {
    min-width: 0;
    white-space: nowrap;
}

.ftree-section-header::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--ui-tree-line, rgba(255, 255, 255, 0.045));
    margin-left: 4px;
}

.ftree-section-header .ftree-section-add {
    order: 2;
    opacity: 0.6;
    margin-right: calc(var(--ftree-rail-center-offset) - 12px - var(--ftree-action-half));
}

.ftree-section-header .ftree-section-collapse {
    order: -1;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    border: none;
    background: none;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.12s;
}

.ftree-section-header .ftree-section-collapse :is(i, svg) {
    transform: rotate(0deg);
    transform-origin: center;
    transition: transform 0.15s;
}

.ftree-section-header .ftree-section-collapse[data-tree-collapse-mode="collapse"] :is(i, svg) {
    transform: rotate(90deg);
}

.ftree-section-header .ftree-section-collapse:hover {
    color: #e5e7eb;
}

.ftree-section-header .ftree-section-collapse:disabled {
    color: rgba(107, 114, 128, 0.35);
    cursor: default;
    pointer-events: none;
}

.ftree-section-header .ftree-section-add:hover {
    opacity: 1;
}

.ftree-section-empty {
    padding: 6px 12px 8px 28px;
    font-size: 11px;
    color: var(--text-muted, rgba(255, 255, 255, 0.35));
    font-style: italic;
}

.ftree-empty,
.ftree-loading,
.pinfo-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    gap: 6px;
}

.pinfo-card {
    padding: 12px;
}

.pinfo-cover {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    margin-bottom: 10px;
}

.pinfo-cover-drop {
    width: 128px;
    height: 128px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-bottom: 12px;
    position: relative;
    cursor: pointer;
    transition: box-shadow 0.15s, border-color 0.15s, outline-color 0.15s;
    flex-shrink: 0;
    overflow: hidden;
    outline: 2px dashed transparent;
    outline-offset: 2px;
}

.pinfo-cover-drop--empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255,255,255,0.04);
    border: 1.5px dashed rgba(107,114,128,0.45);
}

.pinfo-cover-drop--empty:hover {
    border-color: var(--accent-border-strong);
    background: rgba(var(--accent-rgb), 0.04);
}

.pinfo-cover-hint {
    font-size: 10px;
    color: #6b7280;
    pointer-events: none;
}


.pinfo-cover-drop:not(.pinfo-cover-drop--empty):hover {
    box-shadow: 0 2px 14px rgba(0,0,0,0.4);
}

.pinfo-cover-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    color: var(--accent);
    opacity: 0;
    transition: opacity 0.15s;
    pointer-events: none;
    border-radius: 12px;
}

.pinfo-cover-drop:not(.pinfo-cover-drop--empty):hover .pinfo-cover-overlay {
    opacity: 1;
}

.pinfo-cover-drop.drag-over .pinfo-cover-overlay {
    opacity: 1;
    background: rgba(var(--accent-rgb), 0.25);
}

.pinfo-cover-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0;
    transition: background 0.15s;
}

.pinfo-cover-drop:hover .pinfo-cover-remove {
    display: inline-flex;
}

.pinfo-cover-remove:hover {
    background: #dc2626;
}

.pinfo-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    pointer-events: none;
}

.pinfo-name {
    font-size: 13px;
    font-weight: 600;
    color: #e5e7eb;
    line-height: 1.3;
}

.pinfo-desc {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
    line-height: 1.5;
}

.pinfo-slug {
    font-size: 10px;
    color: #6b7280;
    margin-top: 2px;
}

.pinfo-stats {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.pinfo-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #9ca3af;
}

.pinfo-stat i {
    color: #6b7280;
    flex-shrink: 0;
}

.pinfo-feed-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    padding: 7px 8px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 7px;
    background: rgba(255,255,255,0.025);
    color: #a9afba;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.pinfo-feed-switch:hover {
    border-color: rgba(246, 185, 143, 0.32);
    background: rgba(246, 185, 143, 0.045);
    color: #f0d2bd;
}

.pinfo-feed-switch__copy {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.1;
}

.pinfo-feed-switch__copy i {
    color: #f6b98f;
    flex-shrink: 0;
}

.pinfo-feed-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pinfo-feed-switch__track {
    width: 30px;
    height: 16px;
    flex: 0 0 auto;
    position: relative;
    border-radius: 999px;
    background: rgba(107, 114, 128, 0.45);
    border: 1px solid rgba(255,255,255,0.08);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.pinfo-feed-switch__thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #c9ced7;
    transition: transform 0.15s ease, background 0.15s ease;
}

.pinfo-feed-switch.is-on .pinfo-feed-switch__track {
    background: rgba(246, 185, 143, 0.28);
    border-color: rgba(246, 185, 143, 0.46);
}

.pinfo-feed-switch.is-on .pinfo-feed-switch__thumb {
    transform: translateX(14px);
    background: #f6b98f;
}

.pinfo-feed-switch input:disabled + .pinfo-feed-switch__track,
.pinfo-feed-switch:has(input:disabled) {
    cursor: wait;
    opacity: 0.65;
}

.pinfo-section-label {
    font-size: 10px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 12px;
    margin-bottom: 4px;
}

/* FolderInfoPanel: цвет фона папки */
.finfo-bg-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}
.finfo-bg-input {
    width: 32px;
    height: 28px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    background: transparent;
    padding: 2px;
    cursor: pointer;
}
.finfo-bg-input:disabled { cursor: not-allowed; opacity: 0.5; }
.finfo-bg-text {
    flex: 1;
    height: 28px;
    font-size: 12px;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    color: #e5e7eb;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 6px;
    padding: 0 8px;
    outline: none;
}
.finfo-bg-text:focus { border-color: var(--accent-border-strong); }
.finfo-bg-clear {
    width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    color: #9ca3af;
    cursor: pointer;
}
.finfo-bg-clear:hover:not(:disabled) {
    color: #ef4444;
    border-color: rgba(239,68,68,0.4);
}
.finfo-bg-clear:disabled { cursor: not-allowed; opacity: 0.5; }

/* FolderInfoPanel: избранное для поплавка ScreenShh */
.finfo-screenshh-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 12px;
    color: #e5e7eb;
    cursor: pointer;
    user-select: none;
}
.finfo-screenshh-row input[type="checkbox"] { cursor: pointer; }
.finfo-screenshh-row input:disabled { cursor: not-allowed; opacity: 0.5; }

/* Применение цвета фона папки к рабочей области */
#main-area {
    background-color: var(--folder-bg, transparent);
    transition: background-color 0.2s ease;
}

body.is-main-view-home #main-area,
body.is-feed-mode #main-area {
    background-color: #0a0a0a;
}

.pinfo-key-widget {
    padding: 8px 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.pinfo-key-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.pinfo-key-label {
    font-size: 10px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex: 1;
}

.pinfo-key-privacy {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: #6b7280;
    background: none;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 2px 6px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.pinfo-key-privacy:hover {
    background: rgba(255,255,255,0.07);
    color: #e5e7eb;
}

.pinfo-key-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.pinfo-key-current {
    margin-left: 4px;
    font-size: 9px;
    font-weight: 800;
    opacity: 0.75;
    text-transform: uppercase;
}

.pinfo-key-indicator {
    cursor: default;
}

.pinfo-key-balances {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 8px;
}

.pinfo-key-balances:empty {
    display: none;
}

.pinfo-key-bal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 10px;
    line-height: 1.2;
    color: #9ca3af;
}

.pinfo-key-bal__name {
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pinfo-key-bal__val {
    color: #e5e7eb;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.pinfo-key-bal__val--loading {
    color: #4b5563;
}

.pinfo-key-bal__val--err {
    color: #7f1d1d;
    cursor: help;
}

.pinfo-users-widget {
    padding: 8px 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.pinfo-users-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.pinfo-users-label {
    font-size: 10px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pinfo-users-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.pinfo-users-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 12px;
    color: #d4d8e0;
    background: transparent;
    border: 0;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.pinfo-users-row:hover {
    background: rgba(255,255,255,0.04);
}

.pinfo-users-row--active {
    background: rgba(250, 204, 21, 0.12);
    color: #fde68a;
}

.pinfo-users-row--active:hover {
    background: rgba(250, 204, 21, 0.18);
}

.pinfo-users-name {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.pinfo-users-count {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #9ca3af;
    flex-shrink: 0;
}

.pinfo-users-role {
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    padding: 1px 4px;
    border-radius: 4px;
    flex-shrink: 0;
}

.pinfo-users-role--owner {
    color: #fbbf24;
}

.pinfo-users-role--admin {
    color: #60a5fa;
}

/* DM-кнопка справа от имени участника. Появляется при hover'е строки. */
.pinfo-users-dm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    color: #6b7280;
    background: transparent;
    transition: color 0.15s, background 0.15s, opacity 0.15s;
    flex-shrink: 0;
    margin-left: auto;
    margin-right: 4px;
    opacity: 0;
    cursor: pointer;
}
.pinfo-users-row:hover .pinfo-users-dm,
.pinfo-users-dm:focus-visible {
    opacity: 1;
}
.pinfo-users-dm:hover {
    color: var(--accent, #d4ff26);
    background: rgba(255,255,255,0.06);
}
.pinfo-users-dm i { width: 12px; height: 12px; }
html.light .pinfo-users-dm:hover { background: rgba(0,0,0,0.06); }

.pinfo-company-projects {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.pinfo-company-project {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 12px;
    color: #d4d8e0;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}

.pinfo-company-project:hover {
    background: var(--accent-subtle);
    color: var(--accent);
}

.pinfo-company-project i {
    color: rgba(var(--accent-rgb), 0.6);
    flex-shrink: 0;
}

.pinfo-company-project span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ftree-node {
    position: relative;
}

.ftree-node--collapsed > .ftree-children {
    display: none;
}

.ftree-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px var(--ftree-row-right-edge) 3px 2px;
    border-radius: 9px;
    cursor: pointer;
    /* Без анимации hover-подсветки: при быстром движении мышью по списку
       fade фона/outline не успевает проиграться → ощущение «лагов».
       Реакция на ховер должна быть мгновенной. */
    transition: none;
    position: relative;
}

.ftree-row:hover {
    background: rgba(255,255,255,0.07);
    outline: 1px solid rgba(var(--accent-rgb), 0.22);
    outline-offset: -1px;
}

.ftree-node--active > .ftree-row {
    background: rgba(var(--accent-rgb), 0.12);
    outline: 1px solid rgba(var(--accent-rgb), 0.38);
    outline-offset: -1px;
    box-shadow: 0 2px 12px rgba(var(--accent-rgb), 0.07);
}

.ftree-node--active > .ftree-row .ftree-icon {
    color: var(--accent);
}

.ftree-node--active > .ftree-row .ftree-name {
    color: var(--accent);
    font-weight: 600;
}

.ftree-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: color 0.12s;
}

.ftree-toggle :is(i, svg) {
    transform: rotate(0deg);
    transform-origin: center;
    transition: transform 0.15s;
}

.ftree-node:not(.ftree-node--collapsed) > .ftree-row .ftree-toggle :is(i, svg) {
    transform: rotate(90deg);
}

.ftree-toggle:hover {
    color: #e5e7eb;
}

.ftree-toggle-spacer {
    width: 16px;
    flex-shrink: 0;
}

.ftree-icon {
    color: var(--accent-muted);
    flex-shrink: 0;
}

.ftree-name {
    font-size: 13.5px;
    font-weight: 500;
    color: #d4d8e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    flex: 1;
    min-width: 0;
    letter-spacing: 0.015em;
}

.ftree-name:hover {
    color: #ffffff;
}

.ftree-count {
    font-size: 11.5px;
    font-weight: 700;
    color: #6b7280;
    background: rgba(255,255,255,0.06);
    border-radius: 5px;
    padding: 1px 5px;
    margin-left: 2px;
    flex-shrink: 0;
    min-width: 18px;
    text-align: center;
}

.ftree-node--active > .ftree-row .ftree-count {
    color: rgba(var(--accent-rgb), 0.7);
    background: rgba(var(--accent-rgb), 0.1);
}

/* Combo-бейдж: «генерации · рефы» (LOD = all). */
.ftree-count--combo {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: transparent !important;
    padding: 0 !important;
    min-width: 0 !important;
}
.ftree-count-gen,
.ftree-count-ref,
.ftree-count-file {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    border-radius: 5px;
    padding: 1px 5px;
}
.ftree-count-gen {
    color: #d1d5db;
    background: rgba(255,255,255,0.07);
}
.ftree-count-ref {
    color: rgba(var(--accent-rgb), 0.85);
    background: rgba(var(--accent-rgb), 0.10);
}
.ftree-count-file {
    color: #93c5fd;
    background: rgba(96,165,250,0.12);
}
.ftree-count-sep {
    color: #6b7280;
    opacity: 0.6;
    font-weight: 400;
}

.ftree-actions {
    display: inline-flex;
    align-items: center;
    gap: var(--ftree-action-gap);
    position: absolute;
    right: var(--ftree-action-right-edge);
    top: 50%;
    transform: translateY(-50%);
    padding-left: 28px;
    background: linear-gradient(to left, rgba(14, 14, 18, 0.92) 42%, rgba(14, 14, 18, 0.6) 74%, transparent 100%);
    border-radius: 0 7px 7px 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 2;
}

.ftree-row:hover .ftree-actions {
    opacity: 1;
    pointer-events: auto;
}

.ftree-action-btn {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    padding: 0;
    border-radius: 7px;
    color: #d1d5db;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}

.ftree-action-btn:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.14);
}

.ftree-action-delete:hover {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.16);
}

.ftree-node--trash .ftree-icon {
    color: rgba(239, 68, 68, 0.45);
}

.ftree-node--trash.ftree-node--active > .ftree-row .ftree-icon {
    color: #ef4444;
}

.ftree-node--trash.ftree-node--active > .ftree-row .ftree-name {
    color: #ef4444;
}

.ftree-node--trash.ftree-node--active > .ftree-row {
    background: rgba(239, 68, 68, 0.08);
    outline-color: rgba(239, 68, 68, 0.25);
}

.ftree-node--entity-separated {
    margin-bottom: 0;
    padding-bottom: 0;
}

.ftree-row.dragging-folder {
    opacity: 0.4;
}

.ftree-row.drop-highlight {
    outline: 1px dashed var(--accent);
    outline-offset: -1px;
    background: var(--accent-subtle);
}

.ftree-children {
    position: relative;
}

.ftree-children::before {
    content: '';
    position: absolute;
    left: calc(20px + (var(--ftree-depth, 0) * 16px));
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--ui-tree-line, rgba(255,255,255,0.045));
}

.accordion-section-body.wsexplorer-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding: 0;
}

.accordion-section-body.wsexplorer-body > .wsexplorer {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.wsexplorer {
    --wsexplorer-side-gap: 12px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 12px 12px 20px;
    color: #f3f3f5;
    position: relative;
}

.wsexplorer-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wsexplorer-project-block {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 0;
}

.wsexplorer-project-block--active::before {
    content: '';
    position: absolute;
    left: calc(-1 * var(--wsexplorer-side-gap));
    top: 0;
    bottom: 0;
    width: 2px;
    border-radius: 999px;
    background: var(--accent);
}

.wsexplorer-company {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px 0 4px;
    text-align: left;
}

.wsexplorer-company-main {
    min-width: 0;
    flex: 1 1 auto;
}

.wsexplorer-company .wsexplorer-drill {
    margin-left: auto;
}

.wsexplorer-company-title {
    font-size: 13px;
    font-weight: 800;
    color: #f0eff2;
    letter-spacing: -0.01em;
}

.wsexplorer-company-cover,
.wsexplorer-cover {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.025);
    outline: 2px dashed transparent;
    outline-offset: 2px;
}

.wsexplorer-company-cover {
    width: 38px;
    height: 38px;
    border-radius: 10px;
}

.wsexplorer-cover {
    width: 56px;
    height: 56px;
    border-radius: 8px 0 0 8px;
    border-right: 0;
}

.wsexplorer-company-cover--empty,
.wsexplorer-cover--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    border-style: dashed;
    color: #8a8d94;
}

.wsexplorer-company-cover--empty span,
.wsexplorer-cover--empty span {
    display: none;
}

.wsexplorer-company-cover-img,
.wsexplorer-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wsexplorer-company-cover-overlay,
.wsexplorer-cover-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.32);
    color: rgba(255,255,255,0.92);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.wsexplorer-company-cover:hover .wsexplorer-company-cover-overlay,
.wsexplorer-cover:hover .wsexplorer-cover-overlay,
.wsexplorer-company-cover.cover-drag-over .wsexplorer-company-cover-overlay,
.wsexplorer-cover.cover-drag-over .wsexplorer-cover-overlay {
    opacity: 1;
}

.wsexplorer-company-cover.cover-drag-over,
.wsexplorer-cover.cover-drag-over {
    outline-color: rgba(var(--accent-rgb), 0.35);
}

.wsexplorer-card {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: stretch;
    gap: 0;
    min-height: 56px;
    padding: 0;
    border-radius: 8px;
    background: #1c1c20;
    border: none;
    cursor: pointer;
    overflow: hidden;
}

.wsexplorer-card:hover {
    border-color: transparent;
}

.wsexplorer-card--active {
    cursor: default;
    box-shadow: none;
}

.wsexplorer-card-panel {
    min-width: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px 8px 12px;
    background: #1c1c20;
}

.wsexplorer-card-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    position: relative;
}

.wsexplorer-card-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    color: #faf9fb;
    letter-spacing: -0.03em;
    word-break: break-word;
}

.wsexplorer-card-subtitle {
    font-size: 10px;
    color: #b9b4bc;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.wsexplorer-card-copy::after {
    content: attr(data-wsx-generation-count);
    position: absolute;
    left: 56px;
    bottom: 0;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    color: #f1edf4;
    font-variant-numeric: tabular-nums;
}

.wsexplorer-card-side {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    align-self: center;
    flex: 0 0 auto;
}

.wsexplorer-drill {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    border: 1px solid rgba(107, 114, 128, 0.45);
    background: rgba(255,255,255,0.02);
    color: #6b7280;
    padding: 0;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(2px);
    transition: opacity 0.15s ease, transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.wsexplorer-card:hover .wsexplorer-drill,
.wsexplorer-company:hover .wsexplorer-drill,
.wsexplorer-drill:focus-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.wsexplorer-drill:hover {
    border-color: rgba(154, 162, 173, 0.5);
    background: rgba(255,255,255,0.04);
    color: #9aa2ad;
}

.wsexplorer-toggle {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    border: 1px solid rgba(107, 114, 128, 0.45);
    background: rgba(255,255,255,0.02);
    color: #6b7280;
    padding: 0;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.wsexplorer-toggle:hover {
    border-color: rgba(154, 162, 173, 0.5);
    background: rgba(255,255,255,0.04);
    color: #9aa2ad;
}

.wsexplorer-toggle--passive {
    cursor: pointer;
}

.wsexplorer-project-details {
    padding: 10px 8px 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Старые .wsexplorer-space-* стили удалены: Проводник теперь рендерит дерево
   через общий FolderTreeRenderer (см. .ftree-* правила выше). */
.wsexplorer-cover-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(0, 0, 0, 0.68);
    color: #fff;
    padding: 0;
    cursor: pointer;
}

.wsexplorer-cover:hover .wsexplorer-cover-remove,
.wsexplorer-company-cover:hover .wsexplorer-cover-remove {
    display: inline-flex;
}

.wsexplorer-cover-remove:hover {
    background: #dc2626;
}

@media (max-width: 720px) {
    .wsexplorer {
        --wsexplorer-side-gap: 8px;
        padding: 10px 8px 18px;
        gap: 18px;
    }

    .wsexplorer-card {
        grid-template-columns: 56px minmax(0, 1fr);
    }

    .wsexplorer-cover {
        width: 56px;
        height: 56px;
        border-radius: 8px 0 0 8px;
    }

    .wsexplorer-card-panel {
        padding: 7px 10px;
        gap: 10px;
    }

    .wsexplorer-card-title {
        font-size: 15px;
    }

    .wsexplorer-count {
        font-size: 14px;
    }
}



/* Маркеры наличия мудборда/задач в папке. */
.ftree-markers{display:inline-flex;align-items:center;justify-content:flex-end;gap:5px;margin-left:auto;flex-shrink:0;}
.ftree-marker{width:var(--ftree-marker-size);height:var(--ftree-marker-size);display:inline-grid;place-items:center;flex-shrink:0;opacity:.92;}
.ftree-marker svg{width:11px;height:11px;stroke-width:2.2;}
/* Цвета берём из акцентов интерфейса: мудборд — основной accent,
   задачи — accent-2 (если задана), либо контрастный production-зелёный. */
.ftree-marker--moodboard{color:var(--accent, #f5a623);}
.ftree-marker--tasks{color:var(--accent-2, var(--success, #4cc38a));}
/* ScreenShh: камера = скрины, видеокамера = видео. */
.ftree-marker--screenshh-screenshot{color:var(--accent-3, #6ab7ff);}
.ftree-marker--screenshh-video{color:var(--accent-4, #c084fc);}
.ftree-row:hover .ftree-marker,
.ftree-node--active > .ftree-row .ftree-marker{opacity:1;}

/* ScreenShh per-user флаги — вертикальный столбик цветных кружков у левого
   края строки (независимо от глубины вложенности). */
.ftree-dots{
    position:absolute;
    left:3px;
    top:50%;
    transform:translateY(-50%);
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:2px;
    z-index:1;
    pointer-events:none;
}
.ftree-dot{
    width:6px;
    height:6px;
    border-radius:50%;
    box-shadow:0 0 0 1px rgba(0,0,0,0.25);
}
.ftree-dot--favorite{background:var(--accent, #f5a623);}
.ftree-dot--screenshot{background:var(--accent-3, #6ab7ff);}
.ftree-dot--video{background:var(--accent-4, #c084fc);}
