/* ============================================================================
   INORIZE 文件站 —— 站点专属样式
   ----------------------------------------------------------------------------
   底座来自 Wiki 的 style.css（设计变量、按钮、卡片、表单、顶栏、页脚）
   与 FRPS 面板的 panel.css（后台骨架、侧栏、状态药丸、批量条）。
   这里只补充「文件浏览」这一层：工具条、文件表、文件夹网格、拖放区、
   上传队列、弹窗与预览浮层。暗色变量块跟在浅色规则之后，靠文档顺序取胜。
   ========================================================================== */

/* ---------------------------------------------------------------- 页面骨架 */
/* ⚠️ 必须先把 .page-body 从 Wiki 的「文章两栏」版式里拉回来。
   Wiki 的 style.css 里它是 flex 行容器（正文 + 右侧目录，justify-content:center），
   而本站把它当普通内容容器用（里面有标题、工具条、卡片、表格等多个区块）——
   不改的话每个区块都会变成被压扁的 flex item 并排居中，
   表现为「一串窄柱子 + 右边浮着空卡片」、二级导航被挤成竖排。
   本站的 station.css 在三套样式表里最后加载，同优先级下这里的规则生效。 */
.page-body {
  display: block;
  /* 注意：这条会覆盖 .container 的 `padding: 0 24px`（同优先级 + 本站样式最后加载），
     所以左右内边距要在这里自己补回来 —— 否则内容会顶到窗口右边缘，
     工具条右侧那组控件看着就像被裁掉了。 */
  padding: 26px 24px 40px;
}
.page-body > * { max-width: 100%; }

/* Wiki 的标题是渐变文字（-webkit-text-fill-color: transparent 优先于 color），
   深色主题下会变成黑字/看不见。这里按 FRPS 面板的做法把背景与 text-fill 一起拍平。 */
.page-title-main,
.page-head h1 {
  font-size: clamp(1.35rem, 2.2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.25;
  color: var(--ink, var(--text));
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: currentColor;
  margin: 0 0 8px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.page-head-main { min-width: 0; flex: 1 1 380px; }
.page-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* 二级导航（设置区）：确保是横向胶囊行，而不是被挤成竖排 */
.subnav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.subnav a {
  padding: 8px 15px;
  border-radius: 11px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-dim);
  border: 1px solid transparent;
}
.subnav a:hover { color: var(--text); background: var(--surface-strong); }
.subnav a.active { color: var(--primary); background: rgba(10, 132, 255, .1); border-color: rgba(10, 132, 255, .22); }

.crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; font-size: .95rem; }
.crumbs .crumb { color: var(--text-dim); padding: 2px 4px; border-radius: 8px; }
.crumbs .crumb:hover { color: var(--primary); background: var(--surface); }
.crumbs .crumb.current { color: var(--text); font-weight: 700; }
.crumbs .crumb-sep { color: var(--text-faint); }

