/* ════════════════════════════════════════════════
   云盘 SPA — style.css v2.0
   蓝白配色，高仿夸克网盘风格
   ════════════════════════════════════════════════ */

/* ── CSS Variables ─────────────────────────────── */
:root {
  --primary:        #1677ff;
  --primary-light:  #e8f3ff;
  --primary-lighter:#f0f7ff;
  --primary-dark:   #0c5fe0;
  --text:           #1d1d1f;
  --text-2:         #666;
  --text-3:         #999;
  --text-4:         #bbb;
  --border:         #f0f0f0;
  --border-2:       #e5e5e5;
  --bg:             #f5f7fb;
  --bg-card:        #ffffff;
  --nav-h:          60px;
  --header-h:       50px;
  --radius:         12px;
  --radius-sm:      8px;
  --shadow:         0 2px 12px rgba(0,0,0,.08);
  --shadow-deep:    0 6px 24px rgba(0,0,0,.12);
  --gold:           #f5a623;
  --gold-dark:      #b5651d;
}

/* ── Reset ─────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow: hidden;
  height: 100dvh;
  overscroll-behavior: none;
}
a { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font: inherit; }
input, textarea, select { font: inherit; outline: none; border: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* ── App Shell ─────────────────────────────────── */
#app {
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg-card);
}

/* ── Splash ────────────────────────────────────── */
#splash {
  position: absolute; inset: 0; z-index: 999;
  background: linear-gradient(145deg, #1677ff 0%, #0c5fe0 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px;
}
#splash .splash-icon { font-size: 4rem; }
#splash .splash-title { font-size: 1.5rem; font-weight: 700; color: #fff; }
#splash .splash-sub   { font-size: .85rem; color: rgba(255,255,255,.65); }

/* ── Loading overlay ───────────────────────────── */
#global-loading {
  position: fixed; inset: 0; z-index: 990;
  background: rgba(255,255,255,.5);
  display: none; align-items: center; justify-content: center;
}
.loading-spin {
  width: 36px; height: 36px;
  border: 3px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ─────────────────────────────────────── */
.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-10px);
  z-index: 9999; padding: 10px 20px;
  background: rgba(30,30,30,.9); color: #fff;
  border-radius: 20px; font-size: .85rem;
  white-space: nowrap; pointer-events: none;
  opacity: 0; transition: all .25s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.toast-success { background: rgba(22,167,94,.9); }
.toast.toast-error   { background: rgba(255,77,79,.9); }
.toast.toast-warn    { background: rgba(250,140,22,.9); }

/* ── Auth Page ─────────────────────────────────── */
#auth-page {
  position: absolute; inset: 0; z-index: 100;
  background: #fff;
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.auth-hero {
  background: linear-gradient(155deg, #1677ff 0%, #1a65e8 45%, #2d7cff 75%, #5b9aff 100%);
  padding: 56px 24px 52px;
  text-align: center; color: #fff;
  position: relative; overflow: hidden;
}
.auth-hero::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.auth-hero::after {
  content: ''; position: absolute; bottom: -60px; left: -30px;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.auth-hero .hero-icon {
  font-size: 4rem; margin-bottom: 14px; position: relative; z-index: 1;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.2));
}
.auth-hero .hero-title {
  font-size: 1.65rem; font-weight: 800; letter-spacing: .5px;
  position: relative; z-index: 1;
}
.auth-hero .hero-sub {
  font-size: .82rem; opacity: .8; margin-top: 6px;
  position: relative; z-index: 1;
}
.auth-box {
  flex: 1; padding: 32px 24px 24px;
  background: #fff; border-radius: 24px 24px 0 0;
  margin-top: -20px;
  box-shadow: 0 -4px 24px rgba(22,119,255,.08);
}
.auth-tabs {
  display: flex; border-bottom: 1px solid #f0f0f0; margin-bottom: 28px;
  gap: 4px;
}
.auth-tab  {
  flex: 1; padding: 11px; text-align: center;
  font-size: .92rem; color: #bbb; cursor: pointer;
  border-bottom: 2.5px solid transparent; margin-bottom: -1px;
  transition: all .2s; font-weight: 500;
}
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }
.auth-form { display: none; }
.auth-form.active { display: block; }
.field-group { position: relative; margin-bottom: 16px; }
.field-group label {
  display: block; font-size: .78rem; color: var(--text-2);
  margin-bottom: 6px; font-weight: 500;
}
.field-group input {
  width: 100%; padding: 13px 16px;
  background: #f5f7ff; border-radius: 10px;
  font-size: .95rem; color: var(--text);
  border: 1.5px solid #e8ecff; transition: all .2s;
}
.field-group input:focus {
  border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 3px rgba(22,119,255,.1);
}
.btn-submit {
  width: 100%; padding: 15px;
  background: linear-gradient(135deg, #1677ff, #0c5fe0); color: #fff;
  border-radius: 12px; font-size: .98rem; font-weight: 700;
  margin-top: 8px;
  box-shadow: 0 4px 18px rgba(22,119,255,.35);
  transition: all .2s;
}
.btn-submit:active { transform: scale(.98); box-shadow: 0 2px 10px rgba(22,119,255,.2); }
.auth-hint { text-align: center; font-size: .82rem; color: var(--text-3); margin-top: 18px; }
.auth-hint span { color: var(--primary); cursor: pointer; font-weight: 600; }

/* ── Main App ──────────────────────────────────── */
#main-app {
  position: absolute; inset: 0; z-index: 50;
  display: flex; flex-direction: column; overflow: hidden;
}
.page-body {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding-bottom: var(--nav-h);
  -webkit-overflow-scrolling: touch;
}
.page-body::-webkit-scrollbar { display: none; }

