/* =========================================================================
   十方云起 · 玻璃拟态云盘
   零构建静态样式表 — 设计变量集中在 :root
   ========================================================================= */

/* ---------- 0. 设计令牌 ---------- */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
    "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas,
    "Liberation Mono", monospace;

  --bg-image: url("/assets/img/background.svg");
  --bg-fallback: linear-gradient(165deg, #d8ecfb 0%, #eaf4ee 45%, #d3e7f6 100%);
  --mist: rgba(255, 255, 255, 0.22);

  --glass-bg: rgba(255, 255, 255, 0.42);
  --glass-bg-soft: rgba(255, 255, 255, 0.34);
  --glass-bg-strong: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-blur: blur(18px) saturate(1.15);

  --radius-xl: 24px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --radius-xs: 9px;

  --shadow-panel: 0 10px 40px rgba(31, 56, 88, 0.12);
  --shadow-float: 0 14px 44px rgba(23, 43, 70, 0.2);
  --shadow-pop: 0 18px 50px rgba(20, 40, 70, 0.24);

  --text: #16181d;
  --text-2: #5b616b;
  --text-3: #7a8390;
  --link: #1e6fe8;
  --link-hover: #0b57d0;

  --blue: #2b7fe4;
  --blue-light: #6db4f7;
  --success: #179a5a;
  --danger: #d63636;
  --danger-soft: rgba(214, 54, 54, 0.1);

  --row-bg: rgba(255, 255, 255, 0.38);
  --row-bg-hover: rgba(255, 255, 255, 0.56);
  --row-bg-selected: rgba(255, 255, 255, 0.66);

  --fab-gradient: linear-gradient(145deg, #5aa7ff 0%, #2b7fe4 52%, #1f6fe0 100%);
  --primary-gradient: linear-gradient(135deg, #3f8df5 0%, #1f6fe0 100%);

  --container-max: 1180px;
  --container-pad: 28px;

  --topbar-h: 36px;
  --row-h: 38px;
  --row-gap: 6px;
  --col-size: 120px;
  --col-time: 200px;
  --col-actions: 36px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --z-bg: 0;
  --z-content: 2;
  --z-fab: 80;
  --z-menu: 90;
  --z-overlay: 100;
  --z-drag: 150;
  --z-toast: 200;
}

/* ---------- 1. 基础重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #dce9f4;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

a {
  color: var(--link);
  text-decoration: none;
}

img,
svg,
video {
  max-width: 100%;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

::selection {
  background: rgba(30, 111, 232, 0.22);
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid rgba(30, 111, 232, 0.8);
  outline-offset: 2px;
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------- 2. 背景 ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: var(--z-bg);
  background-color: #d9e8f3;
  background-image: var(--bg-image), var(--bg-fallback);
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  filter: saturate(1.22) contrast(1.04);
  pointer-events: none;
}

.bg-mist {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0.02) 38%,
      rgba(255, 255, 255, 0.1) 100%
    ),
    var(--mist);
  -webkit-backdrop-filter: blur(2.5px) saturate(1.05);
  backdrop-filter: blur(2.5px) saturate(1.05);
  pointer-events: none;
}

/* ---------- 3. 容器与顶栏 ---------- */
.container {
  position: relative;
  z-index: var(--z-content);
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 18px var(--container-pad) 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  height: var(--topbar-h);
  margin: 0 -6px 14px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.topbar-pill {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 30px;
  padding: 2px 4px 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 16px rgba(31, 56, 88, 0.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-xs);
  color: #1a6fd8;
  transition: background 0.16s ease, transform 0.16s ease;
}

.pill-btn svg {
  width: 18px;
  height: 18px;
}

.pill-btn:hover {
  background: rgba(255, 255, 255, 0.55);
}

.pill-btn:active {
  transform: scale(0.94);
}

.pill-btn.menu-toggle {
  background: rgba(255, 255, 255, 0.55);
  margin-left: 22px;
}

.pill-btn.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.78);
}

.kbd-hint {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}

.kbd-hint kbd,
.palette-esc,
.palette-foot kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 10px;
  height: 21px;
  padding: 0 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 0 rgba(31, 56, 88, 0.12), inset 0 -1px 0 rgba(31, 56, 88, 0.08);
  color: #3f4a5a;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
}

/* 登录状态 */
.auth-area {
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: #12529f;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.admin-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #37d68a, #13b06a);
  box-shadow: 0 0 0 3px rgba(23, 154, 90, 0.16);
}

.logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #38445a;
  font-size: 12.5px;
  font-weight: 500;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background 0.16s ease;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.7);
}

/* ---------- 4. 玻璃面板基础 ---------- */
.panel {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .panel {
    background: rgba(255, 255, 255, 0.76);
  }

  .topbar-pill,
  .admin-badge,
  .logout-btn {
    background: rgba(255, 255, 255, 0.8);
  }
}

/* 入场动效 */
.hero,
.browser {
  animation: panel-in 0.55s var(--ease-out) both;
}

.browser {
  animation-delay: 0.14s;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: 24px 24px 22px;
  border-radius: var(--radius-xl);
}

.welcome {
  font-size: 16px;
  font-weight: 700;
  color: #121419;
  letter-spacing: 0.02em;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.85),
    0 0 3px rgba(255, 255, 255, 0.95);
}

.openlist-line {
  margin-top: 12px;
  font-size: 15px;
}

