@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&family=Noto+Serif+SC:wght@400;600;700&display=swap');

  /* ═════════════════════════════════════════════════════════════
     心理学驱动设计 (Psychology-Driven Design)
     ─────────────────────────────────────────────
     品牌:
       · BNU Sparks · 木铎星火
       · "星星之火，可以燎原" — 每人一份资料就是一粒火星
     色彩:
       · 主色 250° 暖调藏蓝 → 跨文化最受信赖色相，暖化去冷感
       · 强调色 45° 琥珀   → 与主色 205° 互补，冷暖自然悦目
       · 背景 60° 奶油     → 暖底色减少视疲劳 30%+，提升可信度
       · 绿 150°           → 成长/学习的正向暗示
     排版:
       · Noto Serif SC 标题 → 学术权威感
       · Noto Sans SC 正文 → 清晰易读
     空间:
       · 宽松间距降低认知负荷（Hick's Law）
       · whitespace 提升感知价值
     圆角:
       · 人脑处理圆角比直角快 ~60ms（婴儿图式效应）
       · 圆角 → 安全/友善/可信赖
     动效:
       · 微交互动效提供系统状态可见性（Visibility of System Status）
       · 过渡时间 150-250ms 符合最佳交互响应窗口
     ═════════════════════════════════════════════════════════════ */

  :root {
    --primary: oklch(0.40 0.09 250);
    --primary-dark: oklch(0.32 0.11 250);
    --primary-light: oklch(0.88 0.04 250);
    --primary-surface: oklch(0.94 0.025 250);

    --accent: oklch(0.52 0.13 45);
    --accent-hover: oklch(0.45 0.15 45);
    --accent-light: oklch(0.90 0.06 50);

    --success: oklch(0.48 0.12 150);
    --success-light: oklch(0.88 0.06 150);

    --bg: oklch(0.97 0.005 60);
    --surface: oklch(0.995 0.003 60);
    --raised: oklch(1 0 0);
    --ink: oklch(0.18 0.01 55);
    --ink-soft: oklch(0.35 0.01 55);
    --ink-faint: oklch(0.55 0.008 55);
    --border: oklch(0.86 0.012 65);
    --border-light: oklch(0.91 0.008 65);

    --serif: "Noto Serif SC", Georgia, "Times New Roman", serif;
    --sans: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 999px;

    --space-xs: 6px;
    --space-sm: 12px;
    --space-md: 20px;
    --space-lg: 32px;
    --space-xl: 48px;
    --space-2xl: 64px;
    --space-3xl: 80px;

    --content-width: 1080px;
    --header-height: 64px;
  }

  *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
  a { color: inherit; text-decoration: none; }
  body { background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; font-size: 15px; line-height: 1.6; }
  .container { max-width: var(--content-width); margin: 0 auto; padding: 0 var(--space-lg); }

  /* ── Selection ──────────────────────────────────────── */
  ::selection { background: oklch(from var(--primary) l c h / 0.18); color: var(--primary-dark); }

  /* ── Smooth Scroll ──────────────────────────────────── */
  html { scroll-behavior: smooth; }

  /* ════════════════════════════════════════════════════════════
     HEADER — logo(左) + 搜索(中) + login(右)
     ════════════════════════════════════════════════════════════ */
  .site-header {
    background: oklch(from var(--surface) l c h / 0.88);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border-light);
    position: sticky; top: 0; z-index: 100;
    transition: box-shadow 0.2s;
  }
  .site-header.scrolled { box-shadow: 0 1px 8px oklch(0 0 0 / 0.04); }
  .header-inner {
    display: flex; align-items: center; height: var(--header-height); gap: 0;
    padding: 0; max-width: 100%;
  }

  /* ── Header logo（紧贴屏幕最左端）───────────────── */
  .header-logo-area {
    width: 200px; flex-shrink: 0;
    display: flex; align-items: center; gap: 0;
    padding-left: var(--space-md);
    text-decoration: none; line-height: 1;
  }
  .header-logo-area .hl-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border-radius: var(--radius-sm); color: white; font-size: 0.75rem; font-weight: 700; font-family: var(--sans);
    flex-shrink: 0; margin-right: var(--space-sm); transition: border-radius 0.2s, transform 0.2s;
  }
  .header-logo-area:hover .hl-mark { border-radius: var(--radius-md); transform: scale(1.05); }
  .header-logo-area .hl-texts { display: flex; flex-direction: column; }
  .header-logo-area .hl-chinese {
    font-family: var(--serif); font-size: 1rem; font-weight: 700; color: var(--ink);
    letter-spacing: -0.01em; line-height: 1.2;
  }
  .header-logo-area .hl-english {
    font-family: var(--sans); font-size: 0.6rem; font-weight: 600; color: var(--ink-faint);
    letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.2;
  }

  /* ── 搜索靠右，紧挨 login 按钮 ────────────────── */
  .search-hero-wrap {
    flex: 1; display: flex; justify-content: flex-end; padding-right: var(--space-sm);
  }
  .search-box {
    display: flex; align-items: center; width: 100%; max-width: 480px;
    background: var(--raised); border: 1px solid var(--border);
    border-radius: var(--radius-full); padding: 6px 6px 6px 20px;
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  .search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px oklch(from var(--primary) l c h / 0.1);
  }
  .search-box input {
    flex: 1; border: none; background: transparent; font-family: inherit;
    font-size: 0.92rem; outline: none; color: var(--ink);
  }
  .search-box input::placeholder { color: var(--ink-faint); }
  .search-box button {
    width: 34px; height: 34px; border: none; background: var(--accent);
    border-radius: 50%; color: white; font-size: 0.85rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    transition: background 0.18s, transform 0.18s;
  }
  .search-box button:hover { background: var(--accent-hover); transform: scale(1.08); }

  .menu-toggle {
    display: none; width: 36px; height: 36px;
    align-items: center; justify-content: center;
    border: 1px solid var(--border-light); border-radius: var(--radius-md);
    background: var(--raised); cursor: pointer; font-size: 1rem; color: var(--ink-soft);
    transition: border-color 0.15s, background 0.15s; flex-shrink: 0;
  }
  .menu-toggle:hover { border-color: var(--accent); background: var(--accent-light); }

  /* ── Login 占位按钮（与 logo 对称）───────────────── */
  .header-login {
    width: 200px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: flex-end;
    padding-right: var(--space-md);
  }
  .header-login .login-btn {
    display: inline-flex; align-items: center; gap: var(--space-xs);
    font-size: 0.85rem; font-weight: 500; color: var(--ink-soft);
    padding: 6px 14px; border-radius: var(--radius-full);
    border: 1px solid var(--border-light); background: transparent;
    cursor: pointer; font-family: inherit;
    transition: border-color 0.18s, background 0.18s, color 0.18s;
    text-decoration: none;
  }
  .header-login .login-btn:hover {
    border-color: var(--primary-light); background: var(--primary-surface); color: var(--primary);
  }
  .header-login .login-icon { font-size: 0.9rem; }

  /* ── User Avatar (replaces old bell + dropdown) ── */
  .user-avatar-trigger {
    position: relative; display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; padding: 0; margin: 0;
    border: none; background: transparent; cursor: pointer;
    border-radius: 50%;
    transition: box-shadow 0.18s;
  }
  .user-avatar-trigger:hover {
    box-shadow: 0 0 0 3px var(--primary-surface);
  }
  .user-avatar-circle {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, oklch(0.55 0.12 280), oklch(0.45 0.15 320));
    color: #fff; font-size: 0.85rem; font-weight: 700;
    font-family: inherit; line-height: 1; user-select: none;
    transition: transform 0.15s;
  }
  .user-avatar-trigger:hover .user-avatar-circle {
    transform: scale(1.08);
  }
  .notif-badge {
    position: absolute; top: -3px; right: -3px;
    min-width: 16px; height: 16px;
    background: oklch(0.5 0.15 30);
    color: #fff; font-size: 0.55rem; font-weight: 700;
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    padding: 0 4px; line-height: 1; pointer-events: none;
    box-shadow: 0 1px 3px oklch(0 0 0 / 0.2);
  }

  /* ════════════════════════════════════════════════════════════
     SIDEBAR — 竖向导航（桌面端）
     ════════════════════════════════════════════════════════════ */
  .page-layout {
    display: flex; min-height: calc(100vh - var(--header-height));
  }

  .side-nav {
    width: 200px; flex-shrink: 0;
    background: var(--surface);
    border-right: 1px solid var(--border-light);
    position: sticky; top: var(--header-height);
    height: calc(100vh - var(--header-height));
    display: flex; flex-direction: column; gap: 2px;
    padding: var(--space-md) var(--space-sm);
    z-index: 50;
  }
  .side-nav a {
    display: flex; align-items: center; gap: var(--space-sm);
    padding: 10px 16px;
    font-size: 0.88rem; font-weight: 500; color: var(--ink-soft);
    border-radius: var(--radius-md);
    border-left: 3px solid transparent;
    transition: background 0.18s, color 0.18s;
    text-decoration: none;
  }
  .side-nav a:hover { background: var(--primary-surface); color: var(--primary); }
  .side-nav a.active {
    background: var(--primary-surface); color: var(--primary); font-weight: 600;
    border-left-color: var(--primary);
  }
  .side-nav .sn-icon { font-size: 1.05rem; width: 20px; text-align: center; flex-shrink: 0; }
  .side-nav .sn-spacer { margin-top: auto; }

  .main-content { flex: 1; min-width: 0; }

  /* ── Mobile Drawer (for sidebar collapse) ─────────── */
  .mobile-drawer {
    position: fixed; inset: 0; z-index: 200;
    background: oklch(from var(--surface) l c h / 0.96);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-lg);
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s;
  }
  .mobile-drawer.open { opacity: 1; pointer-events: auto; }

  .drawer-brand {
    display: flex; flex-direction: column; align-items: center; gap: var(--space-xs);
    margin-bottom: var(--space-md); padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-light); width: 100%; max-width: 200px;
  }
  .drawer-brand .db-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border-radius: var(--radius-md); color: white; font-size: 1.1rem; font-weight: 700; font-family: var(--sans);
    margin-bottom: var(--space-xs);
  }
  .drawer-brand .db-name {
    font-family: var(--serif); font-size: 1.2rem; font-weight: 700; color: var(--ink);
  }
  .drawer-brand .db-sub {
    font-size: 0.65rem; font-weight: 600; letter-spacing: 0.1em;
    color: var(--ink-faint); text-transform: uppercase;
  }

  .mobile-drawer a {
    font-size: 1.1rem; font-weight: 500; color: var(--ink-soft);
    transition: color 0.15s; display: flex; align-items: center; gap: var(--space-sm);
  }
  .mobile-drawer a:hover,
  .mobile-drawer a.active { color: var(--primary); }
  .mobile-drawer .close-btn {
    position: absolute; top: 20px; right: 20px;
    width: 40px; height: 40px; border: none; background: transparent;
    font-size: 1.6rem; cursor: pointer; color: var(--ink-soft); transition: color 0.15s;
  }
  .mobile-drawer .close-btn:hover { color: var(--ink); }

  /* ════════════════════════════════════════════════════════════
     HERO — 新版本
     ════════════════════════════════════════════════════════════ */
  .hero {
    padding: 80px 0 60px; text-align: center;
    position: relative; overflow: hidden;
  }
  .hero .container { position: relative; }

  .hero-deco {
    position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0;
  }
  .hero-deco .shape {
    position: absolute; border-radius: 50%;
    opacity: 0.08; animation: float 20s ease-in-out infinite;
  }
  .hero-deco .shape-1 {
    width: 240px; height: 240px; background: var(--primary);
    top: -60px; right: -40px; animation-delay: 0s;
  }
  .hero-deco .shape-2 {
    width: 160px; height: 160px; background: var(--accent);
    bottom: -30px; left: -20px; animation-delay: -7s;
  }
  .hero-deco .shape-3 {
    width: 80px; height: 80px; background: oklch(0.52 0.10 300);
    top: 40%; left: 10%; animation-delay: -14s;
  }
  @keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(12px, -16px) scale(1.05); }
    66% { transform: translate(-8px, 10px) scale(0.95); }
  }

  .hero .hero-title-zh {
    font-family: var(--serif);
    font-size: clamp(2.6rem, 5.5vw, 3.8rem);
    font-weight: 700; line-height: 1.05; color: var(--ink);
    letter-spacing: 0.02em; margin-bottom: var(--space-xs);
  }
  .hero .hero-title-zh .hl-accent { color: var(--accent); }
  .hero .hero-title-en {
    font-family: var(--sans);
    font-size: clamp(0.9rem, 1.8vw, 1.2rem);
    font-weight: 600; color: var(--ink-faint);
    letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: var(--space-lg);
  }
  .hero .hero-desc {
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    color: var(--ink-soft); max-width: 520px;
    margin: 0 auto var(--space-md); line-height: 1.4;
    letter-spacing: 0.03em;
  }
  .hero-stats-label {
    font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em;
    color: var(--ink-faint); margin-bottom: var(--space-xs);
  }
  .hero .stats-row { display: flex; justify-content: center; gap: var(--space-sm); flex-wrap: wrap; margin-bottom: var(--space-md); }
  .hero .stat-pill {
    display: inline-flex; align-items: center; gap: var(--space-xs);
    background: var(--raised); border: 1px solid var(--border-light);
    border-radius: var(--radius-full); padding: 7px 18px;
    font-size: 0.82rem; color: var(--ink-soft); font-weight: 500;
    box-shadow: 0 1px 3px oklch(0 0 0 / 0.02);
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  }
  .hero .stat-pill:hover {
    border-color: var(--primary-light); transform: translateY(-2px);
    box-shadow: 0 4px 12px oklch(0 0 0 / 0.04);
  }
  .hero .stat-pill strong { font-weight: 700; color: var(--ink); }

  .hero .hero-footer {
    font-size: 0.85rem; color: var(--ink-faint);
    display: flex; justify-content: center; align-items: center; gap: var(--space-sm);
    flex-wrap: wrap;
  }
  .hero .hero-footer .hf-email {
    color: var(--primary); font-weight: 500;
    text-decoration: none; border-bottom: 1px solid transparent;
    transition: border-color 0.15s;
  }
  .hero .hero-footer .hf-email:hover { border-color: var(--primary-light); }
  .hero .hero-footer .hf-dot { color: var(--border); }

  /* ════════════════════════════════════════════════════════════
     CONTENT — 下载最多(左) + 最近上传(右)
     ════════════════════════════════════════════════════════════ */
  .home-content { padding: var(--space-xl) 0 var(--space-2xl); }
  .home-grid { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-xl); }

  .hc-panel { background: var(--raised); border: 1px solid var(--border-light); border-radius: var(--radius-lg); overflow: hidden; }
  .hc-panel-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: var(--space-md) var(--space-lg); border-bottom: 1px solid var(--border-light);
  }
  .hc-panel-header h3 { font-family: var(--serif); font-size: 0.95rem; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: var(--space-sm); }
  .hc-more { font-size: 0.8rem; font-weight: 500; color: var(--ink-faint); transition: color 0.15s; }
  .hc-more:hover { color: var(--accent); }

  .hc-item {
    display: flex; align-items: center; gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid oklch(from var(--border-light) l c h / 0.6);
    transition: background 0.15s, padding-left 0.15s; cursor: pointer; text-decoration: none;
  }
  .hc-item:last-child { border-bottom: none; }
  .hc-item:hover { background: var(--primary-surface); padding-left: calc(var(--space-lg) + 4px); }
  .hc-item-left { flex: 1; min-width: 0; }
  .hc-item-name { font-size: 0.88rem; font-weight: 500; color: var(--ink); }
  .hc-item-meta { font-size: 0.72rem; color: var(--ink-faint); margin-top: 2px; }
  .hc-item-tag {
    font-size: 0.65rem; font-weight: 600; padding: 2px 10px;
    border-radius: var(--radius-full); flex-shrink: 0;
  }
  .hc-tag-general { background: var(--primary-surface); color: var(--primary); }
  .hc-tag-major { background: var(--accent-light); color: var(--accent-hover); }
  .hc-item-count { font-size: 0.78rem; color: var(--ink-faint); flex-shrink: 0; font-weight: 500; }

  /* ════════════════════════════════════════════════════════════
     FOOTER
     ════════════════════════════════════════════════════════════ */
  .site-footer {
    border-top: 1px solid var(--border-light); padding: var(--space-2xl) 0 var(--space-xl);
    margin-top: var(--space-lg);
  }
  .footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--space-xl);
    margin-bottom: var(--space-xl);
  }
  .footer-col h4 {
    font-family: var(--serif); font-size: 0.9rem; font-weight: 600;
    color: var(--ink); margin-bottom: var(--space-sm);
  }
    .footer-col p { font-size: 0.82rem; color: var(--ink-soft); line-height: 1.6; }
  .footer-brand .brand-line {
    display: block; width: 28px; height: 2px;
    background: var(--accent); border-radius: 1px;
    margin: 10px 0;
  }
  .footer-brand .brand-name {
    font-family: var(--serif); font-size: 1.1rem; font-weight: 700;
    color: var(--ink); letter-spacing: 0.06em; line-height: 1.3;
  }
  .footer-brand .brand-desc {
    font-size: 0.82rem; color: var(--ink-soft); line-height: 1.7;
  }
  .footer-col a {
    display: block; font-size: 0.82rem; color: var(--ink-soft);
    padding: 3px 0; transition: color 0.15s;
  }
  .footer-col a:hover { color: var(--primary); }
  .footer-bottom {
    border-top: 1px solid var(--border-light); padding-top: var(--space-lg);
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-sm);
  }
  .footer-bottom p { font-size: 0.8rem; color: var(--ink-faint); }
  .footer-bottom .footer-social { display: flex; gap: var(--space-sm); }

  /* ════════════════════════════════════════════════════════════
     RESPONSIVE
     ════════════════════════════════════════════════════════════ */

  /* ── Geometric Icon System (replacing emoji) ────────────── */
  .gi { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

  /* Nav sidebar icons - small geometric marks */
  .gi-nav-home { width: 18px; height: 18px; border: 1.5px solid currentColor; border-radius: 1px 1px 3px 3px; position: relative; }
  .gi-nav-home::before { content: ''; position: absolute; top: 3px; left: 3px; right: 3px; bottom: 2px;
    clip-path: polygon(0 100%, 0 45%, 50% 15%, 100% 45%, 100% 100%); background: currentColor; }
  .gi-nav-general { width: 16px; height: 16px; border: 1.5px solid currentColor; border-radius: 2px; position: relative; }
  .gi-nav-general::before { content: ''; position: absolute; top: 2px; left: 2px; right: 2px; bottom: 2px;
    background: currentColor; border-radius: 1px; opacity: 0.3; }
  .gi-nav-major { width: 16px; height: 16px; border: 1.5px solid currentColor;
    transform: rotate(45deg); border-radius: 2px; }

  /* Login icon - empty circle */
  .gi-login { width: 22px; height: 22px; border: 1.5px solid currentColor; border-radius: 50%; position: relative; }
  .gi-login::before { content: ''; position: absolute; top: 4px; left: 5px; right: 5px; bottom: 6px;
    border-radius: 50%; border: 1.5px solid currentColor; }
  .gi-login::after { content: ''; position: absolute; bottom: 2px; left: 3px; right: 3px; height: 5px;
    border-radius: 3px; border: 1.5px solid currentColor; border-top: none; }

  /* ── Card SVG Icons ─────────────────────────────────────── */
  .fc-icon { position: relative; display: flex; align-items: center; justify-content: center; }
  .folder-card .fc-icon svg { width: 28px; height: 28px; color: var(--primary); opacity: 0.6; }
  /* Section header accent */
  .section-accent { display: inline-flex; align-items: center; gap: 10px; }
  .section-accent::before { content: ''; width: 3px; height: 1.1em; background: var(--accent); border-radius: 2px; }
  @media (max-width: 900px) {
    .header-logo-area { display: none; }
    .menu-toggle { display: flex; border: none; background: transparent; border-radius: 0; width: 44px; height: var(--header-height); }
    .menu-toggle:hover { background: var(--primary-surface); }
    .header-login { width: 44px; padding-right: 0; justify-content: center; }
    .header-login .login-btn { border: none; padding: 6px; background: transparent; }
    .header-login .login-btn:hover { background: transparent; color: var(--primary); }
    .header-login .login-text { display: none; }
    .header-login .user-avatar-trigger { width: 32px; height: 32px; }
    .header-login .user-avatar-circle { width: 30px; height: 30px; font-size: 0.75rem; }
    .side-nav { display: none; }
    .home-grid { grid-template-columns: 1fr; }
    .hero { padding: var(--space-2xl) 0 var(--space-xl); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid .footer-col:first-child { grid-column: 1 / -1; }
  }
  @media (max-width: 640px) {
    .search-box { max-width: none; padding: 5px 5px 5px 16px; }
    .search-box input { font-size: 0.85rem; }
    .search-box button { width: 30px; height: 30px; font-size: 0.8rem; }
    .hero .stats-row { flex-direction: column; align-items: center; }
    .hero .hero-footer { flex-direction: column; gap: var(--space-xs); }
    .hero .hero-footer .hf-dot { display: none; }
    .home-grid { gap: var(--space-md); }
    .container { padding: 0 var(--space-md); }
    .hc-item { padding: var(--space-sm) var(--space-md); }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
  }
  /* ════════════════════════════════════════════════════════════
     EXPLORER — 文件管理器风格课程浏览器
     ════════════════════════════════════════════════════════════ */
  .view-section { display: none; }
  .view-section.active { display: block; }

  /* ── Breadcrumb ─────────────────────────── */
  .breadcrumb {
    display: flex; align-items: center; gap: 2px; flex-wrap: wrap;
    padding: var(--space-lg) 0 var(--space-sm); font-size: 0.82rem;
  }
  .breadcrumb a {
    padding: 4px 8px; border-radius: var(--radius-sm);
    color: var(--ink-faint); font-weight: 500;
    transition: background 0.15s, color 0.15s; cursor: pointer;
  }
  .breadcrumb a:hover { background: var(--primary-surface); color: var(--primary); }
  .breadcrumb .bc-sep { color: var(--border); font-size: 0.7rem; user-select: none; }
  .breadcrumb .bc-current { color: var(--ink-soft); font-weight: 500; padding: 4px 6px; }
  .explorer-header {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: var(--space-xs);
  }
  .explorer-header h2 {
    font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--ink);
  }
  .explorer-header .eh-count { font-size: 0.78rem; color: var(--ink-faint); }

  /* ── Level 1: Square Card Grid ──────────── */
  .folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(178px, 218px));
    gap: var(--space-md);
    padding: var(--space-sm) 0 var(--space-xl);
    max-width: 1180px;
    margin: 0 auto;
  }
  .folder-card {
    aspect-ratio: 1;
    background: var(--raised);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: var(--space-sm); cursor: pointer;
    padding: var(--space-sm);
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    position: relative; overflow: hidden;
  }
  .folder-card::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, transparent 60%, oklch(from var(--primary) l c h / 0.03));
    pointer-events: none;
  }
  .folder-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px oklch(0 0 0 / 0.05);
  }
  .folder-card .fc-icon {
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-surface);
    border-radius: var(--radius-md);
    transition: background 0.2s, transform 0.2s;
  }
  .folder-card:hover .fc-icon { background: oklch(from var(--primary) l c h / 0.12); transform: scale(1.05); }
  .folder-card .fc-icon svg { width: 26px; height: 26px; color: var(--primary); opacity: 0.6; }
  .folder-card .fc-name {
    font-size: 0.88rem; font-weight: 600; color: var(--ink);
    text-align: center; line-height: 1.3;
  }
  .folder-card .fc-count {
    font-size: 0.7rem; color: var(--ink-faint);
    font-weight: 500;
  }

  /* ── 管理模式：三点菜单 ─────────────────── */
  .folder-card .fc-card-menu-btn {
    position: absolute; top: 6px; right: 6px;
    width: 26px; height: 26px; display: none;
    align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 1rem; line-height: 1;
    color: var(--ink-mid); cursor: pointer;
    background: var(--raised);
    border: 1px solid var(--border-light);
    z-index: 2;
    transition: background 0.15s, color 0.15s;
  }
  .folder-card .fc-card-menu-btn:hover {
    background: var(--primary-surface);
    color: var(--primary);
  }
  .folder-card:hover .fc-card-menu-btn { display: flex; }
  .mgmt-active .folder-card .fc-card-menu-btn { display: flex; }
  .folder-card .fc-card-menu-btn.is-open { display: flex; background: var(--primary-surface); color: var(--primary); }

  .fc-card-menu {
    position: fixed; z-index: 1000;
    background: var(--raised);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px oklch(0 0 0 / 0.12);
    min-width: 140px;
    padding: 4px 0;
  }
  .fc-card-menu .fc-menu-item {
    padding: 8px 14px;
    font-size: 0.85rem;
    color: var(--ink);
    cursor: pointer;
    transition: background 0.1s;
    white-space: nowrap;
  }
  .fc-card-menu .fc-menu-item:hover {
    background: var(--primary-surface);
    color: var(--primary);
  }
  .fc-card-menu .fc-menu-item.danger {
    color: var(--danger, oklch(0.5 0.15 30));
  }
  .fc-card-menu .fc-menu-item.danger:hover {
    background: oklch(0.9 0.05 30);
  }
  .fc-menu-overlay {
    position: fixed; inset: 0; z-index: 999;
    background: transparent;
  }

  .folder-list-item .fc-card-menu-btn {
    width: 24px; height: 24px; display: none;
    align-items: center; justify-content: center;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    font-size: 1rem; line-height: 1;
    color: var(--ink-faint); cursor: pointer;
    transition: background 0.1s, color 0.1s;
    margin-left: auto;
  }
  .folder-list-item .fc-card-menu-btn:hover {
    background: var(--primary-surface);
    color: var(--primary);
  }
  .folder-list-item:hover .fc-card-menu-btn { display: flex; }
  .mgmt-active .folder-list-item .fc-card-menu-btn { display: flex; }

  /* ── 管理模式弹窗 ─────────────────── */
  .mgmt-dialog { max-width: 420px; }
  .mgmt-dialog h3 { margin: 0 0 12px; font-size: 1rem; }
  .mgmt-dialog label { font-size: 0.85rem; display: block; margin-bottom: 4px; color: var(--ink-mid); }
  .mgmt-dialog input, .mgmt-dialog select {
    width: 100%; padding: 8px; border-radius: 6px;
    border: 1px solid var(--border-light);
    font-size: 0.9rem; box-sizing: border-box;
  }
  .mgmt-dialog .ar-actions { margin-top: 14px; }

  /* ── 新建文件夹：课程代码额外输入（选中类型切换）── */
  .mgmt-course-fields { display: none; margin-top: 10px; }
  .mgmt-course-fields.visible { display: block; }
  .mgmt-auto-code { display: flex; align-items: center; padding: 10px 12px; background: var(--bg-subtle); border: 1px dashed var(--border-light); border-radius: 6px; font-size: 0.85rem; color: var(--ink-faint); font-family: monospace; }

  /* ── 修改课程代码：情况说明 ─── */
  .mgmt-situation { padding: 10px; margin: 10px 0; background: var(--primary-surface); border-radius: var(--radius-sm); font-size: 0.85rem; }
  .mgmt-option { padding: 8px 12px; margin: 6px 0; border: 1px solid var(--border-light); border-radius: var(--radius-sm); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
  .mgmt-option:hover { border-color: var(--primary-light); background: var(--primary-surface); }
  .mgmt-option input[type="radio"] { margin-right: 8px; }
  .mgmt-option label { cursor: pointer; }
  .mgmt-option .mgmt-opt-desc { font-size: 0.8rem; color: var(--ink-faint); margin-top: 2px; }
  .mgmt-course-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
  .mgmt-course-item { padding: 8px 12px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); cursor: pointer; }
  .mgmt-course-item:hover { border-color: var(--primary-light); background: var(--primary-surface); }
  .mgmt-course-item.selected { border-color: var(--primary); background: var(--primary-surface); }

  /* ── Level 2+: Bar List ─────────────────── */
  .folder-list {
    display: flex; flex-direction: column; gap: 3px;
    padding: var(--space-sm) 0 var(--space-xl);
  }
  .folder-list-item {
    display: flex; align-items: center; gap: var(--space-md);
    padding: 12px 18px;
    background: var(--raised);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, padding-left 0.15s, box-shadow 0.15s;
  }
  .folder-list-item:hover {
    border-color: var(--primary-light);
    background: var(--primary-surface);
    padding-left: 22px;
    box-shadow: 0 1px 4px oklch(0 0 0 / 0.03);
  }
  .fli-icon {
    width: 36px; height: 36px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-surface);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: background 0.15s;
  }
  .folder-list-item:hover .fli-icon { background: oklch(from var(--primary) l c h / 0.12); }
  .fli-info { flex: 1; min-width: 0; }
  .fli-name { font-size: 0.88rem; font-weight: 500; color: var(--ink); }
  .fli-meta { font-size: 0.72rem; color: var(--ink-faint); margin-top: 2px; }
  .fli-badge {
    font-size: 0.64rem; font-weight: 600;
    padding: 3px 12px; border-radius: var(--radius-full); flex-shrink: 0;
    letter-spacing: 0.02em;
  }
  .fli-badge.has-data { background: var(--success-light); color: oklch(0.35 0.10 150); }
  .fli-badge.no-data { background: var(--bg); color: var(--ink-faint); }

  /* ── Collapsible No-Data Section ────────── */
  .nd-toggle {
    display: flex; align-items: center; gap: var(--space-sm);
    padding: 12px 18px; cursor: pointer;
    font-size: 0.8rem; color: var(--ink-faint); font-weight: 500;
    border-radius: var(--radius-md);
    transition: background 0.15s;
    margin-top: var(--space-sm);
    border: 1px dashed var(--border-light);
    user-select: none;
  }
  .nd-toggle:hover { background: var(--bg); border-color: var(--border); }
  .nd-toggle .nd-arrow { transition: transform 0.2s; font-size: 0.7rem; }
  .nd-toggle.open .nd-arrow { transform: rotate(90deg); }
  .nd-content { display: none; }
  .nd-content.open { display: block; }
  .nd-item {
    display: flex; align-items: center; gap: var(--space-md);
    padding: 10px 18px; margin-top: 2px;
    background: var(--bg); border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.85rem; color: var(--ink-soft);
    opacity: 0.6;
  }
  .nd-item .nd-icon { font-size: 0.9rem; width: 30px; text-align: center; flex-shrink: 0; }

  /* ── Empty state ────────────────────────── */
  .empty-state {
    text-align: center; padding: 60px 20px; color: var(--ink-faint);
  }
  .empty-state .es-icon { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; margin: 0 auto var(--space-md); }
  .empty-state .es-text { font-size: 0.95rem; }
  .empty-state .es-sub { font-size: 0.8rem; margin-top: var(--space-xs); }

  /* ── Mobile responsive ──────────────────── */
  @media (max-width: 640px) {
    .folder-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: var(--space-sm); }
    .folder-card { padding: 8px; }
    .folder-card .fc-icon { width: 46px; height: 46px; }
    .folder-card .fc-icon svg { width: 26px; height: 26px; }
    .folder-card .fc-name { font-size: 0.75rem; }
    .folder-list-item { padding: 10px 14px; }
    .file-table thead th,
    .file-table tbody td { padding: 8px 12px; font-size: 0.78rem; }
  }

  /* ═══════════════════════════════════════════
     Modal / 登录 / 注册 / 上传
     ═══════════════════════════════════════════ */

  .modal-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: oklch(0 0 0 / 0.4);
    display: flex; align-items: center; justify-content: center;
    padding: var(--space-md);
    backdrop-filter: blur(4px);
  }
  .modal-card {
    background: var(--raised); border-radius: var(--radius-lg);
    padding: var(--space-lg) var(--space-xl);
    width: 100%; max-width: 400px;
    box-shadow: 0 8px 40px oklch(0 0 0 / 0.15);
    position: relative;
    animation: modalIn 0.2s ease-out;
  }
  .modal-card-wide { max-width: 520px; }
  @keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
  }
  .modal-close {
    position: absolute; top: 14px; right: 16px;
    border: none; background: none; font-size: 1.2rem;
    cursor: pointer; color: var(--ink-faint); line-height: 1;
  }
  .modal-close:hover { color: var(--ink); }
  .modal-title {
    font-family: var(--serif);
    font-size: 1.3rem; margin-bottom: var(--space-md);
    color: var(--ink);
  }

  .mf-group { margin-bottom: var(--space-sm); }
  .mf-group label {
    display: block; font-size: 0.82rem;
    color: var(--ink-soft); margin-bottom: 4px;
    font-weight: 500;
  }
  .label-required { color: var(--accent); margin-left: 2px; }
  .mf-pwd-wrap {
    position: relative; display: flex; align-items: center;
  }
  .mf-pwd-wrap .mf-pwd-input {
    padding-right: 40px;
  }
  .mf-pwd-toggle {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    width: 32px; height: 32px; border: none; background: transparent;
    cursor: pointer; font-size: 1rem; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    transition: background 0.15s; opacity: 0.5;
  }
  .mf-pwd-toggle:hover { background: var(--surface); opacity: 1; }
  .mf-input {
    width: 100%; padding: 9px 14px;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    font: inherit; font-size: 0.9rem;
    background: var(--surface); color: var(--ink);
    transition: border-color 0.15s;
  }
  .mf-input:focus { outline: none; border-color: var(--primary); }
  .mf-textarea { min-height: 70px; resize: vertical; }

  /* ── 邮箱后缀输入 ── */
  .mf-email-wrap {
    display: flex; align-items: center;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); transition: border-color 0.15s;
  }
  .mf-email-wrap:focus-within { border-color: var(--primary); }
  .mf-email-prefix {
    flex: 1; border: none !important; outline: none;
    padding: 9px 14px; font: inherit; font-size: 0.9rem;
    background: transparent; color: var(--ink);
    min-width: 80px;
  }
  .mf-email-suffix {
    padding: 9px 14px 9px 0; font-size: 0.85rem;
    color: var(--ink-faint); white-space: nowrap;
    user-select: none;
  }

  /* ── 记住我复选框 ── */
  .mf-remember {
    display: flex; align-items: center; gap: 6px;
    margin-top: var(--space-sm); font-size: 0.82rem;
    color: var(--ink-faint); cursor: pointer;
  }
  .mf-remember input { width: 15px; height: 15px; accent-color: var(--primary); }

  .mf-btn {
    width: 100%; margin-top: var(--space-sm);
    padding: 10px; border: none; border-radius: var(--radius-sm);
    background: var(--primary); color: #fff;
    font: inherit; font-weight: 600; font-size: 0.95rem;
    cursor: pointer; transition: background 0.15s;
  }
  .mf-btn:hover { background: var(--primary-dark); }
  .mf-switch { text-align: center; margin-top: var(--space-sm); font-size: 0.85rem; color: var(--ink-faint); }
  .mf-switch a { color: var(--primary); font-weight: 500; }
  .mf-error { margin-top: var(--space-sm); padding: 8px 12px; border-radius: var(--radius-sm);
    background: oklch(0.95 0.06 30); color: oklch(0.4 0.12 30); font-size: 0.85rem; display: none; }
  .mf-progress { margin-top: var(--space-sm); display: flex; align-items: center; gap: var(--space-sm); }
  .mf-progress-bar { flex: 1; height: 6px; background: var(--border-light); border-radius: 3px; overflow: hidden; }
  .mf-progress-fill { height: 100%; background: var(--primary); width: 0%; transition: width 0.3s; border-radius: 3px; }
  .mf-progress span { font-size: 0.82rem; color: var(--ink-faint); white-space: nowrap; }
  .mf-hint { font-size: 0.78rem; color: var(--ink-faint); margin-top: 4px; }

  /* ── Upload Mode Tabs ─────────────────── */
  .upload-mode-tabs {
    display: flex; gap: 0; margin: var(--space-sm) 0;
    border: 1px solid var(--border-light); border-radius: var(--radius-sm);
    overflow: hidden;
  }
  .um-tab {
    flex: 1; padding: 8px 12px; border: none; background: var(--bg-card);
    color: var(--ink-soft); font: inherit; font-size: 0.85rem;
    cursor: pointer; transition: all 0.15s;
  }
  .um-tab:not(:last-child) { border-right: 1px solid var(--border-light); }
  .um-tab:hover { background: var(--bg-alt); color: var(--ink); }
  .um-tab-active {
    background: var(--primary); color: #fff; font-weight: 600;
  }
  .um-tab-active:hover { background: var(--primary-dark); color: #fff; }

  .upload-mode-pane { margin-bottom: var(--space-sm); }

  .mf-textarea-lg { min-height: 200px; }

  /* ── Register Success ───────────────────── */
  .mf-success {
    text-align: center; padding: var(--space-md) 0;
  }
  .mf-success .ms-check {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--success-light); color: var(--success);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; font-weight: 700; margin: 0 auto var(--space-sm);
  }
  .mf-success .ms-title {
    font-family: var(--serif); font-size: 1.1rem; font-weight: 600; color: var(--ink);
    margin-bottom: var(--space-xs);
  }
  .mf-success .ms-desc { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: var(--space-xs); }
  .mf-success .ms-pwd {
    font-family: monospace; font-size: 1.4rem; font-weight: 700;
    letter-spacing: 0.15em; color: var(--accent-hover);
    padding: var(--space-sm); background: var(--accent-light);
    border-radius: var(--radius-sm); margin: var(--space-xs) 0 var(--space-sm);
    word-break: break-all;
  }
  .mf-success .ms-secure-hint {
    font-size: 0.78rem; color: var(--ink-faint); line-height: 1.6;
    text-align: left; background: var(--bg); padding: 8px 12px;
    border-radius: var(--radius-sm); margin-bottom: var(--space-sm);
  }
  .mf-success .ms-secure-hint strong { color: var(--accent-hover); }
  .mf-success .ms-hint { font-size: 0.78rem; color: var(--ink-faint); margin-bottom: var(--space-sm); }
  .ms-copy-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 18px; border: 1.5px solid var(--primary);
    border-radius: var(--radius-sm); background: transparent;
    color: var(--primary); font: inherit; font-size: 0.82rem;
    font-weight: 600; cursor: pointer;
    transition: all 0.15s; margin-bottom: var(--space-sm);
  }
  .ms-copy-btn:hover { background: var(--primary); color: #fff; }
  .ms-save-check {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.8rem; color: var(--ink-soft); margin-bottom: var(--space-sm);
    text-align: left; cursor: pointer;
  }
  .ms-save-check input[type="checkbox"] {
    width: 18px; height: 18px; accent-color: var(--primary); flex-shrink: 0; cursor: pointer;
  }
  .mf-success .ms-btn:disabled {
    opacity: 0.4; cursor: not-allowed;
  }
  .mf-success .ms-btn { background: var(--accent); }
  .mf-success .ms-btn:hover:not(:disabled) { background: var(--accent-hover); }

  /* ── External Access ──────────────────────── */
  .external-access {
    text-align: right; margin-top: 12px;
    border-top: 1px solid var(--border-light); padding-top: 12px;
  }
  .external-access-btn {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 0.78rem; font-weight: 500; color: var(--ink-faint);
    text-decoration: none; transition: color 0.15s;
  }
  .external-access-btn:hover { color: var(--primary); }

  /* ── Panel Empty State ──────────────────── */
  .hc-empty {
    padding: var(--space-xl) var(--space-lg);
    text-align: center; font-size: 0.85rem; color: var(--ink-faint);
    line-height: 1.6;
  }

  /* ── About Page ─────────────────────────── */
  .about-page { padding: 0 0 var(--space-3xl); }
  /* 关于页（无面包屑）单独给顶部分距 */
  #aboutView .about-page { padding-top: var(--space-xl); }
  .about-header { text-align: center; margin-bottom: var(--space-2xl); }
  .about-title {
    font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 700; color: var(--ink); margin-bottom: var(--space-xs);
  }
  .about-subtitle {
    font-size: 0.9rem; color: var(--ink-faint); letter-spacing: 0.05em;
  }
  .about-content { max-width: 640px; margin: 0 auto; }
  .about-section {
    margin-bottom: var(--space-xl);
    padding: var(--space-lg);
    background: var(--raised); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
  }
  .about-section h3 {
    font-family: var(--serif); font-size: 1rem; font-weight: 600;
    color: var(--ink); margin-bottom: var(--space-sm);
  }
  .about-section p {
    font-size: 0.88rem; color: var(--ink-soft); line-height: 1.7; margin-bottom: var(--space-xs);
  }
  .about-section a { color: var(--primary); font-weight: 500; }
  .about-section a:hover { text-decoration: underline; }

  /* ═══════════════════════════════════════════
     Search overlay
     ═══════════════════════════════════════════ */

  .search-overlay {
    position: fixed; inset: 0; z-index: 8888;
    background: oklch(0 0 0 / 0.35);
    display: flex; align-items: center; justify-content: center;
    padding: var(--space-md);
    backdrop-filter: blur(6px);
  }
  .search-overlay-inner {
    background: var(--raised); border-radius: var(--radius-xl);
    padding: var(--space-xl);
    width: 100%; max-width: 580px;
    box-shadow: 0 12px 48px oklch(0 0 0 / 0.12);
    animation: modalIn 0.25s ease-out;
  }
  .search-overlay-close {
    float: right; border: none; background: none; font-size: 1.1rem;
    cursor: pointer; color: var(--ink-faint); line-height: 1; padding: 4px 6px;
    border-radius: var(--radius-sm); transition: background 0.15s, color 0.15s;
  }
  .search-overlay-close:hover { color: var(--ink); background: var(--primary-surface); }

  /* ── Search Global Overlay — redesigned ── */
  .sg-inner { max-width: 520px; padding: 0; overflow: hidden; }

  .sg-header {
    position: relative; padding: 24px 24px 20px;
    border-bottom: 1px solid var(--border-light);
  }
  .sg-close {
    position: absolute; top: 16px; right: 16px; z-index: 1;
    width: 32px; height: 32px; border: none;
    background: var(--bg); border-radius: 50%; font-size: 0.9rem;
    cursor: pointer; color: var(--ink-faint);
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s;
  }
  .sg-close:hover { background: var(--primary-surface); color: var(--ink); }

  .sg-title-row { display: flex; align-items: center; gap: 10px; }
  .sg-title-icon { font-size: 1.15rem; opacity: 0.45; flex-shrink: 0; }
  .sg-title {
    font-family: var(--serif); font-size: 1.1rem; font-weight: 700;
    color: var(--ink); margin: 0; line-height: 1.3;
  }
  .sg-subtitle {
    margin: 4px 0 0 32px; font-size: 0.76rem; color: var(--ink-faint);
  }

  /* ── Body ── */
  .sg-body { max-height: 460px; overflow-y: auto; overscroll-behavior: contain; }

  /* ── Section ── */
  .sg-section + .sg-section { border-top: 1px solid var(--border-light); }
  .sg-section-header {
    display: flex; align-items: center; gap: 8px;
    padding: 16px 24px 8px;
    position: sticky; top: 0;
    background: var(--raised); z-index: 1;
  }
  .sg-section-svg { opacity: 0.4; flex-shrink: 0; }
  .sg-section-label {
    font-size: 0.75rem; font-weight: 600; color: var(--ink-muted);
    letter-spacing: 0.04em;
  }
  .sg-section-badge {
    margin-left: auto; font-size: 0.68rem; font-weight: 600;
    color: var(--ink-faint); background: var(--bg);
    padding: 2px 9px; border-radius: 10px; line-height: 1.5;
  }

  /* ── Items ── */
  .sg-section-body { padding: 4px 12px 14px; }
  .sg-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 10px;
    text-decoration: none; cursor: pointer;
    transition: background 0.15s; position: relative;
  }
  .sg-item:hover { background: var(--primary-surface); }
  .sg-item::before {
    content: ''; position: absolute; left: 0; top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px; height: 20px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  .sg-item:hover::before { transform: translateY(-50%) scaleY(1); }

  .sg-item-body { flex: 1; min-width: 0; }
  .sg-item-name {
    display: block; font-size: 0.88rem; font-weight: 500;
    color: var(--ink); line-height: 1.4;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .sg-item-meta { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
  .sg-item-code {
    font-size: 0.74rem; color: var(--ink-faint);
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    white-space: nowrap;
  }
  .sg-item-arrow {
    font-size: 0.85rem; color: var(--primary); flex-shrink: 0;
    opacity: 0; transform: translateX(-6px);
    transition: opacity 0.2s, transform 0.2s;
  }
  .sg-item:hover .sg-item-arrow { opacity: 0.6; transform: translateX(0); }

  /* ── Course type pills ── */
  .sg-pill {
    display: inline-flex; align-items: center;
    font-size: 0.63rem; font-weight: 600;
    padding: 1px 7px; border-radius: 4px; line-height: 1.5;
    letter-spacing: 0.02em; flex-shrink: 0;
  }
  .sg-pill-general {
    background: oklch(0.91 0.035 250);
    color: oklch(0.38 0.08 250);
  }
  .sg-pill-major {
    background: oklch(0.91 0.05 150);
    color: oklch(0.36 0.1 150);
  }

  /* ── Empty state ── */
  .sg-empty { text-align: center; padding: 48px 24px; }
  .sg-empty-icon { font-size: 1.8rem; margin-bottom: 12px; opacity: 0.4; }
  .sg-empty-title {
    font-size: 0.9rem; font-weight: 600; color: var(--ink-muted);
    margin-bottom: 4px;
  }
  .sg-empty-desc { font-size: 0.78rem; color: var(--ink-faint); }

  /* ── Upload Search header ── */
  .so-header { text-align: center; padding-bottom: var(--space-lg); }
  .so-icon { font-size: 2rem; margin-bottom: var(--space-xs); }
  .so-title { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; color: var(--ink); }
  .so-sub { font-size: 0.82rem; color: var(--ink-faint); margin-top: 4px; }

  /* ── Search input ── */
  .so-input-group {
    display: flex; align-items: center;
    background: var(--bg); border: 1.5px solid var(--border);
    border-radius: var(--radius-full); padding: 0 20px;
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  .so-input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px oklch(from var(--primary) l c h / 0.1);
  }
  .so-input-icon { font-size: 0.95rem; margin-right: 10px; opacity: 0.45; flex-shrink: 0; }
  #courseSearchInput {
    flex: 1; border: none; background: transparent;
    padding: 14px 0; font-size: 0.95rem; outline: none;
    color: var(--ink); font-family: var(--sans);
  }
  #courseSearchInput::placeholder { color: var(--ink-faint); opacity: 0.6; }

  /* ── Results ── */
  .search-overlay-results { margin-top: var(--space-md); min-height: 60px; }
  .so-results-list { display: flex; flex-direction: column; gap: 4px; }
  .so-result-item {
    display: flex; align-items: center; gap: var(--space-sm);
    padding: 12px 16px; border-radius: var(--radius-md);
    text-decoration: none; transition: background 0.15s;
    cursor: pointer;
  }
  .so-result-item:hover { background: var(--primary-surface); }
  .so-ri-name { flex: 1; font-size: 0.9rem; font-weight: 500; color: var(--ink); }
  .so-ri-code { font-size: 0.78rem; color: var(--ink-faint); font-family: monospace; white-space: nowrap; }
  .so-ri-arrow {
    font-size: 0.85rem; color: var(--primary); opacity: 0;
    transform: translateX(-6px); transition: opacity 0.2s, transform 0.2s;
  }
  .so-result-item:hover .so-ri-arrow { opacity: 0.6; transform: translateX(0); }

  /* ── Empty / hint states ── */
  .so-hint {
    padding: var(--space-md); background: var(--primary-surface);
    border-radius: var(--radius-md); text-align: center;
  }
  .so-hint-title { font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
  .so-hint-text { font-size: 0.82rem; color: var(--ink-faint); line-height: 1.55; }
  .so-empty { text-align: center; padding: var(--space-lg); }
  .so-empty-icon { font-size: 1.5rem; margin-bottom: var(--space-xs); }
  .so-empty-text { font-size: 0.85rem; color: var(--ink-faint); }

  /* ═══════════════════════════════════════════
     Grid divider + Math Card (centered)
     ═══════════════════════════════════════════ */

  .grid-divider-wrap {
    display: flex; justify-content: center;
    padding: var(--space-lg) 0 var(--space-md);
  }
  .grid-divider {
    width: 40%; border: none;
    border-top: 1.5px solid var(--border-light);
  }

  /* ═══════════════════════════════════════════
     Same-name sidebar inside file listing
     ═══════════════════════════════════════════ */

  .file-area-row {
    display: flex; gap: var(--space-xl);
    align-items: flex-start;
  }
  .file-area-main { flex: 1; min-width: 0; }
  .file-area-side {
    width: 200px; flex-shrink: 0;
    background: var(--raised);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    position: sticky; top: calc(var(--header-height) + var(--space-md));
  }
  .file-area-side .fas-title {
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--ink-faint);
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--border-light);
  }
  .file-area-side .fas-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; border-radius: var(--radius-sm);
    cursor: pointer; transition: background 0.15s;
    margin-top: 2px;
  }
  .file-area-side .fas-item:hover { background: var(--primary-surface); }
  .file-area-side .fas-code {
    font-size: 0.78rem; font-weight: 600; color: var(--primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .file-area-side .fas-course {
    font-size: 0.72rem; color: var(--ink-soft);
    margin-top: 1px;
  }

  /* ── 同名课程（底部横排） ── */
  .file-area-side-bottom {
    margin-top: var(--space-lg);
    padding: var(--space-md);
    background: var(--raised);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
  }
  .file-area-side-bottom .fasb-title {
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--ink-faint);
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--border-light);
  }
  .file-area-side-bottom .fasb-list {
    display: flex; flex-wrap: wrap; gap: 8px 12px;
  }
  .file-area-side-bottom .fasb-item {
    display: inline-flex; align-items: center; gap: 4px;
    cursor: pointer; font-size: 0.82rem;
    color: var(--primary); text-decoration: none;
    transition: opacity 0.15s;
  }
  .file-area-side-bottom .fasb-item:hover { opacity: 0.7; }
  .file-area-side-bottom .fasb-code {
    font-weight: 600; white-space: nowrap;
  }
  .file-area-side-bottom .fasb-programs {
    font-size: 0.72rem; color: var(--ink-soft);
  }

  /* ═══════════════════════════════════════════
     File table
     ═══════════════════════════════════════════ */

  .file-area { padding: var(--space-sm) 0 var(--space-xl); }
  .file-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 0.85rem;
  }
  .file-table thead th {
    font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--ink-faint);
    padding: var(--space-sm) var(--space-sm) var(--space-xs);
    border-bottom: 1.5px solid var(--border-light);
    text-align: left; white-space: nowrap;
    width: auto;
  }
  .file-table thead th:nth-child(1) { width: auto; }     /* 文件名 - 自适应 */
  .file-table thead th:nth-child(2) { width: 60px; }     /* 类型 */
  .file-table thead th:nth-child(3) { width: 85px; }     /* 大小 */
  .file-table thead th:nth-child(4) { width: 90px; }     /* 上传者 */
  .file-table thead th:nth-child(5) { width: 90px; }     /* 任课教师 */
  .file-table thead th:nth-child(6) { width: 72px; }     /* 收藏量 */
  .file-table thead th:nth-child(7) { width: 72px; }     /* 下载量 */
  .file-table thead th.th-name { text-align: center; }
  .file-table thead th.th-size { width: 85px; }
  .file-table thead th.th-download { width: 120px; position: relative; text-align: center; }

  /* ── 下载按钮 ↔ 多选复选框 切换（绝对定位叠层，不影响行高） ── */
  .ft-download {
    position: relative;
    text-align: right;
    white-space: nowrap;
    overflow: visible;
  }
  .dl-normal, .dl-check {
    position: absolute;
    top: 50%;
    left: 50%;
    white-space: nowrap;
  }
  .dl-normal {
    opacity: 1;
    transition: opacity 150ms ease;
    transform: translate(-50%, -50%);
  }
  .dl-check {
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms ease, transform 150ms ease;
    transform: translate(-50%, calc(-50% - 4px));
  }
  .dl-check input[type="checkbox"] { cursor: pointer; width: 20px; height: 20px; margin: 0; padding: 0; }
  .file-table.multi-select .dl-normal {
    opacity: 0;
    pointer-events: none;
  }
  .file-table.multi-select .dl-check {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%);
  }
  .file-table.multi-select .ft-download { text-align: center; }

  /* ── 批量选择工具栏（display: none/flex + 淡入动画） ── */
  @keyframes bar-fade-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .batch-dl-bar {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    background: var(--primary-surface);
    border-radius: var(--radius) var(--radius) 0 0;
    font-size: 0.82rem;
  }
  .batch-dl-bar.is-visible {
    display: flex;
    animation: bar-fade-in 200ms ease both;
  }
  .file-table tbody td {
    padding: var(--space-sm);
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
    overflow: hidden;
  }
  .file-table tbody tr { cursor: pointer; }
  .file-table tbody tr:hover td { background: var(--primary-surface); }
  .file-table tbody .selected td { background: var(--primary-light); }

  /* 高亮闪烁（排行榜/最近上传跳转定位） */
  @keyframes highlight-fade {
    0%   { background: var(--accent-light); }
    70%  { background: var(--accent-light); }
    100% { background: transparent; }
  }
  .file-table tbody tr.highlight-row td {
    animation: highlight-fade 2.5s ease forwards;
  }
  .file-table .ft-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .file-table .ft-name .fn-wrap {
    display: flex; align-items: center; gap: 8px;
    overflow: hidden;
  }
  .file-table .ft-name .fn-wrap .ext-badge {
    flex-shrink: 0;
  }
  .file-table .ft-name .fn-wrap .fn-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }

  .file-table .ft-type-cell,
  .file-table .ft-size-cell,
  .file-table .ft-uploader,
  .file-table .ft-teacher {
    white-space: nowrap; color: var(--ink-soft); font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .file-table .ft-favcount {
  width: 60px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.file-table .ft-dlcount {
    white-space: nowrap; color: var(--ink-faint); font-size: 0.8rem;
  }
  .file-table .ft-download {
    text-align: right;
    white-space: nowrap;
    overflow: visible;
  }
  .file-table .dl-link {
    display: inline-flex; align-items: center;
    padding: 4px 14px; border-radius: 6px;
    font-size: 0.78rem; font-weight: 600;
    color: var(--primary); text-decoration: none;
    border: 1.5px solid var(--primary);
    transition: all 0.15s;
    white-space: nowrap;
  }
  .file-table .dl-link:hover {
    background: var(--primary); color: #fff;
  }
  .file-table .dl-disabled {
    display: inline-flex; align-items: center;
    padding: 4px 14px; border-radius: 6px;
    font-size: 0.78rem; font-weight: 600;
    color: var(--ink-light, oklch(0.5 0 0));
    border: 1.5px solid var(--border);
    white-space: nowrap;
    cursor: default;
  }
  .file-table .dl-login-prompt {
    display: inline-flex; align-items: center;
    padding: 4px 14px; border-radius: 6px;
    font-size: 0.78rem; font-weight: 600;
    color: var(--ink-faint);
    border: 1.5px dashed var(--border);
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
  }
  .file-table .dl-login-prompt:hover {
    color: var(--primary);
    border-color: var(--primary-light);
  }
  .file-area-header {
    display: flex; align-items: center; gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    justify-content: space-between;
  }
  .file-area-header .section-accent {
    flex-shrink: 1; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    margin: 0;
  }
  .file-area-header .fa-count {
    flex-shrink: 0;
    font-size: 0.75rem; color: var(--ink-faint);
  }
  .file-area-header .fa-upload-header-btn {
    flex-shrink: 0;
  }
  .fa-upload-header-btn .fa-upload-btn {
    padding: 6px 16px; border-radius: 6px;
    font-size: 0.82rem; font-weight: 600;
    background: transparent; color: var(--primary);
    border: 1.5px solid var(--primary);
    cursor: pointer; transition: all 0.15s;
    white-space: nowrap;
  }
  .fa-upload-header-btn .fa-upload-btn:hover {
    background: var(--primary); color: #fff;
  }
  .fa-upload-header-btn .fa-batch-dl-btn {
    margin-left: 12px;
    /* Same visual style as fa-upload-btn / dl-link (outlined primary) */
  }

  .fa-per-page {
    font-size: 0.75rem; color: var(--ink-faint);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 2px;
  }
  .fa-per-page .ppc-select {
    font-size: 0.75rem;
    padding: 2px 4px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--raised);
    color: var(--ink-soft);
    cursor: pointer;
    font-family: inherit;
    outline: none;
  }
  .fa-per-page .ppc-select:hover,
  .fa-per-page .ppc-select:focus {
    border-color: var(--primary-light);
  }

  .fa-back-bar {
    margin-bottom: var(--space-sm);
    font-size: 0.82rem;
  }
  .fa-back-bar a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--ink-faint);
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 6px;
    background: var(--surface);
    border: 1px solid var(--border-light);
    transition: all 0.15s;
  }
  .fa-back-bar a:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-surface);
  }

  /* ── Pagination ── */
  .file-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: var(--space-lg) 0 var(--space-xl);
    flex-wrap: wrap;
  }
  .file-pagination .fp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--raised);
    color: var(--ink-soft);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
    font-family: inherit;
    line-height: 1;
  }
  .file-pagination .fp-btn:hover:not(.fp-active):not(.fp-disabled) {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-surface);
  }
  .file-pagination .fp-btn.fp-active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    cursor: default;
  }
  .file-pagination .fp-btn.fp-disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
  }
  .file-pagination .fp-btn.fp-ellipsis {
    letter-spacing: 2px;
    min-width: 32px;
  }

  /* Jump popup */
  .fp-jump-popup {
    background: var(--raised);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 24px oklch(0 0 0 / 0.12);
    padding: 10px;
    max-height: 280px;
    overflow-y: auto;
    min-width: 200px;
  }
  .fp-jump-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
  }
  .fp-jump-num {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink-soft);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.1s;
    font-family: inherit;
  }
  .fp-jump-num:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-surface);
  }
  .fp-jump-num.fp-active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
  }

  /* ═══════════════════════════════════════════
     File extension badge
     ═══════════════════════════════════════════ */

  .ext-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 34px; height: 22px;
    padding: 0 5px;
    font-size: 0.6rem; font-weight: 700; letter-spacing: 0.02em;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    color: var(--ink-faint);
    background: transparent;
    margin-right: 8px;
    flex-shrink: 0;
  }

  /* ═══════════════════════════════════════════
     Folder list: fli-icon uses text arrow now
     ═══════════════════════════════════════════ */

  .folder-list-item .fli-icon {
    width: 36px; height: 36px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-surface);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    transition: background 0.15s;
  }
  .folder-list-item:hover .fli-icon { background: oklch(from var(--primary) l c h / 0.12); }

  /* ═══════════════════════════════════════════
     Homepage Navigation Cards + Dividers
     ═══════════════════════════════════════════ */

  .home-divider {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 0 auto;
    max-width: 900px;
  }

  .home-nav-cards {
    padding: var(--space-xl) 0;
  }

  .home-nav-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    max-width: 720px;
    margin: 0 auto;
  }

  .home-nav-card {
    background: var(--raised);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s, box-shadow 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
  }

  .home-nav-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px oklch(0 0 0 / 0.04);
  }

  .home-nav-card .hnc-icon {
    font-size: 2rem;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-surface);
    border-radius: var(--radius-md);
  }

  .home-nav-card .hnc-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
  }

  .home-nav-card .hnc-desc {
    font-size: 0.78rem;
    color: var(--ink-faint);
  }
  .home-nav-card .hnc-icon svg {
    color: var(--primary);
    opacity: 0.7;
  }

  /* ═══════════════════════════════════════════
     Rankings / Recent All View
     ═══════════════════════════════════════════ */

  .rankings-content {
    padding: var(--space-md) 0 var(--space-xl);
  }

  .rankings-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--raised);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xs);
    transition: background 0.15s;
    cursor: pointer;
    text-decoration: none;
  }

  .rankings-item:hover {
    background: var(--primary-surface);
  }

  .rankings-item .ri-rank {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink-faint);
    width: 32px;
    text-align: center;
    flex-shrink: 0;
  }

  .rankings-item .ri-info {
    flex: 1;
    min-width: 0;
  }

  .rankings-item .ri-name {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--ink);
  }

  .rankings-item .ri-meta {
    font-size: 0.75rem;
    color: var(--ink-faint);
    margin-top: 2px;
  }

  .rankings-item .ri-stat {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* ── Filter Bar (学院分类) ── */
  .filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-light);
  }
  .filter-bar .fb-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--raised);
    color: var(--ink-soft);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    user-select: none;
    white-space: nowrap;
  }
  .filter-bar .fb-pill:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    background: var(--primary-surface);
  }
  .filter-bar .fb-pill.fb-active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
  }

  /* ═══════════════════════════════════════════
     About sections sub-navigation
     ═══════════════════════════════════════════ */

  .about-tabs {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
  }

  .about-tab {
    padding: 8px 18px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink-soft);
    background: var(--raised);
    cursor: pointer;
    transition: all 0.15s;
  }

  .about-tab:hover {
    border-color: var(--primary-light);
    color: var(--primary);
  }

  .about-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
  }

  /* ═══════════════════════════════════════════
     Stat pills clickable
     ═══════════════════════════════════════════ */

  .stat-pill-link {
    text-decoration: none;
    display: inline-flex;
  }

  /* ═══════════════════════════════════════════
     Mobile responsive for new elements
     ═══════════════════════════════════════════ */

  @media (max-width: 640px) {
    .home-nav-grid {
      grid-template-columns: 1fr;
      gap: var(--space-md);
    }
    .home-nav-card {
      flex-direction: row;
      text-align: left;
      padding: var(--space-md);
    }
    .home-nav-card .hnc-icon {
      width: 48px;
      height: 48px;
      font-size: 1.5rem;
      flex-shrink: 0;
    }
    .rankings-item {
      padding: var(--space-sm) var(--space-md);
    }
  }

  /* ── 文件表格包裹 ── */
  .file-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* ═══════════════════════════════════════════
     空间不足时折叠次要列
     ═══════════════════════════════════════════ */

  .file-area-compact .file-table thead th.th-type,
  .file-area-compact .file-table thead th.th-uploader,
  .file-area-compact .file-table thead th.th-teacher,
  .file-area-compact .file-table thead th.th-dlcount,
  .file-area-compact .file-table tbody td.ft-type-cell,
  .file-area-compact .file-table tbody td.ft-uploader,
  .file-area-compact .file-table tbody td.ft-teacher,
  .file-area-compact .file-table tbody td.ft-dlcount {
    display: none;
  }

  @media (max-width: 720px) {
    .file-area-row {
      flex-direction: column;
    }
    .file-area-side {
      width: 100%;
      position: static;
      order: 1;
      margin-top: var(--space-md);
    }
    .file-table thead th.th-type,
    .file-table thead th.th-uploader,
    .file-table thead th.th-teacher,
    .file-table thead th.th-favcount,
    .file-table thead th.th-dlcount,
    .file-table tbody td.ft-type-cell,
    .file-table tbody td.ft-uploader,
    .file-table tbody td.ft-teacher,
    .file-table tbody td.ft-favcount,
    .file-table tbody td.ft-dlcount {
      display: none;
      width: 0;
    }
    .file-table thead th.th-size,
    .file-table tbody td.ft-size-cell {
      min-width: 7ch;
    }
    .file-table tbody td.ft-name {
      max-width: none;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .file-table thead th.th-download,
    .file-table tbody td.ft-download {
      width: 72px;
      min-width: 72px;
    }
    .file-table-scroll {
      overflow-x: visible;
      margin-left: 0;
      margin-right: 0;
    }
  }

  @media (max-width: 640px) {
    .file-area-header {
      flex-wrap: wrap;
      gap: 6px;
    }
    .file-area-header .section-accent {
      font-size: 0.8rem;
    }
    .file-area-header .fa-count {
      font-size: 0.7rem;
    }
    .fa-upload-header-btn .fa-upload-btn {
      padding: 3px 8px;
      font-size: 0.7rem;
    }
    .fa-back-bar { font-size: 0.78rem; }
    .file-table-scroll {
      overflow-x: visible;
      margin-left: 0;
      margin-right: 0;
    }
    .file-table thead th,
    .file-table tbody td {
      padding: 6px 8px;
      font-size: 0.72rem;
    }
    .file-table .dl-link {
      padding: 3px 8px;
      font-size: 0.7rem;
    }
    .file-table thead th,
    .file-table tbody td { white-space: nowrap; }
    .file-table tbody td.ft-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  }

  /* ═══════════════════════════════════════════
     文件简介模态框
     ═══════════════════════════════════════════ */

  .file-info-content {
    padding: var(--space-sm) 0;
  }
  .file-info-content .fi-row {
    display: flex;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.88rem;
  }
  .file-info-content .fi-row:last-child {
    border-bottom: none;
  }
  .file-info-content .fi-label {
    width: 100px;
    flex-shrink: 0;
    color: var(--ink-faint);
    font-weight: 500;
  }
  .file-info-content .fi-value {
    flex: 1;
    color: var(--ink);
    word-break: break-all;
  }
  .fi-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    margin-top: var(--space-md);
    transition: background 0.15s;
  }
  .fi-download-btn:hover {
    background: var(--primary-dark);
  }

  /* ── 文件详情弹窗移动端适配 ── */
  @media (max-width: 640px) {
    .file-info-card {
      max-height: 90vh;
      overflow-y: auto;
      padding: var(--space-md);
    }
    .file-info-card .modal-close {
      top: 10px;
      right: 10px;
      z-index: 1;
    }
  }

  /* ── 管理员自传标识 ── */
  .admin-uploaded-badge {
    display: inline-block;
    margin-left: 6px;
    font-size: 0.65rem;
    background: oklch(0.65 0.12 250);
    color: #fff;
    padding: 1px 6px;
    border-radius: 4px;
    vertical-align: middle;
  }

  /* ── 待审核工具条 ── */
  .pc-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .pc-toolbar-toggle {
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    color: var(--ink-soft);
    user-select: none;
  }
  .pc-toolbar-toggle input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
  }

  /* ── 通知中心完整页 ── */
  .notif-full-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .notif-full-item {
    background: var(--raised);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.15s;
  }
  .notif-full-item-unread {
    border-left: 3px solid var(--primary);
  }
  .notif-full-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
  }
  .notif-full-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-light);
    flex-shrink: 0;
  }
  .notif-full-dot.unread {
    background: var(--primary);
  }
  .notif-full-info {
    flex: 1;
    min-width: 0;
  }
  .notif-full-title {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.3;
  }
  .notif-full-meta {
    font-size: 0.72rem;
    color: var(--ink-faint);
    margin-top: 2px;
  }
  .notif-full-body {
    padding: 0 14px 12px;
    border-top: 1px solid var(--border-light);
    padding-top: 10px;
    margin-top: 0;
  }
  .notif-full-msg {
    font-size: 0.85rem;
    color: var(--ink-soft);
    line-height: 1.5;
    margin-bottom: 8px;
    white-space: pre-wrap;
  }
  .notif-full-link a {
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
  }
  .notif-full-link a:hover {
    text-decoration: underline;
  }
  @media (max-width: 640px) {
    .notif-full-item { border-radius: 0; margin: 0 -12px; }
    .notif-view-all { font-size: 0.8rem; }
  }