/* ── Bottom Nav ────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex; z-index: 80;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  cursor: pointer; position: relative;
  color: var(--text-3); transition: color .2s;
}
.nav-item.active { color: var(--primary); }
.nav-item svg { width: 22px; height: 22px; stroke: currentColor; fill: none;
                stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav-item span { font-size: .68rem; }
.nav-badge {
  position: absolute; top: 6px; right: calc(50% - 16px);
  background: #ff4d4f; color: #fff;
  font-size: .6rem; min-width: 16px; height: 16px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  padding: 0 4px; line-height: 1;
}

/* ── Page Header ───────────────────────────────── */
.page-header {
  height: var(--header-h);
  background: #fff;
  display: flex; align-items: center;
  padding: 0 16px; gap: 10px;
  position: sticky; top: 0; z-index: 60;
  border-bottom: 1px solid var(--border);
}
.page-header h1 { flex: 1; font-size: 1.05rem; font-weight: 700; color: var(--text); }
.hdr-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; color: var(--text-2); cursor: pointer;
  transition: background .2s;
}
.hdr-btn:active { background: var(--bg); }
.hdr-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none;
               stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ══════════════════════════════════════════════════
   HOME PAGE
   ══════════════════════════════════════════════════ */
.home-search {
  margin: 14px 16px 0;
  background: var(--bg);
  border-radius: 20px;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
}
.home-search svg { width: 18px; height: 18px; stroke: var(--text-3); fill: none;
                   stroke-width: 1.8; flex-shrink: 0; }
.home-search input {
  flex: 1; font-size: .88rem; color: var(--text);
  background: transparent;
}
.home-search input::placeholder { color: var(--text-4); }

.home-categories {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 12px; padding: 16px 16px 8px;
}
.cat-item {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  cursor: pointer;
}
.cat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.cat-icon.c-photo  { background: #fff3e0; }
.cat-icon.c-video  { background: #e8f0fe; }
.cat-icon.c-music  { background: #fce4ec; }
.cat-icon.c-doc    { background: #e8f5e9; }
.cat-icon.c-zip    { background: #fce8e4; }
.cat-item span { font-size: .7rem; color: var(--text-2); }

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 8px;
}
.section-header .sh-title { font-size: .9rem; font-weight: 600; color: var(--text); }
.section-header .sh-more  { font-size: .8rem; color: var(--primary); cursor: pointer; }

.recent-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 2px; padding: 0 16px 16px;
}
.recent-item {
  aspect-ratio: 1; background: var(--bg);
  border-radius: var(--radius-sm); overflow: hidden;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  cursor: pointer; font-size: 2rem;
  position: relative;
}
.recent-item span.ri-name {
  position: absolute; bottom: 0; left: 0; right: 0;
  font-size: .6rem; color: var(--text-2);
  background: rgba(255,255,255,.85);
  text-align: center; padding: 2px 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.empty-tip {
  display: flex; flex-direction: column; align-items: center;
  padding: 60px 24px; gap: 12px; color: var(--text-3);
}
.empty-tip .empty-icon {
  width: 80px; height: 80px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
}
.empty-tip p { font-size: .88rem; }

/* ══════════════════════════════════════════════════
   FILE PAGE
   ══════════════════════════════════════════════════ */
.breadcrumb {
  padding: 10px 16px;
  display: flex; align-items: center; gap: 4px;
  overflow-x: auto; white-space: nowrap;
  font-size: .8rem; color: var(--text-3);
  scrollbar-width: none;
}
.breadcrumb::-webkit-scrollbar { display: none; }
.bc-item { cursor: pointer; color: var(--text-3); flex-shrink: 0; }
.bc-item:last-child { color: var(--text); font-weight: 500; }
.bc-sep { flex-shrink: 0; }

.file-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 16px; gap: 8px;
}
.file-sort { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--text-3); cursor: pointer; }
.file-views { display: flex; gap: 6px; }
.view-btn { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.view-btn.active { color: var(--primary); background: var(--primary-light); }
.view-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }

.file-list  { padding: 0 16px; }
.file-grid  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 8px 16px; }

.file-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  cursor: pointer; position: relative; -webkit-tap-highlight-color: transparent;
}
.file-item:last-child { border-bottom: none; }
.file-item:active { background: var(--bg); margin: 0 -16px; padding: 10px 16px; border-radius: var(--radius-sm); }

