/* ==========================================================================
   云链 CloudLink — 天翼云盘直链面板
   1. 设计变量与基础
   2. 图标与通用控件
   3. 顶栏
   4. 侧边栏
   5. 主区域 / 页头 / 工具栏
   6. 文件列表（列表与网格）
   7. 空状态 / 加载 / 分页
   8. FAB / 批量操作条 / 弹出菜单 / 消息
   9. 对话框
   10. 响应式
   ========================================================================== */

/* ---------- 1. 设计变量与基础 ---------- */
:root {
  --bg: #f5f3fb;
  --bg-glow: #ece6fb;
  --surface: #ffffff;
  --surface-2: #fcfbff;
  --ink: #1d1a29;
  --ink-2: #3c3850;
  --muted: #6f6a83;
  --muted-2: #9b96ad;
  --line: #e9e5f2;
  --line-strong: #dcd5ec;

  --primary: #5b3ad1;
  --primary-2: #4a2a9e;
  --primary-soft: #f1ecff;
  --pink: #ff4081;
  --pink-2: #e91e63;
  --green: #16a34a;
  --danger: #dc2626;
  --danger-soft: #fef2f2;

  --radius: 16px;
  --shadow-1: 0 1px 2px rgba(30, 20, 70, 0.05);
  --shadow-2: 0 10px 30px -14px rgba(44, 26, 110, 0.25);
  --shadow-3: 0 30px 70px -30px rgba(30, 18, 80, 0.5);

  --appbar-h: 64px;
  --sidebar-w: 268px;
  --cols: 44px minmax(0, 1fr) 96px 132px 84px;

  --font: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 0.68, 0.24, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1000px 500px at 78% -10%, rgba(122, 75, 214, 0.12), transparent 60%),
    radial-gradient(800px 400px at 0% 0%, rgba(255, 64, 129, 0.05), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, dl, dd, figure, blockquote {
  margin: 0;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

svg {
  display: block;
}

::selection {
  background: #ddd2ff;
  color: var(--ink);
}

body.dialog-open {
  overflow: hidden;
}

.noscript {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 700;
  padding: 12px 20px;
  background: #fff4e5;
  border-bottom: 1px solid #f3d6ae;
  color: #8a4b00;
  font-size: 13px;
  text-align: center;
}

.spin {
  animation: spin 0.9s linear infinite;
}

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

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

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

/* 滚动条 */
* {
  scrollbar-width: thin;
  scrollbar-color: #cfc6e6 transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-thumb {
  background: #cfc6e6;
  border-radius: 99px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

/* ---------- 2. 图标与通用控件 ---------- */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--xs {
  width: 14px;
  height: 14px;
  stroke-width: 1.8;
}

.icon--sm {
  width: 16px;
  height: 16px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c5ce6, #5b3ad1);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.avatar--sm {
  width: 26px;
  height: 26px;
  font-size: 11px;
  background: linear-gradient(135deg, #ff8db1, #f4457f);
}

.avatar--lg {
  width: 42px;
  height: 42px;
  font-size: 16px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
    border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.icon-btn:hover {
  background: #f3effc;
  color: var(--ink);
}

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

.icon-btn--sm {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease),
    color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
}

.btn .icon {
  width: 17px;
  height: 17px;
}

.btn--primary {
  background: linear-gradient(135deg, #6844dd, #5432c4);
  color: #fff;
  box-shadow: 0 8px 20px -10px rgba(91, 58, 209, 0.85);
}

.btn--primary:hover {
  box-shadow: 0 12px 26px -10px rgba(91, 58, 209, 0.9);
  transform: translateY(-1px);
}

.btn--ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink-2);
  box-shadow: var(--shadow-1);
}

.btn--ghost:hover {
  border-color: var(--line-strong);
  background: #fbfaff;
  color: var(--ink);
}

.btn--danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(220, 38, 38, 0.8);
}

.btn--danger:hover {
  background: #b91c1c;
}

.btn--sm {
  height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 12.5px;
  gap: 6px;
}

.btn--sm .icon {
  width: 15px;
  height: 15px;
}

.btn--block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn--glass {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.btn--glass:hover {
  background: rgba(255, 255, 255, 0.24);
}

.icon-btn--glass {
  color: rgba(255, 255, 255, 0.8);
}

.icon-btn--glass:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.badge--ok {
  background: #f0fbf4;
  border-color: #cdeed8;
  color: #15803d;
}

.dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
}

.text-ok {
  color: var(--green);
  font-weight: 600;
}

/* ---------- 3. 顶栏 ---------- */
.appbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--appbar-h);
  padding: 0 18px;
  background: linear-gradient(100deg, #3d228c 0%, #5733c8 52%, #7a49d3 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(39, 19, 96, 0.25);
}

.appbar-menu {
  display: none;
  color: #fff;
}

.appbar .icon-btn {
  color: rgba(255, 255, 255, 0.86);
}

.appbar .icon-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: #fff;
  border-radius: 10px;
}