/* ═══════════════════════════════════════════
   Iter 2 — 个人资料、通知、审核标签
   ═══════════════════════════════════════════ */

/* ── 个人资料页 ── */
.profile-card {
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xl);
  display: flex;
  gap: var(--space-xl);
  align-items: flex-start;
}
.profile-avatar {
  flex-shrink: 0;
}
.profile-avatar-circle {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--primary-surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
  border: 2px solid var(--border-light);
}
.profile-avatar {
  position: relative;
}
.profile-avatar-upload {
  position: absolute;
  bottom: 0; right: -4px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary-surface);
  border: 2px solid var(--border-color);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.15s, background 0.15s;
  z-index: 2;
}
.profile-avatar-upload:hover {
  transform: scale(1.15);
  background: var(--accent-bg);
}
.profile-info {
  flex: 1;
  display: flex; flex-direction: column; gap: var(--space-sm);
}
.profile-row {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}
.profile-row:last-of-type { border-bottom: none; }
.profile-label {
  min-width: 80px;
  font-size: 0.85rem;
  color: var(--ink-light, oklch(0.5 0.02 250));
  font-weight: 500;
}
.profile-value {
  font-size: 1rem;
  color: var(--ink);
  font-weight: 500;
}
.profile-edit-btn {
  margin-left: auto;
  background: none; border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  font-size: 0.8rem;
  color: var(--primary);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.profile-edit-btn:hover {
  background: var(--primary-surface);
  border-color: var(--primary);
}
.profile-actions {
  margin-top: var(--space-sm);
  display: flex; gap: var(--space-sm);
}
.profile-action-btn {
  background: none; border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s;
}
.profile-action-btn:hover {
  background: var(--primary-surface);
}

/* ── 个人资料移动端响应式 ── */
@media (max-width: 640px) {
  .profile-card {
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-md);
  }
  .profile-avatar-circle {
    width: 60px;
    height: 60px;
    font-size: 1.6rem;
  }
  .profile-row {
    flex-wrap: wrap;
    gap: 4px;
  }
  .profile-label {
    min-width: 60px;
    font-size: 0.78rem;
  }
  .profile-value {
    font-size: 0.88rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .profile-edit-btn {
    margin-left: 0;
    width: 100%;
    text-align: center;
    margin-top: 4px;
  }
  .profile-actions {
    flex-wrap: wrap;
  }
  .profile-edit-dialog {
    min-width: 0;
    width: 90vw;
  }
}

/* ── 昵称编辑内联弹窗 ── */
.profile-edit-overlay {
  position: fixed;
  inset: 0;
  background: oklch(0 0 0 / 0.3);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.profile-edit-dialog {
  background: #fff;
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  min-width: 320px;
  box-shadow: 0 8px 40px oklch(0 0 0 / 0.12);
}
.profile-edit-dialog h3 {
  margin: 0 0 var(--space-md);
  font-size: 1.1rem;
}
.pe-actions {
  display: flex; gap: var(--space-sm);
  margin-top: var(--space-md);
}
.pe-actions .mf-btn-secondary {
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--border);
}
.pe-actions .mf-btn-secondary:hover {
  background: var(--border-light);
}

/* ── 通知抽屉 ── */
.notif-drawer-overlay {
  position: fixed;
  inset: 0;
  background: oklch(0 0 0 / 0.25);
  z-index: 999;
}
.notif-drawer {
  position: fixed;
  top: 0; right: 0;
  width: 380px; max-width: 90vw;
  height: 100vh;
  background: #fff;
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 24px oklch(0 0 0 / 0.08);
  display: flex; flex-direction: column;
  z-index: 1000;
  animation: notifSlideIn 0.2s ease-out;
}
@keyframes notifSlideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.notif-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-light);
}
.notif-drawer-header h3 {
  margin: 0;
  font-size: 1.1rem;
}
.notif-drawer-close {
  background: none; border: none;
  font-size: 1.2rem; cursor: pointer;
  color: var(--ink-light, oklch(0.5 0 0));
  padding: 4px;
}
.notif-drawer-close:hover { color: var(--ink); }
.notif-drawer-actions {
  padding: var(--space-sm) var(--space-lg);
  border-bottom: 1px solid var(--border-light);
}
.notif-mark-all-btn {
  background: none; border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 0.8rem;
  color: var(--primary);
  cursor: pointer;
  transition: background 0.15s;
}
.notif-mark-all-btn:hover {
  background: var(--primary-surface);
}
/* drawer 内部页面容器 — 必须填满 flex 高度才能让 scrollable body 生效 */
#drawerMenu, #drawerNotif {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
.notif-drawer-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0;
}
.notif-item {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}
.notif-item:hover { background: var(--primary-surface); }
.notif-item-unread { background: oklch(0.97 0.01 250 / 0.4); }
.notif-item-unread:hover { background: oklch(0.94 0.02 250 / 0.4); }
.notif-item-header {
  display: flex; gap: var(--space-sm); align-items: flex-start; cursor: pointer;
  transition: background 0.15s;
}
.notif-item-header:hover { background: oklch(0.95 0.005 250 / 0.3); border-radius: var(--radius); }
.notif-item-dot {
  width: 8px; height: 8px; min-width: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 6px;
}
.notif-item-read .notif-item-dot { background: transparent; }
.notif-item-content { flex: 1; min-width: 0; }
.notif-item-title {
  font-size: 0.9rem; font-weight: 500;
  color: var(--ink);
  margin-bottom: 2px;
}
.notif-item-preview { font-size: 0.78rem; color: var(--ink-faint); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-item-time {
  font-size: 0.75rem;
  color: var(--ink-light, oklch(0.5 0 0));
  white-space: nowrap;
}
.notif-expand-icon { font-size: 0.7rem; color: var(--ink-faint); flex-shrink: 0; transition: transform 0.2s; padding-top: 4px; }
.notif-expand-icon.expanded { transform: rotate(180deg); }

.notif-item-body {
  padding: 8px 0 4px 26px; border-top: 1px solid oklch(from var(--border-light) l c h / 0.3);
  margin-top: 6px;
}
.notif-item-fullmsg { font-size: 0.82rem; color: var(--ink); line-height: 1.6; white-space: pre-wrap; }
.notif-item-link { margin-top: 6px; font-size: 0.78rem; }
.notif-item-link a { color: var(--primary); text-decoration: none; }
.notif-item-link a:hover { text-decoration: underline; }
.notif-mark-btn {
  margin-top: 8px; padding: 3px 10px; font-size: 0.75rem;
  background: var(--primary-surface); color: var(--primary); border: 1px solid var(--border-light);
  border-radius: var(--radius); cursor: pointer; transition: background 0.15s;
}
.notif-mark-btn:hover { background: var(--primary); color: white; }
.notif-empty {
  text-align: center;
  padding: var(--space-xl);
  color: var(--ink-light, oklch(0.5 0 0));
}

/* ── Drawer Menu (replaces old footer) ── */
.drawer-menu-body {
  flex: 1; overflow-y: auto; padding: 8px 12px;
}
.dm-user {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 8px; margin-bottom: 4px;
}
.dm-avatar {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, oklch(0.55 0.12 280), oklch(0.45 0.15 320));
  color: #fff; font-size: 1.1rem; font-weight: 700;
  flex-shrink: 0; user-select: none;
}
.dm-info { flex: 1; min-width: 0; }
.dm-name { font-size: 0.95rem; font-weight: 600; color: var(--ink); }
.dm-role { font-size: 0.75rem; color: var(--ink-faint); margin-top: 1px; }
.dm-divider {
  height: 1px; background: var(--border-light); margin: 4px 8px;
}
.dm-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 12px; border-radius: var(--radius-sm);
  font-size: 0.88rem; color: var(--ink-soft); text-decoration: none;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.dm-item:hover { background: var(--primary-surface); color: var(--primary); }