.text-link {
  color: var(--link);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.65);
}

.text-link:hover {
  color: var(--link-hover);
}

/* ---------- 5.1 123 云盘分享入口 ---------- */
.external-share {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 29px;
  padding: 24px 26px;
  overflow: hidden;
  animation: panel-in 0.55s var(--ease-out) both;
  animation-delay: 0.08s;
}

.external-share::after {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 360px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 159, 255, 0.2) 0%, rgba(91, 159, 255, 0) 70%);
  pointer-events: none;
}

.external-share-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
}

.external-share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(41, 121, 255, 0.16), rgba(95, 178, 255, 0.26));
  color: #1f6fe0;
  box-shadow: inset 0 0 0 1px rgba(70, 139, 230, 0.16);
}

.external-share-icon svg {
  width: 25px;
  height: 25px;
}

.external-share-copy {
  min-width: 0;
}

.external-share-kicker {
  margin: 1px 0 5px;
  color: #55708f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.external-share-title {
  margin: 0;
  color: #121419;
  font-size: 21px;
  line-height: 1.25;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.external-share-note {
  max-width: 680px;
  margin-top: 8px;
  color: #4f5c6d;
  font-size: 13.5px;
  line-height: 1.75;
}

.external-share-code {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: #445267;
  font-size: 13.5px;
}

.external-share-code strong {
  color: #1d2a3a;
  font-size: 15px;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.external-share-copy-btn {
  height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(116, 138, 166, 0.3);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.62);
  color: #46617f;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.external-share-copy-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(70, 139, 230, 0.42);
}

.external-share-btn {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  text-decoration: none;
}

.external-share-btn svg {
  width: 16px;
  height: 16px;
}

body.external-share-mode #browser,
body.external-share-mode .topbar-pill,
body.external-share-mode #fab,
body.external-share-mode #upload-panel,
body.external-share-mode #drag-overlay {
  display: none !important;
}

@media (max-width: 640px) {
  .external-share {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 20px;
  }

  .external-share-main {
    gap: 12px;
  }

  .external-share-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .external-share-title {
    font-size: 19px;
  }

  .external-share-btn {
    width: 100%;
  }
}

/* 分享模式下 FAB 被隐藏，移动端必须把退出登录保留在顶栏 */
@media (max-width: 560px) {
  body.external-share-mode .logout-btn {
    display: inline-flex;
  }
}

/* ---------- 6. 赞助条 ---------- */
/* ---------- 7. 面包屑 + Explorer ---------- */
.browser {
  margin-top: 29px;
}

.breadcrumb-bar {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  width: auto;
  max-width: calc(100% - 16px);
  min-height: 34px;
  margin: 0 0 -12px 8px;
  padding: 2px 5px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.52);
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: none;
  box-shadow: 0 6px 18px rgba(31, 56, 88, 0.1);
}

.breadcrumb-bar::-webkit-scrollbar {
  display: none;
}

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 10px;
  color: #2c333d;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.16s ease, color 0.16s ease;
  flex: 0 0 auto;
}

.crumb .crumb-home-icon {
  font-size: 14px;
  line-height: 1;
}

.crumb:hover {
  background: rgba(255, 255, 255, 0.5);
  color: #14171d;
}

.crumb.is-home {
  background: rgba(255, 255, 255, 0.62);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(31, 56, 88, 0.06);
}

.crumb.is-current {
  font-weight: 600;
  color: #181b21;
  cursor: default;
}

.crumb.is-current:hover {
  background: transparent;
}

.crumb-sep {
  color: rgba(56, 66, 82, 0.55);
  font-size: 13px;
  flex: 0 0 auto;
  padding: 0 1px;
}

.explorer {
  margin-top: 0;
  padding: 9px 6px 12px;
  border-radius: var(--radius-lg);
}

/* 表头 */
.file-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--col-size) var(--col-time) var(--col-actions);
  align-items: center;
  height: 41px;
  padding: 0 10px;
  user-select: none;
}

.head-cell {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 4px;
  border-radius: 7px;
  color: #5c6572;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.16s ease, background 0.16s ease;
  min-width: 0;
}

.head-cell:hover {
  color: #232a34;
  background: rgba(255, 255, 255, 0.32);
}

.head-name {
  justify-content: flex-start;
}

.head-size {
  justify-content: center;
}

.head-time {
  justify-content: flex-end;
  grid-column: 3 / 5;
  padding-right: 0;
}

.sort-arrow {
  display: inline-flex;
  width: 11px;
  height: 11px;
  position: relative;
  color: #1e6fe8;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.head-cell[data-dir="asc"] .sort-arrow,
.head-cell[data-dir="desc"] .sort-arrow {
  opacity: 1;
}

.head-cell[data-dir="asc"] .sort-arrow::before {
  content: "↑";
  font-size: 12px;
  line-height: 1;
}

.head-cell[data-dir="desc"] .sort-arrow::before {
  content: "↓";
  font-size: 12px;
  line-height: 1;
}

/* 文件列表 */
.file-list {
  display: flex;
  flex-direction: column;
  gap: var(--row-gap);
  min-height: 60px;
}

.file-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--col-size) var(--col-time) var(--col-actions);
  align-items: center;
  min-height: var(--row-h);
  padding: 0 10px;
  border-radius: 10px;
  background: var(--row-bg);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s var(--ease-out),
    box-shadow 0.18s ease, border-color 0.18s ease;
  animation: row-in 0.3s var(--ease-out) both;
}