.brand-logo {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.brand-logo .icon {
  width: 21px;
  height: 21px;
}

.brand-logo--dark {
  background: linear-gradient(135deg, #6d4ae0, #4a2a9e);
  box-shadow: 0 6px 14px -8px rgba(74, 42, 158, 0.9);
}

.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-name span {
  margin-top: 2px;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: rgba(255, 255, 255, 0.62);
}

.appbar-sep {
  width: 1px;
  height: 24px;
  flex: none;
  margin-inline: 4px;
  background: rgba(255, 255, 255, 0.18);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.66);
  white-space: nowrap;
}

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease);
}

.crumb:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.crumb .icon {
  width: 14px;
  height: 14px;
  opacity: 0.85;
}

.crumb.is-current {
  color: #fff;
  font-weight: 600;
}

.crumb-sep {
  width: 13px;
  height: 13px;
  flex: none;
  opacity: 0.5;
}

.appbar-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
  margin-left: auto;
}

.appbar-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  margin-left: 6px;
  padding: 0 10px 0 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  transition: background-color 0.18s var(--ease);
}

.appbar-user:hover {
  background: rgba(255, 255, 255, 0.18);
}

.appbar-user .icon {
  opacity: 0.65;
}

/* ---------- 4. 侧边栏 ---------- */
.sidebar {
  position: fixed;
  top: var(--appbar-h);
  bottom: 0;
  left: 0;
  z-index: 80;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--line);
  box-shadow: 4px 0 24px -18px rgba(40, 20, 90, 0.3);
}

.sidebar-scroll {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 18px 16px 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 4px 16px;
  border-bottom: 1px solid var(--line);
}

.user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  line-height: 1.4;
}

.user-info strong {
  font-size: 14px;
  font-weight: 650;
}

.user-info span {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.storage {
  padding: 16px 4px 18px;
  border-bottom: 1px solid var(--line);
}

.card-access {
  padding: 14px 14px 15px;
  margin: 14px 0 4px;
  border: 1px solid #ddd0f5;
  border-radius: 13px;
  background: linear-gradient(135deg, #faf7ff, #f4eeff);
}

.card-access-head {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.card-access-head .icon {
  width: 13px;
  height: 13px;
}

.card-access strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.2;
}

.card-access p {
  margin: 5px 0 0;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.5;
}

.card-access.is-warning {
  border-color: #f0d6bd;
  background: #fff9f1;
}

.card-access.is-warning .card-access-head {
  color: #b56a1f;
}

.storage-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.storage-head b {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.progress {
  height: 6px;
  margin-top: 9px;
  border-radius: 99px;
  background: #eee9f8;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6d4ae0, #ff4d8d);
}

.storage-tip {
  margin-top: 8px;
  font-size: 10.5px;
  color: var(--muted-2);
}

.side-nav {
  display: grid;
  gap: 3px;
  padding: 14px 0 4px;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13.5px;
  text-align: left;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease);
}

.side-link .icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: color 0.16s var(--ease);
}

.side-link span {
  flex: 1;
}

.side-link b {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 99px;
  background: #f3effb;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.side-link:hover {
  background: #f8f5fe;
  color: var(--ink);
}

.side-link.is-active {
  background: linear-gradient(90deg, #f1eaff, #faf7ff);
  color: var(--primary);
  font-weight: 600;
}

.side-link.is-active .icon {
  color: var(--primary);
}

.side-link.is-active b {
  background: #fff;
  color: var(--primary);
}

.side-admin-link {
  margin-top: 6px;
  border: 1px solid #e3d9fb;
  background: #faf7ff;
  color: var(--primary);
  font-weight: 600;
}

.side-admin-link .icon {
  color: var(--primary);
}

.side-admin-link b {
  background: #fff;
  color: var(--primary);
}

.side-heading {
  margin: 18px 10px 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--muted-2);
}

.side-list {
  display: grid;
  gap: 1px;
}

.side-list a,
.side-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  text-align: left;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease);
}

.side-list .icon {
  color: var(--muted-2);
  opacity: 0.8;
}

.side-list a:hover,
.side-list button:hover {
  background: #f8f5fe;
  color: var(--primary);
}