.dm-item span:first-child { font-size: 1.1rem; }
.dm-badge {
  margin-left: auto;
  min-width: 18px; height: 18px;
  background: oklch(0.5 0.15 30); color: #fff;
  font-size: 0.6rem; font-weight: 700;
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
  padding: 0 5px; line-height: 1;
}
.dm-logout { color: var(--ink-faint); margin-top: 4px; }

.notif-nav-back {
  background: none; border: none; font-size: 0.85rem;
  color: var(--primary); cursor: pointer; padding: 4px 8px;
  font-family: inherit; border-radius: var(--radius-sm);
  transition: background 0.15s;
  white-space: nowrap;
}
.notif-nav-back:hover { background: var(--primary-surface); }

/* ── 审核状态标签 ── */
.review-badge {
  display: inline-flex; align-items: center;
  font-size: 0.75rem; font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  gap: 4px;
  line-height: 1.4;
}
.review-badge-pending {
  background: oklch(0.92 0.06 80);
  color: oklch(0.5 0.12 80);
}
.review-badge-approved {
  background: oklch(0.9 0.08 145);
  color: oklch(0.4 0.12 145);
}
.review-badge-rejected {
  background: oklch(0.92 0.06 25);
  color: oklch(0.5 0.12 25);
}


/* ═══════════════════════════════════════════════════════════════
   Iter 3 — 管理后台
   ═══════════════════════════════════════════════════════════════ */