.btn-outline {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: 12px;
  padding: 9px 16px;
  font-weight: 600;
  cursor: pointer;
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 6px 12px; font-size: .86rem; border-radius: 10px; }
.btn-danger { background: #dc2626; color: #fff; border: none; }
.btn-danger:hover { background: #b91c1c; }

/* ---------------------------------------------------------------- 工具条 */
/* 布局按「搜索 + 排序/视图」一行、类型筛选单独一行来做。
   之前三者挤在一行：11 个类型胶囊 + 搜索框 + 排序下拉总宽超过容器，
   右侧的排序与视图切换会被挤出容器裁掉。 */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.toolbar-search { display: flex; gap: 8px; flex: 1 1 280px; max-width: 460px; order: 1; }
.toolbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; order: 2; }
.toolbar-filters { display: flex; gap: 6px; flex-wrap: wrap; flex: 1 1 100%; order: 3; }
.toolbar-search input[type="search"] {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: .92rem;
}
.toolbar-search input[type="search"]:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: .84rem;
  font-weight: 600;
}
.chip:hover { color: var(--primary); border-color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.select-inline { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--text-dim); }
.select-inline select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.view-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.view-toggle button {
  padding: 8px 10px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.view-toggle button.active { background: var(--primary); color: #fff; }

/* ---------------------------------------------------------------- 拖放区 */
.drop-zone { position: relative; border-radius: var(--radius); }
.drop-zone.dragging::after {
  content: '';
  position: absolute;
  inset: -8px;
  border: 2px dashed var(--primary);
  border-radius: calc(var(--radius) + 8px);
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  pointer-events: none;
}
.drop-hint { display: none; }

/* ---------------------------------------------------------------- 文件表 */
.file-table-wrap { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow-x: auto; }
.file-table { width: 100%; border-collapse: collapse; }
.file-table thead th {
  text-align: left;
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-faint);
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.file-table tbody td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.file-table tbody tr:last-child td { border-bottom: none; }
.file-table tbody tr:hover { background: var(--surface-strong); }
.file-table tbody tr.selected { background: color-mix(in srgb, var(--primary) 10%, transparent); }
.col-check { width: 40px; }
.col-size, .col-time, .col-kind, .col-cdn { width: 1%; white-space: nowrap; }
.col-actions { width: 48px; text-align: right; }

.file-open {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
  text-align: left;
  max-width: 100%;
}
.file-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  color: var(--text-dim);
  overflow: hidden;
}
.file-icon svg { width: 20px; height: 20px; }
.file-icon img { width: 100%; height: 100%; object-fit: cover; }
.file-icon.kind-image { color: #0ea5e9; }
.file-icon.kind-video { color: #8b5cf6; }
.file-icon.kind-audio { color: #ec4899; }
.file-icon.kind-pdf { color: #dc2626; }
.file-icon.kind-doc { color: #2563eb; }
.file-icon.kind-archive { color: #d97706; }
.file-icon.kind-code { color: #059669; }
.file-icon.kind-exe { color: #475569; }

.file-name { display: block; font-weight: 600; max-width: 42ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-note { display: block; margin-top: 3px; font-size: .78rem; color: var(--text-faint); max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kind-pill { font-size: .78rem; color: var(--text-dim); }

.icon-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  border-radius: 9px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
}
.icon-btn:hover { background: var(--surface-strong); color: var(--text); border-color: var(--border); }

/* ---------------------------------------------------------------- 文件夹网格 */
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; padding: 14px; border-bottom: 1px solid var(--border); }
.folder-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  position: relative;
}
.folder-card:hover { border-color: var(--primary); }
.fc-icon { flex: 0 0 auto; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; color: #0284c7; }
.fc-icon svg { width: 22px; height: 22px; }
.fc-body { min-width: 0; flex: 1; }
.fc-name { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-meta { display: block; font-size: .78rem; color: var(--text-faint); }
.fc-menu { position: absolute; top: 6px; right: 6px; opacity: 0; }
.folder-card:hover .fc-menu { opacity: 1; }

/* ---------------------------------------------------------------- 网格视图 */
#fileArea[data-view="grid"] .file-table thead { display: none; }
#fileArea[data-view="grid"] .file-table,
#fileArea[data-view="grid"] .file-table tbody { display: block; }
#fileArea[data-view="grid"] .file-table tbody {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  padding: 14px;
}
#fileArea[data-view="grid"] .file-row {
  display: block;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  background: var(--surface);
}
#fileArea[data-view="grid"] .file-row:hover { border-color: var(--primary); }
#fileArea[data-view="grid"] .file-row td { display: block; border: none; padding: 2px 0; }
#fileArea[data-view="grid"] .col-check {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  /* 盖在缩略图上，给一层底避免看不清 */
  border-radius: 6px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  padding: 2px 3px;
}
#fileArea[data-view="grid"] .col-kind,
#fileArea[data-view="grid"] .col-by { display: none; }
#fileArea[data-view="grid"] .file-open { flex-direction: column; align-items: flex-start; gap: 8px; }
#fileArea[data-view="grid"] .file-icon { width: 100%; height: 108px; border-radius: 12px; }
#fileArea[data-view="grid"] .file-icon svg { width: 34px; height: 34px; }
#fileArea[data-view="grid"] .col-actions { position: absolute; top: 6px; right: 6px; }
#fileArea[data-view="grid"] .file-row { position: relative; }
#fileArea[data-view="grid"] .file-name { max-width: 100%; }

/* ---------------------------------------------------------------- 空状态 */
.empty-state { padding: 56px 24px; text-align: center; color: var(--text-faint); }
.empty-state svg { width: 40px; height: 40px; margin: 0 auto 12px; color: var(--text-faint); }

.pager { display: flex; gap: 6px; padding: 14px; }
.page-link {
  min-width: 34px;
  text-align: center;
  padding: 6px 8px;
  border-radius: 9px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: .86rem;
}
.page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------------------------------------------------------------- 批量条 */
.batch-bar[hidden] { display: none; }
.batch-bar { background: var(--surface-strong); backdrop-filter: blur(12px); }
.batch-count { margin-right: 8px; color: var(--text-dim); }

/* ---------------------------------------------------------------- 上传队列 */
.upload-panel {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 380px;
  max-width: calc(100vw - 32px);
  max-height: 60vh;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: var(--bg);
  box-shadow: 0 18px 50px rgba(2, 8, 23, .28);
  z-index: 60;
}
.upload-panel[hidden] { display: none; }
.upload-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.upload-list { overflow-y: auto; padding: 8px 16px 14px; }
.upload-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.upload-item:last-child { border-bottom: none; }
.upload-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.upload-name { font-size: .88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-meta { font-size: .76rem; color: var(--text-faint); white-space: nowrap; }
.upload-bar { height: 5px; margin-top: 7px; border-radius: 999px; background: var(--surface-strong); overflow: hidden; }
.upload-bar > span { display: block; height: 100%; width: 0; background: var(--grad); transition: width .18s ease; }
.upload-item.done .upload-bar > span { background: #16a34a; }
.upload-item.failed .upload-bar > span { background: #dc2626; }
.upload-item .upload-error { margin-top: 5px; font-size: .76rem; color: #dc2626; word-break: break-all; }

/* ---------------------------------------------------------------- 弹窗 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 23, .45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 80;
}
.modal {
  width: 100%;
  max-width: 520px;
  max-height: 86vh;
  overflow-y: auto;
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  box-shadow: 0 24px 70px rgba(2, 8, 23, .35);
}
.modal.modal-wide { max-width: 720px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 1.05rem; }
.modal-body { padding: 18px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); }
.modal-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; }
.modal-list button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
}
.modal-list button:last-child { border-bottom: none; }
.modal-list button:hover { background: var(--surface-strong); }
.modal-list button.active { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); font-weight: 700; }

.kv { display: grid; grid-template-columns: 108px 1fr; gap: 8px 14px; font-size: .9rem; }
.kv dt { color: var(--text-faint); }
.kv dd { margin: 0; word-break: break-all; }

.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row input {
  flex: 1;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: .84rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------------------------------------------------------------- 菜单 */
.row-menu {
  position: fixed;
  min-width: 190px;
  padding: 6px;
  border-radius: 13px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  box-shadow: 0 18px 40px rgba(2, 8, 23, .28);
  z-index: 90;
}
.row-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  border: none;
  border-radius: 9px;
  background: none;
  color: var(--text);
  font-size: .88rem;
  text-align: left;
  cursor: pointer;
}
.row-menu button:hover { background: var(--surface-strong); }
.row-menu button.danger { color: #dc2626; }
.row-menu .row-menu-sep { height: 1px; margin: 6px 4px; background: var(--border); }

/* ---------------------------------------------------------------- 预览浮层 */
.preview-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 23, .78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.preview-box { width: 92vw; height: 88vh; display: flex; flex-direction: column; }
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #fff; padding: 0 4px 12px; }
.preview-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-actions { display: flex; gap: 8px; align-items: center; }
.preview-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .04);
  border-radius: 14px;
  overflow: auto;
  padding: 12px;
}
.preview-stage img, .preview-stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.preview-stage audio { width: min(680px, 100%); }
.preview-stage iframe { width: 100%; height: 100%; border: none; background: #fff; border-radius: 10px; }
.preview-stage pre {
  width: 100%;
  height: 100%;
  overflow: auto;
  margin: 0;
  padding: 16px;
  background: #0b1220;
  color: #e2e8f0;
  border-radius: 10px;
  font-size: .84rem;
  line-height: 1.65;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}
.preview-foot { padding-top: 10px; color: rgba(255, 255, 255, .75); font-size: .82rem; display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- 详情抽屉 */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 92vw;
  background: var(--bg);
  border-left: 1px solid var(--border-strong);
  box-shadow: -18px 0 50px rgba(2, 8, 23, .28);
  z-index: 85;
  display: flex;
  flex-direction: column;
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.drawer-body { padding: 18px 20px; overflow-y: auto; }
.drawer-body h4 { margin: 18px 0 8px; font-size: .92rem; }
.drawer-body h4:first-child { margin-top: 0; }

/* ---------------------------------------------------------------- 详情/统计 */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat-box { padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.stat-box .sv { font-size: 1.35rem; font-weight: 800; }
.stat-box .sl { font-size: .8rem; color: var(--text-faint); }
.bar-series { display: flex; align-items: flex-end; gap: 4px; height: 90px; margin-top: 10px; }
.bar-series span { flex: 1; background: var(--grad); border-radius: 4px 4px 0 0; min-height: 2px; }

/* ---------------------------------------------------------------- 认证页 */
.auth-wrap { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - var(--header-h) - 120px); padding: 40px 0; }
.auth-card { width: 100%; max-width: 420px; }

/* ---------------------------------------------------------------- 状态药丸补充
   panel.css 只定义了 .up / .down，而 Cdn::tone() 还会返回 pending（进行中，蓝）
   与 idle（中性，灰）—— 缺了它们就会落回灰底，看不出「正在上传」。 */
.pill.pending, .status-pill.pending {
  color: #1d4ed8;
  background: rgba(37, 99, 235, .1);
  border-color: rgba(37, 99, 235, .3);
}
.pill.idle, .status-pill.idle { color: var(--text-dim); background: var(--surface-strong); }
.pill.type { color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent); border-color: color-mix(in srgb, var(--primary) 30%, transparent); }
[data-theme="dark"] .pill.pending, [data-theme="dark"] .status-pill.pending {
  color: #93c5fd;
  background: rgba(96, 165, 250, .14);
  border-color: rgba(96, 165, 250, .34);
}

/* ---------------------------------------------------------------- 分享落地页
   之前这里复用了后台的 .section-head（justify-content:space-between），
   结果是「图标贴最左、文字被甩到最右」，看着像卡片飞出去了。
   分享页是给访客看的，单独一套居中卡片版式，不复用后台组件。 */
/* 分享页的卡片再往下一点，别贴着顶栏 */
.share-wrap { max-width: 720px; margin: 88px auto 80px; }
.share-card {
  padding: 28px 30px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
}
.share-card--empty, .share-form { text-align: center; }
.share-card h1 {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 6px;
  color: var(--ink, var(--text));
  /* 拍平 Wiki 的渐变标题，避免深色下变黑字 */
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: currentColor;
  word-break: break-all;
}
.share-head { display: flex; align-items: center; gap: 16px; }
.share-head .file-icon { width: 52px; height: 52px; flex: 0 0 auto; }
.share-head .file-icon svg { width: 26px; height: 26px; }
.share-title { min-width: 0; }
.share-sub { margin: 0; color: var(--text-faint); font-size: .87rem; }
.share-note {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-strong);
  color: var(--text-dim);
  font-size: .9rem;
}
.share-big-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  margin-bottom: 14px;
  border-radius: 16px;
  background: var(--surface-strong);
  color: var(--text-dim);
}
.share-big-icon svg { width: 28px; height: 28px; }
.share-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 18px 0 0;
  padding: 12px;
  max-height: 52vh;
  border-radius: 14px;
  background: var(--surface-strong);
  overflow: hidden;
}
.share-preview img, .share-preview video { max-width: 100%; max-height: 48vh; object-fit: contain; border-radius: 8px; }
.share-preview audio { width: 100%; }
.share-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 20px; }
.share-tip { margin: 10px 0 0; color: var(--text-faint); font-size: .82rem; }
.share-tip--inline { margin: 0; }
/* CDN 高速下载：绿色，和主按钮（本站下载）区分开 */
.btn-cdn {
  background: #16a34a;
  color: #fff;
  border: 1px solid #16a34a;
  border-radius: 12px;
  padding: 9px 16px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-cdn:hover { background: #15803d; border-color: #15803d; color: #fff; }
[data-theme="dark"] .btn-cdn { background: #15803d; border-color: #15803d; }
[data-theme="dark"] .btn-cdn:hover { background: #166534; border-color: #166534; }
.share-meta {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 8px 14px;
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: .9rem;
}
.share-meta dt { color: var(--text-faint); }
.share-meta dd { margin: 0; word-break: break-all; }
.share-files { margin-top: 18px; }
.share-label { display: block; text-align: left; font-size: .88rem; font-weight: 600; margin: 16px 0 7px; }
.share-form input[type="password"] { width: 100%; }
.share-foot { text-align: center; margin-top: 24px; color: var(--text-faint); font-size: .84rem; }
.share-foot a { color: var(--primary); }

/* ---------------------------------------------------------------- 暗色补充 */
[data-theme="dark"] .file-icon { background: rgba(255, 255, 255, .06); }
[data-theme="dark"] .folder-card,
[data-theme="dark"] .file-table-wrap,
[data-theme="dark"] .stat-box { background: rgba(255, 255, 255, .03); }
[data-theme="dark"] .btn-outline { background: rgba(255, 255, 255, .04); }
[data-theme="dark"] .upload-panel,
[data-theme="dark"] .modal,
[data-theme="dark"] .row-menu,
[data-theme="dark"] .drawer { background: #0f141c; }
[data-theme="dark"] .chip.active { background: var(--primary); }

/* 窄屏：表格转卡片 */
@media (max-width: 760px) {
  .page-body { padding: 20px 14px 36px; }
  .share-wrap { margin: 40px auto 60px; }
  .file-table thead { display: none; }
  .file-table, .file-table tbody, .file-table tr, .file-table td { display: block; width: 100%; }
  .file-row { position: relative; border-bottom: 1px solid var(--border); padding: 10px 6px; }
  .file-row td { border: none; padding: 2px 6px; }
  .col-kind, .col-by { display: none; }
  .col-actions { position: absolute; top: 8px; right: 6px; }
  .upload-panel { right: 10px; left: 10px; width: auto; }
  .toolbar-right { margin-left: 0; }
}
