/* ========================================
   Talego - 工作空间页面
   Dark theme · Card grid · Studio workspace
   ======================================== */

.workspace-page {
    padding: calc(var(--nav-h) + 32px) 28px 48px;
    max-width: 1240px;
    margin: 0 auto;
    overflow-x: hidden;
}

/* ---- Toolbar ---- */
.workspace-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 20px;
}

.workspace-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
}

.workspace-tab {
    padding: 7px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all .2s ease;
    cursor: pointer;
    position: relative;
}
.workspace-tab:hover { color: var(--text-primary); }
.workspace-tab.active {
    color: var(--text-primary);
    font-weight: 600;
}
.workspace-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
}

.workspace-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Search */
.ws-search-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: .2s;
}
.ws-search-wrapper:focus-within {
    border-color: rgba(255,255,255,.15);
    background: rgba(255,255,255,.06);
}
.ws-search-icon {
    color: var(--text-muted);
    flex-shrink: 0;
}
.ws-search-box {
    width: 140px;
    font-size: 13px;
    color: var(--text-primary);
    background: none;
    border: none;
    outline: none;
    padding: 0;
}
.ws-search-box::placeholder { color: var(--text-muted); }

/* Dropdown button */
.ws-dropdown {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 13px;
    color: var(--text-secondary);
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: .2s;
    white-space: nowrap;
}
.ws-dropdown:hover {
    color: var(--text-primary);
    border-color: rgba(255,255,255,.12);
    background: rgba(255,255,255,.06);
}
.ws-filter-wrap {
    position: relative;
}
.ws-filter-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    padding: 8px 0;
    background: rgba(22, 24, 30, 0.98);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0,0,0,.55);
    z-index: 80;
    backdrop-filter: blur(16px);
}
.ws-filter-section {
    padding: 4px 0;
}
.ws-filter-section-title {
    padding: 6px 14px 4px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,.35);
    letter-spacing: .3px;
}
.ws-filter-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 14px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,.72);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
}
.ws-filter-item:hover {
    background: rgba(255,255,255,.06);
    color: #fff;
}
.ws-filter-item.active {
    color: #fff;
}
.ws-filter-check {
    opacity: 0;
    color: rgba(255,255,255,.85);
    flex-shrink: 0;
}
.ws-filter-item.active .ws-filter-check {
    opacity: 1;
}
.ws-filter-divider {
    height: 1px;
    margin: 6px 0;
    background: rgba(255,255,255,.08);
}

/* View toggle buttons */
.ws-view-toggle {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border-radius: 10px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06);
}
.ws-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: var(--text-muted);
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    transition: .2s;
}
.ws-view-btn:hover { color: var(--text-secondary); background: rgba(255,255,255,.04); }
.ws-view-btn.active {
    color: rgba(255,255,255,.92);
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.12);
}

/* New project button */
.ws-new-project-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 12px rgba(99,102,241,.3);
    transition: .2s;
    white-space: nowrap;
}
.ws-new-project-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(99,102,241,.45);
}
.ws-new-project-btn span {
    font-size: 17px;
    line-height: 1;
}

/* ---- Card Grid ---- */
.ws-projects {
    position: relative;
    min-height: 200px;
}
.ws-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    align-items: stretch;
}
.ws-projects.is-list .ws-grid {
    display: none;
}
.ws-projects.is-grid .ws-list {
    display: none !important;
}

