/* ==========================================================================
   webfiles — 站点样式表
   设计目标：云盘 + 论坛的混合风格，浅色、圆角、蓝色主色调。
   本文件不依赖任何外部 CSS 框架，所有页面共用。
   ========================================================================== */

:root {
    --brand: #2f6bff;
    --brand-dark: #1f52d6;
    --brand-soft: #eaf1ff;
    --brand-soft-2: #f5f8ff;
    --ink: #1f2329;
    --ink-2: #4a5058;
    --ink-3: #8a9099;
    --line: #e8ebf0;
    --line-2: #f0f2f5;
    --bg: #f5f7fb;
    --card: #ffffff;
    --ok: #16a34a;
    --ok-soft: #e8f7ee;
    --warn: #d97706;
    --warn-soft: #fef4e6;
    --danger: #dc2626;
    --danger-soft: #fdecec;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 20px;
    --shadow: 0 2px 10px rgba(24, 39, 75, .06);
    --shadow-lg: 0 10px 32px rgba(24, 39, 75, .12);
    --sidebar: 232px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; }

h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.35; font-weight: 600; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
h4 { font-size: .95rem; }
p { margin: 0 0 .75rem; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; width: 100%; }
.muted { color: var(--ink-3); }
.small { font-size: .85rem; }
.tiny { font-size: .78rem; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
.flex { display: flex; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.items-center { align-items: center; }
.gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; } .gap-3 { gap: 1.5rem; }
.wrap-gap { display: flex; flex-wrap: wrap; gap: .5rem; }
.grow { flex: 1 1 auto; min-width: 0; }
.hide { display: none !important; }

/* ------------------------------------------------------------------ navbar */

.nav {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    height: 60px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
}

.brand:hover { color: var(--ink); }

.brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: linear-gradient(135deg, #4d84ff, #2f6bff);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 15px;
    font-weight: 700;
    flex: none;
}

.nav-links { display: flex; align-items: center; gap: 4px; }

.nav-link {
    padding: 7px 13px;
    border-radius: 9px;
    color: var(--ink-2);
    font-weight: 500;
    white-space: nowrap;
}

.nav-link:hover { background: var(--brand-soft); color: var(--brand); }
.nav-link.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav-spacer { flex: 1 1 auto; }
.nav-user { display: flex; align-items: center; gap: 8px; }

/* 头像现在是 <img src="/avatar/...">：元素本身仍是圆形，
   object-fit 让方形图片填满圆形，透明图片则露出下面的渐变兜底。 */
.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8fb4ff, #2f6bff);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: .82rem;
    flex: none;
    text-transform: uppercase;
    object-fit: cover;
    overflow: hidden;
}

.nav-toggle {
    display: none;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 9px;
    width: 38px;
    height: 34px;
    font-size: 16px;
    cursor: pointer;
}

/* ------------------------------------------------------------------ layout */

.page { padding: 22px 0 56px; }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card + .card { margin-top: 16px; }
.card-head {
    padding: 14px 18px;
    border-bottom: 1px solid var(--line-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-weight: 600;
}
.card-body { padding: 18px; }
.card-body.tight { padding: 12px 18px; }
.card-foot {
    padding: 12px 18px;
    border-top: 1px solid var(--line-2);
    background: var(--brand-soft-2);
    border-radius: 0 0 var(--radius) var(--radius);
}

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }

/* ------------------------------------------------------------------ buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink-2);
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s, border-color .15s, color .15s;
    white-space: nowrap;
    text-decoration: none;
}

.btn:hover { background: #f7f9fc; color: var(--ink); border-color: #d8dde6; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { background: #128a3f; border-color: #128a3f; color: #fff; }
.btn-warn { background: var(--warn); border-color: var(--warn); color: #fff; }
.btn-warn:hover { background: #b96a05; color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand); }
.btn-sm { padding: 5px 11px; font-size: .82rem; border-radius: 8px; }
.btn-lg { padding: 12px 26px; font-size: 1rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn:disabled, .btn.disabled { opacity: .55; cursor: not-allowed; }

/* ------------------------------------------------------------------- badges */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    background: var(--line-2);
    color: var(--ink-2);
    line-height: 1.7;
}

