:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --panel-2: #f5f7fa;
  --panel-3: #eef1f5;
  --border: #e6e9ef;
  --border-strong: #d7dbe3;
  --text: #0e121b;
  --text-2: #4b5261;
  --text-3: #7b8494;
  --text-4: #99a0ae;
  --primary: #2b7fff;
  --primary-strong: #0561e2;
  --primary-weak: #eff6ff;
  --primary-weak-2: #dbeafe;
  --success: #00a63e;
  --success-weak: #f0fdf4;
  --danger: #e7000b;
  --danger-weak: #fef2f2;
  --warning: #a15c00;
  --warning-weak: #fef9ec;
  --purple: #9810fa;
  --bubble-in: #ffffff;
  --bubble-out: #2b7fff;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-xs: 0 1px 2px rgba(14, 18, 27, .04);
  --shadow-sm: 0 2px 8px rgba(14, 18, 27, .06);
  --shadow: 0 12px 32px rgba(14, 18, 27, .10);
  --shadow-lg: 0 4px 16px rgba(14, 18, 27, .08), 0 1px 2px rgba(14, 18, 27, .04);
  --ring: 0 0 0 3px rgba(43, 127, 255, .16);
  --rail-w: 244px;
  --sidebar-w: 244px;
  --font: "Inter", "Inter Display", "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0b0c0f;
  --panel: #121317;
  --panel-2: #17191e;
  --panel-3: #1d2027;
  --border: #262932;
  --border-strong: #343843;
  --text: #f0f2f6;
  --text-2: #b3bac6;
  --text-3: #8a93a3;
  --text-4: #6b7280;
  --primary: #4c93ff;
  --primary-strong: #74a9ff;
  --primary-weak: #10233d;
  --primary-weak-2: #17304f;
  --success: #3ecf8e;
  --success-weak: #0f2a20;
  --danger: #ff6161;
  --danger-weak: #2c1618;
  --warning: #e5a94a;
  --warning-weak: #2b2312;
  --purple: #c084fc;
  --bubble-in: #1a1d24;
  --bubble-out: #2b7fff;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .45);
  --shadow: 0 16px 40px rgba(0, 0, 0, .6);
  --shadow-lg: 0 6px 20px rgba(0, 0, 0, .5);
  --ring: 0 0 0 3px rgba(76, 147, 255, .24);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  font-feature-settings: "cv05" 1, "ss01" 1;
}

body.scrollable { overflow: auto; }

h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -.011em; line-height: 1.3; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-strong); }
button { font-family: inherit; }
input, textarea, select, button { font-family: inherit; font-size: 14px; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; }
::selection { background: var(--primary-weak-2); color: var(--text); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text-3) 26%, transparent);
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--text-3) 48%, transparent); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--radius-sm);
}

.hidden { display: none !important; }
.muted { color: var(--text-3); }
.small { font-size: 12px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; }
.row.gap { gap: 8px; }
.stack { display: flex; flex-direction: column; }
.spacer { flex: 1; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }

.icon {
  width: 18px;
  height: 18px;
  display: block;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon.sm { width: 15px; height: 15px; }
.icon.lg { width: 22px; height: 22px; }
.icon.xl { width: 28px; height: 28px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  transition: background .13s ease, border-color .13s ease, color .13s ease, box-shadow .13s ease;
  white-space: nowrap;
  user-select: none;
}
.btn:hover { background: var(--panel-2); border-color: color-mix(in srgb, var(--text-3) 40%, var(--border-strong)); }
.btn:active { background: var(--panel-3); }
.btn:focus-visible { box-shadow: var(--ring); border-color: var(--primary); }
.btn .icon { color: var(--text-3); }
.btn:hover .icon { color: var(--text-2); }

.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn.primary .icon { color: rgba(255, 255, 255, .86); }
.btn.primary:hover { background: var(--primary-strong); border-color: var(--primary-strong); color: #fff; }
.btn.primary:hover .icon { color: #fff; }
.btn.primary:active { background: var(--primary-strong); }
.btn.primary:focus-visible { box-shadow: var(--ring); }

.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--panel-2); color: var(--text); }
.btn.ghost:active { background: var(--panel-3); }

.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 32%, var(--border)); background: var(--panel); }
.btn.danger:hover { background: var(--danger-weak); border-color: color-mix(in srgb, var(--danger) 55%, var(--border)); color: var(--danger); }
.btn.danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger.solid:hover { background: color-mix(in srgb, var(--danger) 86%, #000); color: #fff; }

.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; gap: 5px; border-radius: var(--radius-sm); }
.btn.sm .icon { width: 14px; height: 14px; }
.btn.lg { height: 40px; padding: 0 18px; font-size: 14px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn[disabled], .btn:disabled { opacity: .45; pointer-events: none; }
.btn.loading { pointer-events: none; opacity: .7; }

.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .13s ease, color .13s ease;
  flex: none;
}
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.icon-btn:active { background: var(--panel-3); }
.icon-btn.active { background: var(--primary-weak); color: var(--primary); }
.icon-btn.sm { width: 26px; height: 26px; }
.icon-btn.danger:hover { background: var(--danger-weak); color: var(--danger); }

.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label { font-size: 12px; color: var(--text-2); font-weight: 500; }
.field .hint { font-size: 12px; color: var(--text-3); line-height: 1.6; }
.field .hint.error { color: var(--danger); }

.input, .textarea, .select {
  width: 100%;
  height: 36px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text);
  outline: none;
  font-size: 13.5px;
  transition: border-color .13s ease, box-shadow .13s ease, background .13s ease;
}
.input:hover, .textarea:hover, .select:hover { border-color: color-mix(in srgb, var(--text-3) 45%, var(--border-strong)); }
.input:focus, .textarea:focus, .select:focus { border-color: var(--primary); box-shadow: var(--ring); }
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
.textarea { height: auto; min-height: 84px; padding: 9px 11px; resize: vertical; line-height: 1.65; }
.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
}
.input[disabled], .textarea[disabled], .select[disabled] { background: var(--panel-2); color: var(--text-3); pointer-events: none; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }

/* 极验风格人机验证：左侧点击区 + 上下描边 + 右侧安全标识 */
.verify-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 44px;
  padding: 0 10px 0 0;
  border: 0;
  border-radius: 4px;
  background: #232323;
  color: rgba(255, 255, 255, .72);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  transition: background .16s ease, color .16s ease;
}
.verify-box:hover { background: #2a2a2a; }
.verify-box:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(76, 147, 255, .3); }
.verify-box[data-state="checking"] { cursor: progress; }
.verify-box[data-state="ok"] { cursor: default; background: #1b3527; color: #7ee2a8; }
.verify-box[data-state="ok"]:hover { background: #1b3527; }

.verify-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.verify-frame path {
  fill: none;
  stroke: rgba(255, 255, 255, .3);
  stroke-width: 2;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: verify-draw .55s ease forwards;
}
.verify-frame-bottom { animation-delay: .08s; }
.verify-box[data-state="ok"] .verify-frame path { stroke: rgba(62, 207, 142, .42); }

.verify-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .82);
  transition: background .16s ease, color .16s ease;
}
.verify-box:hover .verify-btn { background: rgba(255, 255, 255, .1); }
.verify-box[data-state="ok"] .verify-btn { background: rgba(62, 207, 142, .16); color: #3ecf8e; }

.verify-icon-click,
.verify-icon-check {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.verify-icon-check { display: none; }
.verify-box[data-state="ok"] .verify-icon-click { display: none; }
.verify-box[data-state="ok"] .verify-icon-check { display: block; }

/* 验证通过：打勾动画（图标弹出 + 对勾描边绘制） */
.verify-box[data-state="ok"] .verify-icon-check {
  animation: verify-pop .45s cubic-bezier(.18, 1.4, .4, 1) both;
}
.verify-box[data-state="ok"] .verify-icon-check path {
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  animation: verify-check-draw .38s ease-out .12s forwards;
}

@keyframes verify-pop {
  0% { transform: scale(.3); opacity: 0; }
  60% { transform: scale(1.18); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes verify-check-draw { to { stroke-dashoffset: 0; } }

.verify-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, .22);
  border-top-color: rgba(255, 255, 255, .9);
  border-radius: 50%;
  animation: verify-spin .7s linear infinite;
}
.verify-box[data-state="checking"] .verify-spinner { display: block; }
.verify-box[data-state="checking"] .verify-icon-click { display: none; }

.verify-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.verify-help {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: none;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, .5);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: border-color .14s ease, color .14s ease;
}
.verify-help:hover { border-color: rgba(255, 255, 255, .45); color: rgba(255, 255, 255, .9); }
.verify-help:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(76, 147, 255, .3); }