/* ---- List View ---- */
.ws-list {
    width: 100%;
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255,255,255,.015);
}
.ws-list-header,
.ws-list-row {
    display: grid;
    grid-template-columns: 72px minmax(160px, 1.4fr) 88px minmax(80px, 1fr) 150px 140px 44px;
    gap: 12px;
    align-items: center;
    padding: 0 16px;
}
.ws-list-header {
    height: 42px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    color: rgba(255,255,255,.38);
    font-size: 12px;
    font-weight: 500;
}
.ws-list-body {
    max-height: min(68vh, 720px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.12) transparent;
}
.ws-list-row {
    min-height: 64px;
    border-bottom: 1px solid rgba(255,255,255,.05);
    cursor: pointer;
    transition: background .15s ease;
}
.ws-list-row:last-child {
    border-bottom: none;
}
.ws-list-row:hover,
.ws-list-row.selected {
    background: rgba(255,255,255,.04);
}
.ws-list-row.select-mode .ws-list-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    border: 1.5px solid rgba(255,255,255,.25);
}
.ws-list-row.selected .ws-list-thumb::after {
    border-color: rgba(99,102,241,.9);
    background: rgba(99,102,241,.18);
}
.ws-list-thumb {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255,255,255,.06);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}
.ws-list-name {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ws-list-type,
.ws-list-content,
.ws-list-created,
.ws-list-updated {
    font-size: 13px;
    color: rgba(255,255,255,.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ws-list-type {
    color: rgba(255,255,255,.62);
}
.ws-list-menu-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: rgba(255,255,255,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.ws-list-menu-btn:hover,
.ws-list-menu-btn.active {
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.85);
}

.ws-skeleton {
    display: none;
}
.ws-skeleton.is-visible {
    display: block;
}
.ws-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}
.ws-skeleton-card {
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    pointer-events: none;
}
.ws-skeleton-thumb {
    aspect-ratio: 4 / 3;
    background: rgba(255, 255, 255, 0.045);
    position: relative;
    overflow: hidden;
}
.ws-skeleton-info {
    padding: 12px 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ws-skeleton-line {
    height: 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    position: relative;
    overflow: hidden;
}
.ws-skeleton-line.is-title { width: 68%; height: 12px; }
.ws-skeleton-line.is-meta { width: 42%; }
.ws-skeleton-thumb::after,
.ws-skeleton-line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.06) 45%,
        transparent 90%
    );
    transform: translateX(-100%);
    animation: wsSkeletonShimmer 1.35s ease-in-out infinite;
}
@keyframes wsSkeletonShimmer {
    100% { transform: translateX(100%); }
}

.ws-empty {
    display: none;
    text-align: center;
    padding: 60px 0;
}
.ws-empty.is-visible {
    display: block;
}
.ws-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: .3;
}
.ws-empty-text {
    font-size: 15px;
    color: rgba(255,255,255,.35);
}

.ws-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, background .22s ease;
}
.ws-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.045);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.32);
}

/* Cover image area */
.ws-card-bg {
    aspect-ratio: 4/3;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
}

/* ★ 团队项目标签 */
.ws-card-team-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 500;
    color: #c7d2fe;
    background: rgba(99,102,241,.22);
    border: 1px solid rgba(139,92,246,.3);
    border-radius: 6px;
    backdrop-filter: blur(8px);
    z-index: 2;
}

/* Card info */
.ws-card-info {
    padding: 12px 12px 14px;
    background: transparent;
    border-top: none;
}
.ws-card-title {
    font-size: 13.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.ws-card-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.42);
}

/* ---- New project special card ---- */
.ws-card.new-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    aspect-ratio: unset;
    min-height: 0;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}
.ws-card.new-card:hover {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.055);
}
.ws-new-body {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    aspect-ratio: unset;
    pointer-events: none;
}
.ws-new-body .ws-new-icon,
.ws-new-body .ws-new-label {
    pointer-events: auto;
}
.ws-new-info-spacer {
    visibility: hidden;
    pointer-events: none;
    user-select: none;
}
/* 撑开与项目卡同高：4:3 预览区占位 */
.ws-card.new-card::before {
    content: '';
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    flex-shrink: 0;
}
.ws-new-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    font-weight: 400;
    line-height: 1;
    color: #111;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    transition: transform .2s ease, box-shadow .2s ease;
}
.ws-card.new-card:hover .ws-new-icon {
    transform: scale(1.04);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.36);
}
.ws-new-label {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
}