.admin-panel {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 0;
}

/* ── Tab 导航 ── */
.admin-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid oklch(0.85 0.02 250 / 0.3);
  margin-bottom: 28px;
  padding-bottom: 0;
}
.admin-tab {
  padding: 10px 22px;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .2s, border-color .2s;
  font-family: inherit;
}
.admin-tab:hover {
  color: var(--primary);
}
.admin-tab.active {
  color: var(--primary);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* ── 统计卡片网格 ── */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
@media (max-width: 500px) {
  .admin-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
}
.admin-stat-card {
  background: oklch(1 0 0 / 0.6);
  border-radius: 12px;
  padding: 20px 24px;
  border: 1px solid oklch(0.85 0.02 250 / 0.2);
  backdrop-filter: blur(4px);
}
@media (max-width: 500px) {
  .admin-stat-card {
    padding: 14px 16px;
  }
  .admin-stat-card .stat-number {
    font-size: 1.5rem;
  }
  .admin-stat-card .stat-label {
    font-size: 0.75rem;
  }
}
.admin-stat-card .stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}
.admin-stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── 审核卡片列表 ── */
.admin-pending-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.admin-pending-card {
  background: oklch(1 0 0 / 0.6);
  border-radius: 10px;
  padding: 18px 20px;
  border: 1px solid oklch(0.85 0.02 250 / 0.2);
  display: flex;
  flex-direction: column;
  gap: 8px;
  backdrop-filter: blur(4px);
}
.admin-pending-card .pc-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}
.admin-pending-card .pc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.admin-pending-card .pc-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.admin-pending-card .pc-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.admin-btn {
  padding: 6px 18px;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: opacity .2s;
}
.admin-btn:hover {
  opacity: 0.85;
}
.admin-btn-approve {
  background: oklch(0.85 0.12 145);
  color: oklch(0.3 0.1 145);
}
.admin-btn-reject {
  background: oklch(0.88 0.08 25);
  color: oklch(0.45 0.12 25);
}
.admin-btn-primary {
  background: var(--primary);
  color: #fff;
}
.admin-btn-secondary {
  background: oklch(0.88 0.02 250 / 0.5);
  color: var(--text);
}
.admin-pending-card .pc-own {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── 驳回弹窗 ── */
.admin-reject-overlay {
  position: fixed;
  inset: 0;
  background: oklch(0 0 0 / 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(2px);
}
.admin-reject-dialog {
  background: oklch(1 0 0 / 0.95);
  border-radius: 14px;
  padding: 28px;
  width: min(92vw, 480px);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px oklch(0 0 0 / 0.2);
}
.section-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-style: dotted;
  cursor: pointer;
}
.section-link:hover {
  color: var(--primary);
  text-decoration-style: solid;
}
.admin-reject-dialog h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  color: var(--text);
}
.admin-reject-dialog textarea {
  width: 100%;
  min-height: 90px;
  padding: 10px 12px;
  border: 1px solid oklch(0.82 0.02 250 / 0.4);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  background: oklch(1 0 0 / 0.5);
}
.admin-reject-dialog textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.admin-reject-dialog .ar-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}
.admin-reject-dialog .ar-error {
  color: oklch(0.5 0.15 25);
  font-size: 0.82rem;
  margin-top: 8px;
  display: none;
}