.verify-brand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  color: rgba(255, 255, 255, .4);
  font-size: 11px;
  letter-spacing: .02em;
}
.verify-brand svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.verify-brand em { font-style: normal; }
.verify-box[data-state="ok"] .verify-brand { color: rgba(126, 226, 168, .65); }

.verify-box.shake { animation: verify-shake .4s ease; }

@keyframes verify-draw { to { stroke-dashoffset: 0; } }
@keyframes verify-spin { to { transform: rotate(360deg); } }
@keyframes verify-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}
@media (prefers-reduced-motion: reduce) {
  .verify-box, .verify-btn, .verify-icon-click, .verify-icon-check { transition: none; }
  .verify-frame path { animation: none; stroke-dashoffset: 0; }
  .verify-spinner { animation: none; }
  .verify-box.shake { animation: none; }
  .verify-box[data-state="ok"] .verify-icon-check,
  .verify-box[data-state="ok"] .verify-icon-check path { animation: none; }
  .verify-box[data-state="ok"] .verify-icon-check path { stroke-dashoffset: 0; }
}

.checkbox, .radio {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  color: var(--text-2);
  font-size: 13px;
  user-select: none;
}
.checkbox input, .radio input { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; margin: 0; }

.switch { position: relative; width: 36px; height: 20px; flex: none; display: inline-block; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--border-strong); border-radius: 99px; transition: background .16s ease; }
.switch span::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: transform .16s ease; box-shadow: 0 1px 2px rgba(0, 0, 0, .18); }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(16px); }

.avatar {
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  flex: none;
  user-select: none;
  overflow: hidden;
  letter-spacing: .01em;
}
.avatar.round { border-radius: 50%; }
.avatar.xs { width: 22px; height: 22px; font-size: 10px; }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }
.avatar.md { width: 36px; height: 36px; font-size: 14px; }
.avatar.lg { width: 48px; height: 48px; font-size: 18px; }
.avatar.xl { width: 68px; height: 68px; font-size: 24px; border-radius: 16px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-wrap { position: relative; flex: none; display: inline-flex; }
.avatar-wrap .dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-4);
  border: 2px solid var(--panel);
}
.avatar-wrap .dot.online { background: var(--success); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 21px;
  padding: 0 7px;
  border-radius: var(--radius-xs);
  font-size: 11.5px;
  font-weight: 500;
  background: var(--panel-3);
  color: var(--text-2);
  white-space: nowrap;
  line-height: 1;
}
.tag.primary { background: var(--primary-weak); color: var(--primary-strong); }
.tag.success { background: var(--success-weak); color: var(--success); }
.tag.danger { background: var(--danger-weak); color: var(--danger); }
.tag.warning { background: var(--warning-weak); color: var(--warning); }
.tag.clickable { cursor: pointer; }
.tag.clickable:hover { filter: brightness(.97); }

.unread-badge {
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--danger);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.unread-badge.soft { background: var(--primary); }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 44px 24px;
  color: var(--text-3);
  text-align: center;
}
.empty .empty-icon {
  color: var(--text-4);
  display: flex;
  margin-bottom: 2px;
}
.empty .empty-icon .icon { width: 26px; height: 26px; stroke-width: 1.5; }
.empty strong { color: var(--text-2); font-weight: 600; font-size: 13.5px; }
.empty p { font-size: 12.5px; max-width: 340px; line-height: 1.7; }

#modal-root { position: relative; z-index: 900; }
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 15, .44);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade .14s ease;
  z-index: 900;
}
[data-theme="dark"] .modal-mask { background: rgba(0, 0, 0, .62); }
/* 弹窗本体样式全部交给 SweetAlert2 + css/swal.css，这里只保留遮罩兜底 */

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.99); } }

