/* 鸿玉云盘 · 视觉系统 */
:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #0e1729;
  --ink-soft: #344054;
  --muted: #6b7a90;
  --line: #e4e9f2;
  --line-strong: #d3dae6;
  --brand: #1554d1;
  --brand-deep: #0b3a9e;
  --brand-soft: #eaf0fe;
  --teal: #0e9384;
  --ok: #12905b;
  --warn: #b25c09;
  --danger: #cf2e2e;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 32, 58, 0.06);
  --shadow-md: 0 14px 40px rgba(16, 32, 58, 0.14);
  --sidebar-w: 248px;
  --topbar-h: 66px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: var(--ink-soft); }

/* ---------- 基础控件 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: transparent;
  font-weight: 600; font-size: 14px; line-height: 1; white-space: nowrap;
  transition: background .16s, border-color .16s, color .16s, box-shadow .16s;
}
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(21, 84, 209, .22); }
.btn--primary:hover { background: #0f47b8; }
.btn--primary:disabled { opacity: .6; cursor: not-allowed; box-shadow: none; }
.btn--ghost { background: #fff; border-color: var(--line-strong); color: var(--ink-soft); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #b02222; }
.btn--block { width: 100%; }
.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; color: var(--ink-soft);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: #eff3fa; color: var(--brand); }
.icon-btn--danger:hover { background: #fdecec; color: var(--danger); }
.icon-btn.is-active { background: var(--brand-soft); color: var(--brand); }

.mini-btn {
  height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--ink-soft); font-size: 12.5px; font-weight: 600;
}
.mini-btn:hover { border-color: var(--brand); color: var(--brand); }
.mini-btn--danger:hover { border-color: var(--danger); color: var(--danger); }
.mini-btn:disabled { opacity: .5; cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.field > span { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.field input, .field select {
  height: 42px; width: 100%; padding: 0 12px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); background: #fff; outline: none; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(21, 84, 209, .12); }
.field input::placeholder { color: #9aa6b8; }
.input-row { display: flex; gap: 8px; align-items: center; }
.input-row input { flex: 1; height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; }
.input-inline { height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; outline: none; }
.input-inline:focus { border-color: var(--brand); }
.select-inline { height: 34px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; color: var(--ink-soft); }
.form-error { color: var(--danger); font-size: 13px; margin: 4px 0 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.muted { color: var(--muted); font-size: 12.5px; }

.switch { position: relative; display: inline-flex; width: 44px; height: 24px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch > span { position: absolute; inset: 0; background: #d7deea; border-radius: 999px; transition: background .18s; }
.switch > span::after { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .18s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch-row { display: flex; flex-wrap: wrap; gap: 26px; margin: 6px 0 16px; }
.switch-row .switch { width: auto; height: auto; align-items: center; gap: 9px; cursor: pointer; }
.switch-row .switch > span { position: relative; inset: auto; flex: 0 0 auto; width: 40px; height: 22px; border-radius: 999px; }
.switch-row .switch > span::after { width: 16px; height: 16px; left: 3px; top: 3px; }
.switch-row .switch input:checked + span::after { transform: translateX(18px); }
.switch-row .switch em { font-style: normal; font-size: 13px; color: var(--text); white-space: nowrap; }

.progress { height: 6px; background: #e7ecf5; border-radius: 999px; overflow: hidden; }
.progress__bar { height: 100%; background: linear-gradient(90deg, var(--brand), #2f80ed); border-radius: 999px; transition: width .3s; }
.progress--thin { height: 4px; }

.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.tag--danger { background: #fdecec; color: var(--danger); }
.tag--warn { background: #fff3e2; color: var(--warn); }
.tag--ok { background: #e6f6ee; color: var(--ok); }
.tag--muted { background: #eff2f7; color: var(--muted); }

.avatar { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #1554d1, #2f80ed); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: 0 0 auto; }
.avatar--sm { width: 30px; height: 30px; font-size: 13px; border-radius: 8px; }

/* ---------- 布局 ---------- */
.shell { min-height: 100vh; display: flex; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); background: var(--surface);
  border-right: 1px solid var(--line); display: flex; flex-direction: column;
  padding: 18px 14px 16px; position: sticky; top: 0; height: 100vh; z-index: 40;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand__mark {
  width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, var(--brand), #2f80ed);
  color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(21,84,209,.28);
}
.brand__name { font-size: 16px; font-weight: 800; letter-spacing: .2px; }
.brand__sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

