/* =============================================================================
 * LunarDocs - 完整样式表（无 Tailwind）
 * ============================================================================= */

/* ---- 基础 ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    width: 100%; height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px; line-height: 1.5;
    background: #f3f4f6; color: #111827;
    -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

::selection { background: rgba(74,158,255,0.2); }

.hidden { display: none !important; }

/* ---- 动画 ---- */
@keyframes loginSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes rowFadeIn {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes menuIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes toastSlideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(20px); }
}
@keyframes uploadSlideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ---- 通用按钮 ---- */
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 36px; padding: 0 16px;
    background: #4a9eff; color: #fff;
    border: none; border-radius: 8px;
    font-size: 13px; font-weight: 500; cursor: pointer;
    transition: all 0.15s; white-space: nowrap;
}
.btn-primary:hover { background: #3a8eef; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 36px; padding: 0 16px;
    background: #fff; color: #6b7280;
    border: 1px solid #e5e7eb; border-radius: 8px;
    font-size: 13px; font-weight: 500; cursor: pointer;
    transition: all 0.15s; white-space: nowrap;
}
.btn-secondary:hover { background: #f9fafb; color: #111827; }
.btn-secondary:active { transform: scale(0.98); }

.btn-danger {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 36px; padding: 0 16px;
    background: #ef4444; color: #fff;
    border: none; border-radius: 8px;
    font-size: 13px; font-weight: 500; cursor: pointer;
    transition: all 0.15s; white-space: nowrap;
}
.btn-danger:hover { background: #dc2626; }

.btn-text {
    display: inline-flex; align-items: center; justify-content: center;
    height: 36px; padding: 0 16px;
    background: transparent; color: #6b7280;
    border: none; border-radius: 8px;
    font-size: 13px; font-weight: 500; cursor: pointer;
    transition: all 0.15s;
}
.btn-text:hover { background: #f3f4f6; color: #111827; }

.icon-btn {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    background: transparent; color: #6b7280;
    border: none; border-radius: 8px;
    cursor: pointer; transition: all 0.15s;
}
.icon-btn:hover { background: #f3f4f6; color: #111827; }

/* ---- 输入框 ---- */
.input-wrap {
    position: relative; display: flex; align-items: center;
}
.input-wrap input {
    width: 100%; height: 44px;
    padding: 0 16px 0 40px;
    background: #f9fafb; color: #111827;
    border: 1px solid #e5e7eb; border-radius: 8px;
    font-size: 13px; outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.input-wrap input::placeholder { color: #9ca3af; }
.input-wrap input:focus {
    border-color: #4a9eff;
    box-shadow: 0 0 0 3px rgba(74,158,255,0.1);
}
.input-wrap .input-icon {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; color: #9ca3af; pointer-events: none;
}

.captcha-wrap input { padding-right: 110px; }
.captcha-wrap img {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    height: 34px; width: 100px; cursor: pointer; border-radius: 6px;
    background: transparent;
}

.search-box {
    position: relative; display: flex; align-items: center;
}
.search-box input {
    width: 192px; height: 36px;
    padding: 0 12px 0 36px;
    background: #fff; color: #111827;
    border: 1px solid #e5e7eb; border-radius: 8px;
    font-size: 13px; outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.search-box input::placeholder { color: #9ca3af; }
.search-box input:focus {
    border-color: #4a9eff;
    box-shadow: 0 0 0 3px rgba(74,158,255,0.1);
}
.search-box .search-icon {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; color: #9ca3af; pointer-events: none;
}

.error-msg { font-size: 13px; color: #ef4444; margin-top: 4px; }

/* ---- 登录页 ---- */
.login-overlay {
    position: fixed; inset: 0; z-index: 50;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.4s, visibility 0.4s;
}
.login-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.login-backdrop {
    position: absolute; inset: 0;
    background: rgba(209,213,219,0.6);
    backdrop-filter: blur(12px);
}

.login-card {
    position: relative; width: 100%; max-width: 420px; margin: 0 16px;
    padding: 32px;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.08);
    animation: loginSlideIn 0.5s ease-out;
}

.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo .logo-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 64px; height: 64px; border-radius: 12px;
    background: linear-gradient(135deg, #4a9eff, #3a7eef);
    color: #fff; margin-bottom: 16px;
}
.login-logo h1 { font-size: 24px; font-weight: 700; color: #111827; letter-spacing: -0.5px; }
.login-logo p { font-size: 13px; color: #6b7280; margin-top: 4px; }

.login-form { display: flex; flex-direction: column; gap: 12px; }

.login-footer {
    margin-top: 24px; padding-top: 16px;
    border-top: 1px solid #f3f4f6; text-align: center;
}
.login-footer p { font-size: 12px; color: #9ca3af; }

.spinner { width: 16px; height: 16px; animation: spin 1s linear infinite; }

/* ---- 主应用布局 ---- */
.app-container {
    display: flex; flex-direction: column;
    width: 100%; height: 100vh;
    background: #f3f4f6;
}
.app-container.hidden { display: none !important; }

.topbar {
    display: flex; align-items: center;
    height: 56px; padding: 0 16px;
    background: #fff; border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand-icon {
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 6px;
    background: linear-gradient(135deg, #4a9eff, #3a7eef); color: #fff;
}
.brand-text { font-size: 14px; font-weight: 600; color: #111827; letter-spacing: -0.3px; }

.breadcrumb {
    flex: 1; margin: 0 24px;
    display: flex; align-items: center; gap: 4px;
    overflow: hidden; font-size: 13px;
}
.breadcrumb-item {
    display: inline-flex; align-items: center; gap: 4px;
    color: #6b7280; cursor: pointer; white-space: nowrap;
    transition: color 0.15s;
}
.breadcrumb-item:hover { color: #4a9eff; }
.breadcrumb-item:last-child { color: #111827; cursor: default; }
.breadcrumb-separator { color: #d1d5db; margin: 0 2px; flex-shrink: 0; }

.topbar-right { display: flex; align-items: center; gap: 8px; }
.user-badge {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 12px; border-radius: 8px;
    background: #f3f4f6; color: #374151;
    font-size: 13px;
}

.app-body { display: flex; flex: 1; overflow: hidden; }

/* ---- 侧边栏 ---- */
.sidebar {
    width: 260px; min-width: 260px;
    background: #fff; border-right: 1px solid #e5e7eb;
    display: flex; flex-direction: column;
    flex-shrink: 0;
    position: relative;
}
.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 8px; }
.nav-header { padding: 0 8px; margin-bottom: 8px; }
.nav-header p {
    font-size: 11px; font-weight: 500; color: #9ca3af;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.nav-item {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 8px 12px;
    border: none; border-radius: 8px;
    background: transparent; color: #6b7280;
    font-size: 13px; cursor: pointer;
    transition: all 0.15s;
}
.nav-item:hover { background: #f3f4f6; color: #111827; }
.nav-item.active {
    background: #eff6ff; color: #4a9eff;
    border: none;
}
.nav-item.drop-target {
    background: #eff6ff;
    color: #4a9eff;
    border: 1px dashed #bfdbfe;
}
.nav-item svg { flex-shrink: 0; }

/* 文件夹分隔线："全部文件"与文件夹树之间 */
.folder-separator {
    display: flex; align-items: center; gap: 8px;
    margin: 10px 8px 6px 8px;
    font-size: 11px; font-weight: 500;
    color: #9ca3af;
    letter-spacing: 0.3px;
}
.folder-separator::before,
.folder-separator::after {
    content: ""; flex: 1; height: 1px; background: #e5e7eb;
}
.folder-separator span { white-space: nowrap; }

/* ---- 文件夹树 ---- */
.folder-tree {
    display: flex; flex-direction: column;
    gap: 1px;
    padding: 0 8px;
}

.folder-tree-item {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 12px 7px 12px;
    border-radius: 6px;
    color: #6b7280;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
}

/* 文件夹图标统一黄色 */
.folder-tree-item svg { flex-shrink: 0; color: #f59e0b; }

/* Hover 状态 */
.folder-tree-item:hover {
    background: #f3f4f6;
    color: #111827;
}

/* Active 状态 */
.folder-tree-item.active {
    background: #eff6ff;
    color: #4a9eff;
    font-weight: 500;
}
.folder-tree-item.active svg { color: #f59e0b; }

/* 拖放目标高亮 */
.folder-tree-item.drop-target {
    background: #eff6ff !important;
    color: #4a9eff !important;
    font-weight: 500;
    box-shadow: inset 0 0 0 1px #bfdbfe;
}

/* 空状态 */
.folder-tree-empty {
    padding: 8px 12px;
    font-size: 12px;
    color: #d1d5db;
    text-align: center;
}

.storage-bar-wrap { padding: 12px; border-top: 1px solid #e5e7eb; }
.storage-label {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 8px;
}
.storage-label span:first-child { font-size: 12px; color: #6b7280; }
.storage-label span:last-child { font-size: 12px; color: #9ca3af; }
.storage-track {
    height: 6px; background: #f3f4f6; border-radius: 3px; overflow: hidden;
}
.storage-fill {
    height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, #4a9eff, #3a7eef);
    transition: width 0.3s;
}

.sidebar-mask {
    position: fixed; inset: 0; background: rgba(0,0,0,0.3); z-index: -1;
}

/* ---- 内容区 ---- */
.content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.toolbar {
    display: flex; align-items: center; justify-content: space-between;
    height: 56px; padding: 0 16px;
    border-bottom: 1px solid #e5e7eb; flex-shrink: 0;
}
.toolbar-left { display: flex; align-items: center; gap: 8px; }
.toolbar-right { display: flex; align-items: center; gap: 8px; }

.upload-label { cursor: pointer; }
.upload-label input { display: none; }

.view-toggle {
    display: flex; align-items: center;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden;
}
.view-btn {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    background: transparent; border: none;
    color: #9ca3af; cursor: pointer;
    transition: all 0.15s;
}
.view-btn:hover { background: #f9fafb; }
.view-btn.active { color: #4a9eff; }
.view-btn.inactive { color: #9ca3af; }

.file-list { flex: 1; overflow-y: auto; padding: 16px; }

/* ---- 文件网格视图 ---- */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}
@media (min-width: 640px) {
    .file-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
@media (min-width: 1024px) {
    .file-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
@media (min-width: 1280px) {
    .file-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

.file-card {
    position: relative;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
    padding: 16px; cursor: pointer;
    transition: all 0.2s;
    animation: cardFadeIn 0.3s ease-out;
}
.file-card:hover {
    border-color: #4a9eff; background: #fafcff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.file-card.selected { border-color: #4a9eff; background: #eff6ff; }

.file-card-inner {
    display: flex; flex-direction: column; align-items: center; text-align: center;
}
.file-card-icon {
    width: 56px; height: 56px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px; flex-shrink: 0;
}
.file-card-name {
    font-size: 13px; color: #111827;
    width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file-card-meta {
    font-size: 12px; color: #9ca3af; margin-top: 4px;
}

.file-card-actions {
    position: absolute; top: 8px; right: 8px;
    display: flex; gap: 2px;
    opacity: 0; transform: translateY(-4px);
    transition: all 0.2s;
}
.file-card:hover .file-card-actions { opacity: 1; transform: translateY(0); }

/* ---- 文件列表视图 ---- */
.file-table { border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.file-table-header {
    display: flex; align-items: center; height: 40px; padding: 0 12px;
    background: #f9fafb; border-bottom: 1px solid #e5e7eb;
    font-size: 12px; font-weight: 500; color: #6b7280;
}
.file-table-header .col-name { flex: 1; min-width: 0; }
.file-table-header .col-time { width: 144px; display: none; }
.file-table-header .col-size { width: 96px; text-align: right; display: none; }
.file-table-header .col-action { width: 128px; text-align: right; }

.file-list-row {
    display: flex; align-items: center; height: 48px; padding: 0 12px;
    border-radius: 6px; cursor: pointer;
    transition: background 0.15s;
    animation: rowFadeIn 0.2s ease-out;
}
.file-list-row:nth-child(even) { background: #f9fafb; }
.file-list-row:hover { background: #f3f4f6; }
.file-list-row.selected { background: #eff6ff; }

.row-name { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.row-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.row-name-text { font-size: 13px; color: #111827; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-time { width: 144px; font-size: 12px; color: #6b7280; display: none; }
.row-size { width: 96px; font-size: 12px; color: #6b7280; text-align: right; display: none; }
.row-action { width: 128px; display: flex; justify-content: flex-end; }

.file-row-actions { display: flex; gap: 2px; opacity: 0; transition: opacity 0.15s; }
.file-list-row:hover .file-row-actions { opacity: 1; }

@media (min-width: 640px) {
    .file-table-header .col-time, .row-time { display: block; }
}
@media (min-width: 768px) {
    .file-table-header .col-size, .row-size { display: block; }
}

/* ---- 操作小按钮 ---- */
.action-btn {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px; background: rgba(255,255,255,0.95);
    border: 1px solid #e5e7eb; color: #6b7280;
    cursor: pointer; transition: all 0.15s;
}
.action-btn:hover { background: #f3f4f6; color: #111827; }
.action-btn.danger:hover { background: #fef2f2; color: #ef4444; }

/* ---- 空状态 ---- */
.empty-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 60px 20px; color: #9ca3af;
}
.empty-state svg { margin-bottom: 16px; opacity: 0.4; }

/* ---- 弹窗 ---- */
.modal {
    position: fixed; inset: 0; z-index: 50;
    display: flex; align-items: center; justify-content: center;
}
.modal.hidden { display: none !important; }
.modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
}
.modal-content {
    position: relative; width: 100%; max-width: 360px; margin: 0 16px;
    padding: 24px;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
    animation: modalIn 0.2s ease-out;
}
.modal-content h3 { font-size: 16px; font-weight: 600; color: #111827; margin-bottom: 16px; }
.modal-content input {
    width: 100%; height: 40px; padding: 0 12px;
    background: #f9fafb; color: #111827;
    border: 1px solid #e5e7eb; border-radius: 8px;
    font-size: 13px; outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.modal-content input::placeholder { color: #9ca3af; }
.modal-content input:focus { border-color: #4a9eff; box-shadow: 0 0 0 3px rgba(74,158,255,0.1); }
.modal-actions {
    display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px;
}

.modal-icon {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%; margin-bottom: 12px;
}
.modal-icon.danger-icon { background: #fef2f2; color: #ef4444; }
.modal-icon.warning-icon { background: #fefce8; color: #eab308; }
.modal-icon.info-icon { background: #eff6ff; color: #4a9eff; }

.modal-desc { font-size: 13px; color: #6b7280; margin-bottom: 16px; }

/* ---- 属性弹窗 ---- */
.properties-content { max-width: 400px; }
.properties-list { display: flex; flex-direction: column; gap: 12px; }
.properties-item {
    display: flex; align-items: flex-start; gap: 12px;
}
.properties-label {
    width: 80px; flex-shrink: 0;
    font-size: 12px; color: #9ca3af;
    padding-top: 2px;
}
.properties-value {
    flex: 1; font-size: 13px; color: #111827;
    word-break: break-all;
}

.copy-folder-list { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.copy-folder-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; border-radius: 6px;
    font-size: 13px; color: #6b7280; cursor: pointer;
    transition: all 0.15s;
}
.copy-folder-item:hover { background: #f3f4f6; color: #111827; }
.copy-folder-item.selected { background: #eff6ff; color: #4a9eff; border: 1px solid #bfdbfe; }

/* ---- 编辑器弹窗 ---- */
.editor-modal {
    position: fixed; inset: 0; z-index: 50;
    display: flex; flex-direction: column;
}
.editor-modal.hidden { display: none !important; }
.editor-wrap { position: relative; display: flex; flex-direction: column; height: 100%; }
.editor-header {
    display: flex; align-items: center; justify-content: space-between;
    height: 48px; padding: 0 16px;
    background: #fff; border-bottom: 1px solid #e5e7eb; flex-shrink: 0;
}
.editor-title { display: flex; align-items: center; gap: 12px; }
.editor-title span:first-child { font-size: 13px; font-weight: 500; color: #111827; }
.editor-status { font-size: 12px; color: #9ca3af; }
.editor-body { flex: 1; }

/* ---- 右键菜单 ---- */
.context-menu {
    position: fixed; z-index: 50;
    min-width: 180px; padding: 6px 0;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    animation: menuIn 0.1s ease-out;
}
.context-menu.hidden { display: none !important; }

.ctx-item {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 8px 16px;
    background: transparent; border: none;
    color: #374151; font-size: 13px;
    cursor: pointer; transition: background 0.1s; text-align: left;
}
.ctx-item:hover { background: #f9fafb; }
.ctx-item.ctx-danger { color: #ef4444; }
.ctx-item.ctx-danger:hover { background: #fef2f2; }
.ctx-item svg { flex-shrink: 0; }

.ctx-separator { height: 1px; background: #f3f4f6; margin: 4px 8px; }

/* ---- Toast ---- */
.toast-container {
    position: fixed; top: 16px; right: 16px; z-index: 60;
    display: flex; flex-direction: column; gap: 8px;
    pointer-events: none;
}
.toast {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-radius: 8px;
    font-size: 13px; font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    pointer-events: auto;
    animation: toastSlideIn 0.3s ease-out;
}
.toast.hiding { animation: toastSlideOut 0.3s ease-in forwards; }
.toast-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.toast-error   { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.toast-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; }
.toast-warning { background: #fefce8; border: 1px solid #fde68a; color: #a16207; }

/* ---- 上传进度 ---- */
.upload-overlay {
    position: fixed; bottom: 16px; right: 16px; z-index: 50;
    animation: uploadSlideIn 0.3s ease-out;
}
.upload-overlay.hidden { display: none !important; }
.upload-progress-card {
    width: 320px; padding: 16px;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}
.upload-progress-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px;
}
.upload-progress-header span:first-child { font-size: 13px; font-weight: 500; color: #111827; }
.upload-progress-header span:last-child { font-size: 12px; color: #6b7280; }
.upload-progress-track {
    height: 6px; background: #f3f4f6; border-radius: 3px; overflow: hidden;
}
.upload-progress-fill {
    height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, #4a9eff, #3a7eef);
    transition: width 0.3s;
}
.upload-progress-file { font-size: 12px; color: #9ca3af; margin-top: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- 拖拽上传高亮 ---- */
.file-list.drag-over { outline: 2px solid #4a9eff; outline-offset: -2px; }

/* ---- 文件拖拽移动 ---- */
.file-card.dragging {
    opacity: 0.5;
    transform: scale(0.95);
    border-color: #4a9eff;
    box-shadow: 0 0 0 2px rgba(74,158,255,0.3);
}
.file-list-row.dragging {
    opacity: 0.5;
    background: #eff6ff;
    border: 1px dashed #4a9eff;
}
/* ---- 响应式 ---- */
@media (max-width: 1024px) {
    .sidebar { position: fixed; top: 56px; left: 0; bottom: 0; transform: translateX(-100%); transition: transform 0.3s; z-index: 40; }
    .sidebar.sidebar-open { transform: translateX(0); }
    .lg-hidden { display: flex !important; }
}
@media (min-width: 1025px) {
    .lg-hidden { display: none !important; }
}

@media (max-width: 640px) {
    .search-box input { width: 140px; }
    .file-grid { grid-template-columns: repeat(2, 1fr); }
}