.side-list a:hover .icon,
.side-list button:hover .icon {
  color: var(--primary);
  opacity: 1;
}

.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding: 18px 6px 0;
  font-size: 10.5px;
  color: var(--muted-2);
}

.sidebar-foot small {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.scrim {
  position: fixed;
  inset: var(--appbar-h) 0 0 0;
  z-index: 75;
  background: rgba(28, 16, 62, 0.42);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

/* ---------- 5. 主区域 ---------- */
.main {
  margin-left: var(--sidebar-w);
  padding: calc(var(--appbar-h) + 30px) 32px 110px;
}

.main-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.page-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.live-dot {
  position: relative;
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.14);
}

.live-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 1px solid rgba(22, 163, 74, 0.5);
  border-radius: 50%;
  animation: pulse 2.4s var(--ease) infinite;
}

@keyframes pulse {
  0% { transform: scale(0.7); opacity: 0.85; }
  70% { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}

.page-head h1 {
  margin-top: 6px;
  font-size: clamp(1.55rem, 2.4vw, 1.9rem);
  font-weight: 680;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-sub {
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.head-actions {
  display: flex;
  gap: 10px;
  flex: none;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 220px;
  height: 44px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-1);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.search .icon {
  color: var(--muted-2);
}

.search:focus-within {
  border-color: #b9a6f0;
  box-shadow: 0 0 0 3px rgba(91, 58, 209, 0.1);
}

.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 13.5px;
}

.search input::placeholder {
  color: var(--muted-2);
}

.search input::-webkit-search-cancel-button {
  cursor: pointer;
}

.search kbd {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #faf8ff;
  font-family: var(--font);
  font-size: 11px;
  color: var(--muted-2);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.select-wrap {
  position: relative;
  display: inline-flex;
}

.select-wrap select {
  height: 44px;
  padding: 0 34px 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
  color: var(--ink-2);
  font-size: 13px;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.select-wrap select:hover {
  border-color: var(--line-strong);
}

.select-wrap select:focus {
  outline: none;
  border-color: #b9a6f0;
  box-shadow: 0 0 0 3px rgba(91, 58, 209, 0.1);
}

.select-arrow {
  position: absolute;
  right: 11px;
  top: 50%;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted-2);
}

.select-wrap--sm select {
  height: 34px;
  padding: 0 28px 0 10px;
  border-radius: 9px;
  font-size: 12px;
  box-shadow: none;
}

.select-wrap--sm .select-arrow {
  right: 8px;
  width: 13px;
  height: 13px;
}

.segmented {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-1);
}

.segmented button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease);
}

.segmented button:hover {
  background: #f8f5fe;
  color: var(--ink);
}

.segmented button.is-active {
  background: var(--primary-soft);
  color: var(--primary);
}

/* ---------- 6. 文件列表 ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}

.list-head,
.file-row {
  display: grid;
  grid-template-columns: var(--cols);
  align-items: center;
}

.list-head {
  height: 46px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #fcfbff;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted-2);
  letter-spacing: 0.03em;
}

.list-head > span {
  padding-left: 6px;
}

.check {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  justify-self: start;
  cursor: pointer;
}

.check input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.file-row {
  position: relative;
  min-height: 66px;
  padding: 0 14px;
  border-bottom: 1px solid #f3f0fa;
  cursor: default;
  transition: background-color 0.14s var(--ease), box-shadow 0.14s var(--ease);
}

.file-row:last-child {
  border-bottom: 0;
}

.file-row:hover,
.file-row:focus-within {
  background: #fbf9ff;
}

.file-row.is-selected {
  background: linear-gradient(90deg, #f4efff, #fbf8ff);
  box-shadow: inset 3px 0 0 var(--primary);
}

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

.file-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  background: #f2f0f7;
  color: #6b7280;
}

.file-icon .icon {
  width: 21px;
  height: 21px;
}

.file-icon--folder { background: #f1eaff; color: #6a45d8; }
.file-icon--video { background: #ffe9ee; color: #e11d48; }
.file-icon--image { background: #e7f7ee; color: #15803d; }
.file-icon--audio { background: #f3e9ff; color: #7e22ce; }
.file-icon--archive { background: #fff1e2; color: #c2410c; }
.file-icon--doc { background: #e7f0ff; color: #1d4ed8; }
.file-icon--table { background: #e6f7f2; color: #0f766e; }
.file-icon--code { background: #eef0f4; color: #475569; }
.file-icon--app { background: #e8faf3; color: #059669; }
.file-icon--other { background: #f2f0f7; color: #6b7280; }

.file-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.file-name {
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s var(--ease);
}

.file-name:hover {
  color: var(--primary);
}

.file-sub {
  font-size: 11px;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size,
.file-time {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-left: 6px;
}

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

.file-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1px;
  opacity: 0.55;
  transition: opacity 0.16s var(--ease);
}

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

.file-actions .icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

/* 网格视图 */
.panel.is-grid .list-head {
  display: none;
}

