/* 我的网盘 - 界面样式 */
*, *::before, *::after { box-sizing: border-box; }

:root {
    --bg: #f5f6fa;
    --panel: #ffffff;
    --panel-soft: #fafbfd;
    --text: #1f2430;
    --muted: #7a8294;
    --line: #e8eaf0;
    --line-strong: #dde1e9;
    --primary: #2f6bff;
    --primary-hover: #1f5af0;
    --primary-soft: #eef3ff;
    --danger: #e5484d;
    --danger-soft: #fdeeee;
    --ok: #2f9e63;
    --radius: 12px;
    --radius-sm: 9px;
    --shadow: 0 12px 34px rgba(23, 34, 60, 0.10);
    --shadow-soft: 0 4px 14px rgba(23, 34, 60, 0.06);
}

html, body { height: 100%; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: #f1f3f8; border-radius: 4px; padding: 1px 5px; font-size: 12px; }
svg { display: block; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

/* ---------- 通用控件 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 38px;
    padding: 0 16px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--panel);
    color: var(--text);
    font-weight: 500;
    white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s, transform .05s;
}
.btn:hover { background: #f7f8fb; border-color: #cfd5e0; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover { background: #cf3b40; border-color: #cf3b40; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: #f0f2f7; color: var(--text); }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    flex: none;
}
.icon-btn:hover { background: #f0f2f7; color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13px; color: #4b5563; margin-bottom: 7px; font-weight: 500; }
.field input, .field select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(47, 107, 255, .12);
}
.field input::placeholder { color: #a6adbb; }

.form-error {
    color: var(--danger);
    font-size: 13px;
    min-height: 18px;
    margin: -4px 0 10px;
}
.form-hint { color: var(--muted); font-size: 12px; margin-top: -8px; margin-bottom: 14px; }

/* ---------- 登录 / 安装 ---------- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(900px 480px at 15% 10%, rgba(47, 107, 255, .10), transparent 60%),
        radial-gradient(700px 420px at 90% 90%, rgba(47, 158, 99, .08), transparent 60%),
        #f5f6fa;
}
.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 36px 34px 28px;
    box-shadow: var(--shadow);
}
.auth-logo, .brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4d82ff, #2f6bff);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(47, 107, 255, .28);
}
.auth-logo { margin-bottom: 18px; }
.auth-card h1 { font-size: 22px; margin: 0 0 6px; letter-spacing: .2px; }
.auth-sub { color: var(--muted); margin: 0 0 24px; font-size: 13px; }
.auth-foot { color: #9aa1af; font-size: 12px; text-align: center; margin: 20px 0 0; line-height: 1.6; }

/* ---------- 主框架 ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 236px;
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border-right: 1px solid var(--line);
    padding: 18px 14px 14px;
    z-index: 40;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 18px; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; font-size: 16px; box-shadow: 0 5px 12px rgba(47, 107, 255, .22); }
.brand-name {
    font-size: 15px;
    font-weight: 650;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; padding-bottom: 10px; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    height: 42px;
    padding: 0 11px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #4c5566;
    font-size: 14px;
    text-align: left;
    transition: background .14s, color .14s;
}
.nav-item svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nav-item:hover { background: #f3f5f9; color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-sep { height: 1px; background: var(--line); margin: 9px 10px; }
.nav-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #eef0f5;
    color: var(--muted);
    font-size: 11px;
    line-height: 20px;
    text-align: center;
}
.nav-item.active .nav-badge { background: #dbe6ff; color: var(--primary); }

.storage { padding: 12px 10px 10px; border-top: 1px solid var(--line); }
.storage-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 7px; }
.storage-bar { height: 6px; border-radius: 4px; background: #edf0f5; overflow: hidden; }
.storage-bar i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, #5b8bff, #2f6bff); transition: width .4s; }
.storage-sub { font-size: 11px; color: #9aa1af; margin-top: 7px; }

.userbox { display: flex; align-items: center; gap: 9px; padding: 10px 8px 0; border-top: 1px solid var(--line); }
.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e9efff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 650;
    flex: none;
}
.user-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.user-meta strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta span { font-size: 11px; color: var(--muted); }

.main { flex: 1; min-width: 0; margin-left: 236px; display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 14px;
    height: 64px;
    padding: 0 26px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.menu-btn { display: none; }

.breadcrumbs { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; overflow: hidden; }
.crumb {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 8px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #55607a;
    font-size: 14px;
    white-space: nowrap;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.crumb:hover { background: #f2f4f8; color: var(--text); }
.crumb.current { color: var(--text); font-weight: 600; }
.crumb-sep { color: #b8bfcc; font-size: 12px; flex: none; user-select: none; }

.top-actions { display: flex; align-items: center; gap: 10px; }
.searchbox {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 230px;
    height: 38px;
    padding: 0 11px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.searchbox:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 107, 255, .10); }
.searchbox svg { width: 16px; height: 16px; fill: none; stroke: #8a92a3; stroke-width: 1.8; stroke-linecap: round; }
.searchbox input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 13px; }
.searchbox input::-webkit-search-cancel-button { cursor: pointer; }

.selection-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 26px;
    background: var(--primary-soft);
    border-bottom: 1px solid #dce7ff;
    color: #24478f;
    font-size: 13px;
}
.selection-actions { display: flex; gap: 8px; }
.selection-bar .btn { background: #fff; }
.selection-bar .btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.selection-bar .btn.danger:hover { background: #cf3b40; border-color: #cf3b40; }

.content { flex: 1; padding: 22px 26px 40px; }
.file-view { max-width: 1280px; margin: 0 auto; }

/* ---------- 文件表 ---------- */
.list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.list-title { font-size: 16px; font-weight: 650; margin: 0; }
.list-sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.list-head-actions { display: flex; align-items: center; gap: 8px; }

.table-wrap {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}
.file-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.file-table thead th {
    height: 44px;
    padding: 0 12px;
    background: #fbfcfe;
    border-bottom: 1px solid var(--line);
    color: #7c8496;
    font-size: 12px;
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
}
.file-table th.sortable { cursor: pointer; user-select: none; }
.file-table th.sortable:hover { color: var(--text); }
.file-table th .sort-arrow { font-size: 10px; margin-left: 3px; color: var(--primary); }
.file-table th.col-check, .file-table td.col-check { width: 46px; padding-left: 16px; padding-right: 0; }
.file-table th.col-size, .file-table td.col-size { width: 110px; }
.file-table th.col-mtime, .file-table td.col-mtime { width: 160px; }
.file-table th.col-ops, .file-table td.col-ops { width: 92px; text-align: right; padding-right: 16px; }
.file-table th.col-loc, .file-table td.col-loc { width: 220px; }
.file-table th.col-orig, .file-table td.col-orig { width: 200px; }
.file-table th.col-deleted, .file-table td.col-deleted { width: 130px; }
.file-table th.col-link, .file-table td.col-link { width: 220px; }
.file-table th.col-status, .file-table td.col-status { width: 78px; }
.file-table th.col-dl, .file-table td.col-dl { width: 60px; }
.file-table th.col-created, .file-table td.col-created { width: 130px; }

.loc-link {
    max-width: 100%;
    border: 0;
    background: transparent;
    padding: 3px 5px;
    border-radius: 6px;
    color: #7a8294;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.loc-link:hover { background: #f0f3f8; color: var(--primary); }

.text-btn {
    border: 0;
    background: transparent;
    color: var(--primary);
    font-size: 12.5px;
    padding: 4px 6px;
    border-radius: 6px;
    white-space: nowrap;
}
.text-btn:hover { background: #eef3ff; }
.text-btn.danger { color: var(--danger); }
.text-btn.danger:hover { background: var(--danger-soft); }
.file-table td {
    height: 58px;
    padding: 0 12px;
    border-bottom: 1px solid #f1f3f7;
    font-size: 13px;
    color: #4b5563;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.file-table tbody tr:last-child td { border-bottom: 0; }
.file-table tbody tr { transition: background .12s; }
.file-table tbody tr:hover { background: #fafbff; }
.file-table tbody tr.selected { background: #f0f5ff; }

.name-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.name-cell .file-name {
    border: 0;
    background: transparent;
    padding: 0;
    text-align: left;
    font-size: 13.5px;
    color: var(--text);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.name-cell .file-name:hover { color: var(--primary); }
.name-meta { display: block; color: #9aa1af; font-size: 11.5px; margin-top: 2px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.name-main { min-width: 0; display: flex; flex-direction: column; }

.file-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    background: #f1f3f8;
    color: #64748b;
}
.file-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.file-icon.dir { background: #fff6df; color: #d69a16; }
.file-icon.image { background: #e9f8f0; color: #2f9e63; }
.file-icon.video { background: #f1eeff; color: #7c5cfc; }
.file-icon.audio { background: #fdeef4; color: #d95c8a; }
.file-icon.pdf { background: #fdeeee; color: #e5484d; }
.file-icon.doc { background: #eef3ff; color: #2f6bff; }
.file-icon.text { background: #f1f5f9; color: #64748b; }
.file-icon.archive { background: #faf3e6; color: #b07a2a; }
.file-icon.other { background: #f1f3f8; color: #64748b; }

.row-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #8a92a3;
    opacity: .35;
}
tr:hover .row-menu, .row-menu.open { opacity: 1; background: #eef1f7; color: var(--text); }
.row-menu svg { width: 18px; height: 18px; fill: currentColor; }

.checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
    vertical-align: middle;
    margin: 0;
}

.empty-state { padding: 70px 20px; text-align: center; }
.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 18px;
    background: #eef1f7;
    color: #9aa4b6;
    display: flex;
    align-items: center;
    justify-content: center;
}
.empty-icon svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.empty-state h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.empty-state p { margin: 0; color: var(--muted); font-size: 13px; }

.loading-state { padding: 60px; text-align: center; color: var(--muted); }
.spinner {
    width: 26px;
    height: 26px;
    margin: 0 auto 12px;
    border: 3px solid #e4e8f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 0 4px;
    flex-wrap: wrap;
}
.page-btn {
    height: 32px;
    min-width: 32px;
    padding: 0 9px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #fff;
    color: #55607a;
    font-size: 12.5px;
}
.page-btn:hover { border-color: #c3cad8; color: var(--text); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: .45; cursor: not-allowed; }
.page-info { color: var(--muted); font-size: 12px; padding: 0 6px; }

/* ---------- 右键菜单 ---------- */
.context-menu {
    position: fixed;
    z-index: 200;
    min-width: 172px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 11px;
    box-shadow: var(--shadow);
}
.context-menu button {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #3f4858;
    font-size: 13px;
    text-align: left;
}
.context-menu button:hover { background: #f3f5f9; }
.context-menu button.danger { color: var(--danger); }
.context-menu button.danger:hover { background: var(--danger-soft); }
.context-menu button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.context-sep { height: 1px; background: var(--line); margin: 5px 4px; }

/* ---------- 上传 ---------- */
.drop-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(31, 41, 64, .45);
    backdrop-filter: blur(2px);
}
.drop-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: min(420px, 86vw);
    padding: 42px 30px;
    border: 2px dashed rgba(255, 255, 255, .7);
    border-radius: 20px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    text-align: center;
}
.drop-box svg { width: 42px; height: 42px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 6px; }
.drop-box strong { font-size: 17px; }
.drop-box span { font-size: 13px; opacity: .8; }

.upload-panel {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 180;
    width: 370px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.upload-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    padding: 0 12px 0 16px;
    border-bottom: 1px solid var(--line);
    background: #fbfcfe;
}
.upload-head strong { font-size: 13.5px; }
.upload-head-actions { display: flex; align-items: center; gap: 8px; }
#upload-summary { color: var(--muted); font-size: 12px; }
.upload-list { max-height: 260px; overflow-y: auto; padding: 8px; }
.upload-item { padding: 9px 8px; border-radius: 9px; }
.upload-item:hover { background: #f7f9fc; }
.upload-item-top { display: flex; align-items: center; gap: 9px; }
.upload-item-name { flex: 1; min-width: 0; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-item-status { font-size: 11px; color: var(--muted); flex: none; }
.upload-item-status.error { color: var(--danger); }
.upload-item-status.done { color: var(--ok); }
.upload-progress { height: 4px; margin: 7px 0 0 0; border-radius: 3px; background: #edf0f5; overflow: hidden; }
.upload-progress i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--primary); transition: width .2s; }
.upload-item.error .upload-progress i { background: var(--danger); }
.upload-item.done .upload-progress i { background: var(--ok); }
.upload-empty { padding: 22px; text-align: center; color: var(--muted); font-size: 12.5px; }

/* ---------- 弹窗 ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 260;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(28, 36, 54, .42);
    backdrop-filter: blur(2px);
}
.modal {
    width: 100%;
    max-width: 460px;
    max-height: calc(100vh - 44px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(18, 28, 52, .24);
    overflow: hidden;
}
.modal.wide { max-width: 640px; }
.modal.preview-modal { max-width: 1080px; }
.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 17px 18px 13px 22px;
    border-bottom: 1px solid var(--line);
}
.modal-head h2 { margin: 0; font-size: 16px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    padding: 14px 22px;
    border-top: 1px solid var(--line);
    background: #fbfcfe;
}
.modal-foot .left { margin-right: auto; color: var(--muted); font-size: 12px; }

.preview-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    max-height: 70vh;
    background: #121722;
    border-radius: 10px;
    overflow: hidden;
}
.preview-stage img, .preview-stage video { max-width: 100%; max-height: 70vh; display: block; }
.preview-stage audio { width: min(520px, 90%); }
.preview-stage iframe { width: 100%; height: 68vh; border: 0; background: #fff; }
.preview-text {
    margin: 0;
    max-height: 62vh;
    overflow: auto;
    padding: 16px 18px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-family: "Cascadia Code", Consolas, "Courier New", monospace;
    font-size: 12.5px;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
    color: #334155;
}
.preview-info { color: var(--muted); font-size: 12px; margin: 10px 2px 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.folder-picker {
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}
.picker-path {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 9px 10px;
    background: #fbfcfe;
    border-bottom: 1px solid var(--line);
    min-height: 42px;
    overflow-x: auto;
}
.picker-path button { border: 0; background: transparent; color: #55607a; font-size: 12.5px; padding: 3px 5px; border-radius: 5px; white-space: nowrap; }
.picker-path button:hover { background: #eef1f7; }
.picker-list { height: 230px; overflow-y: auto; padding: 6px; }
.picker-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    height: 38px;
    padding: 0 9px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    font-size: 13px;
    text-align: left;
}
.picker-item:hover { background: #f3f5f9; }
.picker-item svg { width: 17px; height: 17px; fill: none; stroke: #d69a16; stroke-width: 1.7; stroke-linejoin: round; }
.picker-empty { padding: 30px; text-align: center; color: var(--muted); font-size: 12.5px; }

.share-result {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfcfe;
    display: flex;
    gap: 8px;
    align-items: center;
}
.share-result input {
    flex: 1;
    min-width: 0;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #fff;
    font-size: 12px;
    color: #55607a;
    outline: none;
}

.settings-grid { display: grid; gap: 14px; }
.settings-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px;
    background: var(--panel-soft);
}
.settings-card h3 { margin: 0 0 4px; font-size: 14px; }
.settings-card p { margin: 0 0 14px; color: var(--muted); font-size: 12px; }
.stat-row { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 8px; }
.stat-item strong { display: block; font-size: 20px; }
.stat-item span { color: var(--muted); font-size: 12px; }

.trash-toolbar, .shares-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.share-url-cell { display: flex; align-items: center; gap: 6px; }
.share-url-cell input { width: 100%; height: 30px; border: 1px solid var(--line); border-radius: 7px; padding: 0 8px; font-size: 11.5px; color: #6b7488; background: #fbfcfe; }
.status-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; background: #edf8f1; color: #2f9e63; }
.status-pill.expired { background: #fff4e8; color: #c47b1a; }
.status-pill.missing { background: #fdeeee; color: #d94348; }

/* ---------- Toast ---------- */
.toast-root {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 400;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    pointer-events: none;
}
.toast {
    min-width: 220px;
    max-width: 86vw;
    padding: 11px 16px;
    border-radius: 10px;
    background: rgba(32, 41, 61, .94);
    color: #fff;
    font-size: 13px;
    box-shadow: 0 10px 30px rgba(18, 28, 52, .2);
    animation: toast-in .18s ease-out;
}
.toast.error { background: rgba(197, 47, 53, .96); }
.toast.success { background: rgba(35, 132, 79, .96); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- 分享页 ---------- */
.share-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(800px 420px at 20% 10%, rgba(47, 107, 255, .10), transparent 60%),
        radial-gradient(600px 360px at 90% 90%, rgba(124, 92, 252, .08), transparent 60%),
        #f5f6fa;
}
.share-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 22px 26px 24px;
    box-shadow: var(--shadow);
}
.share-brand { display: flex; align-items: center; gap: 10px; color: #55607a; font-size: 13px; margin-bottom: 26px; }
.share-brand .brand-mark { width: 32px; height: 32px; border-radius: 10px; font-size: 14px; }
.share-file { text-align: center; }
.share-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
    border-radius: 20px;
    background: #eef3ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .5px;
}
.share-thumb {
    max-width: 100%;
    max-height: 260px;
    border-radius: 12px;
    display: block;
    margin: 0 auto 16px;
    object-fit: contain;
    background: #f4f6fa;
}
.share-file h1 {
    font-size: 16.5px;
    margin: 0 0 7px;
    word-break: break-all;
    line-height: 1.45;
}
.share-meta { color: var(--muted); font-size: 12.5px; margin: 0 0 22px; }
.share-password { margin-bottom: 6px; }
.share-actions { display: flex; flex-direction: column; gap: 9px; }
.share-empty { text-align: center; padding: 18px 0 8px; }
.share-empty .share-icon { background: #fdeeee; color: var(--danger); font-size: 22px; }
.share-empty h1 { font-size: 16px; margin: 0 0 8px; }
.share-foot { text-align: center; color: #a0a7b5; font-size: 11.5px; margin: 26px 0 0; }

/* ---------- 响应式 ---------- */
@media (max-width: 1060px) {
    .searchbox { width: 190px; }
    .file-table th.col-mtime, .file-table td.col-mtime { width: 132px; }
    .file-table th.col-loc, .file-table td.col-loc { width: 160px; }
}

@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: none; }
    .sidebar.open { transform: translateX(0); box-shadow: 0 0 50px rgba(20, 30, 55, .22); }
    .main { margin-left: 0; }
    .menu-btn { display: inline-flex; }
    .topbar { padding: 0 16px; gap: 8px; }
    .content { padding: 18px 16px 32px; }
    .selection-bar { padding-left: 16px; padding-right: 16px; }
    .breadcrumbs { display: none; }
    .top-actions { flex: 1; justify-content: flex-end; }
    .searchbox { flex: 1; max-width: 280px; }
    .upload-panel { right: 12px; bottom: 12px; }
    .file-table th.col-loc, .file-table td.col-loc { display: none; }
    .file-table th.col-orig, .file-table td.col-orig { display: none; }
    .file-table th.col-link, .file-table td.col-link { display: none; }
}

@media (max-width: 640px) {
    .topbar { height: 58px; }
    .btn-label { display: none; }
    .btn { padding: 0 11px; }
    #btn-upload, #btn-newfolder { width: 38px; padding: 0; }
    .searchbox { width: auto; }
    .file-table th.col-size, .file-table td.col-size { display: none; }
    .file-table th.col-mtime, .file-table td.col-mtime { display: none; }
    .file-table th.col-deleted, .file-table td.col-deleted { display: none; }
    .file-table th.col-created, .file-table td.col-created { display: none; }
    .file-table th.col-status, .file-table td.col-status { width: 74px; }
    .file-table th.col-dl, .file-table td.col-dl { display: none; }
    .file-table th.col-ops, .file-table td.col-ops { width: 58px; padding-right: 8px; }
    .file-table th.col-check, .file-table td.col-check { width: 40px; padding-left: 10px; }
    .file-table td { height: 56px; padding-left: 8px; padding-right: 8px; }
    .auth-card { padding: 28px 22px 22px; }
    .modal-foot { padding: 12px 16px; }
    .modal-body { padding: 16px; }
    .modal-head { padding: 14px 12px 12px 16px; }
    .upload-panel { width: calc(100vw - 24px); }
    .selection-bar { flex-wrap: wrap; }
    .share-card { padding: 20px; }
}