/* 新建文件夹插入动效 */
.ws-folder-card.ws-card-enter {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
}
.ws-folder-card.ws-card-enter-active {
    opacity: 1;
    transform: none;
    transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.ws-list-row.ws-card-enter {
    opacity: 0;
    transform: translateY(8px);
}
.ws-list-row.ws-card-enter-active {
    opacity: 1;
    transform: none;
    transition: opacity 0.28s ease, transform 0.28s ease;
}

/* ---- Responsive ---- */
@media (max-width: 1400px) {
    .ws-grid,
    .ws-skeleton-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1200px) {
    .ws-grid,
    .ws-skeleton-grid { grid-template-columns: repeat(3, 1fr); }
    .ws-list-header,
    .ws-list-row {
        grid-template-columns: 64px minmax(140px, 1.4fr) 72px 0fr 130px 120px 40px;
    }
    .ws-list-col-content,
    .ws-list-content {
        display: none;
    }
}
@media (max-width: 900px) {
    .ws-grid,
    .ws-skeleton-grid { grid-template-columns: repeat(2, 1fr); }
    .workspace-toolbar { flex-wrap: wrap; }
    .ws-search-box { width: 100px; }
    .ws-list-header,
    .ws-list-row {
        grid-template-columns: 56px minmax(120px, 1fr) 0fr 0fr 0fr 110px 36px;
    }
    .ws-list-col-type,
    .ws-list-type,
    .ws-list-col-created,
    .ws-list-created {
        display: none;
    }
}
@media (max-width: 640px) {
    .workspace-page { padding: calc(var(--nav-h) + 24px) 16px 36px; }
    .ws-grid,
    .ws-skeleton-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .ws-search-wrapper { display: none; }
    .ws-filter-wrap { display: none; }
    .ws-new-project-btn span { display: none; }
    .ws-list-header { display: none; }
    .ws-list-row {
        grid-template-columns: 48px 1fr 36px;
        padding: 10px 12px;
    }
    .ws-list-col-updated,
    .ws-list-updated {
        display: none;
    }
}

/* ============================================
   未登录登录引导页 (Guest Gate) — 居中显示在工具栏下方
   ============================================ */
.ws-guest-gate {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--nav-h) - 140px);
    padding: 40px 0 80px;
}

/* 用户头像占位 — 灰色圆形 + 人形图标 */
.ws-guest-avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(255,255,255,.07);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* 标题 */
.ws-guest-title {
    font-size: 20px;
    font-weight: 700;
    color: #e8eaef;
    margin: 0 0 10px;
    letter-spacing: -.3px;
}

/* 描述文字 */
.ws-guest-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 28px;
    line-height: 1.6;
}

/* 登录按钮 — 描边风格（非实心） */
.ws-guest-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 32px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all .22s ease;
}
.ws-guest-login-btn:hover {
    color: #fff;
    border-color: rgba(255,255,255,.25);
    background: rgba(255,255,255,.05);
}

/* ---- Card menu button ---- */
.ws-card-menu-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 4;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.35);
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s ease, background .2s ease;
    backdrop-filter: blur(8px);
}
.ws-card:hover .ws-card-menu-btn,
.ws-card-menu-btn.active,
.ws-card.select-mode .ws-card-menu-btn {
    opacity: 1;
}
.ws-card-menu-btn:hover {
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
}

.ws-card-select {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 4;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    background: rgba(0, 0, 0, 0.35);
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
    backdrop-filter: blur(8px);
}
.ws-card.select-mode .ws-card-select { display: flex; }
.ws-card.selected {
    border-color: rgba(99, 102, 241, 0.65);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.35);
}
.ws-card.selected .ws-card-select {
    background: #6366f1;
    border-color: #6366f1;
}