.tenant-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; background: var(--surface-soft); border: 1px solid var(--line); margin-bottom: 16px; }
.tenant-card__avatar { width: 32px; height: 32px; border-radius: 8px; background: #e8effe; color: var(--brand); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.tenant-card__name { font-weight: 700; font-size: 13px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tenant-card__plan { font-size: 11.5px; color: var(--muted); margin-top: 1px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; color: var(--ink-soft); font-weight: 600; font-size: 13.5px; position: relative; }
.nav-item:hover { background: #f4f7fc; color: var(--ink); }
.nav-item--active { background: var(--brand-soft); color: var(--brand); }
.nav-item--active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--brand); }
.nav__divider { height: 1px; background: var(--line); margin: 10px 6px; }
.nav-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }

.quota-box { margin-top: auto; padding: 14px 12px 4px; border-top: 1px solid var(--line); }
.quota-box__row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 7px; }
.quota-box__row strong { color: var(--ink); }
.quota-box__hint { font-size: 11px; color: var(--muted); margin: 6px 0 8px; }
.quota-box__link { font-size: 12px; color: var(--brand); font-weight: 700; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); flex: 0 0 var(--topbar-h); display: flex; align-items: center; gap: 18px;
  padding: 0 24px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30;
}
.topbar__menu { display: none; }
.topbar__title { font-size: 17px; font-weight: 800; margin: 0; white-space: nowrap; letter-spacing: .2px; }
.search { margin-left: auto; display: flex; align-items: center; gap: 8px; width: min(420px, 38vw); height: 38px; padding: 0 12px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; color: var(--muted); transition: border-color .15s, background .15s; }
.search:focus-within { background: #fff; border-color: var(--brand); }
.search input { flex: 1; border: 0; background: transparent; outline: none; font-size: 13.5px; color: var(--ink); }
.search__clear { border: 0; background: transparent; color: var(--muted); display: flex; }
.topbar__actions { display: flex; align-items: center; gap: 8px; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 4px 10px 4px 4px; border-radius: 999px; }
.user-chip__meta { display: flex; flex-direction: column; line-height: 1.25; }
.user-chip__meta span { font-weight: 700; font-size: 13px; }
.user-chip__meta em { font-style: normal; font-size: 11px; color: var(--muted); }

/* ---------- 页面 ---------- */
.page { flex: 1; padding: 22px 26px 34px; }
.page__inner { max-width: 1600px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.page-head h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: .3px; }
.page-head p { margin: 0; color: var(--muted); font-size: 13px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px 20px; margin-bottom: 18px; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card__head h3 { margin: 0; font-size: 15.5px; }
.card__tools { display: flex; gap: 8px; align-items: center; }
.card__hint { color: var(--muted); font-size: 12.5px; margin: -4px 0 12px; }
.card-empty { padding: 26px 0; text-align: center; color: var(--muted); font-size: 13px; }
.split { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; margin-bottom: 18px; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-row--4 { grid-template-columns: repeat(4, 1fr); }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 5px; }
.stat-card__label { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat-card strong { font-size: 26px; letter-spacing: -.5px; }
.stat-card em { font-style: normal; font-size: 11.5px; color: var(--muted); }

/* ---------- 文件页 ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar__left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.toolbar__right { display: flex; gap: 8px; }
.crumb-current { font-weight: 800; font-size: 15px; }
.crumb-link { color: var(--ink-soft); font-weight: 600; }
.crumb-link:hover { color: var(--brand); }
.crumb-sep { color: #b6c0cf; }

.filterbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 0 14px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; }
.chip { height: 30px; padding: 0 13px; border-radius: 999px; border: 1px solid transparent; background: #eef2f8; color: var(--ink-soft); font-size: 12.5px; font-weight: 600; }
.chip:hover { background: #e5ebf5; }
.chip--active { background: var(--brand-soft); color: var(--brand); border-color: #c9dbfb; }
.filterbar__right { display: flex; align-items: center; gap: 10px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-soft); }
.check input { accent-color: var(--brand); }
.view-toggle { display: flex; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.view-toggle .icon-btn { width: 30px; height: 28px; }

.file-table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.file-table__head { display: grid; grid-template-columns: minmax(0, 1fr) 110px 150px 130px 210px; gap: 14px; padding: 12px 18px; background: #f8fafd; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); font-weight: 700; }
.file-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 150px 130px 210px; gap: 14px; padding: 10px 18px; border-bottom: 1px solid #f0f3f8; align-items: center; transition: background .12s; }
.file-row:last-child { border-bottom: 0; }
.file-row:hover { background: #f8fafd; }
.col-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.file-name { display: flex; align-items: center; gap: 10px; min-width: 0; background: none; border: 0; padding: 0; text-align: left; }
.file-name__text { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-name:hover .file-name__text { color: var(--brand); }
.file-icon { width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: #f0f3f9; color: var(--muted); flex: 0 0 auto; }
.col-size, .col-time, .col-owner { color: var(--ink-soft); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-actions { display: flex; gap: 2px; justify-content: flex-end; opacity: .55; transition: opacity .15s; }
.file-row:hover .col-actions { opacity: 1; }
.file-row .col-actions .icon-btn { width: 30px; height: 30px; }

.tone-folder { background: #fff4e0; color: #c47b09; }
.tone-gray { background: #f0f3f9; color: #68758a; }
.tone-green { background: #e8f6ee; color: #12864f; }
.tone-orange { background: #fff0e2; color: #c05609; }
.tone-pink { background: #fdeef3; color: #b23a6b; }
.tone-red { background: #fdecec; color: #cf2e2e; }
.tone-blue { background: #eaf0fe; color: #1554d1; }
.tone-teal { background: #e6f6f3; color: #0e9384; }
.tone-slate { background: #eff2f7; color: #4b5c73; }

.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.file-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 14px 10px; box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s, box-shadow .15s; display: flex; flex-direction: column; }
.file-card:hover { border-color: #c9dbfb; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(16,32,58,.08); }
.file-card__top { display: flex; flex-direction: column; gap: 9px; width: 100%; border: 0; background: transparent; text-align: left; padding: 0; flex: 1; min-width: 0; }
.file-card .tag { align-self: flex-start; }
.file-card__icon { width: 64px; height: 64px; border-radius: 14px; display: flex; align-items: center; justify-content: center; align-self: flex-start; }
.file-card__name { font-weight: 700; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; width: 100%; min-width: 0; }
.file-card__meta { color: var(--muted); font-size: 11.5px; }
.thumb { width: 100%; height: 110px; border-radius: 10px; overflow: hidden; background: #f0f3f9; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-card__actions { display: flex; gap: 4px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; border-top: 1px solid #f0f3f8; }

.empty { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 64px 20px; text-align: center; color: var(--muted); }
.empty > span { color: #b7c3d6; display: inline-flex; margin-bottom: 10px; }
.empty h3 { margin: 6px 0; color: var(--ink); font-size: 17px; }
.empty p { margin: 0 0 16px; font-size: 13px; }

.skeleton-list { display: flex; flex-direction: column; gap: 10px; }
.skeleton-row { height: 62px; border-radius: 10px; background: linear-gradient(90deg, #eff3f9 25%, #f7f9fd 37%, #eff3f9 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.drop-hint { position: fixed; inset: 0; background: rgba(9, 28, 62, .55); z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; gap: 8px; backdrop-filter: blur(3px); }
.drop-hint p { font-size: 16px; font-weight: 600; }

.upload-panel { position: fixed; right: 22px; bottom: 22px; width: 330px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-md); z-index: 80; overflow: hidden; }
.upload-panel__head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: #f8fafd; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 12.5px; }
.upload-item { padding: 9px 12px; border-bottom: 1px solid #f2f5fa; }
.upload-item__name { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 5px; }
.upload-item__msg { font-size: 11px; color: var(--muted); margin-top: 4px; }
.upload-item__msg.is-error { color: var(--danger); }
.upload-item__msg.is-done { color: var(--ok); }

/* ---------- 预览 ---------- */
.preview { width: min(1100px, 94vw); max-height: 90vh; background: #0d1422; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-md); }
.preview--text { width: min(820px, 92vw); }
.preview__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; background: rgba(255,255,255,.06); color: #fff; }
.preview__title { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; font-size: 13.5px; }
.preview__title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview__title em { font-style: normal; opacity: .6; font-size: 11.5px; }
.preview__actions { display: flex; align-items: center; gap: 6px; }
.preview__actions .btn--ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.18); }
.preview__body { flex: 1; overflow: auto; display: flex; align-items: center; justify-content: center; min-height: 320px; background: #0d1422; }
.preview__image { max-width: 100%; max-height: 76vh; object-fit: contain; }
.preview__video { width: 100%; max-height: 76vh; background: #000; }
.preview__audio { width: min(520px, 80%); margin: 40px; }
.preview__frame { width: 100%; height: 76vh; border: 0; background: #fff; }
.preview__text { margin: 0; padding: 22px 26px; background: #fff; color: #1a2233; width: 100%; height: 70vh; overflow: auto; font-size: 13px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.preview__loading, .preview__empty { color: #9fb0c9; padding: 60px; text-align: center; }
.preview__empty p { margin: 12px 0 18px; }

/* ---------- 对话框 ---------- */
.overlay { position: fixed; inset: 0; background: rgba(10, 22, 44, .5); backdrop-filter: blur(2px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.overlay--dark { background: rgba(5, 12, 24, .78); }
.dialog { width: min(520px, 96vw); background: #fff; border-radius: 14px; padding: 22px 24px; box-shadow: var(--shadow-md); max-height: 90vh; overflow: auto; }
.dialog--sm { width: min(440px, 96vw); }
.dialog--md { width: min(620px, 96vw); }
.dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dialog__title { margin: 0 0 10px; font-size: 17px; word-break: break-all; }
.dialog__text { color: var(--ink-soft); margin: 4px 0 20px; line-height: 1.6; font-size: 13.5px; }
.dialog__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.share-note { display: flex; gap: 8px; align-items: flex-start; background: #f5f8ff; border: 1px solid #dce7fb; color: #2b4f8f; border-radius: 9px; padding: 10px 12px; font-size: 12.5px; margin-bottom: 16px; }
.notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: 9px; margin-bottom: 16px; font-size: 13px; line-height: 1.55; }
.notice--warn { background: #fff6e8; border: 1px solid #f6dfb6; color: #8a5209; }
.notice--ok { background: #eaf8f1; border: 1px solid #c9ead9; color: #0f7748; }
.share-result .muted { margin-top: 8px; }

/* ---------- Toast ---------- */
.toast-stack { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; min-width: 220px; max-width: 560px; padding: 11px 16px; border-radius: 10px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-md); font-size: 13px; font-weight: 600; color: var(--ink); }
.toast--success svg { color: var(--ok); }
.toast--error svg { color: var(--danger); }
.toast--info svg { color: var(--brand); }
.toast-enter-active, .toast-leave-active { transition: opacity .18s, transform .18s; }
.toast-enter-from, .toast-leave-to { opacity: 0; transform: translateY(-8px); }

/* ---------- 登录 / 注册 ---------- */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; background: #fff; }
.auth-hero { position: relative; padding: 56px 64px; background: radial-gradient(1200px 600px at 10% 0%, #1b5fe0 0%, #0b2f78 55%, #071f52 100%); color: #fff; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.auth-hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(circle at 30% 30%, #000 0%, transparent 75%); pointer-events: none; }
.auth-hero__brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .5px; margin-bottom: 48px; position: relative; z-index: 1; }
.auth-hero__title { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.18; margin: 0 0 18px; letter-spacing: .5px; position: relative; z-index: 1; }
.auth-hero__desc { color: rgba(255,255,255,.78); font-size: 14.5px; line-height: 1.7; max-width: 520px; position: relative; z-index: 1; }
.auth-hero__list { list-style: none; padding: 0; margin: 30px 0 0; display: flex; flex-direction: column; gap: 12px; position: relative; z-index: 1; }
.auth-hero__list li { display: flex; gap: 10px; align-items: center; color: rgba(255,255,255,.9); font-size: 13.5px; }
.auth-hero__list svg { color: #7ee2b8; }
.auth-hero__stats { display: flex; gap: 44px; margin-top: 46px; position: relative; z-index: 1; }
.auth-hero__stats div { display: flex; flex-direction: column; gap: 3px; }
.auth-hero__stats strong { font-size: 24px; letter-spacing: -.5px; }
.auth-hero__stats span { font-size: 11.5px; color: rgba(255,255,255,.62); }
.auth-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 28px; background: #f7f9fd; }
.auth-panel--center { grid-column: 1 / -1; min-height: 100vh; }
.auth-card { width: min(430px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 30px 32px; box-shadow: 0 18px 50px rgba(16,32,58,.08); }
.auth-card__title { margin: 0 0 6px; font-size: 22px; letter-spacing: .2px; }
.auth-card__sub { margin: 0 0 22px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.auth-card__badge { display: inline-block; padding: 3px 9px; border-radius: 6px; background: var(--brand-soft); color: var(--brand); font-size: 11.5px; font-weight: 700; margin-bottom: 10px; }
.auth-form .field { margin-bottom: 14px; }
.auth-switch { margin-top: 16px; font-size: 12.5px; color: var(--muted); text-align: center; }
.auth-switch a { color: var(--brand); font-weight: 700; }
.auth-foot { margin-top: 18px; font-size: 11.5px; color: #96a3b7; }
.demo-box { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line); }
.demo-box__title { font-size: 12px; color: var(--muted); margin-bottom: 9px; }
.demo-box__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.demo-item { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: #fafbfe; text-align: left; }
.demo-item:hover { border-color: #bfd3f6; background: #f3f8ff; }
.demo-item strong { font-size: 11.5px; color: var(--ink); }
.demo-item span { font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.plan-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 30px; position: relative; z-index: 1; }
.plan-mini { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; backdrop-filter: blur(4px); }
.plan-mini strong { font-size: 14px; }
.plan-mini span { font-size: 11.5px; color: #a9d0ff; }
.plan-mini em { font-style: normal; font-size: 10.5px; color: rgba(255,255,255,.6); }

/* ---------- 团队 / 分享 / 安全 ---------- */
.member-table__head, .member-row { display: grid; grid-template-columns: minmax(0,1.4fr) 130px 150px 140px 100px 190px; gap: 12px; align-items: center; }
.member-table__head { padding: 10px 4px; border-bottom: 1px solid var(--line); font-size: 11.5px; color: var(--muted); font-weight: 700; }
.member-row { padding: 11px 4px; border-bottom: 1px solid #f1f4f9; font-size: 13px; }
.member-row:last-child { border-bottom: 0; }
.member-cell { display: flex; gap: 10px; align-items: center; min-width: 0; }
.member-cell strong { display: block; font-size: 13px; }
.member-cell em, .member-row em { font-style: normal; color: var(--muted); font-size: 11.5px; }
.role-pill { display: inline-block; padding: 3px 8px; border-radius: 5px; font-size: 11.5px; font-weight: 700; background: #eff2f7; color: var(--ink-soft); }
.role-owner { background: #eaf0fe; color: var(--brand); }
.role-admin { background: #e6f6f3; color: var(--teal); }
.role-platform_admin { background: #fdeee4; color: #b45309; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: #c3cbda; }
.status-dot.is-on { background: var(--ok); }
.status-dot.is-off { background: #b6bfcf; }
.member-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.invite-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 2px; border-bottom: 1px solid #f1f4f9; }
.invite-row em { font-style: normal; color: var(--muted); font-size: 11.5px; display: block; margin-top: 2px; }

.share-table__head, .share-row { display: grid; grid-template-columns: minmax(0,1.3fr) 90px 110px 100px minmax(200px,1.3fr) 70px; gap: 12px; align-items: center; }
.share-table__head { padding: 10px 4px; border-bottom: 1px solid var(--line); font-size: 11.5px; color: var(--muted); font-weight: 700; }
.share-row { padding: 11px 4px; border-bottom: 1px solid #f1f4f9; font-size: 12.5px; }
.share-row:last-child { border-bottom: 0; }
.share-row__file { display: flex; gap: 9px; align-items: center; min-width: 0; }
.share-row__file strong { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-row__file em { font-style: normal; font-size: 11px; color: var(--muted); }
.share-row__link { display: flex; align-items: center; gap: 4px; }
.share-row__link input { flex: 1; min-width: 0; height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: 11px; }
.approval-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 2px; border-bottom: 1px solid #f1f4f9; }
.approval-row strong { display: block; font-size: 13px; }
.approval-row em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.approval-actions { display: flex; gap: 6px; }
.policy-list { display: flex; flex-direction: column; gap: 14px; }
.policy-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 0; }
.policy-row strong { display: block; font-size: 13.5px; }
.policy-row em { font-style: normal; font-size: 11.5px; color: var(--muted); line-height: 1.5; display: block; margin-top: 3px; }
.sensitive-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f1f4f9; }
.sensitive-row strong { display: block; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.sensitive-row em { font-style: normal; font-size: 11px; color: var(--muted); }
.sensitive-row > .muted { margin-left: auto; }
.rule-table__head, .rule-row { display: grid; grid-template-columns: 1.1fr 90px minmax(180px,1.6fr) 100px 90px 70px; gap: 10px; align-items: center; }
.rule-table__head { padding: 9px 4px; border-bottom: 1px solid var(--line); font-size: 11.5px; color: var(--muted); font-weight: 700; }
.rule-row { padding: 10px 4px; border-bottom: 1px solid #f1f4f9; font-size: 12.5px; }
.audit-table__head, .audit-row { display: grid; grid-template-columns: 150px 110px 100px minmax(160px,1.4fr) 130px; gap: 10px; align-items: center; }
.audit-table--wide .audit-table__head, .audit-table--wide .audit-row { grid-template-columns: 150px 140px 100px 140px minmax(160px,1.2fr) 130px; }
.audit-table__head { padding: 9px 4px; border-bottom: 1px solid var(--line); font-size: 11.5px; color: var(--muted); font-weight: 700; }
.audit-row { padding: 9px 4px; border-bottom: 1px solid #f1f4f9; font-size: 12px; color: var(--ink-soft); }
.audit-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding-top: 14px; color: var(--muted); font-size: 12px; }

.plan-current { display: grid; grid-template-columns: .9fr 1.1fr; gap: 24px; background: linear-gradient(120deg, #0f3f9e, #1c66e0); color: #fff; border-radius: 14px; padding: 22px 26px; margin-bottom: 18px; box-shadow: 0 14px 34px rgba(21,84,209,.24); }
.plan-current__label { font-size: 11.5px; opacity: .7; display: block; }
.plan-current strong { font-size: 26px; display: block; margin: 4px 0; }
.plan-current em { font-style: normal; font-size: 12px; opacity: .8; }
.plan-current__usage { display: flex; flex-direction: column; gap: 8px; }
.plan-current__row { display: flex; justify-content: space-between; font-size: 12px; }
.plan-current .progress { background: rgba(255,255,255,.22); }
.plan-current .progress__bar { background: #8fd3ff; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.plan-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px 20px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.plan-card--active { border-color: #b7d0f8; box-shadow: 0 10px 30px rgba(21,84,209,.10); }
.plan-card__head { display: flex; align-items: flex-start; justify-content: space-between; }
.plan-card__head h3 { margin: 0; font-size: 17px; }
.plan-card__price strong { font-size: 26px; letter-spacing: -.5px; }
.plan-card__price span { font-size: 12px; color: var(--muted); }
.plan-card__meta { color: var(--muted); font-size: 12px; margin: 8px 0 14px; }
.plan-card__features { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.plan-card__features li { display: flex; gap: 7px; align-items: flex-start; font-size: 12.5px; color: var(--ink-soft); }
.plan-card__features svg { color: var(--ok); flex: 0 0 auto; margin-top: 1px; }
.order-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 2px; border-bottom: 1px solid #f1f4f9; }
.order-row strong { display: block; font-size: 13px; }
.order-row em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.amount { font-weight: 800; }
.foot-note { color: var(--muted); font-size: 12px; }

/* ---------- 平台后台 ---------- */
.admin-table__head, .admin-row { display: grid; grid-template-columns: minmax(0,1.4fr) 110px 70px 70px 160px 90px 210px; gap: 12px; align-items: center; }
.admin-table--orders .admin-table__head, .admin-table--orders .admin-row { grid-template-columns: 1.3fr 110px 70px 100px 90px 150px; }
.admin-table__head { padding: 10px 4px; border-bottom: 1px solid var(--line); font-size: 11.5px; color: var(--muted); font-weight: 700; }
.admin-row { padding: 11px 4px; border-bottom: 1px solid #f1f4f9; font-size: 12.5px; }
.admin-row strong { display: block; font-size: 13px; }
.admin-row em { font-style: normal; color: var(--muted); font-size: 11px; }
.admin-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.admin-table .select-inline { max-width: 100px; }
.tenant-row { display: grid; grid-template-columns: 34px minmax(0,1fr) 180px 70px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid #f1f4f9; }
.tenant-row:last-child { border-bottom: 0; }
.tenant-row__avatar { width: 34px; height: 34px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.tenant-row__main strong { display: block; font-size: 13px; }
.tenant-row__main em { font-style: normal; color: var(--muted); font-size: 11px; }
.tenant-row__usage { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); }
.bar-row { display: grid; grid-template-columns: 140px 1fr 44px; gap: 10px; align-items: center; padding: 5px 0; font-size: 12px; }
.bar { height: 6px; background: #eef2f8; border-radius: 999px; overflow: hidden; }
.bar__fill { height: 100%; background: linear-gradient(90deg, #2f80ed, #71b3ff); border-radius: 999px; }
.quick-row { display: flex; gap: 8px; flex-wrap: wrap; }
.quick-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 8px; background: #f5f8ff; color: var(--brand); font-size: 12px; font-weight: 700; border: 1px solid #e0eafa; }

/* ---------- 分享落地页 ---------- */
.share-landing { min-height: 100vh; background: radial-gradient(900px 500px at 50% -10%, #eaf1ff 0%, transparent 60%), var(--bg); display: flex; flex-direction: column; }
.share-landing__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 28px; max-width: 1180px; width: 100%; margin: 0 auto; }
.share-landing__badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); background: #fff; border: 1px solid var(--line); padding: 6px 10px; border-radius: 999px; }
.share-landing__main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px 20px 50px; }
.share-landing__foot { margin-top: 22px; font-size: 11.5px; color: #96a3b7; }
.share-card { width: min(720px, 96vw); background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 30px 34px; box-shadow: 0 24px 60px rgba(16,32,58,.10); }
.share-card--loading { text-align: center; color: var(--muted); padding: 60px; }
.share-card__top { display: flex; gap: 16px; align-items: flex-start; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.share-file-icon { width: 72px; height: 72px; border-radius: 16px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.share-card__title h2 { margin: 2px 0 6px; font-size: 20px; word-break: break-all; }
.share-card__title p { margin: 0; color: var(--muted); font-size: 12.5px; }
.share-card__note { margin-top: 6px !important; color: var(--ink-soft) !important; background: #f7f9fc; padding: 6px 10px; border-radius: 6px; display: inline-block; }
.share-card__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.share-tip { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11.5px; }
.share-state__icon { display: inline-flex; color: #b7c3d6; margin-bottom: 12px; }
.share-card h2 { font-size: 20px; margin: 6px 0; }
.share-card > p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.share-password { display: flex; gap: 10px; margin: 18px 0 8px; }
.share-password input { flex: 1; height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 9px; outline: none; }
.share-password input:focus { border-color: var(--brand); }
.share-folder { margin-top: 18px; }
.share-folder__back { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 12px; }
.share-file-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 4px; border-bottom: 1px solid #f1f4f9; }
.share-file-row__main { flex: 1; display: flex; align-items: center; gap: 10px; background: none; border: 0; text-align: left; min-width: 0; }
.share-file-row__main span:nth-child(2) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 13px; }
.share-file-row__main em { font-style: normal; color: var(--muted); font-size: 11.5px; }
.share-file-row__actions { display: flex; gap: 4px; }
.share-single { padding-top: 18px; }
.share-preview-image { background: #0d1422; border-radius: 12px; padding: 14px; display: flex; justify-content: center; }
.share-preview-image img { max-width: 100%; max-height: 460px; border-radius: 6px; object-fit: contain; }
.share-preview-text { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 16px; max-height: 340px; overflow: auto; }
.share-preview-text pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: 12.5px; line-height: 1.7; }
.share-single__hint { text-align: center; padding: 28px; color: #b7c3d6; border: 1px dashed var(--line-strong); border-radius: 12px; }
.share-single__hint p { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .split { grid-template-columns: 1fr; }
  .stat-row--4 { grid-template-columns: repeat(2, 1fr); }
  .file-table__head, .file-row { grid-template-columns: minmax(0,1fr) 90px 130px 170px; }
  .file-table__head .col-owner, .file-row .col-owner { display: none; }
  .member-table__head, .member-row { grid-template-columns: minmax(0,1.3fr) 110px 120px 110px 180px; }
  .member-table__head span:nth-child(4), .member-row > span:nth-child(4) { display: none; }
  .admin-table__head, .admin-row { grid-template-columns: minmax(0,1.3fr) 100px 60px 60px 130px 80px 180px; }
}
@media (max-width: 960px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-102%); transition: transform .22s; box-shadow: 0 12px 40px rgba(16,32,58,.18); }
  .sidebar--open { transform: translateX(0); }
  .topbar__menu { display: inline-flex; }
  .search { width: auto; flex: 1; margin-left: 0; }
  .user-chip__meta { display: none; }
  .page { padding: 18px 16px 28px; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-hero { padding: 40px 28px; }
  .auth-hero__stats { gap: 26px; }
  .share-table__head, .share-row { grid-template-columns: minmax(0,1.4fr) 80px 100px 70px; }
  .share-table__head span:nth-child(4), .share-row > span:nth-child(4),
  .share-table__head span:nth-child(5), .share-row > .share-row__link { display: none; }
  .plan-grid { grid-template-columns: 1fr; }
  .plan-current { grid-template-columns: 1fr; }
  .rule-table__head, .rule-row { grid-template-columns: 1fr 80px 1.4fr 90px 60px; }
  .rule-table__head span:last-child, .rule-row > button { display: none; }
}
@media (max-width: 760px) {
  .topbar { padding: 0 14px; gap: 10px; }
  .topbar__title { font-size: 15px; }
  .stat-row, .stat-row--4 { grid-template-columns: 1fr 1fr; }
  .file-table__head, .file-row { grid-template-columns: minmax(0,1fr) 80px 120px; }
  .file-table__head .col-owner, .file-table__head .col-time, .file-row .col-owner, .file-row .col-time { display: none; }
  .col-actions { opacity: 1; }
  .file-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .member-table__head, .member-row { grid-template-columns: 1fr 90px; }
  .member-table__head span:nth-child(n+3), .member-row > *:nth-child(n+3):not(.member-actions) { display: none; }
  .member-row .member-actions { grid-column: 1 / -1; }
  .admin-table__head, .admin-row { grid-template-columns: 1fr 90px; }
  .admin-table__head span:nth-child(n+3), .admin-row > *:nth-child(n+3):not(.admin-actions) { display: none; }
  .admin-row .admin-actions { grid-column: 1 / -1; }
  .audit-table__head, .audit-row { grid-template-columns: 110px 1fr 90px; }
  .audit-table__head span:nth-child(n+4), .audit-row > span:nth-child(n+4) { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 24px 22px; }
  .share-card { padding: 22px 18px; }
  .share-card__top { flex-direction: column; }
  .dialog { padding: 18px; }
  .upload-panel { right: 10px; left: 10px; width: auto; bottom: 10px; }
  .plan-strip { grid-template-columns: 1fr; }
  .demo-box__grid { grid-template-columns: 1fr; }
}
