/* ============================================================
   天翼云盘接管台 · UI
   深色玻璃质感 / 单一蓝色强调色
   ============================================================ */

:root {
    --bg:            #0a0f16;
    --bg-soft:       #0d141d;
    --panel:         #111a25;
    --panel-2:       #0c141d;
    --panel-3:       #0a121a;
    --line:          rgba(255, 255, 255, .07);
    --line-strong:   rgba(255, 255, 255, .13);
    --text:          #e9eff7;
    --text-dim:      #94a5ba;
    --text-mute:     #66788d;
    --accent:        #4a9ee0;
    --accent-2:      #2f7fc4;
    --accent-deep:   #276aa4;
    --accent-soft:   rgba(74, 158, 224, .13);
    --accent-line:   rgba(74, 158, 224, .32);
    --ok:            #3fc08d;
    --warn:          #e0a94a;
    --danger:        #e56b62;
    --radius-lg:     18px;
    --radius:        12px;
    --radius-sm:     9px;
    --shadow-card:   0 28px 70px -26px rgba(0, 0, 0, .9), 0 2px 8px rgba(0, 0, 0, .35);
    --font: "Inter", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
            "Microsoft YaHei", "Noto Sans SC", sans-serif;
    --mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
.mono { font-family: var(--mono); font-size: .92em; }

::selection { background: rgba(74, 158, 224, .3); }

/* 细滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .1); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .18); background-clip: content-box; }

/* ============================================================
   登录 / 初始化
   ============================================================ */

.auth-body {
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
    background: #0b1018;
}

.auth-bg {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(760px 480px at 50% -8%, rgba(64, 138, 205, .16), transparent 62%),
        radial-gradient(520px 420px at 88% 108%, rgba(58, 120, 180, .10), transparent 60%),
        linear-gradient(180deg, #0c121b 0%, #090e15 100%);
    pointer-events: none;
}

.auth-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 78%);
    -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 78%);
}

.auth-card {
    position: relative;
    z-index: 2;
    width: min(420px, 100%);
    padding: 34px 32px 30px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, .075);
    background:
        linear-gradient(180deg, rgba(23, 33, 46, .96) 0%, rgba(16, 24, 34, .98) 100%);
    box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, .05);
    backdrop-filter: blur(12px);
    animation: card-in .45s cubic-bezier(.22, .8, .3, 1);
}

@keyframes card-in {
    from { opacity: 0; transform: translateY(10px) scale(.99); }
    to   { opacity: 1; transform: none; }
}

.eyebrow {
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .06em;
    color: #4d9fe1;
    margin-bottom: 14px;
}

.auth-title {
    margin: 0 0 26px;
    font-size: 40px;
    line-height: 1.14;
    font-weight: 700;
    letter-spacing: -.02em;
    color: #f2f6fb;
}

.field-label {
    display: block;
    font-size: 14px;
    color: #9aabbf;
    margin-bottom: 9px;
}

.field-hint {
    margin: 10px 0 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--text-mute);
}

.text-input {
    width: 100%;
    height: 52px;
    padding: 0 14px;
    border-radius: 11px;
    border: 1px solid #24334a;
    background: #0b131c;
    color: var(--text);
    font-size: 15px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .45);
    transition: border-color .16s, box-shadow .16s, background .16s;
}

.text-input::placeholder { color: #4d5d72; }

.text-input:hover { border-color: #2c3d55; }

.text-input:focus {
    outline: none;
    background: #0a1119;
    border-color: var(--accent-2);
    box-shadow: 0 0 0 3px rgba(47, 127, 196, .16), inset 0 1px 2px rgba(0, 0, 0, .5);
}

.text-input.sm { height: 42px; font-size: 14px; border-radius: 10px; }

.text-area {
    width: 100%;
    padding: 11px 13px;
    border-radius: 10px;
    border: 1px solid #24334a;
    background: #0b131c;
    color: var(--text);
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.6;
    resize: vertical;
    min-height: 84px;
    transition: border-color .16s, box-shadow .16s;
}

.text-area:focus {
    outline: none;
    border-color: var(--accent-2);
    box-shadow: 0 0 0 3px rgba(47, 127, 196, .16);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 44px;
    margin-top: 16px;
    padding: 0 26px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 11px;
    background: linear-gradient(180deg, #3689cb 0%, #2a76b0 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: .01em;
    box-shadow: 0 10px 24px -12px rgba(58, 145, 214, .9), inset 0 1px 0 rgba(255, 255, 255, .14);
    transition: transform .12s, filter .16s, box-shadow .16s;
}

.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 14px 26px -12px rgba(58, 145, 214, 1); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary.sm { height: 38px; padding: 0 20px; font-size: 13.5px; margin-top: 0; border-radius: 9px; }

.form-error {
    margin: 12px 0 0;
    font-size: 13px;
    color: #f08a82;
    display: flex;
    gap: 6px;
    align-items: center;
}

.form-error::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--danger);
    box-shadow: 0 0 0 3px rgba(229, 107, 98, .15);
}

.auth-foot {
    position: fixed;
    bottom: 26px;
    left: 0; right: 0;
    text-align: center;
    font-size: 12px;
    color: #3d4c5f;
    letter-spacing: .04em;
    z-index: 2;
}

.auth-foot .dot { opacity: .5; margin: 0 2px; }

/* ============================================================
   应用骨架
   ============================================================ */

.app-body { background: var(--bg); }

.app-shell {
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    min-height: 100vh;
}

/* ---------------- 侧边栏 ---------------- */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 14px 14px;
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg, #0c131c 0%, #0a1018 100%);
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 30;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 18px;
}

.brand-mark {
    width: 34px; height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #cfe7ff;
    background: linear-gradient(160deg, #2f7fc4 0%, #1d4f7e 100%);
    box-shadow: 0 6px 16px -8px rgba(58, 145, 214, .9), inset 0 1px 0 rgba(255, 255, 255, .18);
}

.brand-name { font-size: 14.5px; font-weight: 600; letter-spacing: .01em; }
.brand-sub { font-size: 11.5px; color: var(--text-mute); margin-top: 2px; letter-spacing: .06em; }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }

.nav-label {
    margin: 16px 10px 6px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .1em;
    color: #4c5c70;
    text-transform: uppercase;
}

.nav-label:first-child { margin-top: 2px; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 38px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-dim);
    font-size: 13.5px;
    text-align: left;
    transition: background .14s, color .14s, border-color .14s;
}

.nav-item svg { flex: none; opacity: .8; }
.nav-item:hover { background: rgba(255, 255, 255, .045); color: #d7e3f0; }

.nav-item.is-active {
    color: #d8ecff;
    background: linear-gradient(90deg, rgba(74, 158, 224, .17), rgba(74, 158, 224, .05));
    border-color: rgba(74, 158, 224, .2);
    box-shadow: inset 2px 0 0 var(--accent);
}

.nav-item.is-active svg { opacity: 1; color: #6cb4ec; }

.nav-badge {
    margin-left: auto;
    min-width: 20px;
    height: 18px;
    padding: 0 6px;
    display: grid;
    place-items: center;
    border-radius: 99px;
    background: rgba(255, 255, 255, .07);
    font-size: 11px;
    color: var(--text-dim);
}

.sidebar-foot { margin-top: auto; padding-top: 12px; display: grid; gap: 10px; }

.quota-card {
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .022);
}

.quota-head {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--text-mute);
    margin-bottom: 8px;
}

.quota-head span:last-child { color: var(--text-dim); font-variant-numeric: tabular-nums; }

.quota-bar {
    height: 5px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .07);
    overflow: hidden;
}

.quota-bar i {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #3a8bcc, #5fb6f2);
    transition: width .5s cubic-bezier(.3, .8, .3, 1);
}