/* ---- Floating card menu ---- */
.ws-card-menu {
    position: fixed;
    z-index: 10040;
    min-width: 168px;
    padding: 6px;
    border-radius: 10px;
    background: #1b1f2a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}
.ws-card-menu-item {
    display: block;
    width: 100%;
    padding: 9px 12px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: background .15s ease;
}
.ws-card-menu-item:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
}
.ws-card-menu-item:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.ws-card-menu-danger { color: #f87171; }
.ws-card-menu-danger:hover:not(:disabled) { background: rgba(248, 113, 113, 0.12); }
.ws-card-menu-divider {
    height: 1px;
    margin: 4px 6px;
    background: rgba(255, 255, 255, 0.08);
}

/* ---- Selection bar ---- */
.ws-selection-bar {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    z-index: 10030;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(20, 24, 34, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.ws-selection-count {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    white-space: nowrap;
}
.ws-selection-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ws-selection-btn {
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
}
.ws-selection-btn:hover { background: rgba(255, 255, 255, 0.1); }
.ws-selection-btn-danger {
    border-color: rgba(248, 113, 113, 0.35);
    color: #fca5a5;
}
.ws-selection-btn-ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    border-color: transparent;
}

/* ---- Modals ---- */
.ws-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
}
.ws-modal-overlay[hidden],
.ws-card-menu[hidden],
.ws-toast[hidden],
.ws-selection-bar[hidden] {
    display: none !important;
}
.ws-modal {
    width: min(440px, 100%);
    border-radius: 14px;
    background: #151922;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}
.ws-modal-sm { width: min(380px, 100%); }
.ws-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 10px;
}
.ws-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}
.ws-modal-close {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ws-modal-close:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.ws-modal-body { padding: 8px 20px 18px; }
.ws-modal-label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
}
.ws-modal-input {
    width: 100%;
    padding: 11px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-size: 14px;
    outline: none;
}
.ws-modal-input:focus {
    border-color: rgba(99, 102, 241, 0.55);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.ws-modal-desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.62);
}
.ws-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 0 20px 18px;
}
.ws-modal-btn {
    padding: 9px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 13px;
    cursor: pointer;
}
.ws-modal-btn-ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.65);
    border-color: rgba(255, 255, 255, 0.1);
}
.ws-modal-btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
}
.ws-modal-btn-danger {
    background: #dc2626;
    color: #fff;
}
.ws-team-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    max-height: 240px;
    overflow-y: auto;
}
.ws-team-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    cursor: pointer;
    text-align: left;
}
.ws-team-item:hover { border-color: rgba(99, 102, 241, 0.45); background: rgba(99, 102, 241, 0.08); }
.ws-team-item-name { font-size: 13px; font-weight: 600; }
.ws-team-item-role { font-size: 11px; color: rgba(255, 255, 255, 0.45); }

/* 新建项目弹窗（个人命名 / 团队深色自定义下拉） */
.create-project-overlay {
    z-index: 10070;
}
.create-project-modal {
    overflow: visible;
}
.create-project-modal .ws-modal-body {
    overflow: visible;
}
.create-project-team-block {
    margin-bottom: 14px;
}
.create-project-select-wrap {
    position: relative;
}
.create-project-team-trigger {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    text-align: left;
    cursor: pointer;
    padding-right: 36px !important;
}
.create-project-team-trigger:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.create-project-team-trigger-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.92);
}
.create-project-select-chevron {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.45);
    pointer-events: none;
    transition: transform 0.15s ease;
}
.create-project-select-wrap.is-open .create-project-select-chevron {
    transform: translateY(-50%) rotate(180deg);
}
.create-project-team-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 5;
    max-height: 220px;
    overflow-y: auto;
    padding: 6px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #1c2030;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}
.create-project-team-menu[hidden] {
    display: none !important;
}
.create-project-team-option {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}
.create-project-team-option:hover {
    background: rgba(99, 102, 241, 0.16);
}
.create-project-team-option.selected {
    background: rgba(99, 102, 241, 0.28);
    color: #fff;
}
.create-project-team-option.is-hint {
    cursor: default;
    color: rgba(255, 255, 255, 0.4);
}
.create-project-team-option.is-hint:hover {
    background: transparent;
}
.create-project-error {
    margin-top: 10px;
    color: #f87171 !important;
}
.create-project-team-empty {
    margin-top: 8px;
}

/* 设置封面弹窗 */
.ws-cover-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    margin: 12px 0 14px;
    border-radius: 10px;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ws-cover-preview-empty {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}
.ws-cover-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ws-cover-actions {
    display: flex;
    gap: 8px;
}