.file-list.is-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 12px;
  padding: 16px;
}

.file-card {
  position: relative;
  display: flex;
  min-height: 148px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease),
    transform 0.18s var(--ease);
}

.file-card:hover {
  border-color: #d6c8f8;
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}

.file-card.is-selected {
  border-color: #b9a6f0;
  background: #faf7ff;
  box-shadow: 0 0 0 2px rgba(91, 58, 209, 0.12);
}

.card-open {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  padding: 24px 0 0;
  border: 0;
  background: none;
  text-align: left;
}

.file-icon--lg {
  width: 46px;
  height: 46px;
  border-radius: 13px;
}

.file-icon--lg .icon {
  width: 24px;
  height: 24px;
}

.card-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
  word-break: break-all;
}

.card-meta {
  font-size: 10.5px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.card-check {
  position: absolute;
  top: 6px;
  left: 6px;
  opacity: 0;
  transition: opacity 0.16s var(--ease);
}

.card-more {
  position: absolute;
  top: 6px;
  right: 6px;
  opacity: 0;
  transition: opacity 0.16s var(--ease);
}

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

/* ---------- 7. 空状态 / 加载 / 分页 ---------- */
.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 62px 24px 66px;
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  border-radius: 20px;
  background: var(--primary-soft);
  color: var(--primary);
}

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

.state h3 {
  font-size: 15px;
  font-weight: 650;
}

.state p {
  margin-top: 5px;
  max-width: 36ch;
  font-size: 12.5px;
  color: var(--muted);
}

.state .btn {
  margin-top: 18px;
}

.loading {
  padding: 6px 14px;
}

.skeleton {
  display: grid;
  grid-template-columns: var(--cols);
  align-items: center;
  min-height: 66px;
  border-bottom: 1px solid #f5f2fb;
}

.skeleton:last-child {
  border-bottom: 0;
}

.skeleton > .skeleton-icon,
.skeleton-lines i,
.skeleton-meta {
  background: linear-gradient(90deg, #f2eefb 25%, #faf8ff 50%, #f2eefb 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 8px;
}

.skeleton-icon {
  width: 40px;
  height: 40px;
  margin-left: 6px;
  border-radius: 12px;
}

.skeleton-lines {
  display: grid;
  gap: 8px;
  padding-right: 24px;
}

.skeleton-lines i {
  height: 10px;
  width: 56%;
}

.skeleton-lines i:last-child {
  height: 8px;
  width: 34%;
}

.skeleton-meta {
  width: 54px;
  height: 10px;
  justify-self: start;
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #fdfcff;
}

.page-info {
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.page-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease),
    border-color 0.16s var(--ease);
}

.page-btn:hover:not(:disabled) {
  border-color: var(--line-strong);
  color: var(--ink);
  background: #faf8ff;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-btn .icon {
  width: 16px;
  height: 16px;
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-num {
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease);
}

.page-num:hover {
  background: #f4efff;
  color: var(--primary);
}

.page-num.is-active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.page-ellipsis {
  display: grid;
  place-items: center;
  width: 24px;
  height: 32px;
  color: var(--muted-2);
  font-size: 12px;
}

