/* ==========================================================================
   FileBox — 设计系统与页面样式
   ========================================================================== */

:root {
  --ink: #0e1526;
  --ink-2: #2b3648;
  --muted: #6b7688;
  --faint: #97a0b0;
  --line: #e6e9f2;
  --line-strong: #d5dae8;
  --bg: #f4f6fb;
  --surface: #ffffff;

  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --brand-light: #7c6cf7;
  --brand-soft: #eef0ff;

  --danger: #e14b52;
  --danger-soft: #fdeced;
  --ok: #0ea97a;
  --ok-soft: #e6f8f1;
  --warn: #d98324;

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

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 4px 16px -4px rgba(16, 24, 40, .08), 0 1px 3px rgba(16, 24, 40, .04);
  --shadow-lg: 0 24px 60px -18px rgba(23, 30, 66, .22), 0 8px 22px -12px rgba(23, 30, 66, .14);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 14px;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

::selection { background: #d9dbff; color: #241c7a; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: #ccd2e2;
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: #b3bbd0; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ==========================================================================
   通用组件
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #fff;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .16s, border-color .16s, color .16s, box-shadow .16s, transform .08s;
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: translateY(.5px); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.btn-primary {
  background: linear-gradient(180deg, #5b52ea, #4a41dd);
  color: #fff;
  box-shadow: 0 1px 2px rgba(59, 48, 176, .28), inset 0 1px 0 rgba(255, 255, 255, .16);
}
.btn-primary:hover { background: linear-gradient(180deg, #655cef, #5148e3); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink-2); }
.btn-ghost:hover { background: #f7f8fc; border-color: #c3cade; }

.btn-subtle { background: #f3f4fa; color: var(--ink-2); }
.btn-subtle:hover { background: #ebedf6; }

.btn-block { width: 100%; height: 44px; font-size: 15px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { background: #f2f4fa; color: var(--ink); }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.icon-btn svg { width: 17px; height: 17px; }

/* 表单 */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 550;
  color: var(--ink-2);
  margin-bottom: 7px;
  letter-spacing: .01em;
}

.input-wrap { position: relative; display: flex; align-items: center; }

.input-wrap > svg.lead {
  position: absolute;
  left: 13px;
  width: 17px;
  height: 17px;
  color: var(--faint);
  pointer-events: none;
  transition: color .16s;
}

.input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #fcfcfe;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.input::placeholder { color: #a8b0c0; }
.input:hover { border-color: #c5ccdd; }
.input:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3.5px rgba(79, 70, 229, .12);
}
.input-wrap > svg.lead + .input { padding-left: 39px; }
.input.has-toggle { padding-right: 44px; }

.pw-toggle {
  position: absolute;
  right: 6px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
}
.pw-toggle:hover { color: var(--ink-2); background: #f1f3f9; }
.pw-toggle svg { width: 17px; height: 17px; }

.hint { font-size: 12px; color: var(--faint); margin-top: 6px; }

.alert {
  display: none;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert.show { display: flex; }
.alert-error { background: var(--danger-soft); border-color: #f7cdd0; color: #a52429; }
.alert-ok { background: var(--ok-soft); border-color: #bfeadd; color: #0a6b52; }
.alert svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }

/* ==========================================================================
   登录 / 注册页
   ========================================================================== */

.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(900px 520px at 8% -10%, #e7e6ff 0%, rgba(231, 230, 255, 0) 62%),
    radial-gradient(760px 480px at 102% 108%, #e2f0ff 0%, rgba(226, 240, 255, 0) 60%),
    radial-gradient(600px 400px at 85% 4%, #fdeef4 0%, rgba(253, 238, 244, 0) 55%),
    #f7f8fc;
}

.auth-body::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(79, 70, 229, .09) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 100%);
  pointer-events: none;
}

.auth-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.02fr 1fr;
  width: 100%;
  max-width: 940px;
  min-height: 588px;
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .9);
  animation: rise .5s cubic-bezier(.22, .9, .3, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px) scale(.995); }
  to { opacity: 1; transform: none; }
}

/* 左侧品牌面板 */
.auth-aside {
  position: relative;
  padding: 46px 44px 40px;
  color: #fff;
  background: linear-gradient(158deg, #4a41d6 0%, #3b32bb 45%, #2a238f 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.auth-aside::before {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  right: -190px;
  top: -170px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 32%, rgba(150, 140, 255, .75), rgba(150, 140, 255, 0) 68%);
}
.auth-aside::after {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  left: -140px;
  bottom: -150px;
  border-radius: 50%;
  background: radial-gradient(circle at 60% 40%, rgba(96, 190, 255, .42), rgba(96, 190, 255, 0) 70%);
}

.aside-inner { position: relative; z-index: 1; display: flex; flex-direction: column; height: 100%; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -.01em;
}
.brand-mark .logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .24);
  backdrop-filter: blur(4px);
}
.brand-mark .logo svg { width: 19px; height: 19px; }

.aside-copy { margin-top: auto; }
.aside-copy h1 {
  font-size: 28px;
  line-height: 1.32;
  margin: 0 0 14px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.aside-copy p {
  margin: 0;
  color: rgba(255, 255, 255, .74);
  font-size: 13.5px;
  line-height: 1.7;
  max-width: 320px;
}

.feature-list { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 13px; }
.feature-list li {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, .9);
}
.feature-list .tick {
  width: 21px;
  height: 21px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .22);
}
.feature-list .tick svg { width: 11px; height: 11px; }

.aside-foot {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: 12px;
  color: rgba(255, 255, 255, .55);
  display: flex;
  align-items: center;
  gap: 7px;
}
.dot-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5ce0a8;
  box-shadow: 0 0 0 3px rgba(92, 224, 168, .22);
}

/* 右侧表单面板 */
.auth-main {
  padding: 42px 46px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-head { margin-bottom: 24px; }
.auth-head h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -.02em;
}
.auth-head p { margin: 0; color: var(--muted); font-size: 13.5px; }

.tabs {
  position: relative;
  display: flex;
  padding: 4px;
  background: #f2f4fa;
  border-radius: 11px;
  margin-bottom: 26px;
}
.tabs button {
  flex: 1;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--muted);
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: color .2s;
}
.tabs button.active { color: var(--ink); }
.tab-indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: 36px;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow-sm), 0 1px 1px rgba(16, 24, 40, .04);
  transition: transform .28s cubic-bezier(.4, .16, .2, 1);
}
.tab-indicator.right { transform: translateX(100%); }

.auth-form { display: none; animation: fadeUp .28s ease both; }
.auth-form.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.form-foot {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.form-foot button {
  background: none;
  border: none;
  color: var(--brand);
  font-weight: 550;
  cursor: pointer;
  padding: 0 2px;
  font-size: 13px;
}
.form-foot button:hover { text-decoration: underline; }

/* ==========================================================================
   应用页
   ========================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar .brand-mark { color: var(--ink); font-size: 16px; }
.topbar .brand-mark .logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(150deg, #5b52ea, #3b32bb);
  border: none;
  box-shadow: 0 3px 8px -2px rgba(59, 48, 176, .5);
}
.topbar .brand-mark .logo svg { color: #fff; }

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

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.user-chip:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 650;
  color: #fff;
  background: linear-gradient(145deg, #6a5ff0, #443bc4);
  flex: none;
  text-transform: uppercase;
}
.user-chip .uname { font-size: 13px; font-weight: 550; color: var(--ink-2); max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 34px 28px 80px;
}

.page-head { margin-bottom: 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 {
  margin: 0 0 5px;
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -.025em;
}
.page-head p { margin: 0; color: var(--muted); font-size: 13.5px; }

/* 统计卡片 */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-ico {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: none;
}
.stat-ico svg { width: 18px; height: 18px; }
.stat-ico.i1 { background: var(--brand-soft); color: var(--brand); }
.stat-ico.i2 { background: #e7f4ff; color: #1a7fd4; }
.stat-ico.i3 { background: #fff2e3; color: #c97716; }

.stat-body { min-width: 0; }
.stat-label { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.stat-value { font-size: 19px; font-weight: 650; letter-spacing: -.02em; line-height: 1.25; }
.stat-value small { font-size: 12.5px; font-weight: 500; color: var(--faint); margin-left: 3px; }

/* 存储进度条 */
.mini-bar {
  height: 4px;
  border-radius: 99px;
  background: #eaedf5;
  overflow: hidden;
  margin-top: 8px;
  max-width: 190px;
}
.mini-bar span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #5b52ea, #8b7ff5);
  transition: width .4s ease;
  width: 0;
}

/* 上传区 */
.dropzone {
  position: relative;
  border: 1.6px dashed #ccd3e6;
  border-radius: var(--r-lg);
  background: #fbfcff;
  padding: 30px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s, background .18s, box-shadow .18s, transform .18s;
  margin-bottom: 22px;
}
.dropzone:hover { border-color: #a9b2e0; background: #f8f9ff; }
.dropzone.dragging {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, .1);
  transform: scale(1.004);
}

.dz-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 11px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--brand);
  box-shadow: var(--shadow-sm);
  transition: transform .2s;
}
.dropzone:hover .dz-icon { transform: translateY(-2px); }
.dz-icon svg { width: 21px; height: 21px; }

.dz-title { font-size: 14.5px; font-weight: 550; color: var(--ink); margin-bottom: 4px; }
.dz-title b { color: var(--brand); }
.dz-sub { font-size: 12.5px; color: var(--muted); }

/* 上传进度 */
.uploading {
  display: none;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  text-align: left;
  box-shadow: var(--shadow-sm);
}
.uploading.show { display: flex; }
.up-thumb {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  display: grid; place-items: center; background: var(--brand-soft); color: var(--brand);
}
.up-thumb svg { width: 15px; height: 15px; }
.up-info { flex: 1; min-width: 0; }
.up-name { font-size: 12.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-track { height: 4px; border-radius: 99px; background: #eaedf5; margin-top: 6px; overflow: hidden; }
.up-track span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #5b52ea, #8b7ff5); transition: width .2s; }
.up-pct { font-size: 12px; font-weight: 600; color: var(--brand); font-variant-numeric: tabular-nums; }

/* 文件面板 */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

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

.panel-title { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; }
.pill {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 99px;
  background: #f0f2f9;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.tools { display: flex; align-items: center; gap: 9px; }

.search {
  position: relative;
  display: flex;
  align-items: center;
}
.search svg { position: absolute; left: 11px; width: 15px; height: 15px; color: var(--faint); pointer-events: none; }
.search input {
  height: 36px;
  width: 200px;
  padding: 0 12px 0 33px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: #fbfcfe;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s, width .2s;
}
.search input:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .1);
}

select.sort {
  height: 36px;
  padding: 0 30px 0 11px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: #fbfcfe 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='%236b7688' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
select.sort:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 70, 229, .1); }

/* 文件行 */
.file-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 18px;
  border-bottom: 1px solid #f1f3f9;
  transition: background .13s;
  animation: rowIn .26s ease both;
}
.file-row:last-child { border-bottom: none; }
.file-row:hover { background: #fafbff; }

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

.file-ico {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #5a6474;
  background: #f2f4fa;
  border: 1px solid #e9ecf5;
}
.file-ico svg { width: 18px; height: 18px; }
.file-ico.t-img { background: #eafaf2; border-color: #d3f0e1; color: #0f9d67; }
.file-ico.t-doc { background: #eaf2ff; border-color: #d4e4ff; color: #2563c9; }
.file-ico.t-xls { background: #e9f8ee; border-color: #cfeedd; color: #17864b; }
.file-ico.t-zip { background: #fff4e5; border-color: #ffe3bd; color: #c2761a; }
.file-ico.t-vid { background: #fdeef3; border-color: #f8d7e3; color: #c02b62; }
.file-ico.t-aud { background: #f3edff; border-color: #e4d8ff; color: #6b3fd1; }
.file-ico.t-pdf { background: #feeeee; border-color: #f8d4d4; color: #c53030; }
.file-ico.t-code { background: #eef6ff; border-color: #d8e9fb; color: #1f6feb; }
.file-ico.t-ppt { background: #fff2e9; border-color: #ffdcc6; color: #c25b1c; }
.file-ico.t-txt { font-size: 9.5px; letter-spacing: .04em; color: #6b7280; }

.file-main { flex: 1; min-width: 0; }
.file-name {
  font-size: 13.8px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.file-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--faint);
  margin-top: 2px;
}
.file-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: #d3d8e4; }

.file-actions { display: flex; align-items: center; gap: 3px; opacity: .45; transition: opacity .15s; }
.file-row:hover .file-actions { opacity: 1; }

/* 空状态 */
.empty {
  padding: 54px 24px;
  text-align: center;
  display: none;
}
.empty.show { display: block; }
.empty-ico {
  width: 60px; height: 60px; margin: 0 auto 14px;
  border-radius: 18px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, #f2f3fb, #e9ebf7);
  color: #9aa3b8;
}
.empty-ico svg { width: 26px; height: 26px; }
.empty h3 { margin: 0 0 5px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.empty p { margin: 0; font-size: 13px; color: var(--faint); }

/* 加载骨架 */
.skeleton { padding: 18px; display: grid; gap: 10px; }
.skeleton div {
  height: 46px;
  border-radius: 10px;
  background: linear-gradient(90deg, #f3f5fa 25%, #eef1f8 37%, #f3f5fa 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* ==========================================================================
   弹层 / toast
   ========================================================================== */

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(14, 21, 38, .38);
  backdrop-filter: blur(3px);
  animation: maskIn .18s ease both;
}
.modal-mask.show { display: flex; }
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 30px 70px -20px rgba(14, 21, 38, .38);
  padding: 24px;
  animation: modalIn .24s cubic-bezier(.2, .9, .3, 1) both;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.modal h3 { margin: 0 0 8px; font-size: 16.5px; font-weight: 650; letter-spacing: -.01em; }
.modal p { margin: 0 0 20px; font-size: 13.5px; color: var(--muted); line-height: 1.6; word-break: break-all; }
.modal-actions { display: flex; gap: 9px; justify-content: flex-end; }
.modal .field:last-of-type { margin-bottom: 20px; }

.btn-danger { background: var(--danger); color: #fff; box-shadow: 0 1px 2px rgba(180, 40, 46, .25); }
.btn-danger:hover { background: #cf3f46; }

.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 210px;
  max-width: 360px;
  padding: 11px 15px;
  border-radius: 11px;
  background: #151d2e;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 12px 30px -10px rgba(10, 16, 30, .5);
  animation: toastIn .26s cubic-bezier(.2, .9, .3, 1) both;
}
.toast.out { animation: toastOut .2s ease both; }
.toast svg { width: 16px; height: 16px; flex: none; }
.toast.ok svg { color: #4ade9b; }
.toast.err svg { color: #ff8d92; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px) scale(.97); }
  to { opacity: 1; transform: none; }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(12px); }
}

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

@media (max-width: 860px) {
  .auth-card { grid-template-columns: 1fr; max-width: 460px; min-height: auto; }
  .auth-aside { padding: 30px 30px 26px; }
  .aside-copy { margin-top: 22px; }
  .aside-copy h1 { font-size: 21px; }
  .feature-list, .aside-foot { display: none; }
  .auth-main { padding: 30px 30px 34px; }
}

@media (max-width: 720px) {
  .topbar { padding: 0 16px; height: 58px; }
  .user-chip .uname { display: none; }
  .user-chip { padding: 3px; border: none; background: transparent; }
  .page { padding: 24px 16px 60px; }
  .page-head h1 { font-size: 21px; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat { flex-direction: column; align-items: flex-start; gap: 5px; padding: 11px 12px; }
  .stat-ico { display: none; }
  .stat-label { font-size: 11px; margin-bottom: 0; }
  .stat-value { font-size: 15.5px; }
  .stat-value small { display: none; }
  .mini-bar { margin-top: 5px; max-width: none; }
  .panel-head { flex-direction: column; align-items: stretch; gap: 11px; }
  .tools { flex-wrap: wrap; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .file-row { padding: 11px 14px; gap: 11px; }
  .file-actions { opacity: 1; }
  .file-meta { font-size: 11.5px; }
  .dz-title { font-size: 13.5px; }
}

@media (max-width: 420px) {
  .auth-main { padding: 26px 22px 30px; }
  .auth-aside { padding: 24px 22px 22px; }
  .aside-copy h1 { font-size: 19px; }
}