.file-row:hover {
  background: var(--row-bg-hover);
  border-color: rgba(255, 255, 255, 0.55);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(31, 56, 88, 0.12);
}

.file-row:active {
  transform: translateY(0);
}

.file-row.is-selected,
.file-row:focus-visible {
  background: var(--row-bg-selected);
  border-color: rgba(96, 156, 245, 0.55);
  box-shadow: 0 0 0 2px rgba(43, 127, 228, 0.22), 0 6px 18px rgba(31, 56, 88, 0.12);
}

@keyframes row-in {
  from {
    opacity: 0.35;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.file-main {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding-right: 10px;
}

.file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 24px;
  height: 20px;
}

.file-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.file-name {
  min-width: 0;
  font-size: 16px;
  font-weight: 600;
  color: #141920;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.005em;
}

.file-size {
  font-size: 13.5px;
  color: #2b313b;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.file-time {
  grid-column: 3 / 5;
  font-size: 16px;
  font-weight: 600;
  color: #1a212b;
  text-align: right;
  white-space: nowrap;
  padding-right: 0;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.file-actions {
  position: absolute;
  top: 50%;
  right: 2px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  color: #37424f;
  background: rgba(255, 255, 255, 0.66);
  opacity: 0;
  transition: opacity 0.16s ease, background 0.16s ease;
}

.more-btn svg {
  width: 17px;
  height: 17px;
}

.file-row:hover .more-btn,
.file-row:focus-within .more-btn,
.file-row.is-selected .more-btn {
  opacity: 1;
}

.more-btn:hover {
  background: rgba(255, 255, 255, 0.72);
}

@media (hover: none) {
  .more-btn {
    opacity: 0.72;
  }
}

/* 骨架屏 */
.skeleton-row {
  height: var(--row-h);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.skeleton-row::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 1.25s infinite;
}

.skeleton-row:nth-child(2) {
  animation-delay: 0.06s;
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

/* 空态 / 错误态 */
.state-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 52px 20px 58px;
  text-align: center;
}

.state-icon {
  display: inline-flex;
  width: 62px;
  height: 62px;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.4);
  color: #5b8fd6;
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.state-icon svg {
  width: 30px;
  height: 30px;
}

.state-title {
  font-size: 15px;
  font-weight: 600;
  color: #2b323c;
}

.state-desc {
  font-size: 13px;
  color: var(--text-2);
  max-width: 420px;
  line-height: 1.7;
}

.state-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}

/* 状态条 */
.list-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px 2px;
  font-size: 12px;
  color: var(--text-3);
}

.list-status .status-retry {
  color: var(--link);
  font-size: 12px;
}

/* ---------- 8. 按钮 / 输入 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 18px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  transition: filter 0.16s ease, background 0.16s ease, box-shadow 0.16s ease,
    transform 0.12s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.985);
}

.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 7px 18px rgba(31, 111, 224, 0.28);
}

.btn-primary:hover {
  filter: brightness(1.06);
}

.btn-primary:disabled {
  filter: grayscale(0.35) brightness(0.95);
  cursor: default;
  box-shadow: none;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(116, 138, 166, 0.3);
  color: #3c4655;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.88);
}

.btn-danger {
  background: linear-gradient(135deg, #f26565 0%, #d92d2d 100%);
  color: #fff;
  box-shadow: 0 7px 18px rgba(214, 54, 54, 0.25);
}

.btn-danger:hover {
  filter: brightness(1.05);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  height: 32px;
  padding: 0 13px;
  font-size: 13px;
  border-radius: 9px;
}

.text-input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border-radius: 11px;
  border: 1px solid rgba(116, 138, 166, 0.38);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease,
    background 0.16s ease;
}

.text-input::placeholder {
  color: #8b94a2;
}

.text-input:focus {
  border-color: rgba(30, 111, 232, 0.75);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(30, 111, 232, 0.14);
}

.text-input.is-invalid {
  border-color: rgba(214, 54, 54, 0.7);
  box-shadow: 0 0 0 3px rgba(214, 54, 54, 0.1);
}

.form-error {
  min-height: 18px;
  margin: 0;
  color: #cf2d2d;
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
}

/* ---------- 9. FAB + 快捷菜单 / 右键菜单 ---------- */
.fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: var(--z-fab);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--fab-gradient);
  color: #fff;
  box-shadow: 0 10px 26px rgba(31, 111, 224, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.24s var(--ease-spring), box-shadow 0.2s ease;
}