#toast-root {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--radius);
  background: #0e121b;
  color: #f5f7fa;
  box-shadow: var(--shadow);
  font-size: 13px;
  animation: toast-in .18s ease;
  max-width: 460px;
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, .08);
}
[data-theme="dark"] .toast { background: var(--panel-3); color: var(--text); border-color: var(--border); }
.toast .icon { color: rgba(255, 255, 255, .72); }
[data-theme="dark"] .toast .icon { color: var(--text-3); }
.toast.success .icon { color: #4ade80; }
.toast.error .icon { color: #f87171; }
.toast.info .icon { color: #7cb0ff; }
.toast.leaving { animation: toast-out .16s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-4px); } }

.menu {
  position: fixed;
  min-width: 180px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  z-index: 950;
  animation: pop .12s ease;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
  line-height: 1.5;
}
.menu-item:hover { background: var(--panel-2); }
.menu-item .icon { color: var(--text-3); }
.menu-item.danger { color: var(--danger); }
.menu-item.danger .icon { color: var(--danger); }
.menu-item.danger:hover { background: var(--danger-weak); }
.menu-divider { height: 1px; background: var(--border); margin: 4px 2px; }

.progress { height: 5px; border-radius: 99px; background: var(--panel-3); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: var(--primary); transition: width .2s ease; }

.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-3);
  padding: 9px 14px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  letter-spacing: .01em;
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; color: var(--text-2); }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--panel-2); }
.table td strong { color: var(--text); font-weight: 500; }

.skeleton { background: linear-gradient(90deg, var(--panel-3) 25%, var(--panel-2) 50%, var(--panel-3) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { to { background-position: -200% 0; } }

.scroll { overflow: auto; overscroll-behavior: contain; }

.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 12px 2px; }
.pager .page-info { color: var(--text-3); font-size: 12.5px; margin-right: auto; }

@media (max-width: 640px) {
  body { font-size: 13.5px; }
  .modal-mask { padding: 12px; align-items: flex-end; }
  .swal2-container { align-items: flex-start !important; padding: 10px !important; }
  .swal2-popup { max-height: none; margin: 0; }
  .swal2-title { font-size: 19px !important; }
  .swal2-html-container { padding-left: 16px !important; padding-right: 16px !important; }
  .swal2-actions { padding: 0 16px; }
}

.search-box { position: relative; display: flex; align-items: center; }
.search-box .icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-4);
  width: 15px;
  height: 15px;
  pointer-events: none;
}
.search-box input {
  width: 100%;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--panel-2);
  padding: 0 11px 0 32px;
  outline: none;
  color: var(--text);
  font-size: 13px;
  transition: border-color .13s ease, background .13s ease, box-shadow .13s ease;
}
.search-box input::placeholder { color: var(--text-4); }
.search-box input:hover { border-color: var(--border-strong); }
.search-box input:focus { background: var(--panel); border-color: var(--primary); box-shadow: var(--ring); }

.file-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: var(--text-3);
  background: var(--panel-3);
  flex: none;
}
.file-icon .icon { width: 16px; height: 16px; }
.file-icon.folder { background: var(--primary-weak); color: var(--primary); }
.file-icon.image { background: var(--success-weak); color: var(--success); }
.file-icon.video { background: color-mix(in srgb, var(--purple) 10%, var(--panel)); color: var(--purple); }
.file-icon.audio { background: var(--warning-weak); color: var(--warning); }
.file-icon.archive { background: var(--panel-3); color: var(--text-3); }
.file-icon.document { background: var(--panel-3); color: var(--text-2); }

.preview-text {
  width: 100%;
  margin: 0;
  padding: 20px 24px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  background: var(--panel);
  max-height: 72vh;
  overflow: auto;
}

.quota-bar i, .mini-bar i { min-width: 2px; }

.brand-mark img, .rail-logo img, .admin-brand .mark img, .share-brand .mark img, .sb-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

/* SweetAlert2 弹窗保持原生白色外观；弹窗内部的应用控件按浅色渲染，
   避免暗色主题下出现「白卡片 + 黑输入框」的割裂。不改变弹窗自身样式。 */
.swal2-popup {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --panel-2: #f5f7fa;
  --panel-3: #eef1f5;
  --border: #e6e9ef;
  --border-strong: #d7dbe3;
  --text: #0e121b;
  --text-2: #4b5261;
  --text-3: #7b8494;
  --text-4: #99a0ae;
  --primary: #7066e0;
  --primary-strong: #5f56c9;
  --primary-weak: #f1f0fd;
  --primary-weak-2: #ddd9f7;
  --danger: #d93b3b;
  --danger-weak: #fdeeee;
  --success: #2e9e5b;
  --success-weak: #eefaf1;
  --warning: #b8760f;
  --warning-weak: #fdf6e8;
  --bubble-in: #ffffff;
  --bubble-out: #7066e0;
}

/* 弹窗内表单内容左对齐（弹窗自身样式不变） */
.swal2-popup .yc-content { text-align: left; }