.quota-sub { margin-top: 8px; font-size: 11px; color: #55657a; font-variant-numeric: tabular-nums; }

.user-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 9px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    transition: background .14s, border-color .14s;
}

.user-row:hover { background: rgba(255, 255, 255, .03); border-color: var(--line); }

.avatar {
    width: 30px; height: 30px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    color: #cde4f8;
    background: linear-gradient(150deg, #24455f, #1a2f42);
    border: 1px solid rgba(120, 170, 210, .22);
}

.user-meta { min-width: 0; }
.user-name { font-size: 12.5px; color: #cfdcea; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-sub { font-size: 11px; color: #4f6075; margin-top: 2px; }
.logout-form { margin-left: auto; }

/* ---------------- 顶栏 ---------------- */

.main { display: flex; flex-direction: column; min-width: 0; background: radial-gradient(900px 420px at 80% -12%, rgba(58, 130, 190, .07), transparent 65%); }

.topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 64px;
    padding: 0 22px;
    border-bottom: 1px solid var(--line);
    background: rgba(10, 16, 23, .78);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.crumbs { display: flex; align-items: center; gap: 2px; min-width: 0; flex: 1; overflow: hidden; }

.crumb {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 190px;
    padding: 5px 8px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-mute);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background .14s, color .14s;
}

.crumb:hover { background: rgba(255, 255, 255, .05); color: var(--text-dim); }
.crumb.is-current { color: #e2ecf7; font-weight: 500; }
.crumb-sep { color: #33414f; flex: none; display: grid; place-items: center; }

.topbar-right { display: flex; align-items: center; gap: 8px; }

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 236px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, .03);
    color: var(--text-mute);
    transition: border-color .16s, background .16s, width .2s;
}

.search-box:focus-within {
    border-color: var(--accent-line);
    background: rgba(74, 158, 224, .06);
    color: var(--accent);
    width: 280px;
}

.search-box input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    font-size: 13px;
    color: var(--text);
}

.search-box input:focus { outline: none; }
.search-box input::-webkit-search-cancel-button { display: none; }

.search-kbd {
    font-family: var(--mono);
    font-size: 10px;
    color: #4b5b6e;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 1px 5px;
}

.ghost-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, .025);
    color: var(--text-dim);
    font-size: 13px;
    transition: background .14s, color .14s, border-color .14s;
}

.ghost-btn:hover { background: rgba(255, 255, 255, .06); color: var(--text); border-color: var(--line-strong); }
.ghost-btn.sm { height: 32px; font-size: 12.5px; padding: 0 11px; }
.ghost-btn:disabled { opacity: .45; cursor: default; }

.icon-btn {
    width: 32px; height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text-mute);
    transition: background .14s, color .14s;
}

.icon-btn:hover { background: rgba(255, 255, 255, .06); color: var(--text); }

.only-mobile { display: none; }
.only-sm { display: none; }

@media (max-width: 860px) {
    .only-sm { display: inline; }
    .hide-sm { display: none; }
}

/* ---------------- 内容区 ---------------- */

.content { padding: 22px 26px 40px; max-width: 1280px; width: 100%; }

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.page-head h1 {
    margin: 0;
    font-size: 25px;
    font-weight: 650;
    letter-spacing: -.015em;
}

.page-head p { margin: 6px 0 0; font-size: 12.5px; color: var(--text-mute); }

.page-head-tags { display: flex; align-items: center; gap: 8px; padding-bottom: 3px; }

.tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 26px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 99px;
    font-size: 11.5px;
    color: var(--text-dim);
    background: rgba(255, 255, 255, .03);
    white-space: nowrap;
}

.tag-mode { color: #7fc4f0; border-color: rgba(74, 158, 224, .28); background: rgba(74, 158, 224, .1); }
.tag-mode.is-live { color: #6fd6ab; border-color: rgba(63, 192, 141, .3); background: rgba(63, 192, 141, .1); }

/* ---------------- 文件表格 ---------------- */

.table-wrap {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(17, 26, 37, .92), rgba(13, 20, 29, .92));
    overflow: hidden;
    box-shadow: 0 18px 40px -30px rgba(0, 0, 0, .9);
}

.file-table { width: 100%; border-collapse: collapse; table-layout: fixed; }

.file-table thead th {
    height: 40px;
    padding: 0 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #5d6f84;
    background: rgba(255, 255, 255, .022);
    border-bottom: 1px solid var(--line);
}

.col-name { width: auto; }
.col-size { width: 108px; }
.col-time { width: 152px; }
.col-act  { width: 218px; text-align: right !important; }

.file-row { border-bottom: 1px solid rgba(255, 255, 255, .04); transition: background .12s; }
.file-row:last-child { border-bottom: 0; }
.file-row:hover { background: rgba(255, 255, 255, .028); }
.file-row.is-folder:hover { background: rgba(74, 158, 224, .05); }

.file-row td { padding: 0 14px; height: 58px; vertical-align: middle; }

.name-cell { display: flex; align-items: center; gap: 11px; min-width: 0; }

.file-icon {
    width: 32px; height: 32px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: #93a8bd;
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .055);
}