.fab:hover {
  transform: scale(1.07);
  box-shadow: 0 14px 32px rgba(31, 111, 224, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.fab:active {
  transform: scale(0.97);
}

.fab svg {
  width: 22px;
  height: 22px;
  position: absolute;
  transition: opacity 0.16s ease, transform 0.24s var(--ease-out);
}

.fab .fab-close {
  opacity: 0;
  transform: scale(0.5) rotate(-45deg);
}

.fab.is-open {
  transform: scale(1.07);
}

.fab.is-open .fab-grid {
  opacity: 0;
  transform: scale(0.5) rotate(45deg);
}

.fab.is-open .fab-close {
  opacity: 1;
  transform: scale(1) rotate(0);
}

.quick-menu,
.context-menu {
  position: fixed;
  z-index: var(--z-menu);
  min-width: 196px;
  padding: 7px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-pop);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  backdrop-filter: blur(24px) saturate(1.2);
  animation: menu-in 0.17s var(--ease-out) both;
  transform-origin: bottom right;
}

.context-menu {
  transform-origin: top left;
  min-width: 178px;
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  border-radius: 9px;
  color: #20262f;
  font-size: 14px;
  text-align: left;
  transition: background 0.14s ease, color 0.14s ease;
}

.menu-item .icon {
  width: 17px;
  height: 17px;
  color: #4d5a6b;
}

.menu-item:hover,
.menu-item:focus-visible {
  background: rgba(30, 111, 232, 0.1);
  color: #0b57d0;
}

.menu-item:hover .icon,
.menu-item:focus-visible .icon {
  color: #0b57d0;
}

.menu-item.is-danger {
  color: #c22d2d;
}

.menu-item.is-danger .icon {
  color: #c22d2d;
}

.menu-item.is-danger:hover,
.menu-item.is-danger:focus-visible {
  background: var(--danger-soft);
  color: #b01f1f;
}

.menu-sep {
  height: 1px;
  margin: 6px 6px;
  background: rgba(80, 100, 130, 0.14);
}

.menu-label {
  padding: 4px 11px 6px;
  font-size: 11.5px;
  color: var(--text-3);
}

/* ---------- 10. 遮罩 / 弹窗 ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 32, 52, 0.34);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  animation: overlay-in 0.2s ease both;
}

.overlay-top {
  align-items: flex-start;
  justify-content: center;
  padding-top: min(11vh, 104px);
}

/* 确认弹窗必须盖在其他弹窗（账号管理 / 预览等）之上 */
#confirm-modal {
  z-index: calc(var(--z-overlay) + 30);
}

@keyframes overlay-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.dialog {
  position: relative;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 26px 26px 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 28px 70px rgba(15, 32, 56, 0.3);
  -webkit-backdrop-filter: blur(30px) saturate(1.2);
  backdrop-filter: blur(30px) saturate(1.2);
  text-align: center;
  animation: pop-in 0.22s var(--ease-out) both;
}

.dialog-sm {
  width: min(400px, calc(100vw - 32px));
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #545e6c;
  background: rgba(116, 138, 166, 0.12);
  transition: background 0.16s ease;
}

.dialog-close svg {
  width: 13px;
  height: 13px;
}

.dialog-close:hover {
  background: rgba(116, 138, 166, 0.24);
}

.dialog-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 2px auto 6px;
  border-radius: 16px;
  font-size: 25px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 14px rgba(31, 56, 88, 0.1);
}

.dialog-emblem-warn {
  background: rgba(255, 236, 236, 0.75);
  border-color: rgba(255, 210, 210, 0.9);
}

.dialog-title {
  font-size: 19px;
  font-weight: 700;
  color: #14181f;
  letter-spacing: 0.01em;
}

.dialog-desc {
  margin: 7px 0 18px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.65;
  word-break: break-word;
  white-space: pre-line;
}

.dialog-desc strong {
  color: #1c222b;
  font-weight: 600;
}

.dialog-desc .danger-text {
  color: #c22d2d;
  font-weight: 600;
}

.dialog-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.dialog-hint {
  margin: 14px 0 0;
  color: var(--text-3);
  font-size: 12.5px;
  line-height: 1.6;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

/* ---------- 11. 命令面板 ---------- */
.palette {
  width: min(640px, calc(100vw - 24px));
  max-height: min(72vh, 560px);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 30px 80px rgba(15, 32, 56, 0.34);
  -webkit-backdrop-filter: blur(30px) saturate(1.2);
  backdrop-filter: blur(30px) saturate(1.2);
  overflow: hidden;
  animation: pop-in 0.22s var(--ease-out) both;
}

.palette-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(116, 138, 166, 0.16);
}

.palette-search-icon {
  display: inline-flex;
  width: 19px;
  height: 19px;
  color: #1e6fe8;
  flex: 0 0 auto;
}

.palette-search-icon svg {
  width: 100%;
  height: 100%;
}

.palette-input {
  flex: 1;
  min-width: 0;
  height: 30px;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: var(--text);
}

.palette-input::placeholder {
  color: #8b94a2;
}

.palette-esc {
  height: 21px;
  font-size: 10.5px;
}

.palette-results {
  flex: 1;
  min-height: 90px;
  overflow-y: auto;
  padding: 7px;
  overscroll-behavior: contain;
}

.palette-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 5px;
  font-size: 11.5px;
  color: var(--text-3);
  letter-spacing: 0.04em;
}

.palette-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  cursor: pointer;
  color: #1b212a;
  border: 1px solid transparent;
}

.palette-item .icon {
  width: 19px;
  height: 19px;
}

.palette-item.active {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(30, 111, 232, 0.28);
  box-shadow: 0 3px 10px rgba(31, 56, 88, 0.08);
}

.palette-item-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.palette-item-path {
  flex: 0 0 auto;
  max-width: 48%;
  font-size: 11.5px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  direction: rtl;
  text-align: left;
}

.palette-item-badge {
  flex: 0 0 auto;
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(30, 111, 232, 0.1);
  color: #1a5fc4;
}

.palette-empty {
  padding: 30px 16px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.7;
}

.palette-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 12px;
  color: var(--text-3);
  font-size: 12.5px;
}

.spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(30, 111, 232, 0.2);
  border-top-color: #1e6fe8;
  animation: spin 0.7s linear infinite;
  flex: 0 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.palette-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 9px 14px;
  border-top: 1px solid rgba(116, 138, 166, 0.16);
  font-size: 11.5px;
  color: var(--text-3);
  flex-wrap: wrap;
}

.palette-foot span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.palette-foot kbd {
  height: 18px;
  min-width: 18px;
  font-size: 10.5px;
}

/* ---------- 12. 预览 ---------- */
.overlay-preview {
  padding: 22px;
}

.preview-dialog {
  display: flex;
  flex-direction: column;
  width: min(1080px, 100%);
  height: min(88vh, 100%);
  max-height: 100%;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 30px 80px rgba(15, 32, 56, 0.36);
  -webkit-backdrop-filter: blur(30px) saturate(1.2);
  backdrop-filter: blur(30px) saturate(1.2);
  overflow: hidden;
  animation: pop-in 0.22s var(--ease-out) both;
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px 9px 16px;
  border-bottom: 1px solid rgba(116, 138, 166, 0.16);
  flex: 0 0 auto;
}

.preview-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.preview-icon {
  display: inline-flex;
  width: 22px;
  height: 20px;
  flex: 0 0 auto;
}

.preview-icon svg {
  width: 100%;
  height: 100%;
}

.preview-title {
  font-size: 15px;
  font-weight: 650;
  color: #171c24;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #3a4757;
  transition: background 0.16s ease, color 0.16s ease;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn:hover {
  background: rgba(116, 138, 166, 0.14);
  color: #16202c;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(116, 138, 166, 0.14);
  flex: 0 0 auto;
  flex-wrap: wrap;
}

.preview-body {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 32, 52, 0.055);
  overflow: auto;
  position: relative;
}

.preview-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  transition: transform 0.2s var(--ease-out);
  transform-origin: center center;
  user-select: none;
}

.preview-media {
  display: block;
  max-width: calc(100% - 40px);
  max-height: calc(100% - 40px);
  border-radius: 8px;
  outline: none;
}

.preview-audio-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 24px;
  text-align: center;
  width: 100%;
}

.preview-audio-wrap .audio-icon {
  width: 84px;
  height: 84px;
  color: #2b7fe4;
}

.preview-audio {
  width: min(460px, 100%);
}

.preview-pdf {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  display: block;
}

.preview-text-wrap {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.preview-text {
  flex: 1;
  margin: 0;
  padding: 18px 22px;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: #1a222d;
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(255, 255, 255, 0.72);
  width: 100%;
  min-height: 0;
}

.preview-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 40px;
  color: var(--text-2);
  font-size: 13.5px;
}

.preview-hint {
  font-size: 12.5px;
  color: var(--text-3);
  padding: 6px 2px;
}

.preview-zoom-label {
  min-width: 54px;
  text-align: center;
  font-size: 12.5px;
  color: #37424f;
  font-variant-numeric: tabular-nums;
}

/* ---------- 13. 上传队列 ---------- */
.upload-panel {
  position: fixed;
  right: 22px;
  bottom: 88px;
  z-index: 75;
  width: 340px;
  max-width: calc(100vw - 24px);
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-float);
  animation: slide-up 0.24s var(--ease-out) both;
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.upload-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 3px 9px;
}

.upload-title {
  font-size: 13px;
  font-weight: 650;
  color: #1c222b;
}

.upload-summary {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.upload-clear {
  font-size: 12px;
  color: var(--link);
  margin-left: 8px;
}

.upload-clear:hover {
  text-decoration: underline;
}

.upload-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 244px;
  overflow-y: auto;
}

.upload-item {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.upload-item-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}

.upload-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #1d242e;
}

.upload-pct {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  color: #3a4655;
  font-size: 12px;
}

.upload-state {
  flex: 0 0 auto;
  font-size: 11.5px;
  color: var(--text-3);
}

.upload-bar {
  height: 5px;
  margin-top: 6px;
  border-radius: 3px;
  background: rgba(30, 111, 232, 0.14);
  overflow: hidden;
}

.upload-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: var(--primary-gradient);
  transition: width 0.18s ease;
}

.upload-item.is-done .upload-bar-fill {
  background: linear-gradient(135deg, #37d68a, #13b06a);
}

.upload-item.is-error .upload-bar-fill {
  background: linear-gradient(135deg, #f26565, #d92d2d);
}

.upload-item.is-error .upload-state {
  color: #c22d2d;
}

/* ---------- 14. Toast ---------- */
.toast-wrap {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(430px, calc(100vw - 24px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 34px rgba(20, 40, 70, 0.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  backdrop-filter: blur(18px) saturate(1.15);
  font-size: 13.5px;
  color: #1b222c;
  pointer-events: auto;
  animation: toast-in 0.26s var(--ease-out) both;
}

.toast.is-leaving {
  animation: toast-out 0.2s ease both;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
}

.toast .icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.toast-success .icon {
  color: var(--success);
}

.toast-error .icon {
  color: var(--danger);
}

.toast-info .icon {
  color: var(--link);
}

.toast-msg {
  flex: 1;
  min-width: 0;
  line-height: 1.5;
  word-break: break-word;
}

.toast-close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  color: #5c6572;
}

.toast-close svg {
  width: 12px;
  height: 12px;
}

.toast-close:hover {
  background: rgba(116, 138, 166, 0.16);
}

/* ---------- 15. 拖拽遮罩 ---------- */
.drag-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-drag);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 38, 62, 0.3);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  animation: overlay-in 0.16s ease both;
}

.drag-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 40px 54px;
  border-radius: 26px;
  border: 2px dashed rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 24px 70px rgba(15, 32, 56, 0.28);
  text-align: center;
  animation: pop-in 0.22s var(--ease-spring) both;
}