.badge-brand { background: var(--brand-soft); color: var(--brand); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-vip { background: linear-gradient(135deg, #4d84ff, #2f6bff); color: #fff; }

/* -------------------------------------------------------------------- forms */

.form-row { margin-bottom: 14px; }
.label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.hint { font-size: .78rem; color: var(--ink-3); margin-top: 4px; }

.input, .select, .textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-family: inherit;
    color: var(--ink);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}

.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(47, 107, 255, .12);
}

.textarea { resize: vertical; min-height: 110px; line-height: 1.7; }
.input-sm { padding: 6px 10px; font-size: .85rem; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1 1 auto; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: .9rem; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
.radio-row { display: flex; flex-wrap: wrap; gap: 10px; }

.choice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: .88rem;
    background: #fff;
}

.choice:hover { border-color: #c9d6f5; background: var(--brand-soft-2); }
.choice input { accent-color: var(--brand); }

/* ------------------------------------------------------------------- alerts */

.alert {
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: .88rem;
    margin-bottom: 14px;
    border: 1px solid transparent;
    display: flex;
    gap: 9px;
    align-items: flex-start;
}

.alert-info { background: var(--brand-soft); color: #1b47a8; border-color: #cfe0ff; }
.alert-ok { background: var(--ok-soft); color: #14663a; border-color: #c6ecd5; }
.alert-warn { background: var(--warn-soft); color: #8a5205; border-color: #f6dfb8; }
.alert-danger { background: var(--danger-soft); color: #9b1c1c; border-color: #f8cfcf; }

/* -------------------------------------------------------------------- table */

.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th {
    text-align: left;
    padding: 10px 12px;
    background: var(--brand-soft-2);
    color: var(--ink-2);
    font-weight: 600;
    font-size: .82rem;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fafbfe; }
.table-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* --------------------------------------------------------------- file rows */

.file-list { display: flex; flex-direction: column; }

.file-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    transition: background .12s;
}

.file-row + .file-row { border-top: 1px solid var(--line-2); }
.file-row:hover { background: var(--brand-soft-2); }

.file-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 18px;
    flex: none;
    background: var(--brand-soft);
}

.file-icon.dir { background: #fff5e0; }
.file-meta { flex: 1 1 auto; min-width: 0; }
.file-name { font-weight: 500; color: var(--ink); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-name:hover { color: var(--brand); }
.file-sub { font-size: .78rem; color: var(--ink-3); display: flex; gap: 10px; flex-wrap: wrap; }
.file-actions { display: flex; gap: 6px; flex-wrap: wrap; flex: none; }

/* ---------------------------------------------------------------- pagination */

.pager { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 18px; }

.pager a, .pager span {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .86rem;
    color: var(--ink-2);
}

.pager a:hover { border-color: var(--brand); color: var(--brand); }
.pager .current { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pager .disabled { opacity: .45; pointer-events: none; }
.pager .dots { border: none; background: transparent; }

/* --------------------------------------------------------------------- tabs */

.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 16px; }

.tab {
    padding: 9px 15px;
    border-radius: 10px 10px 0 0;
    color: var(--ink-2);
    font-weight: 500;
    font-size: .9rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.tab:hover { color: var(--brand); background: var(--brand-soft-2); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.tab .count { font-size: .75rem; color: var(--ink-3); margin-left: 4px; }

/* ------------------------------------------------------------------- topics */

.topic {
    display: flex;
    gap: 12px;
    padding: 14px 4px;
    border-bottom: 1px solid var(--line-2);
}

.topic:last-child { border-bottom: none; }
.topic-main { flex: 1 1 auto; min-width: 0; }
.topic-title { font-size: .98rem; font-weight: 600; color: var(--ink); }
.topic-title:hover { color: var(--brand); }
.topic-meta { font-size: .78rem; color: var(--ink-3); display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.topic-stats { display: flex; gap: 14px; flex: none; align-items: center; text-align: center; }
.topic-stat { min-width: 52px; }
.topic-stat b { display: block; font-size: 1rem; color: var(--ink); font-weight: 600; }
.topic-stat span { font-size: .72rem; color: var(--ink-3); }

.post-body {
    background: var(--brand-soft-2);
    border: 1px solid var(--line-2);
    border-radius: var(--radius-sm);
    padding: 16px;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.85;
}

.reply { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.reply:last-child { border-bottom: none; }
.reply-body { flex: 1 1 auto; min-width: 0; }
.reply-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.reply-text { white-space: pre-wrap; word-break: break-word; line-height: 1.8; }

/* ------------------------------------------------------------------ 分享页 */

.share-head {
    background: linear-gradient(180deg, #eef4ff 0%, #f7faff 60%, #fff 100%);
    border-bottom: 1px solid var(--line);
    padding: 18px 0 22px;
}

.share-brand { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; font-weight: 700; }
.share-brand .mark {
    width: 38px; height: 38px; border-radius: 11px; flex: none;
    background: linear-gradient(135deg, #4d84ff, #2f6bff);
    color: #fff; display: grid; place-items: center; font-size: 18px;
}
.share-slogan {
    margin-left: 6px;
    padding: 3px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #d7e3ff;
    color: var(--brand);
    font-size: .82rem;
    font-weight: 600;
}

.share-user { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.share-avatar {
    width: 52px; height: 52px; border-radius: 50%; flex: none;
    background: linear-gradient(135deg, #8fb4ff, #2f6bff);
    color: #fff; display: grid; place-items: center; font-size: 20px; font-weight: 600;
    object-fit: cover; overflow: hidden;
}
.share-user-name { font-size: 1.05rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.share-user-sub { font-size: .82rem; color: var(--ink-3); }
.share-user-sub .warn { color: var(--danger); font-weight: 600; }

.share-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line-2);
    flex-wrap: wrap;
}
.share-back { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--ink); }
.share-count { font-weight: 600; }
.share-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: .85rem; }

/* 分享页在多级文件夹里的面包屑。 */
.share-crumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 0 2px;
    font-size: .88rem;
}
.share-crumbs a { color: var(--brand); }
.share-crumbs a:hover { text-decoration: underline; }

.share-foot {
    position: sticky;
    bottom: 0;
    background: rgba(255, 255, 255, .97);
    border-top: 1px solid var(--line);
    padding: 12px 0;
    z-index: 20;
}

.share-foot-inner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.share-foot-hint {
    background: var(--danger);
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 999px;
}

.share-banner {
    margin-top: 20px;
    border-radius: var(--radius);
    padding: 18px 22px;
    background: linear-gradient(120deg, #eaf1ff, #f7faff 60%, #eef7ff);
    border: 1px solid #dbe7ff;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}
.share-banner h3 { margin: 0 0 4px; color: #1b47a8; }
.share-banner p { margin: 0; color: #40639f; font-size: .86rem; }

.share-progress {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: .84rem;
    color: var(--brand);
    font-weight: 600;
}

/* ---------------------------------------------------------------- 首页 hero */

.hero {
    background: linear-gradient(135deg, #2f6bff 0%, #4d84ff 45%, #6f9dff 100%);
    color: #fff;
    padding: 54px 0 66px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    right: -120px;
    top: -80px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}

.hero-inner { position: relative; z-index: 1; }
.hero h1 { font-size: 2.1rem; color: #fff; margin-bottom: .6rem; }
.hero p { font-size: 1.02rem; color: rgba(255, 255, 255, .9); max-width: 640px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero .btn { border-color: rgba(255, 255, 255, .5); }
.hero .btn-light { background: #fff; color: var(--brand); border-color: #fff; font-weight: 600; }
.hero .btn-light:hover { background: #f0f5ff; color: var(--brand-dark); }
.hero .btn-outline { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .6); }
.hero .btn-outline:hover { background: rgba(255, 255, 255, .22); color: #fff; }

.hero-stats { display: flex; gap: 34px; margin-top: 30px; flex-wrap: wrap; }
.hero-stat b { display: block; font-size: 1.5rem; font-weight: 700; }
.hero-stat span { font-size: .84rem; color: rgba(255, 255, 255, .85); }

.stat-card { display: flex; align-items: center; gap: 14px; }
.stat-icon {
    width: 46px; height: 46px; border-radius: 13px; flex: none;
    display: grid; place-items: center; font-size: 21px; background: var(--brand-soft);
}
.stat-card b { display: block; font-size: 1.45rem; font-weight: 700; line-height: 1.2; }
.stat-card span { font-size: .82rem; color: var(--ink-3); }

.feature {
    display: flex;
    gap: 13px;
    align-items: flex-start;
}
.feature-icon {
    width: 42px; height: 42px; border-radius: 12px; flex: none;
    display: grid; place-items: center; font-size: 19px; background: var(--brand-soft);
}
.feature h4 { margin: 0 0 3px; }
.feature p { margin: 0; font-size: .85rem; color: var(--ink-3); }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 30px 0 14px; }
.section-head h2 { margin: 0; font-size: 1.22rem; }

.quick-card {
    display: block;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    color: var(--ink);
    transition: transform .15s, box-shadow .15s;
}
.quick-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--ink); }
.quick-card .emoji { font-size: 24px; }
.quick-card h4 { margin: 10px 0 4px; }
.quick-card p { margin: 0; font-size: .84rem; color: var(--ink-3); }

/* --------------------------------------------------------------------- 后台 */

.admin { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); gap: 18px; align-items: start; }

.admin-side {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 76px;
}

.admin-side-title { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding: 8px 10px 4px; font-weight: 700; }

.admin-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 10px;
    color: var(--ink-2);
    font-weight: 500;
    font-size: .9rem;
}

.admin-link:hover { background: var(--brand-soft-2); color: var(--brand); }
.admin-link.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.admin-link .ico { width: 18px; text-align: center; }
.admin-link .num { margin-left: auto; font-size: .76rem; color: var(--ink-3); }

.admin-main { min-width: 0; }

/* ------------------------------------------------------------------- 空状态 */

.empty { text-align: center; padding: 46px 20px; color: var(--ink-3); }
.empty .emoji { font-size: 40px; display: block; margin-bottom: 10px; }

/* --------------------------------------------------------------------- 底栏 */

.foot {
    border-top: 1px solid var(--line);
    background: #fff;
    padding: 26px 0;
    margin-top: 40px;
    color: var(--ink-3);
    font-size: .84rem;
}
.foot-inner { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.foot a { color: var(--ink-3); }
.foot a:hover { color: var(--brand); }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; }

/* -------------------------------------------------------------------- 工具类 */

.toast {
    position: fixed;
    left: 50%;
    top: 74px;
    transform: translateX(-50%);
    background: rgba(31, 35, 41, .93);
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: .88rem;
    z-index: 200;
    box-shadow: var(--shadow-lg);
    max-width: 90vw;
}

.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(20, 26, 38, .45);
    display: grid;
    place-items: center;
    z-index: 150;
    padding: 16px;
}

.modal {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
}

.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line-2); font-weight: 600; font-size: 1.02rem; }
.modal-body { padding: 18px 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 10px; background: var(--brand-soft-2); }

.progress { height: 8px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .2s; }

.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 14px; font-size: .88rem; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; word-break: break-all; }

.copy-field { display: flex; gap: 8px; }
.copy-field .input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .84rem; }

/* ------------------------------------------------------------------ 响应式 */

@media (max-width: 980px) {
    .split { grid-template-columns: minmax(0, 1fr); }
    .admin { grid-template-columns: minmax(0, 1fr); }
    .admin-side { position: static; }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-side .admin-link { display: inline-flex; }
}

@media (max-width: 720px) {
    .nav-inner { gap: 10px; height: auto; padding: 10px 0; flex-wrap: wrap; }
    .nav-toggle { display: block; margin-left: auto; }
    .nav-links {
        display: none;
        width: 100%;
        flex-wrap: wrap;
        order: 5;
        padding-top: 6px;
    }
    .nav-links.open { display: flex; }
    .nav-user { order: 4; }
    .hero { padding: 36px 0 44px; }
    .hero h1 { font-size: 1.55rem; }
    .hero-stats { gap: 20px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
    .topic-stats { display: none; }
    .kv { grid-template-columns: minmax(0, 1fr); }
    .kv dt { font-weight: 600; }
    .file-row { flex-wrap: wrap; }
    .file-actions { width: 100%; }
    .share-tools { width: 100%; margin-left: 0; }
}

/* 放在导航或列表里的表单：只作为按钮的壳，不占额外布局。 */
.inline-form { display: inline; margin: 0; }
.inline-form > button { font: inherit; }
button.admin-link { width: 100%; border: none; background: none; cursor: pointer; text-align: left; }

/* ---------------------------------------------------------- MC 状态页 (/mc) */

/* ------------------------------------------------- /mc 机器指标卡片 */
.metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 26px;
}
.metric { min-width: 0; }
.metric-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}
.metric-label { font-weight: 600; font-size: .9rem; }
.metric-value { font-variant-numeric: tabular-nums; font-weight: 600; }
.metric-sub { color: var(--ink-3); font-size: .78rem; font-weight: 400; }

.metric-pairs { display: flex; flex-direction: column; gap: 4px; }
.metric-pairs .pair {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}
.pair-key { font-size: .82rem; color: var(--ink-3); }
.pair-key.up { color: #d97706; }
.pair-key.down { color: #2563eb; }
.pair-key.write { color: #dc2626; }
.pair-key.read { color: #059669; }
.pair-val {
    /* 等宽数字，数字跳动时宽度不跟着抖。 */
    font-variant-numeric: tabular-nums;
    font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
    font-size: .86rem;
}

/* 进度条按指标区分颜色：CPU 随负载变色，内存固定用紫色。 */
#mCpuBar { background: linear-gradient(90deg, #22c55e, #eab308 60%, #ef4444); }
#mMemBar { background: #8b5cf6; }

@media (max-width: 560px) {
    .metrics { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}
/* 居中排列的操作按钮组，与 .wrap-gap 搭配使用。 */
.center-gap { justify-content: center; }

/* ================================================== MC 状态页（/mc）重做 */
.mc-page { max-width: 860px; }

.mc-hero { padding: 4px 0 16px; }
.mc-hero-main { display: flex; align-items: center; gap: 14px; }
.mc-hero-badge {
    flex: 0 0 auto;
    width: 52px; height: 52px;
    display: grid; place-items: center;
    font-size: 26px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4ade80, #16a34a);
    box-shadow: 0 6px 16px rgba(22, 163, 74, .25);
}
.mc-hero-title { margin: 0; font-size: 1.5rem; line-height: 1.2; }
.mc-hero-sub {
    margin: 6px 0 0;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.mc-addr {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: .92rem; font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(22, 163, 74, .1);
    color: #15803d;
    word-break: break-all;
}
.mc-refresh {
    border: 1px solid var(--line-2);
    background: #fff;
    border-radius: 999px;
    padding: 4px 12px;
    font: inherit; font-size: .82rem;
    color: var(--ink-2);
    cursor: pointer;
}
.mc-refresh:hover { border-color: var(--brand); color: var(--brand); }
.mc-refresh:disabled { opacity: .5; cursor: default; }

/* 状态卡 */
.mc-status { overflow: hidden; }
.mc-status-head {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--bg-2, #fafafa);
}
.mc-dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--ink-3);
    flex: 0 0 auto;
}
.mc-dot[data-state="online"]  { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.18); }
.mc-dot[data-state="offline"] { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.18); }
.mc-dot[data-state="error"]   { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.18); }
.mc-dot[data-state="loading"] { animation: mcPulse 1.2s ease-in-out infinite; }
@keyframes mcPulse { 0%,100% { opacity: .35 } 50% { opacity: 1 } }
.mc-state { font-weight: 600; font-size: .92rem; }
.mc-updated { margin-left: auto; color: var(--ink-3); font-size: .78rem; }

.mc-status-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 200px;
    gap: 22px;
    padding: 18px;
    align-items: center;
}
.mc-motd-label, .mc-sample-label {
    font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
    color: var(--ink-3); margin-bottom: 6px;
}
.mc-motd {
    font-size: 1.02rem; font-weight: 600; line-height: 1.45;
    word-break: break-word;
    white-space: pre-line;
}
.mc-version { margin-top: 6px; color: var(--ink-3); font-size: .82rem; word-break: break-word; }

.mc-players { text-align: center; }
.mc-players-num {
    font-size: 2rem; font-weight: 700; line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.mc-players-sep { color: var(--ink-3); margin: 0 2px; font-weight: 400; }
.mc-players-label { color: var(--ink-3); font-size: .8rem; margin-top: 2px; }
.mc-players-bar { margin-top: 10px; }
#mcPlayersBar { background: #22c55e; transition: width .3s, background .3s; }
/* 0 人时进度条宽度为 0，只剩一条浅底纹，看起来像没渲染出来。
   给空条换个描边样式，让它读起来是「服务器空着」而不是「这里坏了」。 */
.progress.is-empty {
    background: repeating-linear-gradient(90deg,
        var(--line-2) 0 6px, transparent 6px 12px);
    box-shadow: inset 0 0 0 1px var(--line-2);
}

.mc-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--line);
}
.mc-fact {
    padding: 12px 16px;
    border-right: 1px solid var(--line);
    min-width: 0;
}
.mc-fact:last-child { border-right: none; }
.mc-fact-key { display: block; color: var(--ink-3); font-size: .74rem; margin-bottom: 3px; }
.mc-fact-val {
    font-weight: 600; font-size: .9rem;
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}
#mcDelay[data-q="good"] { color: #16a34a; }
#mcDelay[data-q="ok"]   { color: #d97706; }
#mcDelay[data-q="bad"]  { color: #dc2626; }

.mc-sample-wrap { padding: 14px 18px; border-top: 1px solid var(--line); }
.mc-sample {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; gap: 6px;
    max-height: 168px; overflow-y: auto;
}
.mc-sample li {
    background: var(--bg-2, #f4f4f5);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: .82rem;
    word-break: break-all;
}
.mc-error {
    padding: 14px 18px;
    border-top: 1px solid var(--line);
    color: var(--danger);
    font-size: .88rem;
}

@media (max-width: 640px) {
    .mc-status-body { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .mc-players { text-align: left; }
    .mc-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mc-fact:nth-child(2n) { border-right: none; }
    .mc-fact:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .mc-hero-badge { width: 44px; height: 44px; font-size: 22px; }
    .mc-hero-title { font-size: 1.25rem; }
}
/* --------------------------------------------------- 表格在窄屏的处理
 * 手机上一次摆不下六列（/share 的分享列表就是），原来的做法是把整页撑宽，
 * 于是整个页面可以左右拖动——这是手机端最难受的一种损坏。
 * 现在让表格自己横向滚动，页面宽度不再受影响。
 * 外层 .table-scroll 由渲染器统一加上（见 web.wrapTables），所以这里只负责样式；
 * 用渲染时包装而不是 :has() 选择器，是因为 :has() 在部分旧浏览器上不生效，
 * 而「页面能不能左右拖」不能赌浏览器。 */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* 让滚动条不贴着卡片边缘，手指更好滑。 */
    margin-inline: -2px;
    padding-inline: 2px;
}
.table-scroll > .table { margin: 0; }

@media (max-width: 720px) {
    .table { min-width: 520px; }
    .table th, .table td { padding: 9px 10px; }
    .table-actions { gap: 5px; }
    /* 操作按钮在窄屏换行排列，避免把最后一列撑到很宽。 */
    .table-actions .btn-sm { padding: 4px 9px; font-size: .78rem; }
    /* 表格自身宽度兜底：内容再少也保持可读的列宽，由外层滚动。 */
    .table-scroll > .table { min-width: 520px; }
}
/* 标题行（.between）在窄屏的处理。
 * 20 个模板都用它排「左边标题 + 右边按钮组」，手机上两者并排会把页面撑宽
 * （/admin/database 的「下载备份 / 整理并校验」就是这样溢出的）。
 * 让右侧按钮组允许换行并按需占满一行，页面宽度就回到视口以内。 */
.between > .wrap-gap { flex-wrap: wrap; }
@media (max-width: 720px) {
    .between { align-items: flex-start; }
    /* 只有真正放不下时才占满整行，放得下就仍然并排。 */
    .between > .wrap-gap { min-width: 0; }
    .between > .wrap-gap > .btn,
    .between > .wrap-gap > form > .btn { white-space: nowrap; }
}
/* ==========================================================================
   视觉与布局打磨
   目标：把「哪里是标题、哪里是内容、哪里能点」分清楚，并让交互状态可见。
   下面这些规则都放在文件末尾，因此会覆盖上面的同名简写属性。
   ========================================================================== */

/* ---------------------------------------------------------- 色彩与层次 */
:root {
    /* 主色加深一档：原 #2f6bff 上的白色文字对比度刚好卡在边界，
       链接色在白底上也偏浅，这里整体压深。 */
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --brand-ink: #1e40af;
    --brand-soft: #e8efff;
    --brand-soft-2: #f6f9ff;

    /* 正文色阶拉开，次要信息不再和正文抢注意力。 */
    --ink: #111827;
    --ink-2: #40485a;
    --ink-3: #7c8496;
    --ink-4: #a4abbb;

    --line: #e3e7ef;
    --line-2: #eef1f6;
    --bg: #f4f6fa;
    --card: #ffffff;

    --ok: #15803d;      --ok-soft: #e7f6ec;
    --warn: #b45309;    --warn-soft: #fdf3e3;
    --danger: #dc2626;  --danger-soft: #fdecec;

    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 20px;
    --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
    --shadow-lg: 0 12px 32px rgba(16, 24, 40, .12);
    --ring: 0 0 0 3px rgba(37, 99, 235, .18);
}

body { color: var(--ink); }

/* 键盘可达性：只在键盘聚焦时画圈，鼠标点击不画。 */
.btn:focus-visible,
.input:focus-visible,
.select:focus-visible,
textarea:focus-visible,
.nav-link:focus-visible,
a:focus-visible {
    outline: none;
    box-shadow: var(--ring);
    border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------- 版式 */
h1 { font-size: 1.55rem; letter-spacing: -.01em; }
h2 { font-size: 1.22rem; letter-spacing: -.01em; }
/* 页面主标题下面那行说明统一压成次要色，减少「两行黑字」的噪音。 */
.page > h1 + p,
.page > .between h1 + p { color: var(--ink-3); }

/* --------------------------------------------------------------- 卡片 */
.card {
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}
/* 卡片头部加一点底色，标题与内容自然分开，不必靠粗体撑。 */
.card-head {
    padding: 13px 18px;
    background: linear-gradient(180deg, #fcfdff, #f8fafd);
    border-bottom: 1px solid var(--line-2);
    border-radius: var(--radius) var(--radius) 0 0;
    font-size: .93rem;
    font-weight: 600;
    color: var(--ink);
}
.card-body { padding: 18px; }
.card-body.tight { padding: 10px 16px; }
.card-foot {
    padding: 12px 18px;
    border-top: 1px solid var(--line-2);
    background: #fbfcfe;
    border-radius: 0 0 var(--radius) var(--radius);
}

/* --------------------------------------------------------------- 按钮 */
.btn {
    font-weight: 550;
    transition: background .15s, border-color .15s, color .15s,
                box-shadow .15s, transform .06s;
}
.btn:hover { background: #f6f8fc; border-color: #ccd3e0; color: var(--ink); }
.btn:active { transform: translateY(1px); }

.btn-primary { box-shadow: 0 1px 2px rgba(37, 99, 235, .25); }
.btn-primary:hover {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    box-shadow: 0 3px 10px rgba(37, 99, 235, .28);
}
.btn:disabled, .btn.disabled { opacity: .5; box-shadow: none; transform: none; }

/* 次要按钮：默认带一点边框色，避免整页全是灰白方块。 */
.btn { border-color: #d7dce6; }

/* --------------------------------------------------------------- 表格 */
.table thead th {
    background: #f8fafd;
    color: var(--ink-3);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: none;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #f8fafd; }
/* 数字列用等宽数字，纵向扫读时不会跳。 */
.table td { font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------- 表单 */
.label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--ink-2);
    margin-bottom: 5px;
}
.input, .select, textarea {
    border-color: #d7dce6;
    transition: border-color .15s, box-shadow .15s;
}
.input:hover, .select:hover, textarea:hover { border-color: #c3cad8; }
.input:focus, .select:focus, textarea:focus {
    border-color: var(--brand);
    box-shadow: var(--ring);
    outline: none;
}
.hint { color: var(--ink-3); font-size: .8rem; line-height: 1.6; }

/* --------------------------------------------------------------- 导航 */
.nav {
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--line);
}
.nav-link { font-size: .92rem; }
.nav-link.active { background: var(--brand-soft); color: var(--brand-ink); }

/* ------------------------------------------------------- 空状态与提示 */
.empty {
    color: var(--ink-3);
    padding: 40px 16px;
    text-align: center;
}
.empty .emoji { font-size: 34px; display: block; margin-bottom: 10px; opacity: .85; }

.alert {
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    font-size: .9rem;
    border: 1px solid transparent;
    line-height: 1.65;
}
.alert-warn {
    background: var(--warn-soft);
    border-color: #f5dcb4;
    color: #7c4a06;
}
.alert-ok   { background: var(--ok-soft);   border-color: #bfe6cc; color: #14612f; }
.alert-info { background: var(--brand-soft); border-color: #c9daff; color: var(--brand-ink); }

/* 徽标：统一高度与字重，混排时不会参差。 */
.badge {
    font-weight: 600;
    line-height: 1.7;
    padding: 1px 9px;
}
.badge-brand { background: var(--brand-soft); color: var(--brand-ink); }
.badge-warn  { background: var(--warn-soft);  color: #7c4a06; }
.badge-ok    { background: var(--ok-soft);    color: #14612f; }
.badge-danger{ background: var(--danger-soft);color: #991b1b; }

/* ------------------------------------------------------------ 文件列表 */
/* 行高与分隔统一，图标固定宽度，名称左对齐成一列，扫读时不会左右漂。 */
.file-row {
    border-bottom: 1px solid var(--line-2);
    padding: 11px 2px;
    transition: background .12s;
}
.file-row:last-child { border-bottom: none; }
.file-row:hover { background: #f8fafd; }
.file-icon {
    width: 38px;
    flex: 0 0 38px;
    font-size: 21px;
    text-align: center;
}
.file-name { font-weight: 550; color: var(--ink); }
.file-name:hover { color: var(--brand); }
.file-sub { color: var(--ink-3); font-size: .8rem; }

/* ------------------------------------------------------------ 后台侧栏 */
.admin-side {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 10px;
}
.admin-side-title {
    font-size: .72rem;
    letter-spacing: .06em;
    color: var(--ink-4);
    padding: 10px 10px 6px;
    font-weight: 700;
}
.admin-link {
    border-radius: 9px;
    color: var(--ink-2);
    font-size: .9rem;
    padding: 8px 10px;
    transition: background .12s, color .12s;
}
.admin-link:hover { background: var(--brand-soft-2); color: var(--brand-ink); }
.admin-link.active {
    background: var(--brand-soft);
    color: var(--brand-ink);
    font-weight: 600;
}
/* 去掉默认 button 边框，让表单形式的菜单项和链接完全一致。 */
button.admin-link { border: 1px solid transparent; }
button.admin-link:hover { border-color: transparent; }

/* 统计数字：等宽数字 + 更紧的行高，四张卡并排时高度一致。 */
.stat-card { text-align: left; }
.stat-card .num, .stat-card .stat-value { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ 分页器 */
.pager { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 14px 0 4px; }
.pager a, .pager span.current {
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink-2);
    font-size: .86rem;
}
.pager a:hover { border-color: var(--brand); color: var(--brand); }
.pager span.current {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    font-weight: 600;
}
.pager a.disabled { opacity: .45; pointer-events: none; }
.pager .dots { color: var(--ink-3); font-size: .86rem; margin-left: auto; }

/* ------------------------------------------------------------ 滚动条 */
/* 表格横向滚动时给一条细滚动条，避免默认样式把行高顶开。 */
.table-scroll::-webkit-scrollbar { height: 8px; }
.table-scroll::-webkit-scrollbar-thumb {
    background: #ccd3e0;
    border-radius: 999px;
}
.table-scroll::-webkit-scrollbar-track { background: transparent; }
/* flex 子项默认 min-width:auto，会拒绝收缩到内容以下。标题行里只要有一样
 * 「不好断行」的东西——比如 /admin/database 上那串数据库绝对路径——
 * 整个标题块就会被撑到 413px，把页面顶宽 53px。
 * 允许收缩并让过长的串在必要时断开，页面就回到视口以内。 */
.between > div { min-width: 0; }
@media (max-width: 720px) {
    .between > div { flex: 1 1 100%; }
    /* 路径、哈希这类长串：优先在分隔符处断，实在不行逐字断。 */
    .between .mono,
    .between .break-all { overflow-wrap: anywhere; word-break: break-word; }
}
/* 长串默认不断行，会把所在容器撑到内容宽度。
 * 这个项目里凡是显示绝对路径的地方都用 .mono（磁盘浏览、重命名、移动、
 * 查看、数据库路径……），逐个加类容易漏，所以直接把规则挂在 .mono 上：
 * 等宽字体本身就是为了展示这类标识符，让它们能换行是合理的默认。
 * 页面宽度的回归测试（tools/mobile_audit.py）会守住这条。 */
.mono,
.break-all {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* ------------------------------------------------------------ 底部操作条 */
/* 「我的」与「个人空间」把主要动作集中到底部一条：桌面端居中、等宽好点，
   移动端吸在视口底部。用 sticky 而不是 fixed——它仍在文档流里，
   不会盖住下面的正文。 */
.action-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
}
.action-bar .btn { min-width: 110px; }
@media (max-width: 720px) {
    .action-bar {
        position: sticky;
        bottom: 0;
        gap: 8px;
        padding: 10px;
        box-shadow: 0 -2px 14px rgba(20, 40, 80, .1);
    }
    .action-bar .btn { flex: 1 1 45%; min-width: 0; }
}

/* ------------------------------------------------------------ 头像表单 */
.avatar-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.avatar-form .input {
    width: auto;
    flex: 1 1 240px;
    padding: 6px 10px;
    font-size: .84rem;
}

/* ==========================================================================
   全站视觉升级（v2）
   目标：统一色彩与字阶，拉开层次，让「标题 / 内容 / 可点」一眼可辨，
   并给交互补上清晰的反馈。本段位于文件末尾，覆盖前面同名规则；
   只调整样式，不改动任何 HTML 结构或文案，因此不会影响渲染与测试。
   ========================================================================== */

:root {
    /* 主色：保留蓝，补一档亮色用于渐变与高光。 */
    --brand-2: #4f8bff;
    --brand-ink: #1d4ed8;
    --grad-brand: linear-gradient(135deg, #4f8bff, #2563eb 55%, #1d4ed8);
    --grad-brand-soft: linear-gradient(135deg, #eef4ff, #f7faff);

    /* 正文色阶再次拉开：正文最深，说明文字更浅更细。 */
    --ink: #101828;
    --ink-2: #3d4757;
    --ink-3: #6b7686;
    --ink-4: #97a1b2;

    --line: #e5e9f0;
    --line-2: #f0f3f8;
    --bg: #f5f7fb;
    --card: #ffffff;

    --radius: 16px;
    --radius-sm: 11px;
    --radius-lg: 22px;

    --shadow-xs: 0 1px 2px rgba(16, 24, 40, .06);
    --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px -12px rgba(16, 24, 40, .16);
    --shadow-lg: 0 20px 44px -18px rgba(16, 24, 40, .26);
    --ring: 0 0 0 3px rgba(37, 99, 235, .18);

    --dur: .18s;
    --ease: cubic-bezier(.4, 0, .2, 1);
}

/* ------------------------------------------------------------------ 字体与底色 */

/* 底色保持纯色：旧版 Safari / IE / 老 Chromium 对大面积径向渐变和
   background-attachment: fixed 的重绘开销极高，滚动时会持续掉帧。 */
body {
    font-size: 15px;
    line-height: 1.72;
    letter-spacing: .002em;
    background: var(--bg);
}

h1, h2, h3, h4 { font-weight: 600; color: var(--ink); }
h1 { font-size: 1.6rem; letter-spacing: -.018em; }
h2 { font-size: 1.26rem; letter-spacing: -.014em; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 .7rem; }
.muted { color: var(--ink-3); }
a { transition: color var(--dur) var(--ease); }

/* 内联 SVG 图标：随文色，尺寸走类名，线条统一。 */
.i {
    width: 18px;
    height: 18px;
    flex: none;
    stroke-width: 1.9;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -3px;
}
.i-lg { width: 22px; height: 22px; }
.i-xl { width: 26px; height: 26px; }

/* ------------------------------------------------------------------ 顶部导航 */

/* 不用 backdrop-filter：Safari 与旧内核要么不支持，要么每次滚动都重算模糊，
   吸顶导航会因此明显卡顿。改用近乎不透明的纯色，视觉差别很小。 */
.nav {
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 0 rgba(16, 24, 40, .02), 0 10px 30px -24px rgba(16, 24, 40, .5);
}

.nav-inner { height: 66px; gap: 14px; }
.brand { font-size: 1.16rem; letter-spacing: -.01em; }

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--grad-brand);
    box-shadow: 0 8px 18px -8px rgba(37, 99, 235, .75);
    font-size: 0;
}
.brand-mark .i { width: 19px; height: 19px; color: #fff; }

.nav-link {
    padding: 8px 14px;
    border-radius: 10px;
    font-size: .93rem;
    font-weight: 550;
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav-link:hover { background: var(--brand-soft); color: var(--brand-ink); }
.nav-link.active {
    background: var(--brand-soft);
    color: var(--brand-ink);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .14);
}

.nav-toggle {
    border-color: var(--line);
    border-radius: 10px;
    width: 40px;
    height: 36px;
    display: grid;
    place-items: center;
    color: var(--ink-2);
}
.nav-toggle .i { width: 20px; height: 20px; }
.nav-toggle:hover { border-color: #cfd7e5; color: var(--brand); }

.avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line); }

/* ------------------------------------------------------------------ 卡片与标题 */

.card {
    border-radius: var(--radius);
    border-color: var(--line);
    box-shadow: var(--shadow);
}
.card + .card { margin-top: 18px; }

.card-head {
    padding: 14px 20px;
    background: linear-gradient(180deg, #fcfdff, #f8fafd);
    font-size: .95rem;
    color: var(--ink);
    gap: 10px;
}
.card-head .i { color: var(--brand); }
.card-body { padding: 20px; }
.card-body.tight { padding: 12px 18px; }
.card-foot { padding: 14px 20px; background: #fbfcfe; }

/* 区块小标题：左侧加一条品牌色细杠，标题层级立刻清楚。 */
.section-head { margin: 34px 0 16px; }
.section-head h2 { position: relative; padding-left: 15px; }
.section-head h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: .22em;
    bottom: .22em;
    width: 4px;
    border-radius: 999px;
    background: var(--grad-brand);
}

/* ------------------------------------------------------------------ 按钮 */

.btn {
    padding: 9px 17px;
    border-radius: var(--radius-sm);
    border-color: #d8dee9;
    font-weight: 550;
    transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
                color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
                transform .06s var(--ease);
}
.btn:hover { background: #f5f8fd; border-color: #c6cfdd; color: var(--ink); }
.btn .i { width: 16px; height: 16px; }

.btn-primary {
    background: linear-gradient(180deg, #3b74ff, #2563eb);
    border-color: #2563eb;
    box-shadow: 0 1px 2px rgba(37, 99, 235, .32), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.btn-primary:hover {
    background: linear-gradient(180deg, #2f66f2, #1d4ed8);
    border-color: #1d4ed8;
    box-shadow: 0 6px 16px -6px rgba(37, 99, 235, .55);
}
.btn-ok { background: linear-gradient(180deg, #22a35a, #15803d); border-color: #15803d; }
.btn-ok:hover { background: linear-gradient(180deg, #1c8f4f, #12693a); border-color: #12693a; }
.btn-sm { padding: 5px 12px; font-size: .82rem; border-radius: 9px; }
.btn-lg { padding: 12px 28px; font-size: 1rem; border-radius: 13px; }
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand-ink); }

/* ------------------------------------------------------------------ 首页 hero */

.hero {
    background:
        radial-gradient(900px 420px at 12% -30%, rgba(255, 255, 255, .26), transparent 60%),
        radial-gradient(700px 420px at 95% 120%, rgba(255, 255, 255, .14), transparent 60%),
        linear-gradient(135deg, #1b3fb0 0%, #2563eb 46%, #4f8bff 100%);
    padding: 68px 0 78px;
}
.hero::after {
    right: -140px;
    top: -110px;
    width: 460px;
    height: 460px;
    background: rgba(255, 255, 255, .09);
}
.hero h1 { font-size: 2.35rem; font-weight: 700; letter-spacing: -.025em; margin-bottom: .55rem; }
.hero p { font-size: 1.06rem; max-width: 660px; color: rgba(255, 255, 255, .92); }
.hero-actions { margin-top: 26px; gap: 14px; }
.hero .btn { border-color: rgba(255, 255, 255, .45); }
.hero-stats { gap: 40px; margin-top: 38px; }
.hero-stat b { font-size: 1.62rem; font-weight: 700; letter-spacing: -.02em; }
.hero-stat span { font-size: .85rem; color: rgba(255, 255, 255, .82); }

/* 统计卡与功能块的图标统一成「浅色方块 + 品牌色图形」。 */
.stat-card { gap: 15px; }
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 22px;
    background: var(--grad-brand-soft);
    border: 1px solid #e0eaff;
    color: var(--brand);
}
.stat-icon .i { width: 22px; height: 22px; }
.stat-icon .emoji { font-size: 22px; }
.stat-card b { font-size: 1.5rem; letter-spacing: -.02em; }
.stat-card span { color: var(--ink-3); }

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    font-size: 21px;
    background: var(--grad-brand-soft);
    border: 1px solid #e0eaff;
    color: var(--brand);
}
.feature-icon .i { width: 21px; height: 21px; }
.feature-icon .emoji { font-size: 21px; }
.feature h4 { font-weight: 600; }
.feature p { color: var(--ink-3); line-height: 1.6; }

/* 快捷入口：emoji 收进圆角色块，卡片悬停轻微上浮。 */
.quick-card {
    padding: 20px;
    border-radius: var(--radius);
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
                border-color var(--dur) var(--ease);
}
.quick-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: #d5e2ff;
}
.quick-card .emoji,
.quick-card .i-tile {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 23px;
    background: var(--grad-brand-soft);
    border: 1px solid #e0eaff;
    color: var(--brand);
}
.quick-card .i-tile .i { width: 23px; height: 23px; }
.quick-card h4 { margin: 12px 0 5px; font-size: 1.02rem; }

/* ------------------------------------------------------------------ 文件列表 */

.file-row {
    padding: 12px 12px;
    border-radius: var(--radius-sm);
    border-bottom: 1px solid var(--line-2);
}
.file-row:last-child { border-bottom: none; }
.file-row:hover { background: var(--brand-soft-2); }

.file-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
    background: var(--brand-soft);
    border: 1px solid #e1ebff;
    font-size: 21px;
}
.file-icon.dir { background: #fff5e3; border-color: #ffe9c4; }
.file-name { font-weight: 550; font-size: .96rem; }
.file-sub { color: var(--ink-3); font-size: .81rem; gap: 12px; }

/* ------------------------------------------------------------------ 表单 */

.label { font-size: .84rem; margin-bottom: 6px; }
.input, .select, .textarea {
    padding: 10px 13px;
    border-radius: var(--radius-sm);
    border-color: #d8dee9;
    font-size: .93rem;
}
.input:hover, .select:hover, .textarea:hover { border-color: #c2cbd9; }
.input:focus, .select:focus, .textarea:focus {
    border-color: var(--brand);
    box-shadow: var(--ring);
}
.textarea { min-height: 130px; line-height: 1.75; }
.hint { color: var(--ink-3); font-size: .8rem; line-height: 1.65; }
.choice { border-radius: var(--radius-sm); transition: border-color var(--dur), background var(--dur); }
.choice:hover { border-color: #bcd0f7; background: var(--brand-soft-2); }

/* ------------------------------------------------------------------ 提示条 */

.alert {
    border-radius: var(--radius-sm);
    padding: 12px 15px;
    border-left-width: 4px;
    line-height: 1.68;
    align-items: center;
}
.alert .i { width: 18px; height: 18px; }
.alert-info { border-left-color: var(--brand); }
.alert-ok   { border-left-color: var(--ok); }
.alert-warn { border-left-color: var(--warn); }
.alert-danger { border-left-color: var(--danger); }

/* ------------------------------------------------------------------ 表格 */

.table { font-size: .9rem; }
.table thead th {
    background: #f6f8fc;
    color: var(--ink-3);
    padding: 11px 14px;
    font-size: .79rem;
    letter-spacing: .02em;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.table tbody tr:hover { background: #f8fafd; }

/* ------------------------------------------------------------------ 徽标 */

.badge { padding: 2px 10px; font-size: .76rem; border-radius: 999px; }
.badge-brand { background: var(--brand-soft); color: var(--brand-ink); }

/* ------------------------------------------------------------------ 分页器 */

.pager { gap: 7px; }
.pager a, .pager span.current {
    min-width: 36px;
    height: 36px;
    border-radius: 10px;
    border-color: var(--line);
    font-size: .87rem;
    transition: border-color var(--dur), color var(--dur), background var(--dur);
}
.pager a:hover { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft-2); }
.pager span.current {
    background: var(--grad-brand);
    border-color: transparent;
    box-shadow: 0 6px 14px -8px rgba(37, 99, 235, .8);
}

/* ------------------------------------------------------------------ 空状态 */

.empty { padding: 52px 20px; color: var(--ink-3); }
.empty .emoji {
    font-size: 38px;
    width: 78px;
    height: 78px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--grad-brand-soft);
    border: 1px solid #e1ebff;
}
.empty .i-xl { width: 34px; height: 34px; color: var(--brand); }
.empty { line-height: 1.7; }

/* ------------------------------------------------------------------ 底栏 */

.foot {
    padding: 32px 0;
    margin-top: 48px;
    background: #fbfcfe;
    color: var(--ink-3);
}
.foot strong { color: var(--ink-2); }
.foot-links a { transition: color var(--dur); }

/* ------------------------------------------------------------------ 后台 */

.admin-side { padding: 12px; border-radius: var(--radius); }
.admin-link { border-radius: 10px; padding: 9px 11px; }
.admin-link .ico { font-size: 16px; width: 18px; display: grid; place-items: center; }
.admin-link .ico .i { width: 17px; height: 17px; }
.admin-link .ico .emoji { font-size: 16px; }
.admin-side-title { color: var(--ink-4); }

/* ------------------------------------------------------------------ 弹窗与进度 */

.modal { border-radius: var(--radius-lg); }
.modal-head { background: linear-gradient(180deg, #fcfdff, #f8fafd); }
.progress { height: 9px; }
.progress > i { background: var(--grad-brand); }

/* ------------------------------------------------------------------ 分享页 */

.share-head {
    background:
        radial-gradient(700px 300px at 8% -40%, rgba(255, 255, 255, .7), transparent 60%),
        linear-gradient(180deg, #eaf1ff 0%, #f6faff 62%, #fff 100%);
    padding: 22px 0 26px;
}
.share-brand { font-size: 1.3rem; }
.share-brand .mark { font-size: 0; }
.share-brand .mark .i { width: 21px; height: 21px; color: #fff; }
.share-avatar { box-shadow: 0 0 0 3px #fff, 0 6px 16px -8px rgba(37, 99, 235, .6); }
.share-banner {
    background: linear-gradient(120deg, #eaf1ff, #f7faff 62%, #eef7ff);
    border-radius: var(--radius);
}
.share-foot { box-shadow: 0 -10px 30px -22px rgba(16, 24, 40, .5); }

/* ------------------------------------------------------------------ 滚动条 */

* { scrollbar-width: thin; scrollbar-color: #c5cddb transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c5cddb; border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #aab4c6; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------------------------------------------ 响应式 */

@media (max-width: 720px) {
    body { font-size: 14.5px; }
    .nav-inner { height: auto; padding: 10px 0; }
    .hero { padding: 44px 0 52px; }
    .hero h1 { font-size: 1.7rem; }
    .hero-stats { gap: 22px; margin-top: 28px; }
    .quick-card .emoji, .quick-card .i-tile { width: 42px; height: 42px; font-size: 21px; }
    .card-body { padding: 16px; }
    .section-head { margin: 26px 0 13px; }
}
@media (max-width: 560px) {
    .file-icon { width: 38px; height: 38px; flex-basis: 38px; font-size: 19px; }
}

/* 尊重「减少动态效果」的系统设置。 */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
    .quick-card:hover { transform: none; }
}