.file-icon.k-folder { color: #6fb4ec; background: rgba(74, 158, 224, .13); border-color: rgba(74, 158, 224, .2); }
.file-icon.k-image { color: #6fd0b0; background: rgba(63, 192, 141, .1); border-color: rgba(63, 192, 141, .16); }
.file-icon.k-video { color: #d3a5f0; background: rgba(170, 120, 220, .1); border-color: rgba(170, 120, 220, .18); }
.file-icon.k-audio { color: #e9b96b; background: rgba(224, 169, 74, .1); border-color: rgba(224, 169, 74, .18); }
.file-icon.k-doc { color: #86b8f0; background: rgba(90, 140, 210, .1); border-color: rgba(90, 140, 210, .18); }
.file-icon.k-archive { color: #c9a37a; background: rgba(190, 150, 110, .1); border-color: rgba(190, 150, 110, .18); }

.file-name {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.file-name b {
    font-size: 13.5px;
    font-weight: 450;
    color: #dfe8f2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: .005em;
}

.file-name small { font-size: 11px; color: #4f6075; display: none; }

.file-row.is-folder .file-name b { cursor: pointer; }
.file-row.is-folder:hover .file-name b { color: #eaf3fb; }

.meta-cell { font-size: 12.5px; color: #6f8196; font-variant-numeric: tabular-nums; white-space: nowrap; }

.act-cell { text-align: right; }

.row-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
    flex-wrap: nowrap;
    opacity: .72;
    transition: opacity .14s;
}

.file-row:hover .row-actions,
.file-row.is-open .row-actions { opacity: 1; }

.act-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    height: 29px;
    padding: 0 9px;
    white-space: nowrap;
    border: 1px solid rgba(74, 158, 224, .22);
    border-radius: 8px;
    background: rgba(74, 158, 224, .09);
    color: #7bc0ee;
    font-size: 12px;
    transition: background .14s, border-color .14s, color .14s, transform .12s;
}

.act-btn:hover { background: rgba(74, 158, 224, .18); border-color: rgba(74, 158, 224, .4); color: #a8d8f8; }
.act-btn:active { transform: translateY(1px); }

.act-btn.plain {
    background: rgba(255, 255, 255, .04);
    border-color: var(--line);
    color: var(--text-dim);
}

.act-btn.plain:hover { background: rgba(255, 255, 255, .08); color: var(--text); border-color: var(--line-strong); }

.act-btn.is-loading { pointer-events: none; opacity: .6; }

.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 直链展示条 ---------------- */

.tray-row > td {
    padding: 0 !important;
    height: auto !important;
    background: rgba(6, 11, 17, .55);
    border-bottom: 1px solid rgba(255, 255, 255, .045);
}

.link-tray {
    padding: 13px 16px 15px 57px;
    animation: tray-in .22s ease;
}

@keyframes tray-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: none; }
}

/* 代理直链 / 官方直链：两行同款，中间用细虚线分隔 */
.tray-line + .tray-line {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(255, 255, 255, .06);
}

.tray-line.is-fail .tray-label { color: #b08b6d; }

.tray-fail {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    color: #b08b6d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tray-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tray-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: #7aa8cc;
    letter-spacing: .04em;
    flex: none;
}

.link-chip {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 8px 0 13px;
    border: 1px dashed var(--accent-line);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(74, 158, 224, .09), rgba(74, 158, 224, .035));
    transition: border-color .16s, background .16s;
}

.link-chip:hover { border-color: rgba(74, 158, 224, .5); background: rgba(74, 158, 224, .1); }

.link-chip code {
    flex: 1;
    min-width: 0;
    font-family: var(--mono);
    font-size: 12px;
    color: #a9cbe4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: ltr;
    user-select: all;
}

.copy-btn {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 11px;
    border: 1px solid rgba(74, 158, 224, .35);
    border-radius: 7px;
    background: rgba(74, 158, 224, .16);
    color: #b6dcf7;
    font-size: 12px;
    transition: background .14s, color .14s, border-color .14s;
}

.copy-btn:hover { background: rgba(74, 158, 224, .3); color: #fff; }
.copy-btn.is-done { background: rgba(63, 192, 141, .18); border-color: rgba(63, 192, 141, .4); color: #86e0b8; }

.tray-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 9px;
    font-size: 11.5px;
    color: #55677c;
    flex-wrap: wrap;
}

.tray-meta .live-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #3fc08d;
    box-shadow: 0 0 0 3px rgba(63, 192, 141, .13);
    animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse { 50% { opacity: .4; } }

.tray-meta b { color: #8fb6d4; font-weight: 500; font-variant-numeric: tabular-nums; }
.tray-meta .sep { color: #2f3d4c; }

.text-link-btn {
    border: 0;
    background: none;
    padding: 0;
    color: #5c93bb;
    font-size: 11.5px;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(92, 147, 187, .35);
}

.text-link-btn:hover { color: #8cc4e8; }

/* ---------------- 空态 / 骨架 / 分页 ---------------- */

.empty { padding: 64px 20px 72px; text-align: center; }
.empty-icon {
    width: 62px; height: 62px;
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #3d5165;
    background: rgba(255, 255, 255, .03);
    border: 1px dashed rgba(255, 255, 255, .09);
}
.empty-title { margin: 0 0 6px; font-size: 14px; color: #a9bacb; }
.empty-sub { margin: 0; font-size: 12.5px; color: #55677c; }

.skeleton-list { padding: 6px 0; }
.skeleton-row { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 14px; }
.sk {
    display: block;
    height: 10px;
    border-radius: 99px;
    background: linear-gradient(90deg, rgba(255, 255, 255, .04) 25%, rgba(255, 255, 255, .08) 37%, rgba(255, 255, 255, .04) 63%);
    background-size: 400% 100%;
    animation: sk 1.4s ease infinite;
}
.sk-icon { width: 32px; height: 32px; border-radius: 9px; }
.sk-name { width: 34%; }
.sk-meta { width: 90px; margin-left: auto; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 18px;
    font-size: 12.5px;
    color: var(--text-mute);
}

/* ============================================================
   设置抽屉
   ============================================================ */

.drawer-mask {
    position: fixed;
    inset: 0;
    background: rgba(4, 8, 12, .6);
    backdrop-filter: blur(2px);
    z-index: 60;
    animation: fade-in .18s ease;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.drawer {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(408px, 100%);
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #101a25, #0c141d);
    border-left: 1px solid var(--line-strong);
    box-shadow: -30px 0 80px -30px rgba(0, 0, 0, .9);
    z-index: 61;
    transform: translateX(102%);
    transition: transform .3s cubic-bezier(.32, .8, .3, 1);
    visibility: hidden;
}

.drawer.is-open { transform: none; visibility: visible; }

.drawer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--line);
}

.drawer-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.drawer-head p { margin: 5px 0 0; font-size: 12px; color: var(--text-mute); }

.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px 24px; display: grid; gap: 22px; align-content: start; }

.form-block { display: grid; gap: 8px; }
.form-block.two-col { grid-template-columns: 1fr 1fr; gap: 12px; }
.form-label { font-size: 12.5px; color: #9fb0c3; font-weight: 500; }
.form-label.inline { display: block; }
.form-hint { margin: 0; font-size: 11.5px; line-height: 1.65; color: #55677c; }
.form-hint.block { display: block; margin-top: 3px; }

.segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(0, 0, 0, .25);
}

.segmented button {
    height: 32px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-mute);
    font-size: 12.5px;
    transition: background .16s, color .16s;
}

.segmented button.is-active {
    background: rgba(74, 158, 224, .17);
    color: #bfe1fb;
    box-shadow: inset 0 0 0 1px rgba(74, 158, 224, .28);
}

.inline-actions { display: flex; align-items: center; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.test-result { font-size: 11.5px; color: var(--text-mute); line-height: 1.5; }
.test-result.ok { color: #6fd6ab; }
.test-result.err { color: #ef9188; }

.switch-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    cursor: pointer;
}

.switch {
    appearance: none;
    flex: none;
    width: 40px; height: 23px;
    margin-top: 2px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .08);
    position: relative;
    transition: background .2s, border-color .2s;
    cursor: pointer;
}

.switch::after {
    content: "";
    position: absolute;
    top: 2px; left: 2px;
    width: 17px; height: 17px;
    border-radius: 50%;
    background: #8b9db2;
    transition: transform .2s, background .2s;
}

.switch:checked { background: rgba(74, 158, 224, .5); border-color: rgba(74, 158, 224, .6); }
.switch:checked::after { transform: translateX(17px); background: #eaf5ff; }

.drawer-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, .18);
}

/* ============================================================
   Toast
   ============================================================ */

.toasts {
    position: fixed;
    right: 20px;
    bottom: calc(22px + var(--upload-h, 0px));
    transition: bottom .25s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 90;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 190px;
    max-width: 340px;
    padding: 10px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: rgba(20, 30, 42, .96);
    color: #dbe7f3;
    font-size: 12.5px;
    box-shadow: 0 16px 34px -18px rgba(0, 0, 0, .9);
    animation: toast-in .24s cubic-bezier(.2, .8, .3, 1);
    backdrop-filter: blur(8px);
}

.toast::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    flex: none;
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(74, 158, 224, .16);
}

.toast.ok::before { background: var(--ok); box-shadow: 0 0 0 3px rgba(63, 192, 141, .16); }
.toast.err::before { background: var(--danger); box-shadow: 0 0 0 3px rgba(229, 107, 98, .16); }
.toast.is-out { animation: toast-out .2s ease; }

@keyframes toast-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

/* ============================================================
   链接记录视图
   ============================================================ */

.link-history { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 16px; }

.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: rgba(255, 255, 255, .022);
}

.history-item .h-name { font-size: 13px; color: #dbe6f2; flex: none; max-width: 34%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item .h-url { flex: 1; min-width: 0; font-family: var(--mono); font-size: 11.5px; color: #61809b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item .h-time { font-size: 11px; color: #4b5c70; flex: none; }

.history-item .h-type {
    flex: none;
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 7px;
    border-radius: 6px;
    font-size: 10.5px;
    letter-spacing: .04em;
    color: #8fb6d4;
    background: rgba(74, 158, 224, .12);
    border: 1px solid rgba(74, 158, 224, .22);
}

.history-item .h-type.is-official {
    color: #9aa9bb;
    background: rgba(255, 255, 255, .04);
    border-color: rgba(255, 255, 255, .09);
}

.history-item .h-type.is-preview {
    color: #7fd6a8;
    background: rgba(63, 192, 141, .12);
    border-color: rgba(63, 192, 141, .26);
}

.history-item .copy-btn { height: 26px; padding: 0 10px; font-size: 11.5px; }

.icon-btn.danger:hover { background: rgba(229, 107, 98, .14); color: #e58b83; }

/* ============================================================
   响应式
   ============================================================ */

@media (max-width: 1024px) {
    .search-box { width: 180px; }
    .search-box:focus-within { width: 210px; }
}

@media (max-width: 860px) {
    .app-shell { grid-template-columns: minmax(0, 1fr); }

    .sidebar {
        position: fixed;
        top: 0; bottom: 0; left: 0;
        width: 254px;
        height: 100%;
        transform: translateX(-104%);
        transition: transform .26s cubic-bezier(.3, .8, .3, 1);
        box-shadow: 30px 0 70px -30px rgba(0, 0, 0, .9);
        z-index: 70;
    }

    .sidebar.is-open { transform: none; }
    .only-mobile { display: grid; }

    .topbar { padding: 0 14px; gap: 8px; }
    .topbar-right { gap: 6px; }
    .ghost-btn span { display: none; }
    .ghost-btn { padding: 0 9px; }
    .search-box { width: 150px; }
    .search-box:focus-within { width: 180px; }
    .search-kbd { display: none; }
    .crumbs { flex: 0 1 auto; }

    .content { padding: 16px 14px 32px; }
    .page-head h1 { font-size: 21px; }
    .page-head { align-items: flex-start; }

    .file-table thead { display: none; }
    .file-table, .file-table tbody { display: block; width: 100%; }
    .file-table tbody tr.file-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "name act" "meta act";
        align-items: center;
        padding: 11px 12px;
        gap: 2px 10px;
    }
    .file-row td { padding: 0 !important; height: auto !important; border: 0; }
    .file-row td.col-name { grid-area: name; }
    .file-row td.col-size { grid-area: meta; }
    .file-row td.col-time { display: none; }
    .file-row td.col-act { grid-area: act; }
    .act-cell { text-align: right; }
    .row-actions { opacity: 1; }
    .act-btn.js-download { display: none; }
    .act-btn { height: 30px; padding: 0 9px; }
    .act-btn span { display: none; }
    .meta-cell { padding-left: 43px !important; font-size: 11.5px; }

    .tray-row, .link-tray { display: block; }
    .tray-row > td { display: block; }
    .link-tray { padding: 4px 12px 16px; }
    .tray-main { flex-wrap: wrap; }
    .tray-label { width: 100%; }
    .link-chip { width: 100%; height: auto; padding: 8px 8px 8px 11px; flex-wrap: wrap; }
    .link-chip code { white-space: normal; word-break: break-all; line-height: 1.5; padding: 2px 0;
        display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
    .copy-btn { height: 30px; margin-left: auto; }
    .tray-meta { gap: 7px; }

    .form-block.two-col { grid-template-columns: 1fr; }
    .link-history { padding: 12px; }
    .history-item { flex-wrap: wrap; }
    .history-item .h-url { flex-basis: 100%; order: 3; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ============================================================
   v1.1 · 空状态 / 账号卡片 / 折叠面板 / 复制兜底
   ============================================================ */

/* --- 未连接账号时的空状态 --- */
.blank-view {
    display: grid;
    place-items: center;
    min-height: 64vh;
    padding: 30px 20px 70px;
}

.blank-inner {
    text-align: center;
    max-width: 470px;
}

.blank-mark {
    width: 88px; height: 88px;
    margin: 0 auto 24px;
    border-radius: 27px;
    display: grid; place-items: center;
    color: #74b8ee;
    background: radial-gradient(120% 120% at 50% 0%, rgba(74, 158, 224, .22), rgba(74, 158, 224, .04) 70%);
    border: 1px solid rgba(74, 158, 224, .18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 20px 46px -26px rgba(74, 158, 224, .8);
}

.blank-inner h2 {
    margin: 0 0 10px;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: .01em;
}

.blank-inner p {
    margin: 0;
    font-size: 13px;
    line-height: 1.85;
    color: var(--text-mute);
}

.blank-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 24px 0 16px;
    flex-wrap: wrap;
}

.blank-foot {
    font-size: 11.5px;
    color: #445568;
}

/* 未连接：导航弱化（点击仍会引导打开设置） */
body.is-blank .nav { opacity: .45; }
body.is-blank .nav-item { cursor: default; }
body.is-blank .quota-card { opacity: .6; }

/* --- 已连接账号卡片 --- */
.account-card {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--line);
}

.acc-avatar {
    flex: none;
    width: 34px; height: 34px;
    border-radius: 10px;
    display: grid; place-items: center;
    font-size: 14px;
    color: #dcecff;
    background: linear-gradient(160deg, rgba(74, 158, 224, .55), rgba(47, 127, 196, .34));
    border: 1px solid rgba(74, 158, 224, .3);
}

.acc-meta { flex: 1; min-width: 0; }
.acc-name { font-size: 13px; color: #dbe7f4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-sub { margin-top: 3px; font-size: 11px; color: var(--text-mute); word-break: break-all; line-height: 1.5; }
.acc-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(63, 192, 141, .14); }
.acc-dot.is-warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(224, 169, 74, .14); }

/* --- 表单细节 --- */
.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 11.5px;
    color: var(--text-mute);
    cursor: pointer;
    user-select: none;
}

.check-row input {
    width: 14px; height: 14px;
    accent-color: #4a9ee0;
    cursor: pointer;
}

.ghost-btn.danger { color: #e58b83; }
.ghost-btn.danger:hover {
    color: #f2a49c;
    border-color: rgba(229, 107, 98, .34);
    background: rgba(229, 107, 98, .08);
}

.text-input:disabled,
.search-box input:disabled { opacity: .5; cursor: not-allowed; }

/* --- 折叠：高级设置 --- */
.fold {
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.fold > summary {
    cursor: pointer;
    font-size: 12.5px;
    color: var(--text-dim);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 7px;
    user-select: none;
}

.fold > summary::-webkit-details-marker { display: none; }

.fold > summary::before {
    content: "";
    width: 0; height: 0;
    border-left: 5px solid #5a6d83;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    transition: transform .18s;
}

.fold[open] > summary::before { transform: rotate(90deg); }
.fold[open] > summary { color: var(--text); }
.fold-body { display: grid; gap: 18px; padding-top: 16px; }

/* --- 复制兜底弹层 --- */
.copy-fallback {
    position: fixed;
    inset: 0;
    z-index: 95;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(4, 8, 12, .74);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.copy-fallback-inner {
    width: min(460px, 100%);
    padding: 18px;
    border-radius: 14px;
    background: var(--panel);
    border: 1px solid var(--line-strong);
    box-shadow: var(--shadow-card);
}

.copy-fallback-inner p { margin: 0 0 10px; font-size: 12.5px; color: var(--text-dim); }

.copy-fallback textarea {
    width: 100%;
    resize: none;
    padding: 10px;
    font-family: var(--mono);
    font-size: 11.5px;
    line-height: 1.65;
    color: var(--text);
    background: #0a1119;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
}

.copy-fallback-foot { display: flex; justify-content: flex-end; margin-top: 12px; }

/* 直链文本可点选 */
.link-chip code { cursor: text; }

@media (max-width: 860px) {
    .blank-view { min-height: 56vh; padding: 22px 8px 50px; }
    .blank-mark { width: 76px; height: 76px; border-radius: 23px; }
    .blank-inner h2 { font-size: 17px; }
    .blank-actions { flex-direction: column; }
    .blank-actions .btn-primary,
    .blank-actions .ghost-btn { width: 100%; justify-content: center; }
}

/* 未连接时隐藏面包屑，保持界面干净 */
body.is-blank .crumbs { visibility: hidden; }

/* 抽屉内分节线 */
.drawer-body > .form-block + .form-block,
.drawer-body > .form-block + .fold {
    border-top: 1px solid var(--line);
    padding-top: 18px;
}

/* --- 下拉选择（代理链接有效期） --- */
.select-input {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 34px;
    cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, #6b7f96 50%), linear-gradient(135deg, #6b7f96 50%, transparent 50%);
    background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.select-input option {
    background: #0d1620;
    color: var(--text);
}

/* ============================================================
   v1.4 · 勾选 / 批量条 / 弹窗 / WebDAV
   ============================================================ */

/* --- 勾选列 --- */
.col-check { width: 44px; text-align: center !important; }

/* 自绘复选框：原生控件在深浅两套主题 / 无头浏览器里渲染差异太大，
   干脆统一 appearance: none，勾选样式自己画 */
.col-check input[type="checkbox"],
.row-check {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    width: 15px; height: 15px;
    margin: 0;
    padding: 0;
    border: 1.5px solid var(--line-strong);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    vertical-align: middle;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.col-check input[type="checkbox"]:hover,
.row-check:hover { border-color: var(--accent); }
.col-check input[type="checkbox"]:focus-visible,
.row-check:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.col-check input[type="checkbox"]:checked,
.row-check:checked {
    background: var(--accent);
    border-color: var(--accent);
}
.col-check input[type="checkbox"]:checked::after,
.row-check:checked::after {
    content: "";
    position: absolute;
    left: 4px; top: 1px;
    width: 4px; height: 7px;
    border: solid #fff;
    border-width: 0 1.8px 1.8px 0;
    transform: rotate(42deg);
}
.col-check input[type="checkbox"]:indeterminate,
.row-check:indeterminate {
    background: var(--accent);
    border-color: var(--accent);
}
.col-check input[type="checkbox"]:indeterminate::after,
.row-check:indeterminate::after {
    content: "";
    position: absolute;
    left: 3px; top: 6px;
    width: 7px; height: 1.8px;
    background: #fff;
    border: 0;
    transform: none;
}
.file-row.is-selected { background: rgba(74, 158, 224, .085); }
.file-row.is-selected:hover { background: rgba(74, 158, 224, .12); }
.file-row.is-selected .file-name b { color: #a8d8f8; }

/* --- 批量操作条 --- */
.batch-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 10px 14px;
    border: 1px solid var(--accent-line);
    border-radius: 12px;
    background: var(--accent-soft);
    animation: batch-in .16s ease;
}

@keyframes batch-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.batch-count { font-size: 12.5px; font-weight: 500; color: #a8d8f8; }
.batch-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.batch-actions .ghost-btn { height: 30px; font-size: 12.5px; padding: 0 11px; }
.batch-actions .ghost-btn.danger { color: #e58b83; border-color: rgba(229, 107, 98, .3); }
.batch-actions .ghost-btn.danger:hover { background: rgba(229, 107, 98, .14); color: #f0a49d; }
.batch-actions .text-link-btn { margin-left: 2px; }
.batch-actions button:disabled { opacity: .4; cursor: default; }

/* --- 通用弹窗 --- */
.modal-mask {
    position: fixed;
    inset: 0;
    z-index: 92;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(4, 8, 13, .68);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    animation: fade-in .14s ease;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
    width: min(540px, 100%);
    max-height: 84vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--line-strong);
    background: linear-gradient(180deg, #131d29, #0d151e);
    box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .92);
    animation: modal-in .18s cubic-bezier(.3, .8, .3, 1);
}

@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }

.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head h3 { margin: 0; font-size: 15.5px; font-weight: 600; letter-spacing: .01em;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-sub { margin: 8px 0 14px; font-size: 12.5px; line-height: 1.65; color: var(--text-mute); }
.modal .text-input { margin-top: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* 下载方式选择 */
.dl-options { display: grid; gap: 9px; }

.dl-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 13px;
    text-align: left;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, .022);
    color: var(--text);
    transition: border-color .14s, background .14s, transform .14s;
}

.dl-option:hover {
    border-color: var(--accent-line);
    background: rgba(74, 158, 224, .1);
    transform: translateX(2px);
}

.dl-option > svg { flex: none; color: var(--text-mute); }
.dl-icon {
    width: 34px; height: 34px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #8fc6f0;
    background: rgba(74, 158, 224, .14);
    border: 1px solid rgba(74, 158, 224, .22);
}
.dl-text { display: grid; gap: 3px; min-width: 0; flex: 1; }
.dl-text b { font-size: 13px; font-weight: 550; }
.dl-text small { font-size: 11.5px; line-height: 1.55; color: var(--text-mute); }

/* 目录选择器（移动 / 复制） */
.picker-crumbs {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
    padding: 6px 2px 10px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 8px;
}

.picker-list { display: grid; gap: 2px; max-height: 300px; overflow-y: auto; padding: 2px; }

.picker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 9px;
    text-align: left;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--text-dim);
    font-size: 13px;
    transition: background .12s, color .12s;
}

.picker-item > span:not(.file-icon) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-item > svg { flex: none; opacity: .5; }
.picker-item:hover:not(:disabled) { background: rgba(255, 255, 255, .05); color: var(--text); }
.picker-item.is-disabled { opacity: .38; cursor: not-allowed; }
.picker-item .file-icon { width: 26px; height: 26px; border-radius: 8px; }
.picker-loading { padding: 26px 10px; text-align: center; font-size: 12.5px; color: var(--text-mute); }

.btn-primary.danger {
    background: linear-gradient(180deg, #d9615a 0%, #b84a44 100%);
    border-color: rgba(229, 107, 98, .5);
    box-shadow: 0 10px 24px -12px rgba(200, 80, 70, .8);
}

/* --- WebDAV 面板 --- */
.dav-card {
    display: grid;
    gap: 20px;
    padding: 22px;
}

.dav-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.dav-head h2 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.dav-head p { margin: 0; max-width: 560px; font-size: 12.5px; line-height: 1.7; color: var(--text-mute); }

.dav-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: none;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, .02);
}

.dav-url-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
    padding: 8px 8px 8px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, .025);
}

.dav-url-row code {
    flex: 1;
    min-width: 0;
    font-family: var(--mono);
    font-size: 12px;
    color: #b6dcf7;
    overflow-x: auto;
    white-space: nowrap;
}

.inline-actions { display: flex; align-items: center; gap: 14px; }

/* 主题切换按钮 */
.theme-btn {
    width: 34px; height: 34px;
    border-color: var(--line);
    background: rgba(255, 255, 255, .02);
    color: var(--text-dim);
}
.theme-btn:hover { background: rgba(255, 255, 255, .07); border-color: var(--line-strong); color: var(--text); }
.theme-btn svg { transition: transform .3s cubic-bezier(.3, .8, .3, 1); }
.theme-btn:hover svg { transform: rotate(24deg); }

/* 移动端：勾选列进网格 */
@media (max-width: 860px) {
    .file-table tbody tr.file-row {
        grid-template-columns: 30px minmax(0, 1fr) auto;
        grid-template-areas: "check name act" "check meta act";
    }
    .file-row td.col-check { grid-area: check; width: 17px; align-self: center; }
    .file-row td.col-check input { width: 17px; height: 17px; }
    .file-row td { display: block; min-width: 0; }
    .file-row td.col-size, .file-row td.col-act { width: auto; }
    .file-row td.col-act { justify-self: end; }
    .file-row .name-cell { width: 100%; }
    .file-row .file-name { flex: 1 1 auto; min-width: 0; }
    .file-row .row-actions { max-width: 100%; }
    .meta-cell { padding-left: 0 !important; }
    .batch-actions { margin-left: 0; width: 100%; }
    .batch-actions .ghost-btn span { display: inline; }
    .modal { padding: 16px; }
    .picker-list { max-height: 46vh; }
    .dav-card { padding: 16px; }
    .dav-head { gap: 12px; }
    .dav-switch { width: 100%; justify-content: space-between; }
    .inline-actions { flex-wrap: wrap; }
}

/* 窄屏：顶栏按钮变多后，搜索框改成弹性收缩，按钮不再被挤出屏幕 */
@media (max-width: 560px) {
    .topbar { gap: 6px; padding: 0 10px; }
    .topbar-right { gap: 5px; min-width: 0; flex: 1 1 auto; justify-content: flex-end; }
    .crumbs { flex: 0 1 auto; min-width: 0; }
    /* 根目录时顶栏面包屑和下方标题重复，窄屏直接省掉这段空间留给搜索 */
    .crumbs > .crumb:only-child { display: none; }
    /* inline-flex 里 text-overflow 不生效，窄屏改成 block 才能显示省略号 */
    .crumb { display: block; flex: 0 1 auto; max-width: none; min-width: 0; text-overflow: ellipsis; }
    .search-box { width: auto; flex: 1 1 96px; min-width: 64px; }
    .search-box:focus-within { width: auto; }
    .ghost-btn { padding: 0 7px; }
    .theme-btn { width: 30px; height: 30px; }
}

/* ============================================================
   v1.4 · 白昼主题（html.theme-light）
   机制：先换语义变量，再补少量硬编码深色的表面
   ============================================================ */

html.theme-light {
    --bg:            #f2f5fa;
    --bg-soft:       #e9eff7;
    --panel:         #ffffff;
    --panel-2:       #f8fafd;
    --panel-3:       #f1f5fa;
    --line:          rgba(18, 40, 66, .1);
    --line-strong:   rgba(18, 40, 66, .18);
    --text:          #14212e;
    --text-dim:      #46586c;
    --text-mute:     #6f8195;
    --accent:        #1f7ac0;
    --accent-2:      #1a6aa8;
    --accent-deep:   #155a90;
    --accent-soft:   rgba(31, 122, 192, .09);
    --accent-line:   rgba(31, 122, 192, .3);
    --ok:            #1f9d72;
    --warn:          #b8802a;
    --danger:        #cf5048;
    --shadow-card:   0 24px 56px -30px rgba(24, 46, 74, .28), 0 2px 8px rgba(24, 46, 74, .07);
}

/* 基础表面 */
html.theme-light .main {
    background: radial-gradient(900px 420px at 80% -12%, rgba(31, 122, 192, .07), transparent 65%);
}

html.theme-light .sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f5f8fc 100%);
}

html.theme-light .topbar {
    background: rgba(255, 255, 255, .82);
}

html.theme-light .table-wrap {
    background: #ffffff;
    box-shadow: 0 14px 34px -28px rgba(24, 46, 74, .35);
}

/* 文字：把只在暗色下成立的浅色值拉回深色 */
html.theme-light .nav-label,
html.theme-light .quota-sub,
html.theme-light .user-sub,
html.theme-light .file-name small,
html.theme-light .empty-sub,
html.theme-light .form-hint,
html.theme-light .modal-sub,
html.theme-light .history-item .h-time,
html.theme-light .picker-loading { color: #7c8da1; }

html.theme-light .nav-item:hover { background: rgba(18, 40, 66, .05); color: #1d2c3c; }
html.theme-light .nav-item.is-active { color: #155a90; background: linear-gradient(90deg, rgba(31, 122, 192, .14), rgba(31, 122, 192, .03)); }
html.theme-light .nav-item.is-active svg { color: #1f7ac0; }
html.theme-light .nav-badge { background: rgba(18, 40, 66, .08); }

html.theme-light .brand-mark { color: #ffffff; background: linear-gradient(160deg, #2f86c6 0%, #1a5e97 100%); }
html.theme-light .avatar { color: #18527f; background: linear-gradient(150deg, #dceafa, #c3dcf4); border-color: rgba(31, 122, 192, .25); }
html.theme-light .user-row:hover { background: rgba(18, 40, 66, .04); }
html.theme-light .user-name { color: #1d2c3c; }

html.theme-light .quota-card { background: rgba(18, 40, 66, .028); }
html.theme-light .quota-bar { background: rgba(18, 40, 66, .09); }
html.theme-light .quota-bar i { background: linear-gradient(90deg, #3a90cf, #6bb8ef); }

html.theme-light .crumb.is-current { color: #14212e; }
html.theme-light .crumb:hover { background: rgba(18, 40, 66, .055); color: #46586c; }
html.theme-light .crumb-sep { color: #a9b8c8; }

html.theme-light .search-box { background: rgba(18, 40, 66, .04); }
html.theme-light .search-box:focus-within { background: #ffffff; border-color: var(--accent-line); }
html.theme-light .search-box input::placeholder { color: #93a3b4; }

html.theme-light .ghost-btn { background: rgba(18, 40, 66, .035); }
html.theme-light .ghost-btn:hover { background: rgba(18, 40, 66, .07); color: #14212e; border-color: var(--line-strong); }
html.theme-light .icon-btn:hover { background: rgba(18, 40, 66, .07); color: #14212e; }
html.theme-light .theme-btn { background: rgba(18, 40, 66, .02); color: #4a5b6f; }
html.theme-light .theme-btn:hover { background: rgba(18, 40, 66, .07); color: #14212e; border-color: var(--line-strong); }

html.theme-light .tag { background: rgba(18, 40, 66, .045); }
html.theme-light .tag-mode { color: #1a6aa8; background: rgba(31, 122, 192, .1); border-color: rgba(31, 122, 192, .26); }
html.theme-light .tag-mode.is-live { color: #1f8f68; background: rgba(31, 157, 114, .1); border-color: rgba(31, 157, 114, .28); }

/* 表格 */
html.theme-light .file-table thead th { color: #7c8da1; background: rgba(18, 40, 66, .028); }
html.theme-light .file-row { border-bottom-color: rgba(18, 40, 66, .065); }
html.theme-light .file-row:hover { background: rgba(18, 40, 66, .03); }
html.theme-light .file-row.is-folder:hover { background: rgba(31, 122, 192, .055); }
html.theme-light .file-row.is-selected { background: rgba(31, 122, 192, .085); }
html.theme-light .file-row.is-selected .file-name b { color: #155a90; }
html.theme-light .file-name b { color: #1b2a38; }
html.theme-light .file-row.is-folder:hover .file-name b { color: #0f1d29; }
html.theme-light .meta-cell { color: #6a7c90; }

html.theme-light .file-icon { color: #5c7691; background: rgba(18, 40, 66, .05); border-color: rgba(18, 40, 66, .07); }
html.theme-light .file-icon.k-folder { color: #1f7ac0; background: rgba(31, 122, 192, .1); }
html.theme-light .file-icon.k-image { color: #1f9d72; background: rgba(31, 157, 114, .1); }
html.theme-light .file-icon.k-video { color: #8a5cc0; background: rgba(138, 92, 192, .09); }
html.theme-light .file-icon.k-audio { color: #b8802a; background: rgba(184, 128, 42, .1); }
html.theme-light .file-icon.k-doc { color: #2a6aa8; background: rgba(42, 106, 168, .09); }
html.theme-light .file-icon.k-archive { color: #96683c; background: rgba(150, 104, 60, .09); }

html.theme-light .act-btn { color: #1f7ac0; background: rgba(31, 122, 192, .1); border-color: rgba(31, 122, 192, .22); }
html.theme-light .act-btn:hover { background: rgba(31, 122, 192, .17); color: #155a90; }
html.theme-light .act-btn.plain { color: #5b6d80; background: rgba(18, 40, 66, .04); border-color: var(--line); }
html.theme-light .act-btn.plain:hover { background: rgba(18, 40, 66, .085); color: #14212e; }

/* 直链展开条 */
html.theme-light .tray-row > td { background: #f5f9fd; border-bottom-color: var(--line); }
html.theme-light .tray-line + .tray-line { border-top-color: rgba(18, 40, 66, .12); }
html.theme-light .link-tray { background: rgba(31, 122, 192, .045); }
html.theme-light .tray-label { color: #4a6b8a; }
html.theme-light .link-chip { background: #ffffff; border-color: var(--line); }
html.theme-light .link-chip code { color: #1b4a70; }
html.theme-light .tray-meta { color: #6a7c90; }
html.theme-light .tray-meta b { color: #2a6aa8; }
html.theme-light .tray-meta .sep { color: #b6c3d1; }
html.theme-light .text-link-btn { color: #1f7ac0; }
html.theme-light .copy-btn { color: #1f7ac0; background: rgba(31, 122, 192, .12); border-color: rgba(31, 122, 192, .26); }
html.theme-light .copy-btn:hover { background: #1f7ac0; color: #ffffff; }

/* 直链记录 */
html.theme-light .history-item { background: #ffffff; border-color: var(--line); }
html.theme-light .history-item .h-name { color: #1b2a38; }
html.theme-light .history-item .h-url { color: #65809a; }
html.theme-light .history-item .h-type { color: #1a6aa8; background: rgba(31, 122, 192, .1); border-color: rgba(31, 122, 192, .24); }
html.theme-light .history-item .h-type.is-official { color: #5b6d80; background: rgba(18, 40, 66, .05); border-color: var(--line); }
html.theme-light .history-item .h-type.is-preview { color: #1c7a52; background: rgba(28, 122, 82, .1); border-color: rgba(28, 122, 82, .24); }

/* 空状态 / 骨架屏 */
html.theme-light .empty-icon { color: #9fb0c1; background: rgba(18, 40, 66, .04); border-color: var(--line-strong); }
html.theme-light .empty-title { color: #46586c; }
html.theme-light .skeleton-row span {
    background: linear-gradient(90deg, rgba(18, 40, 66, .05) 25%, rgba(18, 40, 66, .1) 37%, rgba(18, 40, 66, .05) 63%);
}

/* 抽屉 / 表单 */
html.theme-light .drawer { background: linear-gradient(180deg, #ffffff, #f7fafd); box-shadow: -30px 0 70px -30px rgba(24, 46, 74, .28); }
html.theme-light .drawer-mask { background: rgba(20, 38, 60, .32); }
html.theme-light .form-label { color: #3d5063; }
html.theme-light .text-input { background: #ffffff; border-color: rgba(18, 40, 66, .16); color: #14212e; }
html.theme-light .text-input:hover { border-color: rgba(18, 40, 66, .26); }
html.theme-light .text-input:focus { background: #ffffff; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31, 122, 192, .12); }
html.theme-light .text-input::placeholder { color: #a2b1c1; }
html.theme-light .select-input option { background: #ffffff; color: #14212e; }
html.theme-light .acc-name { color: #1b2a38; }
html.theme-light .acc-card { background: rgba(18, 40, 66, .03); }
html.theme-light .switch { background: rgba(18, 40, 66, .18); border-color: rgba(18, 40, 66, .1); }
html.theme-light .switch:checked { background: #1f7ac0; }
html.theme-light .switch:checked::after { background: #ffffff; }
html.theme-light .fold > summary { color: #3d5063; }
html.theme-light .fold[open] > summary { color: #14212e; }

/* 弹窗 / 批量条 / WebDAV */
html.theme-light .modal {
    background: linear-gradient(180deg, #ffffff, #f7fafd);
    box-shadow: 0 30px 70px -26px rgba(24, 46, 74, .3);
}
html.theme-light .modal-mask { background: rgba(20, 38, 60, .34); }
html.theme-light .dl-option { background: rgba(18, 40, 66, .028); }
html.theme-light .dl-option:hover { background: rgba(31, 122, 192, .075); }
html.theme-light .dl-icon { color: #1f7ac0; background: rgba(31, 122, 192, .1); border-color: rgba(31, 122, 192, .2); }
html.theme-light .picker-item:hover:not(:disabled) { background: rgba(18, 40, 66, .055); }
html.theme-light .batch-count { color: #155a90; }
html.theme-light .batch-actions .ghost-btn.danger { color: #cf5048; border-color: rgba(207, 80, 72, .32); }
html.theme-light .dav-switch,
html.theme-light .dav-url-row { background: rgba(18, 40, 66, .03); }
html.theme-light .dav-url-row code { color: #1b4a70; }
html.theme-light .inline-actions .test-result.ok { color: #1f8f68; }

/* 复制兜底 / 提示条 */
html.theme-light .copy-fallback { background: rgba(20, 38, 60, .34); }
html.theme-light .copy-fallback textarea { background: #ffffff; color: #14212e; border-color: var(--line-strong); }
html.theme-light .toast { background: #ffffff; border-color: var(--line-strong); color: #14212e; box-shadow: 0 18px 40px -24px rgba(24, 46, 74, .34); }

/* 登录页保持深色玻璃质感：即使带 theme-light 也不切换 */
html.theme-light .auth-body { background: #0b1018; color: #e9eff7; }
html.theme-light .auth-body .auth-bg { display: block; }

/* --- 图片 / 视频预览层 --- */
.preview-mask {
    position: fixed;
    inset: 0;
    z-index: 96;
    display: flex;
    flex-direction: column;
    background: rgba(4, 8, 13, .9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    animation: fade-in .16s ease;
}

.preview-stage {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px 22px 6px;
    overflow: auto;
}

.preview-stage img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    border-radius: 8px;
    box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .95);
    background: #0b1118;
    cursor: zoom-out;
}

.preview-stage img.is-zoomed {
    max-width: none;
    max-height: none;
    cursor: zoom-in;
}

.preview-stage video {
    width: min(1080px, 100%);
    max-height: 100%;
    border-radius: 10px;
    background: #000;
    box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .95);
    outline: none;
}

.preview-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #b9c8d8;
    font-size: 13px;
    text-align: center;
    line-height: 1.7;
    padding: 26px;
}

.preview-hint .spin { animation: spin 1s linear infinite; }

.preview-hint.is-err { color: #f0a49d; }

.preview-bar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 18px 14px;
}

.preview-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: #cfdcea;
    font-family: var(--mono);
}

.preview-tools { display: flex; gap: 8px; flex: 0 0 auto; }

.preview-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 13px;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .07);
    color: #dbe7f4;
    font-size: 12.5px;
    text-decoration: none;
    transition: background .15s, border-color .15s;
}

.preview-btn:hover { background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .26); }
.preview-btn svg { flex: 0 0 auto; }

@media (max-width: 560px) {
    .preview-stage { padding: 10px 10px 4px; }
    .preview-bar { padding: 8px 12px 12px; }
    .preview-title { font-size: 12px; }
    .preview-btn { height: 30px; padding: 0 10px; }
    .preview-btn span { display: none; }
}

/* 预览层在浅色主题下也保持暗底：看图 / 看视频不能有白框干扰 */
html.theme-light .preview-mask { background: rgba(9, 14, 20, .92); }

.preview-hint .preview-sub {
    font-size: 12px;
    color: #8fa2b6;
    max-width: 30em;
}

/* --- v1.5.0 · 批量取链接 / 302 --- */
.dl-option:disabled {
    opacity: .45;
    cursor: default;
    transform: none;
}

.dl-option:disabled:hover {
    border-color: var(--line);
    background: rgba(255, 255, 255, .022);
    transform: none;
}

.modal-warn {
    margin: 0 0 10px;
    padding: 8px 11px;
    border-radius: 9px;
    font-size: 12px;
    line-height: 1.6;
    color: #d9b48c;
    background: rgba(214, 152, 86, .1);
    border: 1px solid rgba(214, 152, 86, .24);
}

.bulk-links {
    width: 100%;
    min-height: 132px;
    max-height: 40vh;
    padding: 11px 12px;
    border-radius: 11px;
    border: 1px solid var(--line-strong);
    background: rgba(0, 0, 0, .28);
    color: #b9d2e8;
    font-family: var(--mono);
    font-size: 11.5px;
    line-height: 1.75;
    resize: vertical;
    outline: none;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.bulk-links:focus { border-color: var(--accent-line); }

.modal-foot .btn-primary svg { margin-right: 5px; }

.history-item .h-type.is-go {
    color: #e0b978;
    background: rgba(224, 185, 120, .1);
    border-color: rgba(224, 185, 120, .26);
}

html.theme-light .history-item .h-type.is-go {
    color: #8a6220;
    background: rgba(176, 122, 32, .1);
    border-color: rgba(176, 122, 32, .24);
}

html.theme-light .modal-warn {
    color: #8a5f1f;
    background: rgba(214, 152, 86, .12);
    border-color: rgba(214, 152, 86, .3);
}

html.theme-light .bulk-links {
    background: #f7fafd;
    color: #2b4560;
    border-color: var(--line-strong);
}

html.theme-light .history-item .icon-btn { color: #6d8298; }

/* --- v1.6.0 · 全选 / 直链记录批量操作 / 每页条数 --- */
.col-check { width: 64px; }

.check-all-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-mute);
    white-space: nowrap;
}

.check-all-wrap:hover { color: var(--text); }
.check-all-wrap input { flex: 0 0 auto; }

/* 直链记录工具条 */
.history-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
}

.history-bar .hist-info { font-size: 12px; color: var(--text-mute); }

.history-bar .hist-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

/* 记录行勾选态 */
.history-item .h-check { flex: 0 0 auto; }

.history-item.is-checked {
    border-color: rgba(74, 158, 224, .45);
    background: rgba(74, 158, 224, .07);
}

html.theme-light .history-item.is-checked {
    border-color: rgba(31, 122, 192, .4);
    background: rgba(31, 122, 192, .05);
}

@media (max-width: 860px) {
    .history-bar { padding: 10px 12px; gap: 10px; }
    .history-bar .hist-actions { margin-left: 0; flex-basis: 100%; }
    .history-bar .hist-actions .ghost-btn { flex: 1 1 auto; justify-content: center; }
}

.pager { justify-content: space-between; }
.pager-nav { display: inline-flex; align-items: center; gap: 14px; }
.pager-total { color: var(--text-dim); font-family: var(--mono); font-size: 12px; }

@media (max-width: 860px) {
    .pager { flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }
    .pager-total { order: 3; flex-basis: 100%; text-align: center; }
    .pager #selAllBtn { order: 1; }
    .pager-nav { order: 2; }
}

/* 移动端列表条：表头隐藏后仍能一键全选 */
.list-bar { display: none; }

@media (max-width: 860px) {
    .list-bar {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 12px;
        border-bottom: 1px solid var(--line);
    }
    .list-bar-info { font-size: 12px; color: var(--text-dim); font-family: var(--mono); }
}

/* ============================================================
   v1.7.0 · 上传进度悬浮层 / 最近上传记录
   ============================================================ */

.upload-float {
    position: fixed;
    right: 20px;
    bottom: 22px;
    width: 336px;
    max-width: calc(100vw - 32px);
    padding: 12px 14px 11px;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: rgba(17, 26, 37, .97);
    box-shadow: 0 24px 52px -24px rgba(0, 0, 0, .95), 0 2px 10px rgba(0, 0, 0, .35);
    backdrop-filter: blur(10px);
    z-index: 95;
    animation: uf-in .26s cubic-bezier(.2, .8, .3, 1);
}
.upload-float.is-out { animation: uf-out .3s ease forwards; }

@keyframes uf-in {
    from { opacity: 0; transform: translateY(12px) scale(.985); }
    to   { opacity: 1; transform: none; }
}
@keyframes uf-out {
    to { opacity: 0; transform: translateY(10px) scale(.985); }
}

.uf-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.uf-title { font-size: 12.5px; font-weight: 600; color: var(--text); letter-spacing: .01em; }
.uf-total { font-family: var(--mono); font-size: 11.5px; color: var(--accent); }

.uf-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 216px;
    overflow-y: auto;
    padding-right: 2px;
}

.uf-item { display: flex; flex-direction: column; gap: 5px; }
.uf-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.uf-name {
    font-size: 12px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.uf-pct { flex: none; font-family: var(--mono); font-size: 11px; color: var(--text-dim); }

.uf-track {
    height: 4px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .09);
    overflow: hidden;
}
.uf-track i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
    transition: width .18s ease;
}
.uf-sub { font-family: var(--mono); font-size: 10.5px; color: var(--text-mute); }

.uf-item.is-done .uf-track i { background: var(--ok); }
.uf-item.is-done .uf-pct { color: var(--ok); }
.uf-item.is-fail .uf-track i { background: var(--danger); }
.uf-item.is-fail .uf-pct { color: var(--danger); }
.uf-item.is-fail .uf-sub { color: var(--danger); }

/* 「最近上传」里标注哪些是本次通过面板传上去的 */
.rec-flag {
    display: inline-block;
    margin-left: 7px;
    padding: 0 5px;
    border: 1px solid var(--accent-line);
    border-radius: 99px;
    font-size: 10px;
    font-style: normal;
    line-height: 1.6;
    color: var(--accent);
    background: var(--accent-soft);
    vertical-align: 1px;
}

#recentClearAll { margin-left: auto; }

@media (max-width: 860px) {
    .upload-float {
        right: 12px;
        left: 12px;
        bottom: 12px;
        width: auto;
        max-width: none;
    }
    .uf-list { max-height: 180px; }
}

html.theme-light .upload-float {
    background: rgba(255, 255, 255, .98);
    border-color: rgba(18, 40, 66, .13);
    box-shadow: 0 24px 48px -26px rgba(18, 40, 66, .4), 0 2px 8px rgba(18, 40, 66, .08);
}
html.theme-light .uf-title { color: #1d2c3c; }
html.theme-light .uf-name { color: #1d2c3c; }
html.theme-light .uf-track { background: rgba(18, 40, 66, .1); }
html.theme-light .uf-sub { color: #7c8da1; }
html.theme-light .uf-pct { color: #5d6f83; }
html.theme-light .rec-flag { color: #1f7ac0; background: rgba(31, 122, 192, .1); border-color: rgba(31, 122, 192, .28); }

/* 最近上传行多一个「移除」，操作列放宽，避免按钮被裁掉 */
#fileView.is-recent .col-act { width: 278px; }
#fileView.is-recent .act-btn { padding: 0 8px; }
/* 行内「移除」只留图标，避免操作列太挤被裁 */
#fileView.is-recent .act-btn.js-unsave span { display: none; }
#fileView.is-recent .act-btn.js-unsave { padding: 0 7px; }
#recentClearAll { flex: none; }

@media (max-width: 860px) {
    /* 手机上也要能看清「清空记录」不是删云端文件 */
    #recentClearAll { height: 28px; padding: 0 9px; }
    #recentClearAll span { display: inline; }
    .page-head-tags { flex-wrap: wrap; justify-content: flex-end; }
}