.drag-icon {
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  border-radius: 16px;
  color: #fff;
  background: var(--primary-gradient);
  box-shadow: 0 10px 24px rgba(31, 111, 224, 0.32);
}

.drag-icon svg {
  width: 26px;
  height: 26px;
}

.drag-title {
  font-size: 18px;
  font-weight: 700;
  color: #161b22;
}

.drag-sub {
  font-size: 13px;
  color: var(--text-2);
}

/* ---------- 16. 页脚 ---------- */
.footer {
  padding: 24px 0 30px;
  text-align: center;
  font-size: 12px;
  color: rgba(32, 48, 68, 0.6);
}

.footer p {
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

.footer a {
  color: rgba(20, 70, 140, 0.8);
}

/* ---------- 17. 响应式 ---------- */
@media (max-width: 820px) {
  :root {
    --container-pad: 16px;
    --col-size: 0px;
    --col-time: 168px;
    --col-actions: 30px;
  }

  .container {
    padding-top: 14px;
  }

  .topbar {
    margin-bottom: 13px;
  }

  .hero {
    padding: 20px 16px 18px;
  }

  .head-size,
  .file-size {
    display: none;
  }

  .file-head,
  .file-row {
    grid-template-columns: minmax(0, 1fr) var(--col-time);
  }

  .head-time,
  .file-time {
    grid-column: auto;
    padding-right: 0;
  }

  .file-time {
    font-size: 13px;
  }

  .file-name {
    font-size: 14px;
  }

  .more-btn {
    opacity: 0.7;
  }

  .overlay {
    padding: 16px;
  }

  .overlay-preview {
    padding: 12px;
  }
}

@media (max-width: 560px) {
  :root {
    --container-pad: 12px;
    --col-time: 94px;
    --col-actions: 28px;
    --row-h: 42px;
  }

  .container {
    padding-top: 10px;
  }

  .topbar {
    height: 32px;
    margin-bottom: 11px;
  }

  .topbar-pill {
    height: 32px;
    gap: 4px;
    padding: 2px 4px;
  }

  .kbd-hint {
    display: none;
  }

  .pill-btn {
    width: 27px;
    height: 27px;
  }

  .admin-badge,
  .logout-btn {
    height: 28px;
    padding: 0 9px;
    font-size: 11.5px;
  }

  .hero {
    padding: 18px 12px 16px;
    border-radius: 18px;
  }

  .welcome {
    font-size: 14px;
  }

  .openlist-line {
    margin-top: 10px;
    font-size: 13px;
  }

  .browser {
    margin-top: 11px;
  }

  .breadcrumb-bar {
    min-height: 32px;
    padding: 2px 3px;
    border-radius: 12px;
  }

  .crumb {
    height: 26px;
    padding: 0 8px;
    font-size: 13px;
  }

  .explorer {
    margin-top: 11px;
    padding: 6px 6px 10px;
    border-radius: 16px;
  }

  .file-head {
    height: 34px;
    padding: 0 4px 0 6px;
  }

  .head-cell {
    font-size: 12px;
    height: 26px;
  }

  .file-row {
    padding: 0 2px 0 7px;
    border-radius: 9px;
  }

  .file-main {
    gap: 8px;
    padding-right: 4px;
  }

  .file-icon {
    width: 23px;
    height: 19px;
  }

  .file-name {
    font-size: 14px;
  }

  .file-time {
    font-size: 12.5px;
    letter-spacing: 0;
  }

  .time-clock {
    display: none;
  }

  .state-block {
    padding: 40px 14px 44px;
  }

  .fab {
    right: 14px;
    bottom: 14px;
    width: 44px;
    height: 44px;
  }

  .fab svg {
    width: 20px;
    height: 20px;
  }

  .upload-panel {
    right: 12px;
    left: 12px;
    bottom: 68px;
    width: auto;
    max-width: none;
  }

  .overlay {
    padding: 12px;
  }

  .overlay-top {
    padding-top: 7vh;
  }

  .overlay-preview {
    padding: 0;
  }

  .preview-dialog {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .preview-title {
    max-width: 52vw;
  }

  .dialog {
    padding: 22px 18px 18px;
    border-radius: 18px;
  }

  .toast-wrap {
    top: 10px;
  }

  .quick-menu,
  .context-menu {
    min-width: 174px;
  }

  .footer {
    padding: 18px 0 22px;
    font-size: 11.5px;
  }
}

@media (max-width: 380px) {
  .file-name {
    font-size: 13px;
  }
}

/* ---------- 18. 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .skeleton-row::after {
    animation: none;
    opacity: 0.4;
  }
}

/* ---------- 19. 高对比度 / 打印 ---------- */
@media (prefers-contrast: more) {
  :root {
    --text-2: #3d434d;
    --text-3: #4d5560;
    --glass-bg: rgba(255, 255, 255, 0.62);
    --row-bg: rgba(255, 255, 255, 0.58);
  }
}

@media print {
  .bg,
  .bg-mist,
  .fab,
  .upload-panel,
  .toast-wrap,
  .overlay,
  .quick-menu,
  .context-menu {
    display: none !important;
  }
}

/* ---------- 20. 补充状态 / 交互细节 ---------- */
body.modal-open {
  overflow: hidden;
}

.state-icon .icon {
  width: 30px;
  height: 30px;
}

.state-art {
  width: 76px !important;
  height: 76px !important;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.34);
}

.state-art svg {
  width: 100%;
  height: 100%;
}

.palette-status {
  margin-left: auto;
  color: var(--text-3);
}

@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-3px); }
  40%, 60% { transform: translateX(3px); }
}

