/* ============================================================
 * 文件站：公开网盘列表 + 登录后的文件传输助手
 * ============================================================ */
body.files-page {
  min-height: 100vh;
  background:
    radial-gradient(1100px 520px at 8% -10%, rgba(37,99,235,.14), transparent 62%),
    radial-gradient(900px 480px at 96% 4%, rgba(14,165,233,.12), transparent 60%),
    #f3f6fb;
}
.file-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 22px auto 60px;
  display: flex; flex-direction: column; gap: 16px;
}
.file-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 18px;
  padding: 22px 24px;
  border-radius: 18px;
  background: linear-gradient(120deg, #0f172a, #14284a 58%, #173b66);
  color: #fff;
  box-shadow: 0 18px 46px rgba(15,23,42,.22);
  overflow: hidden; position: relative;
}
.file-head::after {
  content: ""; position: absolute; right: -70px; top: -100px;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(147,197,253,.26), transparent 68%);
}
.file-head-main { position: relative; z-index: 1; min-width: 0; }
.file-eyebrow { font-size: 11px; letter-spacing: 2.4px; color: #93c5fd; font-weight: 700; }
.file-head h1 { margin: 6px 0 5px; font-size: 27px; line-height: 1.2; letter-spacing: .5px; }
.file-head p { color: rgba(255,255,255,.66); font-size: 12.5px; }
.file-head-actions { display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 1; }
.file-head-actions .btn {
  background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25);
}
.file-head-actions .btn:hover { background: rgba(255,255,255,.22); color: #fff; }

/* 上传区 */
.upload-card {
  border-radius: 18px; padding: 20px; cursor: pointer;
  border: 1.5px dashed #b9cdf0;
  background: rgba(255,255,255,.72);
  display: flex; align-items: center; gap: 18px;
  transition: all .18s ease; box-shadow: 0 8px 26px rgba(30,64,175,.06);
}
.upload-card:hover, .upload-card.drag {
  border-color: var(--primary); background: rgba(239,246,255,.92);
  box-shadow: 0 10px 32px rgba(37,99,235,.15);
}
.upload-card.uploading { cursor: progress; opacity: .72; }
.upload-icon {
  width: 52px; height: 52px; border-radius: 16px; flex: none;
  display: grid; place-items: center;
  color: #fff; background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 8px 20px rgba(37,99,235,.25);
}
.upload-icon .icon { width: 24px; height: 24px; }
.upload-copy { min-width: 0; flex: 1; }
.upload-copy b { display: block; font-size: 15px; color: #1e3a8a; }
.upload-copy span { display: block; font-size: 12px; color: var(--text-light); margin-top: 3px; }
.upload-meta { font-size: 12px; color: var(--text-light); white-space: nowrap; }

/* 浏览器 */
.file-browser {
  border-radius: 18px; background: rgba(255,255,255,.82);
  border: 1px solid rgba(226,232,240,.9);
  box-shadow: 0 12px 38px rgba(30,64,175,.07);
  overflow: hidden;
}
.file-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 18px; border-bottom: 1px solid #edf1f7;
  background: rgba(248,250,252,.72);
}
.crumbs { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 200px; flex-wrap: wrap; }
.crumb {
  border: 0; background: transparent; color: #475569; font-size: 13px;
  padding: 4px 7px; border-radius: 7px; cursor: pointer;
}
.crumb:hover { background: #e8effb; color: var(--primary); }
.crumb.current { color: #0f172a; font-weight: 700; background: #edf3ff; }
.crumb-sep { color: #cbd5e1; font-size: 12px; }
.file-search {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); background: #fff; border-radius: 9px;
  padding: 5px 10px; min-width: 180px;
}
.file-search .icon { width: 14px; height: 14px; color: #94a3b8; }
.file-search input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 12.5px; width: 100%; min-width: 0; }
.file-toolbar-actions { display: flex; gap: 6px; }
.file-toolbar-actions .btn { padding: 6px 10px; font-size: 12.5px; }

.folder-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px; padding: 16px 18px 2px;
}
.folder-card {
  display: flex; align-items: center; gap: 11px; text-align: left;
  border: 1px solid #e6edf8; background: #fff; border-radius: 12px;
  padding: 11px 12px; cursor: pointer; color: var(--text);
  transition: all .15s ease; min-width: 0;
}
.folder-card:hover { border-color: #bcd2f7; background: #f8fbff; transform: translateY(-1px); }
.folder-card .ficon {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: grid; place-items: center; color: #2563eb; background: #eaf2ff;
}
.folder-card .ficon .icon { width: 19px; height: 19px; }
.folder-card-main { min-width: 0; }
.folder-card-name { font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-card-sub { font-size: 11px; color: var(--text-light); margin-top: 2px; }

.file-list { padding: 8px 10px 10px; }
.file-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 92px 138px 78px;
  align-items: center; gap: 10px;
  padding: 10px 10px; border-radius: 10px; border-bottom: 1px solid #f1f5f9;
}
.file-row:last-child { border-bottom: 0; }
.file-row:hover { background: #f8fbff; }
.file-name-cell { display: flex; align-items: center; gap: 11px; min-width: 0; }
.file-type {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: grid; place-items: center; font-size: 9.5px; font-weight: 800;
  letter-spacing: .3px; color: #1d4ed8; background: #eaf2ff; text-transform: uppercase;
}
.file-type.img { color: #047857; background: #e7f8f0; }
.file-type.video { color: #a21caf; background: #fbeafd; }
.file-type.zip { color: #b45309; background: #fff4e5; }
.file-type.pdf { color: #b91c1c; background: #fdeaea; }
.file-type.md, .file-type.txt, .file-type.doc, .file-type.docx { color: #475569; background: #eef2f7; }
.file-name-main { min-width: 0; display: flex; flex-direction: column; }
.file-name { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-sub { display: block; font-size: 11px; color: var(--text-light); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size, .file-time { font-size: 11.5px; color: var(--text-light); }
.file-ops { display: flex; justify-content: flex-end; gap: 4px; }
.file-op {
  width: 28px; height: 28px; border-radius: 7px; border: 1px solid transparent;
  background: transparent; color: #64748b; cursor: pointer;
  display: grid; place-items: center;
}
.file-op:hover { background: #eaf2ff; color: var(--primary); border-color: #d9e7ff; }
.file-op.danger:hover { background: #fdeaea; color: var(--danger); border-color: #f7cccc; }
.file-op .icon { width: 15px; height: 15px; }
.file-empty {
  padding: 48px 20px; text-align: center; color: #94a3b8; font-size: 13px;
}
.file-empty .icon { width: 34px; height: 34px; display: block; margin: 0 auto 10px; color: #cbd5e1; }

.file-foot {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 18px 14px; color: #94a3b8; font-size: 11.5px;
}
.public-note {
  padding: 11px 16px; border-radius: 12px; background: #eff6ff;
  border: 1px solid #dbeafe; color: #1e40af; font-size: 12px;
}
.public-note b { font-weight: 700; }
.public-empty { padding: 60px 20px; text-align: center; }
.public-empty h2 { font-size: 20px; margin-bottom: 6px; }
.public-empty p { color: var(--text-light); font-size: 13px; }

@media (max-width: 760px) {
  .file-shell { width: calc(100% - 20px); margin-top: 12px; gap: 12px; }
  .file-head { padding: 18px; align-items: flex-start; flex-direction: column; }
  .file-head h1 { font-size: 22px; }
  .file-head-actions { width: 100%; }
  .upload-card { padding: 15px; gap: 12px; }
  .upload-icon { width: 44px; height: 44px; border-radius: 13px; }
  .upload-meta { display: none; }
  .file-row { grid-template-columns: minmax(0, 1fr) 62px 70px; }
  .file-time { display: none; }
  .file-size { text-align: right; }
  .file-op { width: 26px; height: 26px; }
  .folder-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px 12px 2px; }
  .file-toolbar { padding: 11px 12px; }
  .file-search { min-width: 140px; flex: 1; }
  .file-list { padding: 4px 6px 8px; }
}
