/* ============================================================
   悦・仓库 — 样式表
   设计基调：暖白底 + 朱红主色 + 多巴胺点缀，紧凑、留白克制、层级清晰
   ============================================================ */

:root {
    --accent: #F5333F;
    --accent-ink: #C4141F;
    --accent-soft: #FFF0F1;
    --accent-soft: color-mix(in srgb, var(--accent) 9%, #fff);
    --accent-line: #FBD5D8;
    --accent-line: color-mix(in srgb, var(--accent) 24%, #fff);
    --accent-shadow: rgba(214, 40, 55, .28);

    --bg: #FBF6F4;
    --surface: #FFFFFF;
    --surface-2: #FFF9F8;
    --line: #EFE4E1;
    --line-soft: #F6EDEB;
    --ink: #22191A;
    --ink-2: #6C5C5B;
    --ink-3: #A2928F;

    --yellow: #FFC53D;
    --mint: #17C3A2;
    --violet: #7C5CFF;
    --pink: #FF5C93;
    --blue: #3B82F6;

    --r-sm: 8px;
    --r: 12px;
    --r-lg: 16px;
    --r-xl: 22px;

    --shadow-1: 0 1px 2px rgba(50, 20, 20, .05);
    --shadow-2: 0 10px 24px -14px rgba(70, 25, 30, .3);
    --shadow-3: 0 24px 60px -24px rgba(50, 15, 20, .38);

    --topbar-h: 58px;
    --side-w: 248px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

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

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p, dl, dd, dt, ul, li { margin: 0; padding: 0; }
ul { list-style: none; }
.mono {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 12.5px;
}
.nowrap { white-space: nowrap; }
.ta-r { text-align: right; }

/* ---------- 图标 ---------- */
.ic, .sprite { width: 20px; height: 20px; flex: 0 0 auto; }
.ic { display: inline-block; vertical-align: -0.22em; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* 文件类型配色 */
.k-image   { color: #0EA5A4; }
.k-video   { color: var(--pink); }
.k-audio   { color: var(--violet); }
.k-pdf     { color: #EF3B2D; }
.k-doc     { color: #2F6BFF; }
.k-sheet   { color: #10A56A; }
.k-slide   { color: #FF8A00; }
.k-archive { color: #D9A400; }
.k-code    { color: #6D5BD0; }
.k-text    { color: #6B7280; }
.k-exe     { color: #475569; }
.k-apk     { color: #00B37E; }
.k-font    { color: #D6336C; }
.k-db      { color: #0284C7; }
.k-iso     { color: #64748B; }
.k-design  { color: #B5179E; }
.k-ebook   { color: #F59E0B; }
.k-generic { color: #94A3B8; }
.k-folder  { color: #F5A524; }

/* ---------- 顶栏 ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 16px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.brand-mark {
    width: 32px; height: 32px;
    display: grid; place-items: center;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 62%, #FF9A3D));
    box-shadow: 0 6px 14px -8px var(--accent-shadow);
}
.brand-mark svg { width: 26px; height: 26px; }
.brand-name {
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: .3px;
    white-space: nowrap;
}

.searchbox {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 320px;
    max-width: 460px;
    height: 36px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    transition: .18s;
}
.searchbox:focus-within {
    background: #fff;
    border-color: var(--accent-line);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.searchbox .search-ic { color: var(--ink-3); width: 18px; height: 18px; }
.searchbox input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 13.5px;
}
.searchbox input::placeholder { color: var(--ink-3); }
.searchbox kbd {
    display: none;
    padding: 1px 6px;
    border-radius: 5px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink-3);
    font-size: 11px;
    font-family: inherit;
}
@media (min-width: 1100px) { .searchbox kbd { display: block; } }

.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: .16s ease;
    -webkit-tap-highlight-color: transparent;
}
.btn .ic { width: 17px; height: 17px; }
.btn-primary {
    color: #fff;
    background: linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 74%, #FF7A3D));
    box-shadow: 0 8px 18px -12px var(--accent-shadow), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn-primary:hover { filter: brightness(1.04); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { color: var(--ink-2); border-color: var(--line); background: #fff; }
.btn-ghost:hover { color: var(--ink); border-color: var(--accent-line); background: var(--accent-soft); }
.btn-soft {
    color: var(--accent-ink);
    background: var(--accent-soft);
    border-color: var(--accent-line);
}
.btn-soft:hover { background: var(--accent-line); }
.btn-danger-soft { color: #C4141F; background: #FFF1F1; border-color: #FBD5D8; }
.btn-danger-soft:hover { background: #FFE3E4; }
.btn-lg { height: 44px; border-radius: 12px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-icon {
    display: inline-grid;
    place-items: center;
    width: 36px; height: 36px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    color: var(--ink-2);
}
.btn-icon:hover { border-color: var(--accent-line); color: var(--accent-ink); }

.mini-btn {
    display: inline-grid;
    place-items: center;
    width: 26px; height: 26px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--ink-3);
    cursor: pointer;
    transition: .15s;
}
.mini-btn .ic { width: 16px; height: 16px; }
.mini-btn:hover { background: var(--accent-soft); color: var(--accent-ink); }
.mini-btn.danger:hover { background: #FFE9EA; color: #C4141F; }

/* ---------- 用户菜单 ---------- */
.usermenu { position: relative; }
.usermenu > summary {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 8px 0 4px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    cursor: pointer;
    list-style: none;
}
.usermenu > summary::-webkit-details-marker { display: none; }
.usermenu > summary:hover { border-color: var(--accent-line); }
.avatar {
    width: 26px; height: 26px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-ink);
    font-weight: 700;
    font-size: 12.5px;
}
.uname { font-size: 13px; font-weight: 600; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caret { width: 14px; height: 14px; color: var(--ink-3); }
.usermenu[open] .menu { animation: pop .14s ease; }
.menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 208px;
    padding: 6px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-3);
    z-index: 90;
}
.menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 9px 9px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 13px;
}
.menu a, .menu .menu-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px 9px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    color: var(--ink-2);
}
.menu a .ic, .menu .menu-item .ic { width: 16px; height: 16px; color: var(--ink-3); }
.menu a:hover, .menu .menu-item:hover { background: var(--surface-2); color: var(--ink); }
.menu .danger { color: #C4141F; }
.menu .danger .ic { color: #C4141F; }
.menu form { margin: 0; }

/* ---------- 布局 ---------- */
.layout {
    display: grid;
    grid-template-columns: var(--side-w) minmax(0, 1fr);
    min-height: calc(100vh - var(--topbar-h));
}

.sidebar {
    position: sticky;
    top: var(--topbar-h);
    height: calc(100vh - var(--topbar-h));
    display: flex;
    flex-direction: column;
    background: #fff;
    border-right: 1px solid var(--line);
    z-index: 30;
}
.side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.4px;
    color: var(--ink-3);
    text-transform: uppercase;
}
.tree { flex: 1; overflow-y: auto; padding: 0 8px 12px; scrollbar-width: thin; }
.tree::-webkit-scrollbar { width: 8px; }
.tree::-webkit-scrollbar-thumb { background: #EADFDC; border-radius: 99px; }

.tree-root { margin-bottom: 2px; }
.tree-row { display: flex; align-items: center; gap: 2px; border-radius: 9px; }
.tree-row:hover { background: var(--surface-2); }
.tree-item.is-current > .tree-row { background: var(--accent-soft); }
.tree-item.is-current > .tree-row .tree-link { color: var(--accent-ink); font-weight: 700; }
.tree-toggle {
    width: 20px; height: 24px;
    flex: 0 0 20px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--ink-3);
    cursor: pointer;
    padding: 0;
}
.tree-toggle.is-empty { cursor: default; }
.tree-chev { display: grid; place-items: center; transition: transform .16s ease; }
.tree-chev .ic { width: 13px; height: 13px; }
.tree-toggle[data-open="1"] .tree-chev { transform: rotate(90deg); }
.tree-link {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 1;
    min-width: 0;
    height: 30px;
    padding-right: 6px;
    font-size: 13.2px;
    color: var(--ink-2);
}
.tree-link .folder-ic { width: 17px; height: 17px; color: #F5A524; }
.tree-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-count {
    font-size: 11px;
    color: var(--ink-3);
    background: var(--surface-2);
    border-radius: 99px;
    padding: 0 6px;
    line-height: 17px;
}
.tree-children { margin-left: 12px; border-left: 1px dashed var(--line); padding-left: 4px; }

.side-foot { border-top: 1px solid var(--line); padding: 10px 14px 14px; background: var(--surface-2); }
.stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12.5px;
    color: var(--ink-2);
    padding: 2px 0;
}
.stat-row span { display: flex; align-items: center; gap: 6px; color: var(--ink-3); }
.stat-row .ic { width: 14px; height: 14px; }
.stat-row b { font-variant-numeric: tabular-nums; color: var(--ink); }
.foot-note { margin-top: 6px; font-size: 11px; color: var(--ink-3); }

/* ---------- 主区 ---------- */
.main { padding: 14px 22px 64px; min-width: 0; }
.main-head { position: sticky; top: var(--topbar-h); z-index: 20; background: var(--bg); padding-bottom: 8px; margin: -14px -22px 8px; padding: 14px 22px 8px; }

.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 13px; min-height: 26px; }
.crumb { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 7px; color: var(--ink-2); }
.crumb:hover { background: #fff; color: var(--ink); }
.crumb .ic { width: 15px; height: 15px; }
.crumb.home { color: var(--ink-2); font-weight: 600; }
.crumb.is-last { color: var(--ink); font-weight: 700; }
.crumb-sep { color: var(--ink-3); display: inline-flex; }

.toolbar { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.tb-left { display: flex; align-items: center; gap: 8px; }
.tb-right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.count { font-size: 12.5px; color: var(--ink-3); }

.sort-form select, .filter-item select {
    height: 34px;
    padding: 0 28px 0 10px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A2928F' stroke-width='2.4' stroke-linecap='round'><path d='m5 9 7 7 7-7'/></svg>") no-repeat right 9px center;
    appearance: none;
    font-size: 13px;
    color: var(--ink-2);
    cursor: pointer;
}
.sort-form select:focus, .filter-item select:focus { outline: 2px solid var(--accent-line); outline-offset: 1px; }

.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.seg-btn {
    display: grid;
    place-items: center;
    width: 30px; height: 26px;
    border-radius: 7px;
    color: var(--ink-3);
    transition: .15s;
}
.seg-btn .ic { width: 16px; height: 16px; }
.seg-btn:hover { color: var(--ink); }
.seg-btn.is-on { background: var(--accent); color: #fff; box-shadow: 0 4px 10px -6px var(--accent-shadow); }

/* ---------- 文件网格 ---------- */
.content { min-height: 40vh; }
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
    gap: 12px;
    padding-top: 2px;
}
.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
    box-shadow: var(--shadow-1);
}
.tile:hover {
    transform: translateY(-2px);
    border-color: var(--accent-line);
    box-shadow: var(--shadow-2);
}
.tile-hit { position: absolute; inset: 0; border-radius: var(--r-lg); z-index: 1; }
.tile-hit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.tile-thumb {
    position: relative;
    height: 92px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background:
        radial-gradient(120% 100% at 50% 0%, #fff 0%, var(--surface-2) 60%, #FDF1EF 100%);
    border: 1px solid var(--line-soft);
    overflow: hidden;
}
.tile-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-glyph { width: 40px; height: 40px; }
.folder-glyph { width: 48px; height: 48px; color: #F5A524; }

.tile-info { min-width: 0; padding: 0 2px 2px; }
.tile-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-all;
}
.tile-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 11.5px;
    color: var(--ink-3);
    white-space: nowrap;
    overflow: hidden;
}
.tile-meta i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .55; flex: 0 0 3px; }
.dl-count { color: var(--accent-ink); }

.tile-acts {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 3px;
    opacity: 0;
    transform: translateY(-4px);
    transition: .16s ease;
    z-index: 2;
}
.tile:hover .tile-acts, .tile:focus-within .tile-acts { opacity: 1; transform: none; }
.act {
    display: grid;
    place-items: center;
    width: 26px; height: 26px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .96);
    color: var(--ink-2);
    cursor: pointer;
    box-shadow: var(--shadow-1);
}
.act .ic { width: 15px; height: 15px; }
.act:hover { color: var(--accent-ink); border-color: var(--accent-line); background: #fff; }

.tile-dir .tile-thumb { background: radial-gradient(120% 100% at 50% 0%, #fff 0%, #FFF8EC 65%, #FFF1DA 100%); }
.tile-dir .tile-name { padding-right: 6px; }
.badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 4px;
    padding: 0 5px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 600;
    line-height: 16px;
    vertical-align: 1px;
}
.badge .ic { width: 10px; height: 10px; }
.badge-lock { background: #FFF0F0; color: #C4141F; }
.badge-login { background: #EEF4FF; color: #2F6BFF; }

/* 列表视图 */
.list-view .grid { display: flex; flex-direction: column; gap: 5px; }
.list-view .tile {
    flex-direction: row;
    align-items: center;
    gap: 11px;
    padding: 7px 10px;
    border-radius: var(--r);
}
.list-view .tile:hover { transform: none; }
.list-view .tile-thumb {
    width: 40px; height: 40px;
    flex: 0 0 40px;
    border-radius: 9px;
    background: var(--surface-2);
}
.list-view .file-glyph { width: 24px; height: 24px; }
.list-view .folder-glyph { width: 26px; height: 26px; }
.list-view .tile-info { flex: 1; display: flex; align-items: center; gap: 12px; padding: 0; }
.list-view .tile-name { -webkit-line-clamp: 1; flex: 1; font-weight: 500; }
.list-view .tile-meta { margin: 0; flex: 0 0 auto; }
.list-view .tile-meta span:last-child { display: none; }
.list-view .tile-acts { position: static; opacity: 1; transform: none; }

/* 空状态 */
.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 70px 20px;
    color: var(--ink-3);
    text-align: center;
}
.empty > .ic { width: 46px; height: 46px; opacity: .5; }
.empty p { font-size: 14px; }

/* 搜索结果 */
.search-results { display: flex; flex-direction: column; gap: 6px; }
.result-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r);
}
.result-row:hover { border-color: var(--accent-line); }
.result-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: var(--surface-2); }
.result-ic .file-glyph { width: 24px; height: 24px; }
.result-body { flex: 1; min-width: 0; }
.result-name { display: block; font-weight: 600; font-size: 13.4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-name:hover { color: var(--accent-ink); }
.result-meta { font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 锁屏 ---------- */
.lockscreen { display: grid; place-items: center; min-height: 62vh; padding: 30px 16px; }
.lock-card {
    width: min(392px, 100%);
    padding: 30px 28px 26px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-3);
    text-align: center;
}
.lock-ic {
    width: 56px; height: 56px;
    margin: 0 auto 14px;
    display: grid; place-items: center;
    border-radius: 18px;
    background: var(--accent-soft);
    color: var(--accent-ink);
}
.lock-ic .ic { width: 26px; height: 26px; }
.lock-card h2 { font-size: 17px; margin-bottom: 6px; word-break: break-all; }
.lock-card p { font-size: 13px; color: var(--ink-2); margin-bottom: 16px; }
.lock-hint { font-size: 11.5px !important; color: var(--ink-3) !important; margin: 12px 0 0 !important; }

/* ---------- 表单 ---------- */
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.field input, .field select, .field textarea {
    width: 100%;
    height: 38px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    font-size: 13.5px;
    transition: .16s;
}
.field input[type="color"] { padding: 4px; height: 38px; cursor: pointer; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: 0;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input::placeholder { color: var(--ink-3); }

.alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 11px;
    border-radius: 10px;
    font-size: 12.8px;
    margin-bottom: 12px;
}
.alert .ic { width: 16px; height: 16px; margin-top: 1px; }
.alert-error { background: #FFF0F0; color: #C4141F; border: 1px solid #FBD5D8; }

/* ---------- 登录 / 初始化 ---------- */
.is-plain { background: var(--bg); }
.auth-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 28px 18px;
    background:
        radial-gradient(42vw 42vw at 12% -6%, rgba(245, 51, 63, .12), transparent 65%),
        radial-gradient(38vw 38vw at 92% 4%, rgba(255, 197, 61, .18), transparent 62%),
        radial-gradient(40vw 40vw at 80% 96%, rgba(124, 92, 255, .10), transparent 60%),
        var(--bg);
}
.auth-card {
    width: min(398px, 100%);
    padding: 32px 30px 26px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-3);
    backdrop-filter: blur(6px);
}
.auth-brand { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 20px; font-weight: 700; letter-spacing: .3px; }
.auth-card h1 { font-size: 22px; letter-spacing: -.4px; }
.auth-sub { font-size: 13px; color: var(--ink-2); margin: 5px 0 20px; }
.auth-foot { margin-top: 16px; text-align: center; font-size: 12.8px; }
.auth-foot a { color: var(--ink-2); }
.auth-foot a:hover { color: var(--accent-ink); }
.auth-copy { font-size: 12px; color: var(--ink-3); }
.err-card { text-align: center; }
.err-code { font-size: 44px; font-weight: 800; color: var(--accent); letter-spacing: -2px; line-height: 1; margin-bottom: 8px; }

/* ---------- 页面（日志 / 管理） ---------- */
.page { max-width: 1180px; margin: 0 auto; padding: 22px 22px 70px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-title { display: flex; align-items: center; gap: 8px; font-size: 19px; letter-spacing: -.3px; }
.page-title .ic { width: 21px; height: 21px; color: var(--accent); }
.page-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }

.filterbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px;
    margin-bottom: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
}
.filter-item { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.filter-item.grow { flex: 1 1 220px; min-width: 160px; }
.filter-item .ic { width: 15px; height: 15px; color: var(--ink-3); }
.filter-item input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    outline: 0;
    font-size: 13px;
    height: 100%;
}
.filter-item input[type="date"] { width: 128px; }
.filter-item select { border: 0; background-color: transparent; height: 100%; padding-left: 2px; }
.date-label { font-size: 12px; color: var(--ink-3); }

.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table thead th {
    position: sticky;
    top: 0;
    background: var(--surface-2);
    text-align: left;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .4px;
    color: var(--ink-3);
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.table td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr:hover { background: #FFFCFB; }
.table tbody tr:last-child td { border-bottom: 0; }
.cell-name { font-weight: 600; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-path { color: var(--ink-3); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-empty { text-align: center; color: var(--ink-3); padding: 40px 12px !important; }

.tag {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 17px;
    white-space: nowrap;
}
.tag-red { background: #FFEDEE; color: #C4141F; }
.tag-mint { background: #E7F9F4; color: #0A8F76; }
.tag-soft { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-soft); }

.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #D7CBC8; margin-right: 5px; vertical-align: 1px; }
.dot-on { background: var(--mint); box-shadow: 0 0 0 3px rgba(23, 195, 162, .15); }

.pager { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 16px; }
.pg {
    display: grid;
    place-items: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: #fff;
    font-size: 13px;
    color: var(--ink-2);
}
.pg:hover { border-color: var(--accent-line); color: var(--accent-ink); }
.pg.is-active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.pg.is-disabled { opacity: .4; pointer-events: none; }
.pg .ic { width: 15px; height: 15px; }

/* 管理 - 标签页 */
.tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; width: fit-content; }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.tab .ic { width: 16px; height: 16px; }
.tab:hover { background: var(--surface-2); }
.tab.is-on { background: var(--accent); color: #fff; box-shadow: 0 6px 14px -10px var(--accent-shadow); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat-card { display: flex; align-items: center; gap: 11px; padding: 13px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); }
.sc-ic { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--surface-2); }
.sc-ic .ic { width: 19px; height: 19px; }
.sc-value { font-size: 18px; font-weight: 700; letter-spacing: -.4px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.sc-label { font-size: 11.5px; color: var(--ink-3); }
.tone-red .sc-ic { background: #FFEDEE; color: #E11D2A; }
.tone-amber .sc-ic { background: #FFF6E3; color: #D18A00; }
.tone-mint .sc-ic { background: #E7F9F4; color: #0A8F76; }
.tone-violet .sc-ic { background: #F0ECFF; color: #6244E0; }
.tone-blue .sc-ic { background: #EAF2FF; color: #2563EB; }
.tone-pink .sc-ic { background: #FFEDF3; color: #DB2777; }

.panel { padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 14px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel-title { display: flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 700; margin-bottom: 12px; }
.panel-head .panel-title { margin-bottom: 0; }
.panel-title .ic { width: 17px; height: 17px; color: var(--ink-3); }
.panel-note { font-size: 12px; color: var(--ink-3); margin-top: 12px; }
.panel-note code { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 5px; padding: 1px 5px; font-size: 11.5px; }

.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2px 18px; }
.kv > div { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line-soft); }
.kv dt { flex: 0 0 96px; font-size: 12.5px; color: var(--ink-3); }
.kv dd { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv dd.path { white-space: normal; word-break: break-all; font-size: 11.5px; color: var(--ink-2); }
.kv-hint { color: var(--ink-3); font-size: 11px; white-space: normal; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 14px; }
.switch-list { display: flex; flex-direction: column; gap: 2px; margin: 6px 0 4px; }
.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-top: 1px solid var(--line-soft);
    cursor: pointer;
}
.switch-row b { display: block; font-size: 13.2px; }
.switch-row small { display: block; font-size: 11.5px; color: var(--ink-3); }
.switch-row input[type="checkbox"] {
    appearance: none;
    width: 42px; height: 24px;
    flex: 0 0 42px;
    border-radius: 99px;
    background: #E7DCD9;
    position: relative;
    cursor: pointer;
    transition: .18s;
    border: 0;
}
.switch-row input[type="checkbox"]::after {
    content: "";
    position: absolute;
    top: 3px; left: 3px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
    transition: .18s;
}
.switch-row input[type="checkbox"]:checked { background: var(--accent); }
.switch-row input[type="checkbox"]:checked::after { transform: translateX(18px); }
.form-actions { display: flex; gap: 8px; margin-top: 14px; }

/* ---------- 模态框 ---------- */
.modal-root {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(38, 20, 22, .42);
    backdrop-filter: blur(3px);
    animation: fade .16s ease;
}
.modal-root[hidden] { display: none; }
.modal {
    width: min(460px, 100%);
    max-height: min(86vh, 860px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 18px;
    box-shadow: var(--shadow-3);
    overflow: hidden;
    animation: pop .18s cubic-bezier(.2, .9, .3, 1.2);
}
.modal.is-wide { width: min(720px, 100%); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 15px 16px 12px; border-bottom: 1px solid var(--line-soft); }
.modal-title { font-size: 14.5px; font-weight: 700; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-body { padding: 16px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line-soft); background: var(--surface-2); }
.modal-close { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--ink-3); cursor: pointer; }
.modal-close:hover { background: var(--surface-2); color: var(--ink); }
.modal-note { font-size: 12px; color: var(--ink-3); margin-top: 8px; line-height: 1.6; }

.ctx-menu {
    position: fixed;
    z-index: 260;
    min-width: 178px;
    padding: 5px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-3);
    animation: pop .12s ease;
}
.ctx-menu button, .ctx-menu a {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 7px 9px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}
.ctx-menu .ic { width: 15px; height: 15px; color: var(--ink-3); }
.ctx-menu button:hover, .ctx-menu a:hover { background: var(--surface-2); }
.ctx-menu .danger { color: #C4141F; }
.ctx-menu .danger .ic { color: #C4141F; }
.ctx-sep { height: 1px; margin: 4px 6px; background: var(--line-soft); }

/* 预览 */
.preview-stage {
    display: grid;
    place-items: center;
    min-height: 200px;
    max-height: 66vh;
    background: #14100F;
    border-radius: 12px;
    overflow: hidden;
}
.preview-stage img { max-width: 100%; max-height: 66vh; display: block; object-fit: contain; }
.preview-stage video { width: 100%; max-height: 66vh; display: block; background: #000; }
.preview-stage iframe { width: 100%; height: 66vh; border: 0; background: #fff; }
.preview-stage audio { width: min(520px, 100%); }
.audio-wrap { padding: 42px 22px; text-align: center; width: 100%; }
.audio-art {
    width: 92px; height: 92px;
    margin: 0 auto 16px;
    display: grid; place-items: center;
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(140deg, #7C5CFF, #FF5C93);
    box-shadow: 0 18px 40px -22px rgba(124, 92, 255, .8);
}
.audio-art .ic { width: 42px; height: 42px; }
.audio-wrap audio { margin: 0 auto 6px; }
.preview-text {
    width: 100%;
    max-height: 62vh;
    overflow: auto;
    margin: 0;
    padding: 14px 16px;
    background: #fff;
    border-radius: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    color: #2A2020;
}
.preview-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--ink-3); }
.preview-meta .tag { border: 1px solid var(--line-soft); }
.preview-none { padding: 34px 20px; text-align: center; color: var(--ink-3); }
.preview-none .ic { width: 40px; height: 40px; opacity: .5; margin-bottom: 10px; }

/* 上传面板 */
.uploader { display: flex; flex-direction: column; gap: 10px; }
.up-drop {
    display: block;
    padding: 22px 18px;
    border: 2px dashed var(--line);
    border-radius: 14px;
    text-align: center;
    cursor: pointer;
    background: var(--surface-2);
    transition: border-color .15s, background .15s;
}
.up-drop:hover, .up-drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.up-drop > .ic { width: 26px; height: 26px; color: var(--accent); }
.up-drop-title { margin-top: 6px; font-size: 13.5px; font-weight: 600; }
.up-drop-sub { margin-top: 3px; font-size: 12px; color: var(--ink-3); }
.up-actions { display: flex; justify-content: flex-end; }
.up-dirbtn { font-size: 12.5px; }
.up-list { display: flex; flex-direction: column; gap: 7px; max-height: 320px; overflow: auto; }
.up-list:empty { display: none; }
.up-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    background: var(--surface-2);
}
.up-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #fff; }
.up-ic .ic { width: 18px; height: 18px; }
.up-main { flex: 1; min-width: 0; }
.up-name { font-size: 12.8px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-bar { height: 4px; border-radius: 99px; background: #EDE2DF; margin-top: 5px; overflow: hidden; }
.up-bar > i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent), #FF8A5B); transition: width .16s linear; }
.up-state { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.up-row.is-done .up-bar > i { background: var(--mint); }
.up-row.is-err .up-bar > i { background: #E11D2A; }

/* 拖拽遮罩 */
.drop-mask {
    position: fixed;
    inset: 12px;
    z-index: 300;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 10px;
    border-radius: 20px;
    border: 2px dashed var(--accent);
    background: rgba(255, 245, 245, .9);
    backdrop-filter: blur(2px);
    color: var(--accent-ink);
    font-weight: 600;
}
.drop-mask[hidden] { display: none; }
.drop-mask .ic { width: 40px; height: 40px; }

/* 路径选择器 */
.path-picker { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 5px; }
.path-opt {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 9px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    color: var(--ink-2);
}
.path-opt:hover { background: var(--surface-2); }
.path-opt.is-on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.path-opt .ic { width: 15px; height: 15px; color: #F5A524; }
.path-opt.is-lock .ic { color: var(--ink-3); }

/* Toast */
.toasts { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: min(92vw, 460px);
    padding: 9px 15px;
    border-radius: 999px;
    background: rgba(34, 25, 26, .93);
    color: #fff;
    font-size: 13px;
    box-shadow: 0 12px 28px -12px rgba(0, 0, 0, .5);
    animation: toastIn .2s ease;
}
.toast .ic { width: 16px; height: 16px; }
.toast.ok .ic { color: #4ADE9B; }
.toast.err .ic { color: #FF8A8A; }
.toast.out { animation: toastOut .2s ease forwards; }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.985); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

/* ---------- 响应式 ---------- */
.only-narrow { display: none; }

@media (max-width: 900px) {
    .layout { grid-template-columns: minmax(0, 1fr); }
    .sidebar {
        position: fixed;
        top: var(--topbar-h);
        left: 0;
        height: calc(100vh - var(--topbar-h));
        width: 264px;
        transform: translateX(-100%);
        transition: transform .2s ease;
        box-shadow: var(--shadow-3);
    }
    body.side-open .sidebar { transform: none; }
    body.side-open::after {
        content: "";
        position: fixed;
        inset: var(--topbar-h) 0 0 0;
        background: rgba(30, 18, 18, .3);
        z-index: 25;
    }
    .only-narrow { display: inline-grid; }
    .only-wide { display: none !important; }
    .main { padding: 12px 14px 60px; }
    .main-head { margin: -12px -14px 8px; padding: 12px 14px 8px; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
    .tile-thumb { height: 78px; }
    .tile-acts { opacity: 1; transform: none; }
    .searchbox { flex: 1 1 100px; }
    .brand-name { display: none; }
    .page { padding: 16px 14px 60px; }
}

@media (max-width: 560px) {
    .topbar { gap: 8px; padding: 0 10px; }
    .btn span { display: none; }
    .topbar .btn span { display: none; }
    .topbar .btn { padding: 0 10px; }
    .top-actions { gap: 5px; }
    .usermenu .caret { display: none; }
    .usermenu > summary { padding: 0 4px 0 4px; }
    .searchbox { flex: 1 1 80px; min-width: 0; height: 34px; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
    .tile { padding: 8px; gap: 7px; }
    .tile-thumb { height: 68px; border-radius: 9px; }
    .file-glyph { width: 32px; height: 32px; }
    .table { font-size: 12px; }
    .filter-item.grow { flex-basis: 100%; }
}

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

/* ============================================================
   v1.2.0 新增：目录排序 / 多选框选 / 批量操作 / 后台任务 / 重置密码
   ============================================================ */

/* ---------- 侧边栏：一级目录排序 ---------- */
.side-head-acts { display: inline-flex; align-items: center; gap: 2px; }
.side-head-acts .mini-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); }
.side-sort-hint {
    margin: 0 12px 8px;
    padding: 7px 9px;
    font-size: 11.5px;
    line-height: 1.55;
    color: var(--accent-ink);
    background: var(--accent-soft);
    border: 1px dashed var(--accent-line);
    border-radius: 8px;
}
.tree-sort { display: none; align-items: center; gap: 2px; padding-right: 3px; }
body.is-tree-sorting .tree-sort { display: inline-flex; }
.tree-move {
    width: 21px; height: 21px;
    display: grid; place-items: center;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: #fff;
    color: var(--ink-3);
    cursor: pointer;
    box-shadow: var(--shadow-1);
}
.tree-move .ic { width: 12px; height: 12px; }
.tree-move:hover { background: var(--accent); color: #fff; }
body.is-tree-sorting .tree-children .tree-sort { display: none; }

/* ---------- 磁贴勾选 ---------- */
.tile-pick {
    position: absolute;
    top: 8px; left: 8px;
    z-index: 3;
    width: 19px; height: 19px;
    padding: 0;
    border: 1.5px solid #D9C7C4;
    border-radius: 6px;
    background: rgba(255, 255, 255, .95);
    cursor: pointer;
    opacity: 0;
    transition: opacity .14s ease, background .14s ease, border-color .14s ease;
}
.tile:hover .tile-pick,
.tile.is-selected .tile-pick,
body.has-selection .tile-pick { opacity: 1; }
.tile-pick:hover { border-color: var(--accent); }
.tile-pick[aria-pressed="true"] {
    background: var(--accent);
    border-color: var(--accent);
    opacity: 1;
}
.tile-pick[aria-pressed="true"]::after {
    content: '';
    position: absolute;
    left: 6px; top: 2px;
    width: 5px; height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(42deg);
}
.tile.is-selected {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow-2);
}
.tile.is-cut { opacity: .45; border-style: dashed; }
.tile.is-cut .tile-thumb { filter: grayscale(.35); }

.list-view .tile { padding-left: 8px; }
.list-view .tile-pick { position: static; flex: 0 0 19px; opacity: 1; }

/* ---------- 框选 ---------- */
.marquee {
    position: fixed;
    z-index: 95;
    pointer-events: none;
    border: 1px solid var(--accent);
    border-radius: 5px;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
}
body.is-marquee, body.is-marquee * {
    user-select: none;
    -webkit-user-select: none;
    cursor: crosshair !important;
}

/* ---------- 选择工具条 ---------- */
.sel-bar {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    z-index: 120;
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: calc(100vw - 20px);
    flex-wrap: wrap;
    padding: 8px 10px;
    border-radius: 14px;
    background: rgba(34, 25, 26, .95);
    color: #fff;
    box-shadow: 0 20px 44px -20px rgba(0, 0, 0, .6);
    backdrop-filter: saturate(180%) blur(10px);
}
.sel-bar[hidden] { display: none; }
.sel-count { padding: 0 4px 0 6px; font-size: 12.5px; white-space: nowrap; }
.sel-count b { font-variant-numeric: tabular-nums; }
.sel-sep { width: 1px; height: 18px; background: rgba(255, 255, 255, .18); }
.sel-bar .btn-ghost {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .16);
    color: #fff;
}
.sel-bar .btn-ghost:hover { background: rgba(255, 255, 255, .22); color: #fff; border-color: rgba(255, 255, 255, .3); }
.sel-bar .btn-ghost:disabled { opacity: .4; }
.sel-bar .btn-danger-soft { background: #E01E2B; border-color: transparent; color: #fff; }
.sel-bar .btn-danger-soft:hover { background: #F5333F; }
.sel-bar .btn-icon { width: 30px; height: 30px; border-color: transparent; background: transparent; color: rgba(255, 255, 255, .72); }
.sel-bar .btn-icon:hover { background: rgba(255, 255, 255, .14); color: #fff; }

.btn-xs { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn-xs .ic { width: 15px; height: 15px; }

/* ---------- 后台任务进度 ---------- */
.job-box {
    margin-top: 12px;
    padding: 10px 12px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 10px;
}
.job-box[hidden] { display: none; }
.job-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--ink-2); }
.job-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-line b { font-variant-numeric: tabular-nums; color: var(--accent-ink); }
.job-track { height: 6px; margin-top: 7px; border-radius: 99px; background: #F1E6E3; overflow: hidden; }
.job-track > i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--accent), #FF9A3D);
    transition: width .25s ease;
}

/* ---------- 重置密码面板 ---------- */
.reset-box { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.reset-box summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--ink-2);
    cursor: pointer;
    list-style: none;
}
.reset-box summary::-webkit-details-marker { display: none; }
.reset-box summary .ic { width: 15px; height: 15px; }
.reset-box summary:hover { color: var(--accent-ink); }
.reset-box[open] summary { margin-bottom: 10px; }
.reset-warn {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-bottom: 10px;
    padding: 8px 10px;
    font-size: 11.5px;
    line-height: 1.6;
    color: #8A5B00;
    background: #FFF8E6;
    border: 1px solid #FFE7A8;
    border-radius: 9px;
}
.reset-warn .ic { width: 15px; height: 15px; margin-top: 1px; flex: 0 0 15px; }
.reset-warn code,
.panel-note code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11.5px;
    padding: 0 3px;
    border-radius: 3px;
    background: rgba(0, 0, 0, .05);
}
.alert-warn { background: #FFF8E6; color: #8A5B00; border: 1px solid #FFE7A8; }
.alert-warn code { background: rgba(0, 0, 0, .06); padding: 0 3px; border-radius: 3px; }

@media (max-width: 560px) {
    .sel-bar { bottom: 10px; gap: 4px; padding: 7px 8px; border-radius: 12px; }
    .sel-bar .btn-xs span { display: none; }
    .sel-bar .btn-xs { padding: 0 9px; }
    .sel-count { font-size: 12px; }
    .tile-pick { opacity: 1; }
}

/* ---------- 移动端：列表行距收紧（v1.2.1） ----------
   手机屏幕上 40px 缩略图 + 7px 上下内边距 + 5px 行间隔显得又高又散，
   这里按断点逐级压缩：行高从约 56px 收到 38px，一屏能多放 3~4 条。 */
@media (max-width: 900px) {
    .list-view .grid { gap: 4px; }
    .list-view .tile { padding: 5px 8px; gap: 9px; }
    .list-view .tile-thumb { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 8px; }
    .list-view .file-glyph { width: 21px; height: 21px; }
    .list-view .folder-glyph { width: 23px; height: 23px; }
    .list-view .tile-meta { font-size: 11px; gap: 5px; }
}

@media (max-width: 560px) {
    .grid { gap: 8px; }
    .list-view .grid { gap: 3px; }
    .list-view .tile { padding: 3px 6px; gap: 7px; border-radius: 9px; }
    .list-view .tile-thumb { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 7px; }
    .list-view .file-glyph { width: 18px; height: 18px; }
    .list-view .folder-glyph { width: 20px; height: 20px; }
    .list-view .tile-name { font-size: 12.5px; }
    .list-view .tile-meta { font-size: 10.5px; gap: 4px; }
    .list-view .tile-acts { gap: 2px; }
    .list-view .tile-acts .act { width: 23px; height: 23px; border-radius: 7px; }
    .list-view .tile-acts .act .ic { width: 13px; height: 13px; }
    .list-view .tile-pick { flex: 0 0 17px; width: 17px; height: 17px; }
    .list-view .tile-pick[aria-pressed="true"]::after { left: 5px; top: 1px; width: 4px; height: 8px; }
}

/* ---------- v1.2.2：服务器防护页（Nginx 片段 / 外网自检） ---------- */
.panel-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.btn-sm .ic { width: 14px; height: 14px; }
.tag-amber { background: #FFF6E3; color: #99650A; }
.muted { color: var(--ink-3); font-weight: 400; }

/* 规则片段：等宽 + 可横向滚动，行距略松便于对照行号阅读 */
.code-block {
    margin: 0;
    padding: 14px 16px;
    border-radius: var(--r);
    background: var(--surface-2);
    border: 1px solid var(--line-soft);
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.75;
    color: var(--ink);
    white-space: pre;
    overflow: auto;
    max-height: 460px;
    tab-size: 4;
}

.probe-out { margin-top: 14px; display: grid; gap: 7px; }
.probe-tip { margin: 0 0 4px; font-size: 12.5px; color: var(--ink-2); }
.probe-tip.ok { color: #0A8F76; }
.probe-tip.err { color: var(--accent-ink); }
.probe-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 4px 10px;
    align-items: center;
    padding: 9px 11px;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    background: var(--surface);
}
.probe-name { font-size: 13px; font-weight: 600; }
.probe-code { font-size: 11.5px; color: var(--ink-2); }
.probe-url { grid-column: 2 / -1; font-size: 11px; color: var(--ink-3); word-break: break-all; }
.probe-note { grid-column: 1 / -1; font-size: 11.5px; color: var(--ink-3); }
.path-cell { max-width: 420px; word-break: break-all; font-size: 11.5px; }

@media (max-width: 560px) {
    .code-block { font-size: 11px; padding: 11px 12px; max-height: 340px; }
    .probe-item { grid-template-columns: auto 1fr; }
    .probe-code { grid-column: 2; justify-self: start; }
}