/* ---------- 8. FAB / 批量操作条 / 弹出菜单 / 消息 ---------- */
.fab {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

body.has-selection .fab {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

body.sidebar-open .fab {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

body.is-trash .fab {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.fab-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
}

.fab.is-open .fab-actions {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.fab-action {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 6px 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-2);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
}

.fab-action span {
  order: -1;
}

.fab-action .icon {
  width: 26px;
  height: 26px;
  padding: 5px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
}

.fab-action:hover {
  border-color: #d6c8f8;
  color: var(--primary);
}

.fab-main {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(140deg, #ff6a9b, #f4346f);
  color: #fff;
  box-shadow: 0 14px 30px -10px rgba(233, 30, 99, 0.65);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.fab-main .icon {
  width: 24px;
  height: 24px;
  transition: transform 0.25s var(--ease);
}

.fab-main:hover {
  box-shadow: 0 18px 36px -12px rgba(233, 30, 99, 0.7);
}

.fab.is-open .fab-main .icon {
  transform: rotate(45deg);
}

.selection-bar {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 95;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 9px 10px 9px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 15px;
  background: #29213f;
  color: #fff;
  box-shadow: 0 24px 50px -18px rgba(20, 10, 50, 0.7);
  transform: translateX(-50%);
  animation: barIn 0.22s var(--ease);
}

@keyframes barIn {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.selection-bar p {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
}

.selection-bar b {
  color: #fff;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.selection-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.selection-actions .icon-btn {
  width: 34px;
  height: 34px;
}

.menu {
  position: fixed;
  z-index: 250;
  width: 194px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-3);
  animation: menuIn 0.14s var(--ease);
}

@keyframes menuIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  text-align: left;
  transition: background-color 0.14s var(--ease), color 0.14s var(--ease);
}

.menu-item .icon {
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.menu-item:hover {
  background: #f7f3ff;
  color: var(--primary);
}

.menu-item:hover .icon {
  color: var(--primary);
}

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

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

.menu-item.is-danger:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.menu-sep {
  height: 1px;
  margin: 5px 8px;
  background: var(--line);
}

.toasts {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(86vw, 420px);
  padding: 10px 16px;
  border-radius: 11px;
  background: #241c3c;
  color: #fff;
  font-size: 12.5px;
  box-shadow: 0 18px 40px -16px rgba(20, 10, 50, 0.7);
  animation: toastIn 0.22s var(--ease);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.toast .icon {
  width: 16px;
  height: 16px;
  flex: none;
  color: #7ee2a8;
}

.toast--error .icon {
  color: #ff9d9d;
}

.toast.is-out {
  opacity: 0;
  transform: translateY(6px);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* ---------- 9. 对话框 ---------- */
.dialog {
  width: min(92vw, 500px);
  max-height: 88dvh;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 40px 90px -30px rgba(20, 10, 60, 0.55);
  overflow: hidden;
}

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

.dialog[open] {
  display: flex;
  flex-direction: column;
  animation: dialogIn 0.2s var(--ease);
}

.dialog::backdrop {
  background: rgba(24, 15, 48, 0.5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

@keyframes dialogIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 0;
}

.dialog-head h2 {
  font-size: 16px;
  font-weight: 680;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.dialog-sub {
  margin-top: 3px;
  max-width: 38ch;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dialog-body {
  display: grid;
  gap: 14px;
  padding: 16px 22px 10px;
  overflow-y: auto;
  min-height: 0;
}

.dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 22px 20px;
}

.dialog-text {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-2);
}

.field {
  display: grid;
  gap: 7px;
}

.field > span {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.field input,
.field select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fcfbff;
  color: var(--ink);
  font-size: 13px;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease),
    background-color 0.16s var(--ease);
}

.field input:focus,
.field select:focus {
  outline: none;
  background: #fff;
  border-color: #b9a6f0;
  box-shadow: 0 0 0 3px rgba(91, 58, 209, 0.1);
}

.field input::placeholder {
  color: var(--muted-2);
}

.link-box {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f9f7ff;
  overflow: hidden;
}

.link-box input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 11.5px;
}

.link-box input:focus {
  outline: none;
}

.link-box .btn {
  margin: 6px;
  height: 34px;
  flex: none;
}

.hint {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f7f5fd;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
}

.hint .icon {
  margin-top: 2px;
  color: var(--muted-2);
}

.account-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(135deg, #faf7ff, #fff);
}

.account-card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.account-card-text strong {
  font-size: 14px;
  font-weight: 650;
}

.account-card-text span {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 2px;
  border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
}

.info-list > div:last-child {
  border-bottom: 0;
}

.info-list dt {
  color: var(--muted);
}

.info-list dd {
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.acc {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.acc + .acc {
  margin-top: -4px;
}

.acc summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.acc summary::-webkit-details-marker {
  display: none;
}

.acc-ic {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary);
}

.acc-ic .icon {
  width: 17px;
  height: 17px;
}

.acc-title {
  display: flex;
  flex-direction: column;
  flex: 1;
  line-height: 1.35;
}

.acc-title strong {
  font-size: 12.5px;
  font-weight: 650;
}

.acc-title small {
  font-size: 10.5px;
  color: var(--muted-2);
}

.acc-arrow {
  width: 16px;
  height: 16px;
  color: var(--muted-2);
  transition: transform 0.2s var(--ease);
}

.acc[open] .acc-arrow {
  transform: rotate(180deg);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 13px 13px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 11px 0 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fcfbff;
  font-size: 11.5px;
  color: var(--ink-2);
  transition: border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.chip b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.chip small {
  font-size: 9.5px;
  color: var(--muted-2);
}

.chip:hover {
  border-color: #d6c8f8;
  background: #faf7ff;
}

.about-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 2px;
}

.about-brand > div {
  display: flex;
  flex-direction: column;
  flex: 1;
  line-height: 1.4;
}

.about-brand strong {
  font-size: 14px;
  font-weight: 680;
}

.about-brand span {
  font-size: 11px;
  color: var(--muted);
}

.check-list {
  display: grid;
  gap: 9px;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.55;
}

.check-list .icon {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex: none;
  padding: 3px;
  border-radius: 50%;
  background: #e9f9ef;
  color: var(--green);
  stroke-width: 2.4;
}

/* ---------- 10. 登录页 ---------- */
body.is-logged-out {
  overflow: hidden;
}

.login {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  background: var(--bg);
  overflow-y: auto;
}

.login-art {
  position: relative;
  display: flex;
  padding: clamp(28px, 4vw, 56px);
  overflow: hidden;
  background: linear-gradient(150deg, #2d156b 0%, #4a2a9e 48%, #7a3fc4 100%);
  color: #fff;
}

.login-art-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.login-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(ellipse at 30% 20%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse at 30% 20%, #000 10%, transparent 75%);
}

.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.55;
}

.login-orb--1 {
  width: 420px;
  height: 420px;
  top: -120px;
  right: -120px;
  background: #b06bff;
}

.login-orb--2 {
  width: 360px;
  height: 360px;
  left: -140px;
  bottom: -100px;
  background: #ff4d8d;
  opacity: 0.3;
}

.login-art-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding-block: 8px;
}

.login-art-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.login-art-top .brand-name,
.login-art-top .brand-name span {
  color: #fff;
}

.login-art-top .brand-name span {
  opacity: 0.55;
}

.login-headline {
  margin-top: clamp(48px, 8vh, 92px);
  font-size: clamp(2.1rem, 3.5vw, 3.2rem);
  font-weight: 680;
  line-height: 1.14;
  letter-spacing: -0.035em;
}

.login-lead {
  margin-top: 20px;
  max-width: 34ch;
  font-size: 14.5px;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.72);
}

.login-points {
  display: grid;
  gap: 12px;
  margin-top: 30px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.84);
}

.login-points li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.login-point-ic {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
}

.login-point-ic .icon {
  width: 12px;
  height: 12px;
  stroke-width: 2.4;
}

.login-art-cards {
  position: relative;
  flex: none;
  height: 190px;
  max-width: 420px;
  margin-top: 36px;
}

.login-art-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.55);
  font-size: 12px;
  white-space: nowrap;
}

.login-art-card .icon {
  width: 16px;
  height: 16px;
  color: #d9c8ff;
}

.login-art-card small {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
}

.lac-1 {
  left: 0;
  top: 0;
  transform: rotate(-2.5deg);
}

.lac-2 {
  left: 108px;
  top: 55px;
  transform: rotate(1.6deg);
}

.lac-3 {
  left: 26px;
  top: 112px;
  transform: rotate(-1deg);
}

.login-copyright {
  margin-top: auto;
  padding-top: 24px;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.4);
}

.login-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background:
    radial-gradient(600px 320px at 85% 0%, rgba(122, 75, 214, 0.12), transparent 60%),
    radial-gradient(500px 300px at 0% 100%, rgba(255, 64, 129, 0.05), transparent 60%),
    var(--bg);
}

