/* ============================================================
   资源管理系统 · 设计系统
   ============================================================ */
:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafd;
  --line: #e8ecf4;
  --line-strong: #d9e0ec;
  --text: #141b2d;
  --text-2: #4b5568;
  --muted: #8a93a7;
  --brand: #2f5fe0;
  --brand-600: #2a55cd;
  --brand-700: #1d3fa8;
  --brand-soft: #eef2ff;
  --brand-line: #dbe4ff;
  --teal: #0f9f92;
  --teal-soft: #e8f7f5;
  --amber: #d79422;
  --amber-soft: #fdf4e3;
  --danger: #d64545;
  --danger-soft: #fdeeee;
  --ok: #17936f;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-xs: 0 1px 2px rgba(20, 32, 60, .05);
  --shadow-sm: 0 4px 14px -6px rgba(20, 32, 60, .12);
  --shadow-md: 0 18px 40px -22px rgba(20, 32, 60, .28);
  --shadow-lg: 0 30px 70px -30px rgba(12, 24, 56, .42);
  --sidebar-w: 256px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: var(--brand); text-decoration: none; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; }
svg { flex: none; width: 16px; height: 16px; }
::selection { background: #d8e2ff; color: #12224a; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #ccd4e2; border-radius: 20px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #b4bfd3; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 启动屏 ---------------- */
.boot {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px; background: var(--bg); z-index: 100;
}
.boot-mark {
  width: 54px; height: 54px; border-radius: 16px; color: #fff; display: grid; place-items: center;
  background: linear-gradient(140deg, #2f5fe0, #6b8cff);
  box-shadow: 0 14px 30px -12px rgba(47, 95, 224, .7);
  animation: bootPulse 1.4s var(--ease) infinite;
}
.boot-mark svg { width: 26px; height: 26px; }
.boot-text { color: var(--muted); font-size: 13px; letter-spacing: .4px; }
@keyframes bootPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* ---------------- 布局 ---------------- */
#shell { min-height: 100vh; }
.sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; width: var(--sidebar-w);
  background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 14px 16px; z-index: 30;
}
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.view { flex: 1; width: 100%; max-width: 1420px; margin: 0 auto; padding: 26px 34px 64px; }

/* 品牌 */
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 20px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, #2f5fe0 0%, #5b82f7 100%);
  box-shadow: 0 10px 22px -10px rgba(47, 95, 224, .85);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; border-radius: inherit; }