.dialog.shake {
  animation: shake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.upload-list {
  list-style: none;
}

.preview-image-stage {
  background: transparent;
}

/* 触摸设备：保证行尾操作可用 */
@media (hover: none) {
  .file-row .file-actions {
    opacity: 1;
  }
}
/* 赞助商右栏文案换行点与参考截图一致 */
/* ---------- 21. 顶栏 Ctrl K 合并键帽 ---------- */
.kbd-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 0 rgba(31, 56, 88, 0.12), inset 0 -1px 0 rgba(31, 56, 88, 0.08);
  color: #3f4a5a;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ---------- 22. 移动端细节修正 ---------- */
@media (max-width: 560px) {
  .admin-badge,
  .logout-btn {
    display: none;
  }

  .topbar-actions {
    gap: 6px;
  }

  .breadcrumb-bar {
    min-height: 34px;
    margin: 0 0 -10px 6px;
    max-width: calc(100% - 12px);
  }

  .crumb {
    height: 26px;
    padding: 0 9px;
    font-size: 13px;
  }

  /* 行尾操作独立成列，避免盖住时间 */
  .file-head,
  .file-row {
    grid-template-columns: minmax(0, 1fr) var(--col-time) 28px;
  }

  .head-time,
  .file-time {
    grid-column: auto;
    padding-right: 0;
  }

  .file-actions {
    position: static;
    transform: none;
  }

  .more-btn {
    opacity: 1;
    background: rgba(255, 255, 255, 0.4);
    width: 26px;
    height: 26px;
  }

  .footer {
    padding: 18px 0 78px;
  }
}

/* ---------- 23. 上传文件夹：批量进度 / 冲突弹窗 / 跳过态 ---------- */
.upload-batch {
  margin: 0 2px 8px;
  padding: 8px 9px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.65);
}

.upload-batch-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #1d242e;
}

.upload-batch-title {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-batch-count {
  flex: 0 0 auto;
  color: #3a4655;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.upload-batch-pct {
  flex: 0 0 auto;
  min-width: 38px;
  text-align: right;
  color: #1a5fc4;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.upload-batch .upload-bar {
  margin-top: 6px;
  height: 6px;
}

.upload-batch-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.upload-batch-current {
  flex: 1;
  min-width: 0;
  font-size: 11.5px;
  color: #5b6572;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-batch-cancel {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  color: #c22d2d;
  background: rgba(214, 54, 54, 0.08);
  white-space: nowrap;
  transition: background 0.15s ease;
}

.upload-batch-cancel:hover {
  background: rgba(214, 54, 54, 0.16);
}

.dialog .conflict-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 4px;
}

.conflict-actions .btn {
  width: 100%;
  min-width: 0;
}

.upload-item.is-skipped {
  opacity: 0.85;
}

.upload-item.is-skipped .upload-bar-fill {
  background: linear-gradient(135deg, #c3ccd8, #9aa6b5);
}

.upload-item.is-skipped .upload-state {
  color: #7a8390;
}

@media (max-width: 560px) {
  .conflict-actions .btn {
    flex: 1 1 40%;
  }

  .upload-batch-title {
    max-width: 52%;
  }
}

/* ======================================================================
   24. 启动占位 + 全屏登录页
   ====================================================================== */
.splash {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.splash-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 250px;
  padding: 30px 40px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-panel);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  text-align: center;
}

.splash-brand {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #1a2130;
  text-indent: 0.14em;
}

.splash-spinner {
  width: 22px;
  height: 22px;
  border-width: 3px;
}

.splash-text {
  margin: 0;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
}

.splash .btn {
  margin-top: 6px;
}

.login-screen {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 32px 24px;
}

.login-card {
  width: min(400px, 100%);
  padding: 34px 32px 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 24px 70px rgba(20, 40, 70, 0.22);
  -webkit-backdrop-filter: blur(26px) saturate(1.2);
  backdrop-filter: blur(26px) saturate(1.2);
  text-align: center;
  animation: pop-in 0.28s var(--ease-out) both;
}

.login-brand {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #161c26;
  text-indent: 0.14em;
  text-shadow: 0 0 16px rgba(255, 255, 255, 0.75);
}

.login-title {
  margin: 10px 0 26px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.02em;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #3c4757;
  letter-spacing: 0.03em;
}

.login-input {
  height: 44px;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.82);
}

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

.password-wrap .login-input {
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: #5a6675;
  transition: background 0.15s ease, color 0.15s ease;
}

.password-toggle:hover {
  background: rgba(116, 138, 166, 0.14);
  color: #28303c;
}

.password-toggle svg {
  width: 19px;
  height: 19px;
}

.password-toggle .icon-eye-off {
  display: none;
}

.password-toggle.is-visible .icon-eye {
  display: none;
}

.password-toggle.is-visible .icon-eye-off {
  display: block;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: -4px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.4;
  cursor: pointer;
  user-select: none;
}