.login-card {
  width: min(100%, 430px);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 30px 80px -48px rgba(30, 10, 80, 0.45);
}

.login-mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.login-mobile-brand .brand-name {
  color: var(--ink);
}

.login-mobile-brand .brand-name span {
  color: var(--muted-2);
}

.login-kicker {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--muted-2);
}

.login-title {
  margin-top: 8px;
  font-size: clamp(1.4rem, 2.2vw, 1.7rem);
  font-weight: 680;
  letter-spacing: -0.02em;
}

.login-sub {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--muted);
}

.login-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  margin-top: 22px;
  padding: 3px;
  border-radius: 11px;
  background: #f3effb;
}

.setup-ty-link {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 14px;
  font-size: 11px;
  text-align: center;
}

#cardGatePanel {
  margin-top: 20px;
}

#cardGatePanel .login-submit {
  margin-top: 4px;
}

#cardGatePanel .qr-hint {
  margin-top: 12px;
  text-align: center;
}

.trial-access-btn {
  margin-top: 10px;
}

.purchase-btn {
  margin-top: 10px;
  border-color: #f0c36d;
  background: #fff8e8;
  color: #9a5b00;
  text-decoration: none;
}

.purchase-btn:hover {
  background: #fff1d2;
  border-color: #e5ae43;
}