.file-item.selected .file-icon-wrap::before {
  content: '✓';
  position: absolute; inset: 0;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; font-size: .9rem; font-weight: 700;
  z-index: 1;
}
.file-icon-wrap { position: relative; width: 44px; height: 44px; flex-shrink: 0; }
.file-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
/* file type colors */
.fi-folder { background: #fff8e1; }
.fi-image  { background: #fce4ec; }
.fi-video  { background: #e8eaf6; }
.fi-audio  { background: #f3e5f5; }
.fi-doc    { background: #e8f5e9; }
.fi-pdf    { background: #fff3e0; }
.fi-zip    { background: #fce8e4; }
.fi-other  { background: var(--bg); }

.file-info { flex: 1; min-width: 0; }
.file-name { font-size: .9rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { font-size: .72rem; color: var(--text-3); margin-top: 2px; }
.file-more { padding: 6px; color: var(--text-4); flex-shrink: 0; }
.file-more svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }

/* Grid mode */
.file-grid-item {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer;
}
.file-grid-item .file-icon { width: 40px; height: 40px; }
.file-grid-item .file-name { font-size: .72rem; text-align: center; color: var(--text); width: 100%;
                              overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* FAB upload */
.fab {
  position: fixed; bottom: calc(var(--nav-h) + 16px); right: 20px;
  width: 52px; height: 52px;
  background: var(--primary); color: #fff;
  border-radius: 50%; box-shadow: var(--shadow-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; z-index: 65; cursor: pointer;
  transition: transform .2s; -webkit-tap-highlight-color: transparent;
}
.fab:active { transform: scale(.92); }
.fab svg { width: 24px; height: 24px; stroke: #fff; fill: none; stroke-width: 2; }

/* Batch bar */
.batch-bar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h); background: var(--primary);
  display: flex; align-items: center; padding: 0 16px; gap: 12px;
  z-index: 70; transform: translateY(-100%); transition: transform .25s;
}
.batch-bar.active { transform: translateY(0); }
.batch-bar .bb-cancel { color: #fff; font-size: .88rem; cursor: pointer; }
.batch-bar .bb-info   { flex: 1; color: #fff; font-size: .88rem; text-align: center; }
.batch-bar .bb-actions { display: flex; gap: 10px; }
.batch-bar .bb-btn {
  color: #fff; font-size: .82rem; cursor: pointer;
  padding: 5px 10px; border-radius: 6px; border: 1px solid rgba(255,255,255,.4);
}

/* Upload drop zone */
.upload-drop-zone {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(22, 119, 255, .12);
  border: 3px dashed var(--primary);
  display: none; align-items: center; justify-content: center;
  flex-direction: column; gap: 12px;
  font-size: 1.1rem; color: var(--primary);
  pointer-events: none;
}
.upload-drop-zone.active { display: flex; }

/* Upload progress item */
.upload-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; background: #fff;
  border-bottom: 1px solid var(--border);
}
.up-icon { font-size: 1.4rem; flex-shrink: 0; }
.up-info { flex: 1; min-width: 0; }
.up-name { font-size: .85rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-bar  { height: 4px; background: var(--bg); border-radius: 2px; margin-top: 5px; overflow: hidden; }
.up-fill { height: 100%; background: var(--primary); border-radius: 2px; transition: width .2s; }
.up-pct  { font-size: .72rem; color: var(--text-3); flex-shrink: 0; }

/* ══════════════════════════════════════════════════
   TRANSFER PAGE (Screenshot 2)
   ══════════════════════════════════════════════════ */
.transfer-tabs {
  display: flex; background: #fff;
  padding: 0 4px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
}
.transfer-tabs::-webkit-scrollbar { display: none; }
.tt-item {
  flex-shrink: 0; padding: 13px 18px;
  font-size: .88rem; color: var(--text-3); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all .2s; white-space: nowrap;
}
.tt-item.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

.transfer-banner {
  margin: 12px 16px;
  background: var(--primary-lighter);
  border-radius: var(--radius); padding: 14px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
}
.tb-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--primary-light); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.tb-text .tb-title { font-size: .9rem; font-weight: 600; color: var(--primary); }
.tb-text .tb-sub   { font-size: .75rem; color: var(--text-3); margin-top: 2px; }

.concurrent-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; font-size: .82rem; color: var(--text-2);
}
.concurrent-row .cr-num {
  color: var(--primary); font-weight: 600;
}
.concurrent-row select {
  border: 1px solid var(--border-2); border-radius: 6px;
  padding: 3px 6px; font-size: .82rem; color: var(--primary);
  background: #fff;
}

.status-tabs {
  display: flex; gap: 8px; padding: 8px 16px 4px;
}
.st-item {
  padding: 5px 14px; border-radius: 16px;
  font-size: .8rem; cursor: pointer;
  border: 1px solid var(--border-2); color: var(--text-2);
  transition: all .2s;
}
.st-item.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

.transfer-list { padding: 8px 16px; }
.transfer-task {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.transfer-task:last-child { border-bottom: none; }
.tt-file-icon { font-size: 1.8rem; flex-shrink: 0; }
.tt-file-info { flex: 1; min-width: 0; }
.tt-file-name { font-size: .88rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-file-meta { font-size: .72rem; color: var(--text-3); margin-top: 2px; }
.tt-prog { height: 3px; background: var(--bg); border-radius: 2px; margin-top: 5px; }
.tt-prog-fill { height: 100%; border-radius: 2px; }
.tt-prog-fill.done { background: #52c41a; }
.tt-prog-fill.running { background: var(--primary); }
.tt-prog-fill.failed { background: #ff4d4f; }
.tt-status { flex-shrink: 0; }
.tt-status-badge { font-size: .72rem; padding: 2px 8px; border-radius: 10px; font-weight: 500; }
.tt-status-badge.done    { background: #f6ffed; color: #52c41a; }
.tt-status-badge.running { background: var(--primary-light); color: var(--primary); }
.tt-status-badge.failed  { background: #fff1f0; color: #ff4d4f; }

.transfer-empty {
  display: flex; flex-direction: column; align-items: center;
  padding: 60px 24px; gap: 16px;
}
.te-circle {
  width: 100px; height: 100px; background: var(--primary-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.te-circle svg { width: 48px; height: 48px; stroke: var(--primary); fill: none; stroke-width: 1.5; }
.transfer-empty p { font-size: .88rem; color: var(--text-3); }

/* ══════════════════════════════════════════════════
   INFO / CHAT PAGE (Screenshot 1)
   ══════════════════════════════════════════════════ */
.info-section-label {
  padding: 14px 16px 6px;
  font-size: .78rem; color: var(--text-3); font-weight: 500;
}
.conv-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; cursor: pointer;
  transition: background .15s; position: relative;
}
.conv-item:active { background: var(--bg); }
.conv-item::after {
  content: ''; position: absolute; left: 72px; right: 0; bottom: 0;
  height: 1px; background: var(--border);
}
.conv-avatar {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #a8c8f0 0%, #5a9fd4 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: #fff; font-weight: 600;
  position: relative; overflow: hidden;
}
.conv-avatar img { width: 100%; height: 100%; object-fit: cover; }
.conv-avatar.deleted {
  background: var(--primary-light); color: var(--primary);
  font-size: .9rem; font-weight: 700;
}
.conv-body { flex: 1; min-width: 0; }
.conv-row1 { display: flex; align-items: center; justify-content: space-between; }
.conv-name { font-size: .9rem; font-weight: 500; color: var(--text); }
.conv-time { font-size: .72rem; color: var(--text-3); }
.conv-preview {
  font-size: .78rem; color: var(--text-3); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.unread-dot {
  width: 8px; height: 8px; background: var(--primary); border-radius: 50%; flex-shrink: 0;
}
.unread-count {
  background: #ff4d4f; color: #fff;
  font-size: .65rem; min-width: 16px; height: 16px;
  border-radius: 8px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
}

.info-add-btn {
  position: fixed; bottom: calc(var(--nav-h) + 16px); right: 20px;
  width: 48px; height: 48px;
  background: var(--primary); color: #fff; border-radius: 50%;
  box-shadow: var(--shadow-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; z-index: 65; cursor: pointer;
}

/* ══════════════════════════════════════════════════
   MINE PAGE (Screenshot 3)
   ══════════════════════════════════════════════════ */
.mine-page { background: var(--bg); }
.mine-profile {
  background: #fff; padding: 20px 16px 16px;
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 8px;
}
.mine-avatar {
  width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #d0e8ff 0%, #a8c8f0 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; overflow: hidden; cursor: pointer;
}
.mine-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mine-info-block { flex: 1; min-width: 0; }
.mine-nickname { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.mine-vip-link {
  font-size: .78rem; color: var(--primary); display: flex; align-items: center; gap: 2px; cursor: pointer; margin-bottom: 3px;
}
.mine-email    { font-size: .75rem; color: var(--text-3); }
.mine-actions  { display: flex; align-items: flex-start; gap: 8px; flex-shrink: 0; }
.mine-checkin-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 12px; border: 1px solid var(--primary);
  border-radius: 16px; font-size: .78rem; color: var(--primary); cursor: pointer;
}
.mine-checkin-btn.done {
  border-color: var(--border-2); color: var(--text-3);
  cursor: not-allowed;
}
.mine-qr-btn {
  width: 34px; height: 34px;
  border: 1px solid var(--border-2); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); cursor: pointer; font-size: 1rem;
}
.mine-qr-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; }

/* VIP Banner */
.vip-banner {
  margin: 0 16px 12px;
  background: linear-gradient(110deg, #2d1b00 0%, #5c3d00 40%, #8b5e00 70%, #c4820a 100%);
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; align-items: center; gap: 12px; cursor: pointer;
}
.vb-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #ffdd82, #f5a623);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.vb-text { flex: 1; }
.vb-title { font-size: .9rem; font-weight: 700; color: #ffd96a; }
.vb-sub   { font-size: .72rem; color: rgba(255,210,100,.65); margin-top: 2px;
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vb-btn   {
  flex-shrink: 0; padding: 7px 14px;
  background: linear-gradient(135deg, #ffd96a, #f5a623);
  color: #5c3000; font-size: .8rem; font-weight: 700;
  border-radius: 16px; white-space: nowrap;
}

/* Storage section */
.mine-storage {
  background: #fff; margin: 0 0 8px;
  padding: 14px 16px;
}
.ms-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
}
.ms-title {
  display: flex; align-items: center; gap: 6px;
  font-size: .88rem; font-weight: 600; color: var(--text);
}
.ms-title svg { width: 16px; height: 16px; stroke: var(--primary); fill: none; stroke-width: 1.8; }
.ms-total  { font-size: .78rem; color: var(--text-3); }
.ms-bar    { height: 6px; background: var(--bg); border-radius: 4px; overflow: hidden; margin-bottom: 8px; display: flex; }
.ms-seg    { height: 100%; border-radius: 0; transition: width .5s; }
.ms-seg:first-child { border-radius: 4px 0 0 4px; }
.ms-seg:last-child  { border-radius: 0 4px 4px 0; }
.ms-legend { display: flex; gap: 14px; flex-wrap: wrap; }
.ms-leg-item { display: flex; align-items: center; gap: 5px; font-size: .72rem; color: var(--text-3); }
.ms-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* Quick action grid */
.mine-quick {
  background: #fff; padding: 14px 0 12px;
  margin-bottom: 8px;
}
.quick-grid { display: grid; grid-template-columns: repeat(5, 1fr); }
.quick-item {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 4px 4px 4px; cursor: pointer;
}
.quick-icon {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; transition: transform .15s;
}
.quick-icon svg { width: 22px; height: 22px; stroke: var(--primary); fill: none; stroke-width: 1.6; }
.quick-item:active .quick-icon { transform: scale(.9); }
.quick-label { font-size: .7rem; color: var(--text-2); }

/* Settings menu list */
.mine-settings { background: #fff; }
.setting-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; cursor: pointer; position: relative;
}
.setting-item:not(:last-child)::after {
  content: ''; position: absolute; left: 58px; right: 0; bottom: 0;
  height: 1px; background: var(--border);
}
.setting-item:active { background: var(--bg); }
.si-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .95rem;
}
.si-icon svg { width: 18px; height: 18px; stroke: var(--primary); fill: none; stroke-width: 1.8; }
.si-text { flex: 1; }
.si-title { font-size: .88rem; color: var(--text); font-weight: 500; }
.si-sub   { font-size: .72rem; color: var(--text-3); margin-top: 1px; }
.si-arrow { color: var(--text-4); flex-shrink: 0; font-size: .8rem; }
.si-arrow svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ══════════════════════════════════════════════════
   OVERLAY / SUB-PAGES
   ══════════════════════════════════════════════════ */
.page-overlay {
  position: fixed; inset: 0; z-index: 150;
  background: var(--bg-card);
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4, 0, .2, 1);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.page-overlay.open { transform: translateX(0); }
.ov-header {
  height: var(--header-h); background: #fff;
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px; flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.ov-back {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; color: var(--text-2);
}
.ov-back svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }
.ov-title { flex: 1; font-size: 1rem; font-weight: 700; color: var(--text); }
.ov-body  { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 20px; }
.ov-body::-webkit-scrollbar { display: none; }

/* ── Recycle bin ── */
.trash-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer;
}
.trash-item .ti-del { font-size: .72rem; color: #ff4d4f; }

/* ── My shares ── */
.share-item {
  background: #fff; margin: 8px 16px;
  border-radius: var(--radius); padding: 14px;
  box-shadow: 0 1px 6px rgba(0,0,0,.05);
}
.share-item .share-name { font-size: .9rem; font-weight: 500; color: var(--text); margin-bottom: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-item .share-meta { font-size: .75rem; color: var(--text-3); display: flex; gap: 12px; flex-wrap: wrap; }
.share-item .share-url  { font-size: .78rem; color: var(--primary); word-break: break-all; margin: 6px 0; }
.share-actions { display: flex; gap: 8px; margin-top: 10px; }
.sh-btn {
  padding: 5px 12px; border-radius: 6px; font-size: .78rem; cursor: pointer; border: 1px solid var(--border-2);
}
.sh-btn.copy   { color: var(--primary); border-color: var(--primary-light); background: var(--primary-light); }
.sh-btn.cancel { color: #ff4d4f; border-color: #ffccc7; background: #fff1f0; }
.sh-pw { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; color: #fa8c16;
         background: #fffbe6; padding: 2px 8px; border-radius: 10px; }

/* ── Settings overlay ── */
.settings-group { background: #fff; margin-bottom: 8px; }
.settings-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; border-bottom: 1px solid var(--border); cursor: pointer;
}
.settings-item:last-child { border-bottom: none; }
.settings-item label { font-size: .88rem; color: var(--text); cursor: pointer; }
.settings-item .sv { font-size: .82rem; color: var(--text-3); }
.settings-item input[type=text], .settings-item input[type=email], .settings-item input[type=password] {
  background: transparent; font-size: .88rem; color: var(--text); text-align: right;
  flex: 1; min-width: 0; margin-left: 10px;
}
.settings-item input::placeholder { color: var(--text-4); }
.toggle-switch {
  width: 42px; height: 24px; background: var(--border-2); border-radius: 12px;
  position: relative; cursor: pointer; transition: background .2s; flex-shrink: 0;
}
.toggle-switch.on { background: var(--primary); }
.toggle-switch::after {
  content: ''; position: absolute;
  width: 18px; height: 18px; top: 3px; left: 3px;
  background: #fff; border-radius: 50%; transition: left .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.toggle-switch.on::after { left: 21px; }

/* ── Notification item ── */
.notice-item {
  display: flex; gap: 12px; padding: 14px 16px;
  border-bottom: 1px solid var(--border); cursor: pointer;
}
.notice-item.unread { background: var(--primary-lighter); }
.ni-dot { width: 8px; height: 8px; background: var(--primary); border-radius: 50%; flex-shrink: 0; margin-top: 6px; }
.ni-body { flex: 1; min-width: 0; }
.ni-title { font-size: .88rem; font-weight: 500; color: var(--text); }
.ni-content { font-size: .78rem; color: var(--text-3); margin-top: 3px; }
.ni-time { font-size: .72rem; color: var(--text-4); margin-top: 4px; }

/* ── Order/VIP ── */
.vip-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 16px; }
.vip-plan {
  border: 1.5px solid var(--border-2); border-radius: var(--radius);
  padding: 16px 10px; text-align: center; cursor: pointer; transition: all .2s;
}
.vip-plan.recommend { border-color: var(--primary); background: var(--primary-lighter); }
.vip-plan .vp-name  { font-size: .78rem; color: var(--text-3); margin-bottom: 8px; }
.vip-plan .vp-price { font-size: 1.4rem; font-weight: 700; color: var(--text); }
.vip-plan .vp-price span { font-size: .72rem; font-weight: 400; color: var(--text-3); }
.vip-plan .vp-tag   { font-size: .68rem; color: #ff4d4f; margin-top: 4px; }
.vip-plan.recommend .vp-price { color: var(--primary); }
.vip-benefits { padding: 0 16px; }
.vip-benefit-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.vb-check { width: 18px; height: 18px; background: var(--primary-light); border-radius: 50%;
            display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: .7rem; }
.vb-name { font-size: .85rem; color: var(--text); }

/* ── Privacy space ── */
.privacy-lock {
  display: flex; flex-direction: column; align-items: center;
  padding: 60px 24px; gap: 16px; text-align: center;
}
.privacy-lock .lock-icon { font-size: 3.5rem; }
.privacy-lock h3 { font-size: 1rem; font-weight: 600; color: var(--text); }
.privacy-lock p  { font-size: .82rem; color: var(--text-3); }
.pin-row { display: flex; gap: 12px; justify-content: center; margin-top: 8px; }
.pin-dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--border-2); background: transparent;
  transition: background .2s;
}
.pin-dot.filled { background: var(--primary); border-color: var(--primary); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 260px; margin: 8px auto 0; }
.pin-key {
  padding: 15px; text-align: center; font-size: 1.1rem; font-weight: 500;
  background: var(--bg); border-radius: var(--radius-sm); cursor: pointer;
  transition: background .15s; -webkit-tap-highlight-color: transparent;
}
.pin-key:active { background: var(--primary-light); }

/* ── File cleanup ── */
.cleanup-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: #fff; margin-bottom: 1px;
}
.cu-icon  { font-size: 1.8rem; flex-shrink: 0; }
.cu-info  { flex: 1; }
.cu-title { font-size: .9rem; font-weight: 500; color: var(--text); }
.cu-sub   { font-size: .75rem; color: var(--text-3); margin-top: 2px; }
.cu-size  { font-size: .82rem; color: var(--primary); font-weight: 600; margin-top: 2px; }
.cu-btn   { padding: 7px 14px; border: 1px solid var(--border-2); border-radius: 16px; font-size: .8rem; color: var(--text-2); cursor: pointer; }
.cu-btn.active { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* ── FTP Settings ── */
.ftp-form  { padding: 16px; }
.ftp-field { margin-bottom: 14px; }
.ftp-field label { display: block; font-size: .78rem; color: var(--text-3); margin-bottom: 5px; }
.ftp-field input {
  width: 100%; padding: 10px 12px;
  background: var(--bg); border-radius: var(--radius-sm); border: 1.5px solid transparent;
  font-size: .88rem; color: var(--text); transition: border-color .2s;
}
.ftp-field input:focus { border-color: var(--primary); background: #fff; }
.ftp-save-btn {
  width: 100%; padding: 13px;
  background: var(--primary); color: #fff; border-radius: var(--radius);
  font-size: .9rem; font-weight: 600; cursor: pointer; transition: background .2s;
}
.ftp-save-btn:active { background: var(--primary-dark); }

/* ── Chat Overlay ── */
.chat-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: #f7f8fc;
  display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.chat-overlay.open { transform: translateY(0); }
.chat-header {
  height: var(--header-h); background: #fff;
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.chat-header .chat-name { flex: 1; font-size: .95rem; font-weight: 600; color: var(--text); }
.chat-messages {
  flex: 1; overflow-y: auto; padding: 12px 16px;
  display: flex; flex-direction: column; gap: 12px;
  -webkit-overflow-scrolling: touch;
}
.chat-messages::-webkit-scrollbar { display: none; }
.msg-row { display: flex; gap: 8px; align-items: flex-end; }
.msg-row.mine  { flex-direction: row-reverse; }
.msg-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-light);
              display: flex; align-items: center; justify-content: center; font-size: .85rem;
              color: var(--primary); font-weight: 600; flex-shrink: 0; }
.msg-bubble {
  max-width: 70%; padding: 10px 13px;
  border-radius: 16px 16px 16px 4px;
  background: #fff; font-size: .88rem; line-height: 1.5; color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,.06); word-break: break-word;
}
.msg-row.mine .msg-bubble {
  background: var(--primary); color: #fff;
  border-radius: 16px 16px 4px 16px;
}
.msg-file-bubble {
  display: flex; align-items: center; gap: 10px;
  background: #fff; padding: 10px 12px;
  border-radius: 12px; max-width: 220px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06); cursor: pointer;
}
.msg-file-icon { font-size: 1.5rem; flex-shrink: 0; }
.msg-file-info { flex: 1; min-width: 0; }
.msg-file-name { font-size: .82rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-file-size { font-size: .72rem; color: var(--text-3); }
.msg-time { font-size: .68rem; color: var(--text-4); flex-shrink: 0; align-self: flex-end; margin-bottom: 4px; }
.chat-input-bar {
  background: #fff; border-top: 1px solid var(--border);
  padding: 10px 16px; display: flex; align-items: flex-end; gap: 10px;
  flex-shrink: 0; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0));
}
.chat-input {
  flex: 1; background: var(--bg); border-radius: 20px; padding: 9px 14px;
  font-size: .88rem; color: var(--text); min-height: 38px; max-height: 100px;
  overflow-y: auto; resize: none; line-height: 1.4;
}
.chat-send-btn {
  width: 36px; height: 36px; background: var(--primary); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
.chat-send-btn svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2; }
.chat-attach-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
  color: var(--text-3);
}
.chat-attach-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; }

/* ══════════════════════════════════════════════════
   ACTION SHEET / MODAL
   ══════════════════════════════════════════════════ */
.mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 300;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.mask.center-modal { justify-content: center; align-items: center; }
.mask.hidden { display: none; }
.action-sheet {
  background: #fff; border-radius: 16px 16px 0 0;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.as-title {
  text-align: center; padding: 14px 16px 10px;
  font-size: .82rem; color: var(--text-3);
  border-bottom: 1px solid var(--border);
}
.as-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px; cursor: pointer; border-bottom: 1px solid var(--border);
  font-size: .9rem; color: var(--text); transition: background .15s;
}
.as-item:active { background: var(--bg); }
.as-item svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.as-item.danger { color: #ff4d4f; }
.as-cancel {
  padding: 14px; text-align: center; font-size: .9rem; color: var(--text-2);
  cursor: pointer; background: #fff; border-top: 6px solid var(--bg);
}

/* Center modal (dialog) */
.center-dialog {
  background: #fff; border-radius: 16px;
  width: calc(100% - 64px); max-width: 320px;
  overflow: hidden;
}
.cd-head { padding: 18px 20px 8px; text-align: center; }
.cd-head h3 { font-size: 1rem; font-weight: 700; color: var(--text); }
.cd-body { padding: 8px 20px 16px; font-size: .88rem; color: var(--text-2); text-align: center; line-height: 1.6; }
.cd-input {
  width: 100%; margin: 4px 0 8px; padding: 10px 12px;
  background: var(--bg); border-radius: var(--radius-sm);
  font-size: .88rem; color: var(--text); border: 1.5px solid transparent; transition: border-color .2s;
}
.cd-input:focus { border-color: var(--primary); }
.cd-btns { display: flex; border-top: 1px solid var(--border); }
.cd-btn {
  flex: 1; padding: 13px; text-align: center;
  font-size: .9rem; cursor: pointer; transition: background .15s;
}
.cd-btn:not(:last-child) { border-right: 1px solid var(--border); }
.cd-btn:active { background: var(--bg); }
.cd-btn.primary { color: var(--primary); font-weight: 600; }
.cd-btn.danger  { color: #ff4d4f; }

/* ══════════════════════════════════════════════════
   SEARCH RESULTS / Misc
   ══════════════════════════════════════════════════ */
.search-results-page {
  position: fixed; inset: 0; z-index: 160; background: #fff;
  display: flex; flex-direction: column;
  transform: translateY(-100%); transition: transform .25s;
}
.search-results-page.open { transform: translateY(0); }
.sr-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-bottom: 1px solid var(--border); background: #fff;
}
.sr-input {
  flex: 1; background: var(--bg); border-radius: 20px;
  padding: 9px 14px; font-size: .88rem; color: var(--text);
}
.sr-cancel { font-size: .88rem; color: var(--primary); cursor: pointer; flex-shrink: 0; }
.sr-body   { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* ── User search ── */
.user-search-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer;
}
.user-search-item:active { background: var(--bg); }
.usa-avatar { width: 40px; height: 40px; border-radius: 50%;
              background: var(--primary-light); display: flex; align-items: center; justify-content: center;
              color: var(--primary); font-weight: 600; font-size: .95rem; }
.usa-name { flex: 1; font-size: .9rem; color: var(--text); }
.usa-btn  { padding: 5px 14px; background: var(--primary-light); color: var(--primary);
            border-radius: 14px; font-size: .78rem; cursor: pointer; }
.usa-btn.added { background: var(--bg); color: var(--text-3); }

/* ── Section separator ── */
.section-sep { height: 8px; background: var(--bg); }

/* ── Pull to refresh (visual) ── */
.ptr-text {
  text-align: center; padding: 10px;
  font-size: .78rem; color: var(--text-4); display: none;
}

/* ══════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════ */
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.fade-in  { animation: fadeIn  .3s ease; }
.slide-up { animation: slideUp .3s ease; }

/* ── Safe area on iPhones ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .page-body { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
}