.login-remember input {
  width: 15px;
  height: 15px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: #2f7cf6;
  cursor: pointer;
}

.login-error {
  min-height: 18px;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #cf2d2d;
  text-align: left;
}

.login-submit {
  height: 44px;
  font-size: 15px;
  letter-spacing: 0.06em;
}

.login-foot {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  font-size: 11.5px;
  color: var(--text-3);
  letter-spacing: 0.04em;
}

.login-card.shake {
  animation: shake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@media (max-width: 560px) {
  .login-screen {
    padding: 20px 16px;
  }

  .login-card {
    padding: 26px 20px 18px;
    border-radius: 20px;
  }

  .login-brand {
    font-size: 26px;
  }

  .login-title {
    margin: 8px 0 20px;
  }
}

@media (max-width: 360px) {
  .login-card {
    padding: 22px 16px 16px;
  }

  .login-brand {
    font-size: 23px;
  }
}

/* ======================================================================
   25. 登录 / 创建账号切换 + 成员徽章 + owner 账号管理
   ====================================================================== */
.auth-tabs {
  display: flex;
  gap: 4px;
  margin: 14px 0 18px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.auth-tab {
  flex: 1 1 0;
  height: 34px;
  border-radius: 9px;
  color: #46505f;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.auth-tab:hover {
  color: #1d2530;
}

.auth-tab.is-active {
  background: rgba(255, 255, 255, 0.88);
  color: #14202e;
  box-shadow: 0 2px 8px rgba(31, 56, 88, 0.12);
}

.auth-panel[hidden] {
  display: none;
}

.login-title {
  margin: 2px 0 18px;
}

.login-switch {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--text-3);
}

.link-btn {
  padding: 2px;
  border-radius: 6px;
  color: var(--link);
  font-size: 12.5px;
  font-weight: 500;
}

.link-btn:hover {
  color: var(--link-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.admin-badge.is-member::before {
  background: linear-gradient(135deg, #5aa7ff, #2b7fe4);
  box-shadow: 0 0 0 3px rgba(43, 127, 228, 0.16);
}

/* ---------- 账号管理弹窗 ---------- */
.accounts-dialog {
  width: min(720px, calc(100vw - 32px));
  text-align: left;
}

.accounts-dialog .dialog-title,
.accounts-dialog .dialog-desc {
  text-align: center;
}

.accounts-wrap {
  margin: 6px 0 12px;
  max-height: min(58vh, 440px);
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.4);
  overscroll-behavior: contain;
}

.accounts-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 34px 16px;
  color: var(--text-2);
  font-size: 13px;
}

.accounts-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
  color: #1d2530;
}

/* 账号列固定比例：18+ 字符单行省略（title 显示完整账号），时间列 nowrap */
.accounts-table {
  min-width: 660px;
}

.accounts-table th:nth-child(1),
.accounts-table td:nth-child(1) {
  width: 32%;
}

.accounts-table th:nth-child(2),
.accounts-table td:nth-child(2) {
  width: 12%;
}

.accounts-table th:nth-child(3),
.accounts-table td:nth-child(3) {
  width: 20%;
}

.accounts-table th:nth-child(4),
.accounts-table td:nth-child(4) {
  width: 20%;
}

.accounts-table th:nth-child(5),
.accounts-table td:nth-child(5) {
  width: 72px;
}

.accounts-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 9px 12px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-3);
  text-align: left;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(116, 138, 166, 0.18);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.accounts-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(116, 138, 166, 0.14);
  vertical-align: middle;
}

.accounts-table tr:last-child td {
  border-bottom: 0;
}

.accounts-row:hover td {
  background: rgba(255, 255, 255, 0.42);
}

.accounts-account-cell {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.accounts-role {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.accounts-role .tag {
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(30, 111, 232, 0.1);
  color: #1a5fc4;
}

.accounts-role .tag.is-builtin {
  background: rgba(23, 154, 90, 0.12);
  color: #127a47;
}

.accounts-time {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: #3c4655;
}

.accounts-actions-col {
  width: 72px;
  text-align: right;
}

.accounts-delete {
  padding: 4px 11px;
  white-space: nowrap;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  color: #c22d2d;
  background: rgba(214, 54, 54, 0.08);
  transition: background 0.15s ease;
}

.accounts-delete:hover {
  background: rgba(214, 54, 54, 0.16);
}

.accounts-note-row td.accounts-note {
  padding: 18px 14px;
  color: var(--text-3);
  font-size: 12.5px;
  text-align: center;
  white-space: normal;
}

.accounts-empty {
  padding: 28px 16px 30px;
}

.accounts-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 16px;
  color: #cf2d2d;
  font-size: 12.5px;
  text-align: center;
}

.accounts-error[hidden] {
  display: none;
}

@media (max-height: 720px) {
  .login-screen {
    align-items: flex-start;
    padding-top: 20px;
    padding-bottom: 20px;
  }
}

@media (max-width: 560px) {
  .accounts-dialog {
    width: calc(100vw - 24px);
    padding-left: 16px;
    padding-right: 16px;
  }

  .accounts-wrap {
    max-height: 52vh;
  }

  .auth-tabs {
    margin: 12px 0 14px;
  }
}
/* 移动端保留身份徽章（退出登录仍在 FAB 菜单内） */
@media (max-width: 560px) {
  .admin-badge {
    display: inline-flex;
  }
}