.login-tab {
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}

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

.login-tab.is-active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(60, 30, 120, 0.08);
}

.login-field {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}

.login-field > label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}

.login-input {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fcfbff;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}

.login-input > .icon {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--muted-2);
}

.login-input input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 13.5px;
  color: var(--ink);
}

.login-input input::placeholder {
  color: var(--muted-2);
}

.login-input:focus-within {
  border-color: #b9a6f0;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(91, 58, 209, 0.1);
}

.login-input.is-invalid {
  border-color: #e7a7a7;
  background: #fff8f8;
}

.login-eye {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted-2);
}

.login-eye:hover {
  background: #f3effb;
  color: var(--ink);
}

.login-eye .icon {
  width: 17px;
  height: 17px;
}

.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.login-check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}

.login-check input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary);
  font-size: 12px;
  cursor: pointer;
}

.link-btn:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-btn .icon {
  width: 14px;
  height: 14px;
}

.login-error {
  min-height: 18px;
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #c2410c;
}

.login-submit {
  margin-top: 4px;
  height: 46px;
}

.login-submit:disabled {
  opacity: 0.72;
  cursor: progress;
  transform: none;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  font-size: 10px;
  color: var(--muted-2);
}

.login-divider::before,
.login-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.login-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 16px;
  font-size: 10.5px;
  line-height: 1.65;
  color: var(--muted);
}

.login-note .icon {
  margin-top: 2px;
  color: var(--muted-2);
}

.login-note a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.login-legal {
  margin-top: 10px;
  font-size: 9.5px;
  line-height: 1.65;
  color: var(--muted-2);
  text-align: center;
}

.login-foot {
  margin-top: 18px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}

/* 扫码登录 */
.qr-wrap {
  display: flex;
  justify-content: center;
  padding: 20px 0 4px;
}

.ty-login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 16px;
  padding: 3px;
  border-radius: 10px;
  background: #f3effb;
}

.ty-login-tab {
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.ty-login-tab.is-active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(80, 55, 140, 0.1);
}

.ty-password-form {
  margin-top: 14px;
  text-align: left;
}

.ty-password-form .login-submit {
  margin-top: 4px;
}

.ty-captcha-box {
  margin-top: 12px;
}

.ty-captcha-box > label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
}

.ty-captcha-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ty-captcha-row input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  outline: none;
}

.ty-captcha-row input:focus {
  border-color: var(--primary);
}

.ty-captcha-row img {
  width: 90px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  object-fit: cover;
  cursor: pointer;
  background: #f7f4fc;
}

.qr-code {
  width: 176px;
  height: 176px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 34px -24px rgba(30, 10, 80, 0.5);
}

.ty-qr-image {
  display: block;
  width: 196px;
  height: 196px;
  object-fit: contain;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 34px -24px rgba(30, 10, 80, 0.5);
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}

.ty-qr-image.is-ready {
  opacity: 1;
}

.qr-code svg {
  display: block;
  width: 100%;
  height: 100%;
}

.qr-tip {
  margin-top: 12px;
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
}

.qr-hint {
  margin-top: 4px;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--muted-2);
  text-align: center;
}

.qr-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

/* ---------- 11. 响应式 ---------- */
@media (max-width: 1240px) {
  :root {
    --cols: 44px minmax(0, 1fr) 88px 120px 76px;
  }

  .main {
    padding-inline: 26px;
  }
}