.brand-name { font-size: 15.5px; font-weight: 700; letter-spacing: .3px; line-height: 1.25; }
.brand-sub { font-size: 10px; letter-spacing: 1.6px; color: #9aa3b5; text-transform: uppercase; margin-top: 2px; }

/* 导航 */
.nav { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
.nav-label {
  font-size: 10.5px; letter-spacing: 1.5px; color: #a2aabd; font-weight: 600;
  padding: 16px 10px 7px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 11px;
  border-radius: 10px; color: var(--text-2); font-size: 13.5px; font-weight: 500;
  cursor: pointer; border: 1px solid transparent; transition: .16s var(--ease); white-space: nowrap;
}
.nav-item svg { width: 17px; height: 17px; opacity: .78; }
.nav-item:hover { background: #f6f8fd; color: var(--text); }
.nav-item.active {
  background: linear-gradient(92deg, #eff3ff, #f8faff);
  border-color: var(--brand-line); color: var(--brand-700); font-weight: 600;
}
.nav-item.active svg { opacity: 1; color: var(--brand); }
.nav-item .nav-count {
  margin-left: auto; font-size: 11px; color: #8b95aa; background: #f1f4fa;
  border-radius: 20px; padding: 1px 7px; min-width: 22px; text-align: center;
}
.nav-item.active .nav-count { background: #e3eaff; color: var(--brand-700); }

.side-foot { margin-top: auto; padding-top: 14px; }
.user-card {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.user-card .u-name { font-size: 13px; font-weight: 600; line-height: 1.3; }
.user-card .u-role { font-size: 11px; color: var(--muted); }
.user-card .u-actions { margin-left: auto; display: flex; gap: 2px; }
.user-card .u-out {
  width: 28px; height: 28px; border-radius: 8px; border: none; background: transparent;
  color: #98a1b3; display: grid; place-items: center; cursor: pointer; transition: .15s;
}
.user-card .u-out:hover { background: #fff; color: var(--brand); box-shadow: var(--shadow-xs); }
.user-card .u-out#logoutBtn:hover { color: var(--danger); }
.user-card .u-out svg { width: 15px; height: 15px; }

/* 顶栏 */
.topbar {
  height: 66px; position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px; padding: 0 34px;
  background: rgba(255, 255, 255, .82); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-title { font-size: 15px; font-weight: 650; letter-spacing: .2px; display: flex; align-items: center; gap: 8px; }
.topbar-title .crumb { color: var(--muted); font-weight: 500; font-size: 13px; }
.topbar-title .sep { color: #c7cedd; font-weight: 400; }
.topbar-spacer { flex: 1; }

.search { position: relative; width: 300px; max-width: 38vw; }
.search input {
  width: 100%; height: 38px; border-radius: 10px; border: 1px solid var(--line);
  background: #f7f9fd; padding: 0 12px 0 36px; font-size: 13px; color: var(--text);
  transition: .16s var(--ease);
}
.search input::placeholder { color: #a3abbd; }
.search input:focus { outline: none; background: #fff; border-color: #b9caf5; box-shadow: 0 0 0 4px rgba(47, 95, 224, .09); }
.search .search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #9ba4b8; }
.search .search-icon svg { width: 16px; height: 16px; }
.search-panel {
  position: absolute; top: 46px; left: 0; right: 0; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; max-height: 420px; overflow-y: auto; z-index: 40;
}
.search-hit {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; cursor: pointer;
}
.search-hit:hover { background: var(--surface-2); }
.search-hit .t { font-size: 13px; font-weight: 550; line-height: 1.35; }
.search-hit .s { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.search-empty { padding: 18px 12px; color: var(--muted); font-size: 12.5px; text-align: center; }

.role-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px;
  border-radius: 20px; background: #f2f5fc; border: 1px solid var(--line); color: var(--text-2);
  font-size: 12px; font-weight: 550;
}
.role-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(23, 147, 111, .13); }
.role-pill.admin { background: #eef2ff; border-color: var(--brand-line); color: var(--brand-700); }
.role-pill.editor { background: #e8f7f4; border-color: #cfeee8; color: #0b6f65; }
.role-pill.editor .dot { background: var(--teal); box-shadow: 0 0 0 3px rgba(15, 159, 146, .15); }

.menu-btn { display: none; }

/* 弹窗内的密码行与创建结果 */
.pwd-row { display: flex; gap: 8px; align-items: center; }
.pwd-row .input { flex: 1; min-width: 0; }
.pwd-row .btn { flex: none; height: 42px; }
.cred-success { text-align: center; padding: 10px 0 2px; }
.cred-ico {
  width: 50px; height: 50px; border-radius: 50%; margin: 0 auto 12px;
  background: #e7f7f1; color: var(--ok); display: grid; place-items: center;
}
.cred-ico svg { width: 24px; height: 24px; }
.cred-title { font-size: 15px; font-weight: 680; }
.cred-sub { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.7; }
.cred-box {
  margin: 16px 0 6px; border: 1px dashed var(--line-strong); border-radius: 12px;
  background: var(--surface-2); padding: 4px 14px;
}
.cred-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.cred-row:last-child { border-bottom: none; }
.cred-row span { font-size: 12px; color: var(--muted); }
.cred-row b { font-size: 14px; letter-spacing: .4px; user-select: all; }

/* ---------------- 通用组件 ---------------- */
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700; letter-spacing: .3px; color: var(--brand-700);
  background: linear-gradient(140deg, #dde6ff, #f0f4ff); border: 1px solid #d9e3ff; flex: none;
}
.avatar.lg { width: 42px; height: 42px; font-size: 14px; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.admin { color: #8a5a00; background: linear-gradient(140deg, #ffeecb, #fff8ea); border-color: #f3dfb4; }
.avatar.editor { color: #0b6f65; background: linear-gradient(140deg, #d9f4ef, #f0fbf9); border-color: #c9ece6; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 15px; border-radius: 10px; font-size: 13px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: .16s var(--ease);
  user-select: none;
}
.btn svg { width: 15px; height: 15px; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }
.btn-primary {
  background: linear-gradient(135deg, #2f5fe0, #4a78f2); color: #fff;
  box-shadow: 0 8px 18px -10px rgba(47, 95, 224, .9);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 24px -12px rgba(47, 95, 224, .95); }
.btn-ghost { background: #fff; border-color: var(--line-strong); color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { border-color: #bfcbe4; color: var(--text); background: #fbfcff; }
.btn-soft { background: var(--brand-soft); color: var(--brand-700); }
.btn-soft:hover:not(:disabled) { background: #e4ebff; }
.btn-danger { background: var(--danger-soft); color: #b93a3a; }
.btn-danger:hover:not(:disabled) { background: #fbdede; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12px; border-radius: 8px; }
.btn-sm svg { width: 13px; height: 13px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 14px; border-radius: 12px; }
.btn-block { width: 100%; }

.icon-btn {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid transparent; background: transparent;
  color: #7c869c; display: inline-grid; place-items: center; cursor: pointer; transition: .15s;
}
.icon-btn:hover { background: #f2f5fb; color: var(--text); }
.icon-btn:disabled { opacity: .3; cursor: not-allowed; background: transparent; }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.icon-btn svg { width: 16px; height: 16px; }

.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.input, .select, .textarea {
  width: 100%; height: 42px; border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 0 13px; font-size: 13.5px; background: #fff; color: var(--text); transition: .16s var(--ease);
}
.textarea { height: auto; min-height: 84px; padding: 10px 13px; resize: vertical; line-height: 1.6; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a93a7' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: #97b0f2; box-shadow: 0 0 0 4px rgba(47, 95, 224, .10); }
.input::placeholder, .textarea::placeholder { color: #a8b1c3; }
.input:disabled { background: #f7f9fd; color: var(--muted); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.card-pad { padding: 22px 24px; }
.section-head { display: flex; align-items: center; gap: 12px; margin: 34px 0 14px; }
.section-head h2 { font-size: 16.5px; font-weight: 680; letter-spacing: .2px; }
.section-head .sub { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.section-head .spacer { flex: 1; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 7px;
  border-radius: 6px; font-size: 11px; font-weight: 600; letter-spacing: .2px; line-height: 1;
}
.badge-ppt { background: #fff2e5; color: #c2610b; }
.badge-doc { background: #eaf1ff; color: #2557c9; }
.badge-video { background: #f4ecff; color: #7a3fc4; }
.badge-pdf { background: #fdecea; color: #c0392b; }
.badge-gray { background: #f1f4fa; color: #5d6a83; }
.badge-ok { background: #e7f7f1; color: #0f7a5c; }
.badge-warn { background: #fdf3e2; color: #b37612; }
.badge-err { background: #fdecec; color: #b93a3a; }
.badge-brand { background: var(--brand-soft); color: var(--brand-700); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px;
  border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--text-2);
  font-size: 12.5px; font-weight: 550; cursor: pointer; transition: .15s var(--ease);
}
.chip:hover { border-color: #c5d1e8; color: var(--text); }
.chip.active { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-700); }
.chip .n { font-size: 11px; color: var(--muted); }
.chip.active .n { color: var(--brand); }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-variant-numeric: tabular-nums; }

.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 60px 24px; gap: 7px; color: var(--muted);
}
.empty .ico {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center;
  background: #f2f5fb; color: #a3aec4; margin-bottom: 6px;
}
.empty .ico svg { width: 24px; height: 24px; }
.empty .t { font-size: 14px; font-weight: 600; color: var(--text-2); }
.empty .d { font-size: 12.5px; max-width: 340px; line-height: 1.7; }

.skeleton { background: linear-gradient(90deg, #eef1f7 25%, #f6f8fc 37%, #eef1f7 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* 提示 */
.toast-root { position: fixed; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast {
  display: flex; align-items: flex-start; gap: 10px; min-width: 240px; max-width: 380px;
  padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); font-size: 13px; color: var(--text); animation: toastIn .22s var(--ease);
}
.toast svg { width: 17px; height: 17px; margin-top: 1px; }
.toast.ok svg { color: var(--ok); }
.toast.err svg { color: var(--danger); }
.toast.info svg { color: var(--brand); }
.toast.out { animation: toastOut .18s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }

/* 弹窗 */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 24, 45, .42); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 150;
  animation: fadeIn .16s var(--ease);
}
.modal {
  width: 100%; max-width: 480px; max-height: 88vh; display: flex; flex-direction: column;
  background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden;
  animation: modalIn .22s var(--ease);
}
.modal.wide { max-width: 620px; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 20px 22px 14px; }
.modal-head h3 { font-size: 15.5px; font-weight: 680; }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 4px 22px 6px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 22px 20px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.985); } }
@keyframes fadeIn { from { opacity: 0; } }

/* ---------------- 登录 ---------------- */
.login {
  position: relative; min-height: 100vh; overflow: hidden;
  display: flex; align-items: center; justify-content: center; padding: 44px 20px;
  background:
    radial-gradient(900px 540px at 6% -8%, rgba(47, 95, 224, .16), transparent 62%),
    radial-gradient(760px 520px at 104% 106%, rgba(15, 159, 146, .13), transparent 62%),
    linear-gradient(180deg, #f8fafe 0%, #eef2fa 100%);
}
.login::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(20, 40, 90, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 40, 90, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 38%, #000 0%, transparent 72%);
}
.login-card {
  position: relative; width: 100%; max-width: 440px; background: #fff;
  border: 1px solid var(--line); border-radius: 22px; padding: 32px 36px 26px;
  box-shadow: 0 44px 90px -54px rgba(15, 32, 68, .55), 0 2px 6px rgba(15, 32, 68, .04);
}
.login-logo { margin-bottom: 22px; }
.login-logo .brand-mark { width: 44px; height: 44px; border-radius: 13px; }
.eyebrow { font-size: 11px; letter-spacing: 2.2px; color: var(--brand); font-weight: 700; text-transform: uppercase; }
.login-card h2 { font-size: 26px; font-weight: 720; margin: 0; letter-spacing: .3px; }
.login-card .lead { color: var(--muted); font-size: 13px; margin-top: 8px; line-height: 1.75; }
.login-form { margin-top: 26px; }
.login-form .field > label { font-size: 12.5px; }
.login-form .input { height: 46px; border-radius: 11px; font-size: 14px; padding-left: 40px; }
.input-wrap { position: relative; }
.input-wrap .lead-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #9aa4b8; pointer-events: none; }
.input-wrap .lead-icon svg { width: 17px; height: 17px; }
.input-wrap .peek {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: none; background: transparent;
  color: #9aa4b8; cursor: pointer; padding: 6px; border-radius: 7px; display: grid; place-items: center;
}
.input-wrap .peek:hover { color: var(--text-2); background: #f3f6fc; }
.input-wrap .peek svg { width: 16px; height: 16px; }
.login-form .btn { margin-top: 6px; }
.login-error {
  display: none; align-items: flex-start; gap: 7px; background: #fdecec; color: #b93a3a; font-size: 12.5px;
  padding: 9px 12px; border-radius: 9px; margin-bottom: 14px; border: 1px solid #f8dada; line-height: 1.6;
}
.login-error.show { display: flex; }
.login-error svg { width: 15px; height: 15px; margin-top: 1px; }
.caps-hint {
  display: flex; align-items: center; gap: 5px; margin-top: 6px;
  color: #b37612; font-size: 11.5px;
}
.caps-hint[hidden] { display: none; }
.caps-hint svg { width: 13px; height: 13px; }
.login-hint {
  margin-top: 20px; padding: 11px 13px; border-radius: 11px; background: var(--surface-2);
  border: 1px dashed var(--line-strong); font-size: 11.5px; color: var(--muted); line-height: 1.8;
}
.login-hint b { color: var(--text-2); font-weight: 600; }
.login-hint code { background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: 11px; color: var(--brand-700); }
.login-foot { margin-top: 18px; text-align: center; font-size: 11px; color: #a3abbd; letter-spacing: .3px; }
/* ---------------- 工作台 ---------------- */
.hero {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 30px 34px;
  color: #fff; background:
    radial-gradient(560px 280px at 92% -30%, rgba(122, 156, 255, .75), transparent 60%),
    linear-gradient(122deg, #101f45 0%, #1d3a80 48%, #2f5fe0 100%);
  box-shadow: 0 26px 50px -34px rgba(19, 39, 92, .85);
  display: flex; gap: 26px; align-items: stretch;
}
.hero::after {
  content: ""; position: absolute; right: -70px; top: -90px; width: 340px; height: 340px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 0 0 46px rgba(255, 255, 255, .04), 0 0 0 112px rgba(255, 255, 255, .022);
}
.hero-main { position: relative; flex: 1; min-width: 0; }
.hero .eyebrow { font-size: 11.5px; letter-spacing: 2px; color: rgba(255, 255, 255, .55); text-transform: uppercase; font-weight: 600; }
.hero h1 { font-size: 27px; font-weight: 700; margin-top: 8px; letter-spacing: .4px; }
.hero h1 span { color: #a8c2ff; }
.hero p { margin-top: 9px; font-size: 13px; color: rgba(255, 255, 255, .66); }
.hero-side { position: relative; display: flex; gap: 10px; align-items: center; }
.hero-stat {
  min-width: 96px; padding: 13px 16px; border-radius: 14px; text-align: center;
  background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(8px);
}
.hero-stat b { display: block; font-size: 22px; font-weight: 700; letter-spacing: .5px; }
.hero-stat span { font-size: 11px; color: rgba(255, 255, 255, .6); letter-spacing: .6px; }
.hero-actions { display: flex; gap: 9px; margin-top: 20px; flex-wrap: wrap; }
.hero-actions .btn { height: 34px; font-size: 12.5px; }
.hero-actions .btn-light { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .22); }
.hero-actions .btn-light:hover { background: rgba(255, 255, 255, .22); }
.hero-actions .btn-white { background: #fff; color: #1c3a80; }

.area-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; margin-top: 18px; }
.area-card {
  position: relative; overflow: hidden; display: flex; gap: 18px; padding: 22px 24px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  cursor: pointer; transition: .22s var(--ease); box-shadow: var(--shadow-xs);
}
.area-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #d5e0f8; }
.area-card .glow { position: absolute; right: -60px; top: -70px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, #2f5fe0, transparent 68%); opacity: .10; }
.area-card.amber .glow { background: radial-gradient(circle, #e8a838, transparent 68%); opacity: .16; }
.area-card.teal .glow { background: radial-gradient(circle, #0f9f92, transparent 68%); opacity: .14; }
.area-ico {
  width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; flex: none;
  background: linear-gradient(140deg, #e9efff, #f6f9ff); color: var(--brand); border: 1px solid #dfe8ff;
}
.area-ico svg { width: 24px; height: 24px; }
.area-card.amber .area-ico { background: linear-gradient(140deg, #fff3dc, #fffaef); color: #b97b12; border-color: #f6e3bf; }
.area-card.teal .area-ico { background: linear-gradient(140deg, #e2f7f4, #f4fdfb); color: #0d8277; border-color: #cbeee8; }
.area-body { position: relative; min-width: 0; flex: 1; }
.area-body h3 { font-size: 15.5px; font-weight: 680; display: flex; align-items: center; gap: 8px; }
.area-body p { font-size: 12.5px; color: var(--muted); margin-top: 5px; line-height: 1.65; }
.area-meta { display: flex; gap: 14px; margin-top: 13px; font-size: 11.5px; color: var(--muted); }
.area-meta b { color: var(--text); font-weight: 650; font-size: 13px; }
.area-card .enter { align-self: center; color: #b7c1d4; transition: .2s; }
.area-card:hover .enter { color: var(--brand); transform: translateX(3px); }
.area-card .enter svg { width: 18px; height: 18px; }

.area-row { display: flex; align-items: center; gap: 10px; margin: 22px 0 12px; }
.area-row-name { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 650; }
.area-row-name svg { width: 15px; height: 15px; color: var(--brand); }
.area-row-meta { font-size: 11.5px; color: var(--muted); }
.area-row .spacer { flex: 1; }

.folder-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.folder-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px;
  padding: 18px 19px 15px; border-radius: var(--radius); background: #fff;
  border: 1px solid var(--line); cursor: pointer; transition: .2s var(--ease); box-shadow: var(--shadow-xs);
}
.folder-card:hover { transform: translateY(-2px); border-color: #d3dff8; box-shadow: var(--shadow-md); }
.folder-card .top { display: flex; align-items: flex-start; gap: 10px; }
.folder-ico {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none;
  background: linear-gradient(140deg, #f0f4ff, #fafbff); color: var(--brand); border: 1px solid #e4eafb;
}
.folder-ico svg { width: 18px; height: 18px; }
.folder-card.amber .folder-ico { background: linear-gradient(140deg, #fff4e2, #fffcf6); color: #b57a12; border-color: #f5e5c6; }
.folder-card.teal .folder-ico { background: linear-gradient(140deg, #e7f8f5, #f6fdfc); color: #0d8277; border-color: #d2efe9; }
.folder-card h4 { font-size: 14px; font-weight: 650; line-height: 1.45; }
.folder-card .desc { font-size: 12px; color: var(--muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; }
.folder-card .foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 11.5px; color: var(--muted); }
.folder-card .foot .kinds { display: flex; gap: 4px; }
.kind-dot { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; padding: 1px 5px; border-radius: 4px; background: #f4f6fb; color: #6b768c; }
.kind-dot--folder { background: #eef2ff; color: #2f5fe0; }
.folder-card .foot .time { margin-left: auto; }

.recent-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.recent-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line); cursor: pointer; transition: .16s var(--ease);
}
.recent-item:hover { border-color: #d3dff8; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.recent-item .t { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-item .s { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.recent-item .go { margin-left: auto; color: #b9c3d6; }
.recent-item:hover .go { color: var(--brand); }

/* ---------------- 区域 / 目录页 ---------------- */
.page-head { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 22px; }
.page-head .ico {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: none;
  background: linear-gradient(140deg, #e9efff, #f7f9ff); color: var(--brand); border: 1px solid #e0e8fb;
}
.page-head .ico.amber { background: linear-gradient(140deg, #fff2da, #fffbf3); color: #b97b12; border-color: #f6e3bf; }
.page-head .ico.teal { background: linear-gradient(140deg, #e2f7f4, #f5fdfb); color: #0d8277; border-color: #cbeee8; }
.page-head .ico svg { width: 24px; height: 24px; }
.page-head h1 { font-size: 22px; font-weight: 700; letter-spacing: .3px; line-height: 1.4; }
.page-head .desc { color: var(--muted); font-size: 12.5px; margin-top: 5px; max-width: 720px; line-height: 1.7; }
.page-head .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.meta-pill {
  display: inline-flex; align-items: center; gap: 5px; height: 25px; padding: 0 10px; border-radius: 20px;
  background: #fff; border: 1px solid var(--line); font-size: 11.5px; color: var(--text-2);
}
.meta-pill b { color: var(--text); font-weight: 650; }
.meta-pill svg { width: 12px; height: 12px; color: var(--muted); }

.breadcrumb { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); cursor: pointer; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb svg { width: 12px; height: 12px; color: #c2cada; }

.toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }

.res-list { display: flex; flex-direction: column; gap: 9px; }
.res-row {
  display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-radius: 13px;
  background: #fff; border: 1px solid var(--line); transition: .16s var(--ease); cursor: pointer;
}
.res-row:hover { border-color: #d3dff8; box-shadow: var(--shadow-sm); }
.res-ico {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex: none; position: relative;
}
.res-ico svg { width: 19px; height: 19px; }
.res-ico.ppt { background: #fff2e5; color: #c2610b; }
.res-ico.doc { background: #eaf1ff; color: #2557c9; }
.res-ico.video { background: #f4ecff; color: #7a3fc4; }
.res-ico.pdf { background: #fdecea; color: #c0392b; }
.res-ico .ext {
  position: absolute; bottom: -5px; right: -5px; font-size: 8.5px; font-weight: 700; letter-spacing: .3px;
  background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 0 3px; color: #6b768c;
}
.res-main { min-width: 0; flex: 1; }
.res-title { font-size: 13.5px; font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-sub { display: flex; align-items: center; gap: 10px; margin-top: 3px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.res-sub .dot { width: 3px; height: 3px; border-radius: 50%; background: #c9d0de; }
.res-actions { display: flex; align-items: center; gap: 6px; }

/* ---------------- 预览器 ---------------- */
.viewer {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column;
  background: #0d1424; color: #e7ecf5;
}
.viewer-top {
  height: 62px; flex: none; display: flex; align-items: center; gap: 14px; padding: 0 18px;
  background: rgba(14, 22, 40, .92); border-bottom: 1px solid rgba(255, 255, 255, .08); backdrop-filter: blur(12px);
}
.viewer-top .back {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06); color: #dbe3f2; display: grid; place-items: center; cursor: pointer;
}
.viewer-top .back:hover { background: rgba(255, 255, 255, .14); }
.viewer-title { min-width: 0; }
.viewer-title .t { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-title .s { font-size: 11px; color: #8d9ab3; margin-top: 2px; display: flex; gap: 8px; align-items: center; }
.viewer-top .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.viewer-badge {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 8px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); color: #a9b6cd; font-size: 11px;
  white-space: nowrap;
}
.viewer-badge svg { width: 12px; height: 12px; }
.viewer-body { flex: 1; position: relative; overflow: hidden; }
.viewer-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #eef1f7; }
.viewer-video { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #070b14; }
.viewer-video video { width: 100%; height: 100%; max-height: 100%; background: #000; outline: none; }
.viewer-state {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center; padding: 30px; color: #aab6cb; background: #0f1728;
}
.viewer-state .spin {
  width: 38px; height: 38px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .16);
  border-top-color: #6b93ff; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.viewer-state h3 { color: #e7ecf5; font-size: 15px; }
.viewer-state p { font-size: 12.5px; max-width: 420px; line-height: 1.8; }
.wm {
  position: absolute; inset: 0; pointer-events: none; z-index: 5; opacity: .55;
  background-repeat: repeat; background-position: 0 0;
}
.viewer[data-kind="pdf"] .viewer-frame { background: #525659; }

/* ---------------- 管理页 ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 13px; margin-bottom: 22px; }
.stat-card { padding: 16px 18px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.stat-card .k { font-size: 11.5px; color: var(--muted); letter-spacing: .3px; display: flex; align-items: center; gap: 6px; }
.stat-card .k svg { width: 13px; height: 13px; }
.stat-card .v { font-size: 25px; font-weight: 720; margin-top: 7px; letter-spacing: .4px; font-variant-numeric: tabular-nums; }
.stat-card .v small { font-size: 11px; color: var(--muted); font-weight: 500; margin-left: 3px; }

.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: .5px;
  padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 12px 16px; border-bottom: 1px solid #f0f3f9; font-size: 13px; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: #fbfcff; }
.table .who { display: flex; align-items: center; gap: 10px; }
.table .who .n { font-weight: 600; font-size: 13px; }
.table .who .u { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.table .actions { display: flex; justify-content: flex-end; gap: 2px; }
.table .num { font-variant-numeric: tabular-nums; }
.table .empty-cell { padding: 34px; text-align: center; color: var(--muted); font-size: 12.5px; }

.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.status-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.status-dot.off { color: var(--muted); }
.status-dot.off::before { background: #c3cada; }

.perm-layout { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: start; }
.perm-users { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.perm-users .head { padding: 14px 15px; border-bottom: 1px solid var(--line); }
.perm-users .list { max-height: calc(100vh - 280px); overflow-y: auto; padding: 7px; }
.perm-user {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer; transition: .14s;
}
.perm-user:hover { background: var(--surface-2); }
.perm-user.active { background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-line); }
.perm-user .n { font-size: 13px; font-weight: 600; }
.perm-user .u { font-size: 11px; color: var(--muted); }
.perm-user .cnt { margin-left: auto; font-size: 11px; color: var(--muted); background: #f0f3fa; border-radius: 20px; padding: 1px 7px; }
.perm-user.active .cnt { background: #fff; color: var(--brand-700); }

.perm-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); min-height: 420px; display: flex; flex-direction: column; }
.perm-panel .p-head { display: flex; align-items: center; gap: 12px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.perm-panel .p-head .n { font-size: 14.5px; font-weight: 680; }
.perm-panel .p-head .s { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.perm-panel .p-body { padding: 8px 20px 20px; overflow-y: auto; max-height: calc(100vh - 330px); }
.perm-panel .p-foot {
  margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px 20px;
  border-top: 1px solid var(--line); background: #fcfdff; border-radius: 0 0 var(--radius) var(--radius);
}
.perm-group { padding: 14px 0 4px; }
.perm-group + .perm-group { border-top: 1px dashed var(--line); }
.perm-group .g-head { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.perm-group .g-head .g-name { font-size: 13px; font-weight: 650; display: flex; align-items: center; gap: 7px; }
.perm-group .g-head svg { width: 15px; height: 15px; color: var(--brand); }
.perm-group .g-head .btn { margin-left: auto; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.perm-item {
  display: flex; align-items: flex-start; gap: 9px; padding: 10px 11px; border-radius: 9px;
  border: 1px solid var(--line); cursor: pointer; transition: .14s; background: #fff;
}
.perm-item:hover { border-color: #c9d6ef; background: #fcfdff; }
.perm-item.on { border-color: var(--brand-line); background: #f7f9ff; }
.perm-item input { margin: 2px 0 0; accent-color: var(--brand); width: 15px; height: 15px; }
.perm-item .pn { font-size: 12.5px; font-weight: 550; line-height: 1.45; }
.perm-item .pc { font-size: 11px; color: var(--muted); margin-top: 1px; }

.content-layout { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
.tree-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tree-panel .head { padding: 14px 15px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.tree-areas { display: flex; padding: 8px 10px 0; gap: 5px; flex-wrap: wrap; }
.tree-area {
  font-size: 11.5px; padding: 4px 9px; border-radius: 7px; cursor: pointer; color: var(--text-2); border: 1px solid transparent;
}
.tree-area.on { background: var(--brand-soft); color: var(--brand-700); border-color: var(--brand-line); font-weight: 600; }
.tree-folders { padding: 7px; max-height: calc(100vh - 300px); overflow-y: auto; }
.tree-folder {
  display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 9px; cursor: pointer; transition: .14s;
}
.tree-folder:hover { background: var(--surface-2); }
.tree-folder.active { background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-line); }
.tree-folder svg { width: 16px; height: 16px; color: #9aa6bd; }
.tree-folder.active svg { color: var(--brand); }
.tree-folder .n { font-size: 12.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tree-folder .c { margin-left: auto; font-size: 10.5px; color: var(--muted); }
.tree-folder.child { padding-left: 24px; position: relative; }
.tree-folder.child .tree-branch {
  position: absolute; left: 11px; top: 50%; width: 8px; height: 1px; background: #d3daea;
}
.tree-folder.child .n { font-size: 12px; color: var(--text-2); }
.tree-folder .tree-add {
  width: 22px; height: 22px; flex: none; border-radius: 6px; border: 1px solid transparent;
  background: transparent; color: #a7b1c5; display: grid; place-items: center; cursor: pointer; padding: 0;
  opacity: .4; transition: .15s;
}
.tree-folder:hover .tree-add { opacity: 1; }
.tree-folder .tree-add svg { width: 13px; height: 13px; color: inherit; }
.tree-folder .tree-add:hover { background: #eef2ff; border-color: var(--brand-line); color: var(--brand); }
.subfolder-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.subfolder-label { font-size: 11.5px; color: var(--muted); letter-spacing: .6px; }

.content-main { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.content-main .c-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.content-main .c-body { padding: 18px 20px 22px; }

.dropzone {
  border: 1.5px dashed #cfd9ec; border-radius: 14px; padding: 26px 20px; text-align: center;
  background: linear-gradient(180deg, #fbfcff, #f7f9fe); transition: .18s var(--ease); cursor: pointer;
}
.dropzone:hover, .dropzone.over { border-color: #8fadf5; background: #f3f7ff; }
.dropzone .dz-ico {
  width: 44px; height: 44px; border-radius: 13px; margin: 0 auto 9px; display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line); color: var(--brand); box-shadow: var(--shadow-xs);
}
.dropzone .dz-ico svg { width: 20px; height: 20px; }
.dropzone .t { font-size: 13px; font-weight: 600; }
.dropzone .d { font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.7; }
.upload-list { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }
.upload-item { display: flex; align-items: center; gap: 10px; padding: 9px 11px; background: #fff; border: 1px solid var(--line); border-radius: 9px; font-size: 12px; }
.upload-item .bar { flex: 1; height: 5px; border-radius: 6px; background: #eef1f8; overflow: hidden; }
.upload-item .bar i { display: block; height: 100%; background: linear-gradient(90deg, #2f5fe0, #6b93ff); border-radius: 6px; transition: width .2s; }
.upload-item .st { font-size: 11px; color: var(--muted); min-width: 44px; text-align: right; }

/* 用户页头部 */
.page-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-top h1 { font-size: 20px; font-weight: 700; letter-spacing: .3px; }
.page-top .sub { font-size: 12.5px; color: var(--muted); }
.page-top .spacer { flex: 1; }

/* 横向 tabs */
.tabs { display: flex; gap: 4px; padding: 4px; background: #eef2f9; border-radius: 11px; width: fit-content; }
.tab { padding: 7px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 550; color: var(--text-2); cursor: pointer; transition: .15s; }
.tab.active { background: #fff; color: var(--text); box-shadow: var(--shadow-xs); font-weight: 650; }

/* 空状态内的操作 */
.empty .btn { margin-top: 10px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1180px) {
  :root { --sidebar-w: 232px; }
  .view { padding: 22px 24px 56px; }
  .topbar { padding: 0 24px; }
  .perm-layout { grid-template-columns: 280px 1fr; }
  .folder-grid, .recent-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-panel { padding: 40px 24px; }
  .content-layout { grid-template-columns: 1fr; }
  .perm-layout { grid-template-columns: 1fr; }
  .perm-users .list { max-height: 260px; }
}
@media (max-width: 860px) {
  :root { --sidebar-w: 0px; }
  .sidebar {
    width: 260px; transform: translateX(-100%); transition: transform .24s var(--ease);
    box-shadow: 0 0 60px rgba(10, 20, 45, .18);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after {
    content: ""; position: fixed; inset: 0; background: rgba(14, 22, 40, .34); z-index: 25;
  }
  .main { margin-left: 0; }
  .menu-btn {
    display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px;
    border: 1px solid var(--line); background: #fff; color: var(--text-2); cursor: pointer;
  }
  .menu-btn svg { width: 18px; height: 18px; }
  .topbar { padding: 0 16px; gap: 12px; }
  .view { padding: 18px 16px 60px; }
  .search { width: 200px; }
  .search input { height: 36px; }
  .hero { flex-direction: column; padding: 24px; }
  .hero-side { justify-content: flex-start; }
  .hero h1 { font-size: 22px; }
  .area-grid { grid-template-columns: 1fr; }
  .folder-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .res-row { padding: 11px 12px; gap: 11px; }
  .table-wrap { overflow-x: auto; }
  .table { min-width: 720px; }
  .viewer-top { padding: 0 12px; }
  .viewer-title .s { display: none; }
}
@media (max-width: 560px) {
  .topbar-title .crumb, .topbar-title .sep { display: none; }
  .search { flex: 1; width: auto; max-width: none; }
  .role-pill { display: none; }
  .page-head { gap: 12px; }
  .page-head .ico { width: 44px; height: 44px; border-radius: 13px; }
  .page-head h1 { font-size: 18px; }
  .hero-stat { min-width: 80px; padding: 10px 12px; }
  .hero-stat b { font-size: 18px; }
  .folder-grid, .recent-list { grid-template-columns: 1fr; }
  .modal { max-width: none; }
  .viewer-top .back { width: 30px; height: 30px; }
}

/* 打印保护：预览内容不落到纸面 */
@media print {
  body.print-guard .viewer { display: none !important; }
  body.print-guard::after {
    content: "该内容受保护，不支持打印或另存。"; display: block; font-size: 16px; padding: 40px; text-align: center;
  }
}

/* 与乐教乐学官网的衔接 */
.login-home { display: block; margin-top: 10px; text-align: center; font-size: 12px; color: var(--brand); text-decoration: none; }
.login-home:hover { text-decoration: underline; }
.side-home { display: flex; align-items: center; gap: 6px; margin: 0 4px 10px; padding: 8px 10px; border-radius: 9px; color: var(--muted); font-size: 12px; text-decoration: none; }
.side-home:hover { background: var(--surface-2); color: var(--brand); }