.ws-toast {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 10060;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 260px;
    max-width: 420px;
    padding: 14px 18px;
    border-radius: 12px;
    background: rgba(26, 28, 35, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}
.ws-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.ws-toast-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.75);
}
.ws-toast.is-success .ws-toast-icon {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}
.ws-toast.is-error .ws-toast-icon {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}
.ws-toast-content { min-width: 0; }
.ws-toast-title { font-size: 14px; font-weight: 500; color: #fff; margin-bottom: 2px; }
.ws-toast-desc { font-size: 12px; color: rgba(255, 255, 255, 0.5); line-height: 1.5; word-break: break-all; }

.workspace-page.has-selection-bar { padding-bottom: 96px; }

/* ---- Breadcrumb ---- */
.ws-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -8px 0 18px;
    font-size: 13px;
    color: var(--text-secondary);
}
.ws-breadcrumb[hidden] { display: none !important; }
.ws-breadcrumb-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
}
.ws-breadcrumb-link:hover { color: var(--text-primary); }
.ws-breadcrumb-sep { opacity: 0.45; }
.ws-breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- Folder card (frosted pocket + fan preview) ---- */
.ws-folder-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}
.ws-folder-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.045);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.32);
}
.ws-folder-preview {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    min-height: 180px;
    aspect-ratio: unset;
    overflow: hidden;
    background:
        radial-gradient(70% 55% at 50% 12%, rgba(180, 195, 220, 0.22), transparent 58%),
        linear-gradient(180deg, #222833 0%, #141820 100%);
}
.ws-folder-fan {
    position: absolute;
    left: 50%;
    top: 12%;
    width: 56%;
    height: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 1;
}
.ws-folder-fan-card {
    position: absolute;
    inset: 0;
    border-radius: 11px;
    background: linear-gradient(165deg, #f3f5f8 0%, #d8dee8 100%);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.38);
}
.ws-folder-fan-card::before {
    content: '';
    position: absolute;
    top: 11px;
    left: 11px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 1.5px solid rgba(40, 50, 70, 0.22);
    box-sizing: border-box;
}
.ws-folder-fan-card:nth-child(1) {
    transform: translate(-24%, 14%) rotate(-15deg);
    opacity: 0.82;
}
.ws-folder-fan-card:nth-child(2) {
    transform: translate(0, 2%) rotate(0deg);
    opacity: 0.98;
    z-index: 1;
}
.ws-folder-fan-card:nth-child(3) {
    transform: translate(24%, 14%) rotate(15deg);
    opacity: 0.82;
}
/* 文件夹前盖：用 file.svg 做遮罩，左侧标签形状对齐参考图1 */
.ws-folder-pocket {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 52%;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.22) 0%,
            rgba(255, 255, 255, 0.1) 28%,
            rgba(30, 36, 48, 0.28) 72%,
            rgba(16, 20, 28, 0.45) 100%
        );
    backdrop-filter: blur(20px) saturate(1.25);
    -webkit-backdrop-filter: blur(20px) saturate(1.25);
    -webkit-mask-image: url('/web/img/file.svg');
    mask-image: url('/web/img/file.svg');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center bottom;
    mask-position: center bottom;
    clip-path: none;
    box-shadow: none;
}
/* 前盖顶沿高光（更清晰的玻璃边） */
.ws-folder-pocket::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 28%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.28) 0%,
        rgba(255, 255, 255, 0.06) 55%,
        transparent 100%
    );
    pointer-events: none;
}
.ws-folder-pocket svg,
.ws-folder-pocket img {
    display: none;
}
.ws-folder-card .ws-folder-rename-btn {
    opacity: 0;
}
.ws-folder-card:hover .ws-folder-rename-btn {
    opacity: 1;
}
/* 菜单三点：参考图1始终显示在右上角 */
.ws-folder-card .ws-card-menu-btn {
    opacity: 1;
    z-index: 4;
    top: 10px;
    right: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
}
.ws-folder-card .ws-card-menu-btn:hover,
.ws-folder-card .ws-card-menu-btn.active {
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
}
.ws-folder-rename-btn {
    position: absolute;
    top: 10px;
    right: 42px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: rgba(0, 0, 0, 0.35);
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 4;
    transition: background 0.15s ease, opacity 0.15s ease;
}
.ws-folder-rename-btn:hover {
    background: rgba(0, 0, 0, 0.5);
}
.ws-folder-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    padding: 14px 14px 16px;
    pointer-events: none;
}
.ws-folder-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ws-folder-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.48);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.ws-folder-meta span:last-child {
    flex-shrink: 0;
}
.ws-list-row.is-folder .ws-list-col-preview {
    color: var(--text-secondary);
}