@media (max-width: 1023.98px) {
  .login {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .login-art {
    display: none;
  }

  .login-mobile-brand {
    display: flex;
  }

  .login-panel {
    padding: 32px 20px;
  }

  .sidebar {
    transform: translateX(-104%);
    transition: transform 0.28s var(--ease);
    z-index: 90;
    box-shadow: 20px 0 60px -30px rgba(20, 10, 60, 0.5);
  }

  body.sidebar-open .sidebar {
    transform: none;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  .appbar-menu {
    display: inline-grid;
  }

  .main {
    margin-left: 0;
    padding: calc(var(--appbar-h) + 24px) 22px 104px;
  }

  .scrim {
    display: block;
  }

  .segmented,
  .select-wrap select,
  .search {
    height: 42px;
  }
}

@media (max-width: 900px) {
  :root {
    --cols: 40px minmax(0, 1fr) 84px 64px;
  }

  .list-head .cell-time,
  .file-time {
    display: none;
  }

  .breadcrumb {
    display: none;
  }

  .appbar-sep {
    display: none;
  }

  .page-head {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
  }

  .head-actions {
    width: 100%;
  }

  .head-actions .btn {
    flex: 1;
  }
}

@media (max-width: 640px) {
  :root {
    --cols: 38px minmax(0, 1fr) 56px;
  }

  .login-panel {
    justify-content: flex-start;
    padding: 14px 12px 28px;
  }

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

  .login-title {
    font-size: 1.45rem;
  }

  .login-foot {
    display: none;
  }

  .main {
    padding: calc(var(--appbar-h) + 18px) 14px 112px;
  }

  .appbar {
    padding: 0 12px;
    gap: 8px;
  }

  .appbar-user-name,
  .appbar-user .icon {
    display: none;
  }

  .appbar-user {
    padding: 0 5px;
    border-color: transparent;
    background: transparent;
  }

  .brand-name span {
    display: none;
  }

  .page-head h1 {
    font-size: 1.5rem;
  }

  .toolbar {
    flex-wrap: wrap;
    gap: 9px;
  }

  .search {
    order: -1;
    width: 100%;
    flex: 1 1 100%;
  }

  .toolbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .toolbar-right .select-wrap {
    flex: 1;
  }

  .toolbar-right .select-wrap select {
    width: 100%;
  }

  .list-head,
  .file-row {
    padding-inline: 8px;
  }

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

  .file-main {
    gap: 10px;
    padding-right: 6px;
  }

  .file-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

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

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

  .file-sub {
    font-size: 10px;
  }

  .file-actions {
    opacity: 1;
  }

  .file-actions .icon-btn {
    width: 30px;
    height: 30px;
  }

  .file-actions [data-action="link"] {
    display: none;
  }

  .file-list.is-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 9px;
    padding: 12px;
  }

  .file-card {
    min-height: 136px;
  }

  .pagination {
    padding: 10px 12px;
    justify-content: center;
  }

  .page-info {
    width: 100%;
    text-align: center;
  }

  .page-controls {
    width: 100%;
    justify-content: space-between;
    gap: 4px;
  }

  .page-numbers {
    gap: 2px;
  }

  .page-num {
    min-width: 28px;
    height: 30px;
    border-radius: 8px;
  }

  .page-btn {
    width: 30px;
    height: 30px;
  }

  .selection-bar {
    left: 12px;
    right: 12px;
    bottom: 14px;
    gap: 8px;
    padding: 8px 8px 8px 14px;
    transform: none;
    justify-content: space-between;
  }

  .selection-bar p {
    font-size: 11.5px;
  }

  .selection-actions {
    gap: 4px;
  }

  .selection-actions .btn {
    padding: 0 9px;
  }

  .selection-actions .btn .icon {
    display: none;
  }

  .selection-bar {
    animation: none;
  }

  .fab {
    right: 16px;
    bottom: 18px;
  }

  .fab-main {
    width: 52px;
    height: 52px;
  }

  .dialog {
    width: calc(100vw - 24px);
    max-height: 90dvh;
  }

  .dialog-head {
    padding: 18px 18px 0;
  }

  .dialog-body {
    padding: 14px 18px 8px;
  }

  .dialog-foot {
    padding: 10px 18px 18px;
  }

  .toasts {
    bottom: 88px;
    width: calc(100vw - 32px);
    align-items: stretch;
  }

  .toast {
    max-width: none;
    justify-content: center;
  }
}

@media (max-width: 400px) {
  .appbar-user {
    display: none;
  }

  .page-num {
    min-width: 26px;
    padding: 0 4px;
  }
}

@media (hover: none) {
  .file-actions,
  .card-check,
  .card-more {
    opacity: 1;
  }
}

@media (max-height: 920px) and (min-width: 1024px) {
  .login-art-card {
    display: none;
  }

  .login-headline {
    margin-top: 30px;
  }

  .login-art-cards {
    height: 40px;
  }

  .login-lead {
    margin-top: 14px;
  }

  .login-points {
    margin-top: 18px;
  }
}

@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;
  }
}

/* 天翼云盘只读模式：隐藏本地存储的写操作入口 */
body.is-provider-tianyi .head-actions,
body.is-provider-tianyi .fab,
body.is-provider-tianyi #selDelete,
body.is-provider-tianyi [data-mode="recent"] {
  display: none !important;
}

@media print {
  .appbar,
  .sidebar,
  .scrim,
  .toolbar,
  .head-actions,
  .fab,
  .selection-bar,
  .pagination,
  .login {
    display: none !important;
  }

  .main {
    margin: 0;
    padding: 0;
  }

  .panel {
    border: 0;
    box-shadow: none;
  }
}