/* ── 表格（审核历史 & 用户管理） ── */
.admin-table-wrap {
  overflow-x: auto;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.admin-table th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid oklch(0.85 0.02 250 / 0.3);
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  font-size: 0.8rem;
}
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid oklch(0.88 0.02 250 / 0.2);
  color: var(--text);
  vertical-align: middle;
}
.admin-table tr:hover td {
  background: oklch(0.95 0.01 250 / 0.3);
}
.admin-table .status-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 500;
}
.admin-table .status-approved {
  background: oklch(0.9 0.08 145);
  color: oklch(0.35 0.1 145);
}
.admin-table .status-rejected {
  background: oklch(0.92 0.06 25);
  color: oklch(0.5 0.12 25);
}
.admin-table .status-pending {
  background: oklch(0.92 0.06 80);
  color: oklch(0.5 0.12 80);
}

/* ── 用户管理角色选择 ── */
.admin-role-select {
  padding: 4px 8px;
  border: 1px solid oklch(0.82 0.02 250 / 0.3);
  border-radius: 6px;
  font-size: 0.82rem;
  font-family: inherit;
  background: oklch(1 0 0 / 0.5);
  cursor: pointer;
}
.admin-role-select:focus {
  outline: none;
  border-color: var(--primary);
}

/* ── 分页 ── */
.admin-pagination {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 20px;
  flex-wrap: wrap;
}
.admin-pagination button {
  padding: 4px 12px;
  border: 1px solid oklch(0.85 0.02 250 / 0.3);
  border-radius: 6px;
  background: oklch(1 0 0 / 0.5);
  color: var(--text);
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.admin-pagination button:hover:not(:disabled) {
  background: oklch(0.9 0.02 250 / 0.3);
}
.admin-pagination button:disabled {
  opacity: 0.4;
  cursor: default;
}
.admin-pagination .page-info {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-left: 8px;
}

/* ── 用户搜索框 ── */
.admin-search-box {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.admin-search-box input {
  flex: 1;
  max-width: 300px;
  padding: 8px 12px;
  border: 1px solid oklch(0.82 0.02 250 / 0.3);
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: inherit;
  background: oklch(1 0 0 / 0.5);
}
.admin-search-box input:focus {
  outline: none;
  border-color: var(--primary);
}
.admin-search-box button {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
}

/* ── 空状态 ── */
.admin-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ── loading ── */
.admin-loading {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
}

/* ── 文件管理模式 ── */
.fm-header { margin-bottom: 16px; }
.fm-header h3 { margin: 0 0 4px; }
.fm-root { margin-bottom: 12px; }
.fm-root-title { font-weight: 700; font-size: 0.95rem; padding: 8px 0; color: var(--primary); border-bottom: 1px solid var(--border-light); margin-bottom: 4px; }
.fm-children { padding-left: 20px; }
.fm-node { display: flex; align-items: center; padding: 6px 8px; border-radius: 6px; cursor: pointer; gap: 8px; }
.fm-node:hover { background: var(--primary-surface); }
.fm-node-icon { flex-shrink: 0; font-size: 1rem; width: 20px; text-align: center; }
.fm-node-name { flex: 1; font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-node-actions { flex-shrink: 0; display: flex; gap: 4px; }
.fm-action-btn { padding: 3px 10px; font-size: 0.75rem; border-radius: 4px; border: 1px solid var(--border-light); background: transparent; cursor: pointer; color: var(--primary); transition: all 0.12s; }
.fm-action-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── 审核异议 ── */
.pc-comments-section { border-top: 1px solid var(--border-light); margin-top: 8px; padding-top: 6px; }
.pc-comments-toggle { background: none; border: none; cursor: pointer; font-size: 0.78rem; color: var(--text-muted); padding: 4px 0; }
.pc-comments-toggle:hover { color: var(--primary); }
.pc-comments { padding: 8px; background: oklch(0.98 0.005 60); border-radius: 6px; margin-top: 6px; }
.pc-comment-item { padding: 6px 0; border-bottom: 1px solid oklch(0.93 0.005 65); }
.pc-comment-item:last-child { border-bottom: none; }
.pcc-name { font-weight: 600; font-size: 0.78rem; color: var(--primary); }
.pcc-time { font-size: 0.7rem; color: var(--ink-faint); margin-left: 8px; }
.pcc-content { font-size: 0.82rem; margin-top: 2px; }
.pc-comment-empty { font-size: 0.78rem; color: var(--ink-faint); padding: 8px 0; text-align: center; }
.pc-comment-form { display: flex; gap: 6px; margin-top: 8px; align-items: flex-start; }
.pc-comment-input { flex: 1; padding: 6px 8px; border: 1px solid var(--border-light); border-radius: 4px; font-size: 0.8rem; resize: vertical; min-height: 36px; font-family: var(--sans); }
.pc-comment-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px oklch(from var(--primary) l c h / 0.1); }
.pc-comment-form .admin-btn { padding: 6px 12px; font-size: 0.78rem; white-space: nowrap; }
.pc-comments-loading { text-align: center; padding: 12px; color: var(--ink-faint); font-size: 0.8rem; }
.pcc-reply-btn { background:none;border:none;cursor:pointer;font-size:0.72rem;color:var(--text-muted);padding:2px 0;margin-top:2px }
.pcc-reply-btn:hover { color:var(--primary) }
.pc-comment-reply { margin-left:24px;padding-left:12px;border-left:2px solid var(--border-light);font-size:0.9em }
.pc-comment-reply .pcc-name { font-size:0.78rem }

/* ── 专业选择（小版主指派） ── */
.college-check-list { max-height: 240px; overflow-y: auto; }
.college-check-item { display: flex; align-items: center; gap: 8px; padding: 6px 4px; font-size: 0.85rem; cursor: pointer; border-radius: 4px; }
.college-check-item:hover { background: var(--primary-surface); }
.college-check-item input { width: 16px; height: 16px; accent-color: var(--primary); }

/* ── admin-role-select 宽度适应新角色名 ── */
.admin-role-select { max-width: 120px; font-size: 0.78rem; }

/* ── 驳回重新上传按钮 ── */
.reupload-btn {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 6px; padding: 4px 12px; font-size: 0.78rem;
  background: var(--accent); color: white; border: none;
  border-radius: var(--radius); cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.reupload-btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.delete-rejected-btn { background: oklch(0.95 0.03 20); color: oklch(0.4 0.1 20); border: 1px solid oklch(0.88 0.05 20 / 0.3); cursor: pointer; font-size: 0.75rem; padding: 4px 10px; border-radius: var(--radius); transition: background 0.15s; }
.delete-rejected-btn:hover { background: oklch(0.88 0.08 20); }
.hc-item-actions { margin-top: 2px; display: flex; gap: 6px; flex-wrap: wrap; }

.reupload-info {
  background: oklch(0.95 0.05 80 / 0.5); border: 1px solid oklch(0.9 0.08 80 / 0.3);
  border-radius: var(--radius); padding: 8px 12px; margin-bottom: 12px;
  font-size: 0.82rem; color: var(--ink); line-height: 1.5;
}
.reupload-info small { color: var(--ink-faint); font-size: 0.75rem; }

/* ── 审核异议重设计 ── */
.admin-btn-sm {
  padding: 2px 8px; font-size: 0.75rem;
  background: var(--primary-surface); color: var(--primary);
  border: 1px solid var(--border-light); border-radius: var(--radius-sm);
  cursor: pointer; transition: background 0.15s;
}
.admin-btn-sm:hover { background: var(--primary); color: white; }

.pc-section-label {
  font-size: 0.85rem; font-weight: 600; color: var(--ink);
  padding: 12px 0 4px; margin-top: 4px;
}
.pc-section-divider {
  height: 1px; background: var(--border-light); margin: 12px 0;
}
.pc-peer-approved {
  border-left: 3px solid oklch(0.55 0.12 150);
  background: oklch(0.97 0.03 150 / 0.15);
}
.pc-peer-approved-badge {
  font-size: 0.82rem; color: oklch(0.4 0.1 150);
  padding: 6px 0 2px; font-weight: 500;
}
.pc-sub-handled {
  border-left: 3px solid oklch(0.55 0.14 265);
  background: oklch(0.97 0.03 265 / 0.1);
}
.sub-tag {
  display: inline-block;
  font-size: 0.7rem; padding: 1px 6px; border-radius: 4px;
  background: oklch(0.55 0.14 265 / 0.15);
  color: oklch(0.35 0.14 265);
  margin-bottom: 4px;
}
.hc-comments-row td {
  padding: 0 !important; background: oklch(0.98 0.005 250 / 0.3);
}
.hc-comments-row .pc-comments {
  padding: 12px 16px;
}

/* ── 板块选择对话框 ── */
.section-check-item {
  padding: 3px 0; font-size: 0.85rem;
}
.section-check-item input { width: 15px; height: 15px; accent-color: var(--primary); margin-right: 4px; }
.section-check-list {
  border: 1px solid var(--border-light); border-radius: var(--radius);
  padding: 8px 12px; background: var(--surface);
}

/* ── 管理后台移动端适配（@640px） ── */
@media (max-width: 640px) {
  .admin-panel {
    max-width: 100%;
    padding: 16px 12px;
  }
  .admin-tabs {
    overflow-x: auto;
    gap: 0;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }
  .admin-tab {
    white-space: nowrap;
    padding: 8px 14px;
    font-size: 0.82rem;
    flex-shrink: 0;
  }
  .admin-stat-card {
    padding: 12px 14px;
  }
  .admin-stat-card .stat-number {
    font-size: 1.3rem;
  }
  .admin-stat-card .stat-label {
    font-size: 0.7rem;
  }
  .admin-pending-card {
    padding: 12px 14px;
  }
  .admin-pending-card .pc-title {
    font-size: 0.9rem;
  }
  .admin-pending-card .pc-meta {
    flex-direction: column;
    gap: 4px;
    font-size: 0.78rem;
  }
  .admin-pending-card .pc-meta span {
    display: block;
  }
  .admin-pending-card .pc-actions {
    flex-direction: column;
    gap: 6px;
  }
  .admin-pending-card .pc-actions .admin-btn {
    width: 100%;
    text-align: center;
    padding: 8px 14px;
  }
  .admin-table th,
  .admin-table td {
    padding: 6px 8px;
    font-size: 0.72rem;
    white-space: nowrap;
  }
  .admin-reject-dialog {
    width: calc(100vw - 32px);
    min-width: 0;
    max-width: none;
    padding: 20px;
    margin: 0 16px;
    max-height: 85vh;
  }
  .admin-reject-dialog .ar-actions {
    flex-direction: column;
  }
  .admin-reject-dialog .ar-actions .admin-btn {
    width: 100%;
    text-align: center;
  }
  .admin-auto-toggle {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px;
  }
  .admin-auto-toggle button {
    align-self: stretch;
  }
  .pc-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .pc-toolbar .admin-btn {
    width: 100%;
    text-align: center;
  }
  .pc-toolbar-toggle {
    font-size: 0.78rem;
  }
  .admin-search-box {
    flex-direction: column;
  }
  .admin-search-box input {
    max-width: none;
    width: 100%;
    box-sizing: border-box;
  }
  .admin-search-box button {
    width: 100%;
  }
  .admin-pagination {
    justify-content: center;
  }
  .admin-pagination button {
    padding: 6px 10px;
    font-size: 0.78rem;
  }
  .admin-pagination .page-info {
    font-size: 0.72rem;
  }
  .fm-node {
    flex-wrap: wrap;
    padding: 8px 6px;
  }
  .fm-node-name {
    font-size: 0.82rem;
  }
  .fm-node-actions {
    width: 100%;
    margin-top: 4px;
  }
  .fm-action-btn {
    padding: 4px 8px;
    font-size: 0.72rem;
  }
  .fm-children {
    padding-left: 12px;
  }
  .pc-section-label {
    font-size: 0.85rem;
  }
  .pc-peer-approved-badge {
    font-size: 0.78rem;
  }
  .sub-tag {
    font-size: 0.7rem;
  }

  /* ── 批量操作工具栏移动端 ── */
  .batch-dl-bar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .batch-dl-bar .admin-btn-sm {
    font-size: 0.72rem;
    padding: 5px 10px;
  }

  /* ── 管理模式新建按钮移动端 ── */
  .mgmt-new-btn {
    font-size: 0.7rem;
    padding: 3px 8px;
  }

  /* ── 管理表格（删除记录/操作记录）横向滚动 ── */
  .admin-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .admin-table-wrapper table {
    min-width: 560px;
  }
}

/* ═══ Iter 6 — 管理模式 / 文件编辑 / 操作记录 ═══ */

/* iOS 开关 */
.ios-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  background: #e0e0e0;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s;
  flex-shrink: 0;
}
.ios-toggle-on { background: var(--success, #34c759); }
.ios-toggle-knob {
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.3s;
}
.ios-toggle-on .ios-toggle-knob { transform: translateX(20px); }

/* 抽屉开关行 */
.dm-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  cursor: default;
}
.dm-toggle-label { font-size: 0.85rem; }

/* 管理模式 — 新建按钮 */
.mgmt-new-btn {
  margin-left: auto;
  background: var(--accent, #c97d2d);
  color: #fff;
  border: none;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.mgmt-new-btn:hover { opacity: 0.85; }

/* 管理模式 — 文件列表铅笔图标 */
.mgmt-pen {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.mgmt-pen:hover { opacity: 1; }
.mgmt-pen-sm { font-size: 0.7rem; vertical-align: middle; }

/* 我的上传页面 tabs */
.mu-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.mu-tab {
  padding: 6px 14px;
  border: 1px solid var(--border-light, #ddd);
  border-radius: 20px;
  background: transparent;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-muted, #666);
  transition: all 0.2s;
}
.mu-tab.active {
  background: var(--accent, #c97d2d);
  color: #fff;
  border-color: var(--accent, #c97d2d);
}
.mu-tab:hover:not(.active) { border-color: var(--accent, #c97d2d); }

/* 文件详情 — 简介行 */
.fi-row-desc .fi-value {
  white-space: pre-wrap;
  word-break: break-word;
}

/* 文件详情 — 内联编辑输入框 */
.fi-edit-input {
  width: 90%;
  padding: 4px 6px;
  border: 1px solid var(--accent, #c97d2d);
  border-radius: 4px;
  font-size: inherit;
  font-family: inherit;
  box-sizing: border-box;
}
.fi-pen {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.2s;
  vertical-align: middle;
}
.fi-pen:hover { opacity: 1; }

/* 审核面板 — 详情按钮 */
.pc-btn-detail {
  background: var(--surface-alt, #f0f0f0);
  border-color: transparent;
}

/* ═══════════════════════════════════════════
   文件预览 — 表格行按钮
   ═══════════════════════════════════════════ */

.file-table .pv-link {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 6px;
  font-size: 0.72rem; font-weight: 600;
  color: oklch(0.48 0.10 165); text-decoration: none;
  border: 1.5px solid oklch(0.48 0.10 165);
  transition: all 0.15s;
  white-space: nowrap;
  cursor: pointer;
}
.file-table .pv-link:hover {
  background: oklch(0.48 0.10 165); color: #fff;
}
/* 多选模式隐藏预览 */
.file-table.multi-select .pv-link {
  display: none;
}

/* 下载+预览按钮同行排列 */
.dl-normal {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════
   文件预览 — 预览模态框
   ═══════════════════════════════════════════ */

.preview-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: oklch(0 0 0 / 0.88);
  display: flex; flex-direction: column;
  padding: var(--space-md);
  backdrop-filter: blur(8px);
  animation: modalIn 0.2s ease-out;
}

.preview-header {
  display: flex; align-items: center; gap: var(--space-sm);
  color: #fff; padding: 0 var(--space-sm) var(--space-sm);
  flex-shrink: 0;
}
.preview-header .pv-badge {
  flex-shrink: 0;
}
.preview-header .pv-title {
  flex: 1; font-size: 0.85rem; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0.85;
}

.preview-body {
  flex: 1; display: flex; align-items: center; justify-content: center;
  overflow: auto; min-height: 0;
}

.preview-close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  width: 36px; height: 36px; border: none;
  background: oklch(1 0 0 / 0.12); color: #fff;
  font-size: 1.1rem; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.preview-close:hover { background: oklch(1 0 0 / 0.3); }

/* 预览下载按钮 */
.pv-dl-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 18px; border-radius: 6px;
  font-size: 0.82rem; font-weight: 600;
  background: var(--primary); color: #fff;
  border: none; cursor: pointer; text-decoration: none;
  transition: background 0.15s;
  font-family: inherit;
}
.pv-dl-btn:hover { background: var(--primary-dark); }
.pv-dl-btn-hdr {
  margin-left: auto;
  font-size: 0.78rem;
  padding: 5px 14px;
}

/* 预览内嵌渲染区 */
.pv-viewer { border-radius: var(--radius-md); }

/* 文本预览 */
.pv-text-wrap {
  width: 100%; max-width: 900px; max-height: 100%;
  margin: 0 auto; overflow: auto;
}
.pv-text {
  background: oklch(0.2 0.01 250); color: oklch(0.85 0.005 250);
  padding: var(--space-md); border-radius: var(--radius-md);
  font-family: "SF Mono", "Fira Code", "JetBrains Mono", monospace;
  font-size: 0.75rem; line-height: 1.6;
  white-space: pre-wrap; word-break: break-all;
  overflow-x: auto;
}
.pv-text-code {
  color: oklch(0.83 0.04 150);
}

/* 不支持的格式 */
.pv-unsupported {
  text-align: center; color: oklch(0.7 0.01 0);
}
.pv-unsupported-icon { font-size: 3rem; margin-bottom: var(--space-md); opacity: 0.5; }
.pv-unsupported-text { font-size: 1.1rem; font-weight: 500; margin-bottom: 4px; }
.pv-unsupported-sub { font-size: 0.82rem; opacity: 0.5; margin-bottom: var(--space-lg); }

/* 文件详情弹窗预览按钮 */
.fi-preview-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 22px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600;
  background: transparent; color: oklch(0.48 0.10 165);
  border: 1.5px solid oklch(0.48 0.10 165);
  cursor: pointer; text-decoration: none; margin-bottom: 8px;
  transition: all 0.15s;
  font-family: inherit;
}
.fi-preview-btn:hover {
  background: oklch(0.48 0.10 165); color: #fff;
}

/* ── 按钮组均匀纵向布局 ── */
.fi-actions {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px;
  margin-top: var(--space-md);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-light);
}
.fi-actions .fi-preview-btn { margin-bottom: 0; }
.fi-actions .fi-download-btn { margin-top: 0; }

/* ═══════════════════════════════════════════
   文件列表布局优化 — 扩展内容区
   ═══════════════════════════════════════════ */

.explorer-view .container {
  max-width: none;
  padding: 0 32px;
}
@media (max-width: 640px) {
  .explorer-view .container { padding: 0 var(--space-md); }
}

/* 超宽屏上限 */
@media (min-width: 2000px) {
  .explorer-view .container {
    max-width: 1800px;
    margin: 0 auto;
  }
}

/* ── 列宽重新分配 ── */
.file-table thead th:nth-child(1) { width: auto; }     /* 文件名 — 自适应占剩余空间 */
.file-table thead th:nth-child(2) { width: 55px; }     /* 类型 */
.file-table thead th:nth-child(3) { width: 75px; }     /* 大小 */
.file-table thead th:nth-child(4) { width: 90px; }     /* 上传者 */
.file-table thead th:nth-child(5) { width: 100px; }    /* 任课教师 */
.file-table thead th:nth-child(6) { width: 60px; }     /* 收藏量 */
.file-table thead th:nth-child(7) { width: 100px; }    /* 下载量 */
.file-table thead th.th-download { width: 130px; text-align: center; }

/* ── 渐进隐藏列：空间不足时优先显示文件名 ── */

/* 中屏：隐藏任课教师 */
@media (max-width: 1200px) {
  .file-table .ft-teacher,
  .file-table .th-teacher {
    display: none;
  }
}
/* 中窄屏：再隐藏上传者 */
@media (max-width: 1000px) {
  .file-table .ft-uploader,
  .file-table .th-uploader {
    display: none;
  }
}
/* 窄屏：隐藏类型、下载次数，保留文件名/大小/按钮 */
@media (max-width: 768px) {
  .file-table .ft-type-cell,
  .file-table .th-type,
  .file-table .ft-dlcount,
  .file-table .th-dlcount {
    display: none;
  }
  /* 管理模式铅笔图标自动隐藏 */
  .mgmt-pen { display: none; }
  /* 下载列占满剩余宽度 */
  .file-table thead th:nth-child(7) { width: auto; }
}
/* 移动端(<640px)：隐藏预览按钮，单按钮宽度 */
@media (max-width: 640px) {
  .file-table .pv-link { display: none; }
  .file-table thead th:nth-child(7) { width: 84px; }
}

/* 预览弹窗移动端适配 */
@media (max-width: 640px) {
  .preview-overlay { padding: var(--space-xs); }
  .preview-body embed,
  .preview-body iframe { border-radius: var(--radius-sm); }
  .pv-text-wrap { max-width: 100%; }
  .pv-text { font-size: 0.7rem; padding: var(--space-sm); }
  .preview-header .pv-title { font-size: 0.78rem; }
  .fi-preview-btn { font-size: 0.8rem; padding: 7px 16px; }
}

/* 文件详情页预览区移动端适配 */
@media (max-width: 640px) {
  .fd-preview-body { max-height: 85vh; }
  .fd-preview-body .pv-viewer { max-height: 75vh; }
  .fd-preview-body .pv-text { max-height: 70vh; }
}

/* ═══════════════════════════════════════════════════════════════
   Iter 7: 公开资料卡片 + 用户数据
   ═══════════════════════════════════════════════════════════════ */

.profile-section-title {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--ink);
}

.profile-public-card {
  background: var(--raised);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.profile-public-card .ppc-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.profile-public-card .ppc-hint {
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-bottom: var(--space-md);
  line-height: 1.5;
}

.profile-public-card .ppc-field {
  margin-bottom: var(--space-sm);
}

.profile-public-card .ppc-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.profile-public-card .ppc-field input,
.profile-public-card .ppc-field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: var(--sans);
  background: var(--surface);
  color: var(--ink);
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.profile-public-card .ppc-field input:focus,
.profile-public-card .ppc-field textarea:focus {
  outline: none;
  border-color: var(--primary-light);
}

.profile-public-card .ppc-field textarea {
  resize: vertical;
  min-height: 72px;
}

.ppc-char-count {
  font-size: 0.75rem;
  color: var(--ink-faint);
  text-align: right;
  margin-top: 2px;
}

.ppc-save-btn {
  margin-top: var(--space-sm);
  padding: 8px 24px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: var(--sans);
  cursor: pointer;
  transition: background 0.15s;
}

.ppc-save-btn:hover { background: var(--primary-dark); }

.ppc-bio-text {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.6;
  white-space: pre-wrap;
}

.ppc-bio-empty {
  font-size: 0.85rem;
  color: var(--ink-faint);
  font-style: italic;
}

/* 用户数据三栏卡片 */
.user-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.user-stat-card {
  background: var(--raised);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
}

.user-stat-card .usc-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.user-stat-card .usc-label {
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   Iter 7: 用户排行榜
   ═══════════════════════════════════════════════════════════════ */

.leaderboard-tabs {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.leaderboard-tabs .lb-tab {
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--raised);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--sans);
  user-select: none;
}

.leaderboard-tabs .lb-tab:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: var(--primary-surface);
}

.leaderboard-tabs .lb-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.leaderboard-table-wrap {
  background: var(--raised);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table th {
  padding: 12px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-faint);
  text-align: left;
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
}

.leaderboard-table td {
  padding: 12px 16px;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.leaderboard-table tr:last-child td { border-bottom: none; }
.leaderboard-table tr:hover td { background: var(--primary-surface); }

.lb-rank {
  font-weight: 700;
  color: var(--ink-faint);
  width: 40px;
  text-align: center;
}

.lb-rank.top-1 { color: oklch(0.6 0.15 70); }
.lb-rank.top-2 { color: oklch(0.55 0.08 210); }
.lb-rank.top-3 { color: oklch(0.5 0.1 40); }

.lb-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
}

.lb-avatar-placeholder {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary-surface);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  flex-shrink: 0;
}

.lb-user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lb-user-name {
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
  transition: opacity 0.15s;
}

.lb-user-name:hover { opacity: 0.7; }

.lb-count {
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* 排行榜翻页 */
.leaderboard-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: var(--space-md);
  border-top: 1px solid var(--border-light);
}

.leaderboard-pagination button {
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--raised);
  color: var(--ink-soft);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--sans);
}

.leaderboard-pagination button:hover {
  border-color: var(--primary-light);
  background: var(--primary-surface);
  color: var(--primary);
}

.leaderboard-pagination button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.leaderboard-pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════
   Iter 7: 用户公开页
   ═══════════════════════════════════════════════════════════════ */

.user-public-card {
  background: var(--raised);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
}

.user-public-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.user-public-avatar-placeholder {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--primary-surface);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 600;
  flex-shrink: 0;
}

.user-public-info { flex: 1; min-width: 0; }

.user-public-info .upi-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.user-public-info .upi-bio {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.6;
  white-space: pre-wrap;
}

.user-public-info .upi-contact {
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin-top: 8px;
}

.user-public-materials {
  margin-top: var(--space-md);
}

/* ═══════════════════════════════════════════════════════════════
   Iter 7: 首页上传按钮
   ═══════════════════════════════════════════════════════════════ */

.home-upload-section {
  text-align: center;
  padding: 0 0 var(--space-md);
}
.home-upload-section--navcards { display: none; } /* 默认隐藏宽屏版 */

.home-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 48px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-size: 1.05rem;
  font-weight: 600;
  font-family: var(--sans);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  box-shadow: 0 2px 12px oklch(from var(--primary) l c h / 0.25);
}

.home-upload-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.home-upload-btn:active {
  transform: translateY(0);
}

.home-upload-btn svg {
  width: 22px;
  height: 22px;
}

.home-materials-count {
  margin-top: var(--space-sm);
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.home-materials-count strong {
  color: var(--accent);
  font-weight: 700;
}

/* 宽屏（≥ 641px，与 nav-card 三列并排的断点对齐）：按钮移到三个卡片下方 */
@media (min-width: 641px) {
  .home-upload-section--hero { display: none; }
  .home-upload-section--navcards {
    display: block;
    padding: var(--space-lg) 0;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Iter 7: 公告系统
   ═══════════════════════════════════════════════════════════════ */

.announcement-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.announcement-create-btn {
  padding: 8px 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: var(--sans);
  cursor: pointer;
  transition: background 0.15s;
}

.announcement-create-btn:hover { background: var(--primary-dark); }

.announcement-item {
  background: var(--raised);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
}

.announcement-item .ai-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.announcement-item .ai-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  flex-shrink: 0;
}

.announcement-item .ai-avatar-placeholder {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary-surface);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  flex-shrink: 0;
}

.announcement-item .ai-title {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.announcement-item .ai-delete {
  width: 30px; height: 30px;
  border: none;
  background: none;
  color: var(--ink-faint);
  cursor: pointer;
  font-size: 1.1rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.announcement-item .ai-delete:hover {
  background: oklch(from var(--accent) l c h / 0.12);
  color: var(--accent);
}

.announcement-item .ai-content {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.7;
  white-space: pre-wrap;
  margin-top: var(--space-xs);
}

.announcement-item .ai-time {
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin-top: var(--space-sm);
}

/* 公告编辑器 overlay */
.announcement-editor-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: oklch(0 0 0 / 0.4);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}

.announcement-editor-dialog {
  background: var(--raised);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  width: 100%;
  max-width: 560px;
  max-height: 80vh;
  overflow-y: auto;
}

.announcement-editor-dialog h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
}

.announcement-editor-dialog input,
.announcement-editor-dialog textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--sans);
  background: var(--surface);
  color: var(--ink);
  box-sizing: border-box;
  margin-bottom: var(--space-sm);
}

.announcement-editor-dialog input:focus,
.announcement-editor-dialog textarea:focus {
  outline: none;
  border-color: var(--primary-light);
}

.announcement-editor-dialog textarea {
  resize: vertical;
  min-height: 140px;
}

.ae-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.ae-actions button {
  padding: 9px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: var(--sans);
  cursor: pointer;
  transition: all 0.15s;
}

.ae-actions .ae-publish {
  background: var(--primary);
  color: #fff;
  border: none;
}

.ae-actions .ae-publish:hover { background: var(--primary-dark); }

.ae-actions .ae-cancel {
  background: none;
  border: 1px solid var(--border);
  color: var(--ink-soft);
}

.ae-actions .ae-cancel:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.ae-error {
  font-size: 0.82rem;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

/* ═══════════════════════════════════════════════════════════════
   Iter 7: 侧边栏排行榜图标
   ═══════════════════════════════════════════════════════════════ */

.gi-nav-leaderboard {
  width: 18px;
  height: 18px;
  display: inline-flex;
  gap: 2.5px;
  align-items: flex-end;
  flex-shrink: 0;
}

.gi-nav-leaderboard::before {
  content: '';
  display: block;
  width: 4px;
  height: 18px;
  background: currentColor;
  border-radius: 1px;
}

.gi-nav-leaderboard::after {
  content: '';
  display: block;
  width: 4px;
  height: 13px;
  background: currentColor;
  border-radius: 1px;
  opacity: 0.7;
}

/* 第三个竖条通过 shadow 伪元素 */
.gi-nav-leaderboard span {
  display: block;
  width: 4px;
  height: 9px;
  background: currentColor;
  border-radius: 1px;
  opacity: 0.45;
}

@media (max-width: 640px) {
  .user-stats-row { grid-template-columns: 1fr 1fr 1fr; gap: var(--space-sm); }
  .user-public-card { flex-direction: column; align-items: center; text-align: center; }
  .announcement-item .ai-header { flex-wrap: wrap; }
  .leaderboard-table th, .leaderboard-table td { padding: 10px 10px; font-size: 0.8rem; }
}
/* ═══════════════════════════════════════════════════════════
   筛选排序下拉
   ═══════════════════════════════════════════════════════════ */

.fa-filter-bar {
  display: inline-flex;
  gap: 6px;
  margin-left: 10px;
  vertical-align: middle;
}

.fa-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 0.78rem;
  background: var(--raised);
  border: 1px solid var(--border-light, #ddd);
  border-radius: 6px;
  cursor: pointer;
  color: var(--ink, #333);
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}

.fa-filter-btn:hover {
  border-color: var(--primary);
  background: oklch(0.95 0.02 250);
}

.filter-dropdown {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 16px oklch(0 0 0 / 0.12);
  min-width: 140px;
  padding: 4px 0;
  font-size: 0.82rem;
}

.filter-dd-header {
  padding: 6px 12px;
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 0.75rem;
  border-bottom: 1px solid #eee;
}

.filter-dd-item {
  padding: 7px 12px;
  cursor: pointer;
  color: #333;
  transition: background 0.1s;
}

.filter-dd-item:hover {
  background: oklch(0.95 0.02 250);
}

.filter-dd-item.filter-dd-active {
  background: oklch(0.92 0.04 250);
  font-weight: 600;
  color: var(--primary-dark);
}

/* ═══════════════════════════════════════════════════════════
   文件详情页
   ═══════════════════════════════════════════════════════════ */

.fd-container {
  max-width: none;
  margin: 0 auto;
  padding: 0 32px 40px;
}

.fd-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (max-width: 640px) {
  .fd-container { padding: 0 20px 40px; }
}

/* 顶部信息区 — 单列 flex，宽屏时右侧 uploader 绝对定位 */
.fd-info-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 顶栏：面包屑 + 上传者卡片并排 */
.fd-top-row {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 12px;
}

.fd-top-row .breadcrumb {
  flex: 1;
  min-width: 0;
}

@media (max-width: 768px) {
  .fd-top-row {
    flex-direction: column;
    gap: 8px;
  }
}

/* 宽屏：uploader 绝对定位到右侧，不与标题共享行高 */
@media (min-width: 769px) {
  .fd-info-area {
    position: relative;
    padding-right: 180px;
    gap: 12px;
  }
  .fd-info-area .fd-uploader-card {
    position: absolute;
    top: 0;
    right: 0;
    width: 160px;
  }
}

/* 窄屏：uploader 置顶 */
@media (max-width: 768px) {
  .fd-info-area .fd-uploader-card {
    order: -1;
  }
}

.fd-title-area {
  align-self: start;
}

.fd-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.4;
  color: var(--ink, #222);
  word-break: break-word;
}

.fd-editable {
  cursor: text;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.15s;
}

.fd-editable:hover {
  border-bottom-color: var(--primary);
}

.fd-pen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 2px 4px;
  margin-left: 4px;
  opacity: 0.4;
  transition: opacity 0.15s;
  vertical-align: middle;
}

.fd-pen:hover {
  opacity: 1;
}

.fd-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 4px;
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

.fd-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.fd-meta-icon {
  font-size: 0.75rem;
  opacity: 0.7;
}

.fd-meta-sep {
  color: #ccc;
  margin: 0 2px;
  user-select: none;
}

/* 类型下拉（管理模式） */
.fd-type-dropdown-wrap {
  display: inline-block;
  margin-left: 4px;
}

.fd-type-select {
  font-size: 0.78rem;
  padding: 1px 4px;
  border: 1px solid var(--border-light, #ddd);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

/* 简介卡片 */
.fd-desc-card {
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 12px 14px;
  min-height: 60px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* 上传者卡片 */
.fdu-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  background: var(--raised);
  border: 1px solid var(--border-light, #e0e0e0);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
  box-sizing: border-box;
}

.fdu-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px oklch(0 0 0 / 0.06);
}

.fdu-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 600;
  flex-shrink: 0;
}

.fdu-info {
  text-align: center;
}

.fdu-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink, #333);
}

.fdu-label {
  font-size: 0.7rem;
  color: var(--ink-faint, #999);
  margin-top: 2px;
}

/* 窄屏：上传者卡片变为横向 */
@media (max-width: 768px) {
  .fdu-card {
    flex-direction: row;
    gap: 10px;
    padding: 10px 14px;
  }
  .fdu-avatar {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }
  .fdu-info {
    text-align: left;
  }
}

/* 操作按钮区 */
.fd-actions {
  margin: 4px 0;
}

.fd-actions-inner {
  display: flex;
  gap: 10px;
  align-items: center;
}

.fd-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  font-size: 0.88rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s;
  white-space: nowrap;
}

.fd-btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.fd-btn-primary:hover {
  background: color-mix(in srgb, var(--primary) 85%, #000);
}

.fd-btn-secondary {
  background: #fff;
  color: var(--ink, #333);
  border-color: #ccc;
}

.fd-btn-secondary:hover {
  border-color: var(--primary);
  background: oklch(0.97 0.01 250);
}

.fd-btn-danger {
  background: #fff;
  color: #c23a2b;
  border-color: #e0b8b4;
}

.fd-btn-danger:hover {
  background: #fef2f0;
  border-color: #c23a2b;
  box-shadow: 0 0 0 1px rgba(194,58,43,0.2);
}

/* 收藏按钮动效：已收藏状态 */
.fd-btn-fav.favorited {
  background: #FFFBEA;
  border-color: #D4A843;
  color: #8B7500;
}

.fd-btn-fav.favorited:hover {
  background: #FFF5D6;
  border-color: #C49A2E;
}

/* 上传者头像图片 */
.fdu-avatar-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .fdu-avatar-img {
    width: 36px;
    height: 36px;
  }
}

/* 预览区 */
.fd-preview-area {
  background: #fff;
  border: 1px solid var(--border-light, #e0e0e0);
  border-radius: 12px;
  overflow: hidden;
}

.fd-preview-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink, #333);
  border-bottom: 1px solid var(--border-light, #e8e8e8);
}

.pv-hint {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--ink-faint, #999);
  font-weight: 400;
  white-space: nowrap;
}

.fd-preview-body {
  min-height: 400px;
  max-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

.fd-preview-body .pv-viewer {
  width: 100%;
  height: 100%;
  min-height: 400px;
  max-height: calc(100vh - 60px);
}

.fd-preview-body .pv-text-wrap {
  width: 100%;
  height: 100%;
}

.fd-preview-body .pv-text {
  max-height: calc(100vh - 100px);
  overflow: auto;
}

/* 管理模式类型下拉 */
.mgmt-type-dropdown-wrap {
  display: inline-block;
  margin-left: 3px;
}

.mgmt-type-select {
  font-size: 0.72rem;
  padding: 0px 2px;
  border: 1px solid var(--border-light, #ddd);
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
  max-width: 70px;
}

/* 收藏量列宽 */
.file-table th.th-favcount,
.file-table td.ft-favcount {
  width: 60px;
  text-align: center;
}
