/* ==========================================================
   云匣 CloudCoffer · 统一设计系统
   深色玻璃拟态 + 移动优先 + 精致微交互
   ========================================================== */
:root {
  --bg: #0b0f1a;
  --bg2: #111827;
  --card: rgba(255, 255, 255, 0.04);
  --card2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e5e9f2;
  --text2: #8b93ad;
  --accent: #4f7cff;
  --accent2: #6b93ff;
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 14px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 15px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100vh; min-height: 100dvh;
}
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ==================== 登录页 ==================== */
.login-body {
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(79, 124, 255, 0.18), transparent),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(107, 147, 255, 0.12), transparent),
    var(--bg);
  padding: 20px;
}
.login-wrap { width: 100%; max-width: 400px; }
.login-hero { text-align: center; margin-bottom: 28px; }
.login-logo {
  width: 72px; height: 72px; border-radius: 20px;
  box-shadow: 0 8px 32px rgba(79, 124, 255, 0.35);
  margin-bottom: 16px;
}
.login-hero h1 { font-size: 28px; letter-spacing: 1px; display: flex; align-items: baseline; justify-content: center; gap: 10px; }
.login-hero h1 .brand-en { font-size: 13px; font-weight: 500; letter-spacing: 2px; color: var(--text2); }
.login-hero p { color: var(--text2); margin-top: 6px; font-size: 14px; }
.login-card {
  background: var(--card); backdrop-filter: blur(20px);
  border: 1px solid var(--border); border-radius: 20px;
  padding: 24px; box-shadow: var(--shadow);
}
.login-tabs { display: flex; gap: 8px; margin-bottom: 20px; background: rgba(0,0,0,0.25); border-radius: 12px; padding: 4px; }
.ltab {
  flex: 1; padding: 10px; border: 0; background: transparent; color: var(--text2);
  font-size: 15px; border-radius: 9px; transition: all .2s;
}
.ltab.active { background: var(--accent); color: #fff; font-weight: 600; }
.lfield { margin-bottom: 16px; }
.lfield label { display: block; font-size: 13px; color: var(--text2); margin-bottom: 6px; }
.linput {
  width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25); color: var(--text); font-size: 15px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.linput:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.18); }
.lbtn {
  width: 100%; padding: 14px; border: 0; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-size: 16px; font-weight: 600; letter-spacing: 2px;
  transition: transform .15s, box-shadow .2s; box-shadow: 0 4px 20px rgba(79, 124, 255, 0.35);
}
.lbtn:active { transform: scale(0.98); }
.lbtn:disabled { opacity: 0.6; cursor: not-allowed; }
.lerr { color: var(--bad); font-size: 13px; margin-top: 10px; display: none; text-align: center; }
.login-tip { text-align: center; color: var(--text2); font-size: 12px; margin-top: 16px; }
.forgot-line { text-align: center; color: var(--text2); font-size: 12px; margin-top: 14px; }
.forgot-wx {
  border: 0; background: transparent; color: var(--gold, #f5c451); font-size: 12px; font-weight: 700;
  letter-spacing: .5px; cursor: pointer; padding: 0 2px; border-bottom: 1px dashed rgba(245,196,81,.5);
}
.login-foot { text-align: center; color: var(--text2); font-size: 12px; margin-top: 24px; opacity: .7; }

/* ==================== 主界面布局 ==================== */
.drive-body { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }

/* 顶栏 */
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: rgba(11, 15, 26, 0.85); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border); z-index: 50; flex-shrink: 0;
}
.topbar-logo { width: 36px; height: 36px; border-radius: 10px; }
.topbar-title { font-size: 17px; font-weight: 700; letter-spacing: 0.5px; }
.topbar-spacer { flex: 1; }
.topbar-user {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--border); border-radius: 999px;
  padding: 5px 12px 5px 5px;
}
.topbar-avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff; overflow: hidden;
}
.topbar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.topbar-name { font-size: 13px; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 搜索 */
.search-wrap { padding: 12px 16px 0; flex-shrink: 0; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 0 12px;
}
.search-box input {
  flex: 1; background: transparent; border: 0; outline: none; color: var(--text);
  padding: 12px 0; font-size: 14px;
}
.search-box .sicon { color: var(--text2); font-size: 16px; }

/* 面包屑 + 操作行 */
.crumbs-row {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  flex-shrink: 0; overflow-x: auto; scrollbar-width: none;
}
.crumbs-row::-webkit-scrollbar { display: none; }
.crumb {
  color: var(--text2); font-size: 14px; white-space: nowrap;
  padding: 5px 10px; border-radius: 8px; background: transparent; border: 0;
}
.crumb.cur { color: var(--text); background: var(--card2); font-weight: 600; }
.crumb-sep { color: var(--text2); font-size: 12px; }

/* 内容滚动区 */
.content { flex: 1; overflow-y: auto; padding: 0 16px 90px; -webkit-overflow-scrolling: touch; }

/* 配额条 */
.quota-wrap {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 14px;
}
.quota-text { display: flex; justify-content: space-between; font-size: 12px; color: var(--text2); margin-bottom: 8px; }
.quota-text b { color: var(--text); }
.quota-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; }
.quota-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .4s; }
.quota-fill.warn { background: linear-gradient(90deg, var(--warn), #f59e0b); }
.quota-fill.full { background: linear-gradient(90deg, var(--bad), #ef4444); }

/* 区块标题 */
.sec-title { font-size: 13px; color: var(--text2); margin: 16px 0 8px; display: flex; align-items: center; gap: 6px; }

/* 文件列表（卡片式） */
.file-list { display: flex; flex-direction: column; gap: 8px; }
.file-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; transition: background .15s, transform .1s;
  position: relative;
}
.file-item:active { background: var(--card2); transform: scale(0.995); }
.file-icon {
  width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  background: var(--card2);
}
.file-icon.img { background: rgba(52, 211, 153, 0.14); }
.file-icon.vid { background: rgba(244, 114, 182, 0.14); }
.file-icon.aud { background: rgba(251, 191, 36, 0.14); }
.file-icon.doc { background: rgba(79, 124, 255, 0.14); }
.file-icon.zip { background: rgba(167, 139, 250, 0.14); }
.file-icon.folder { background: rgba(79, 124, 255, 0.2); }
.file-info { flex: 1; min-width: 0; }
.file-name {
  font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file-meta { font-size: 11px; color: var(--text2); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; }
.review-tag { font-size: 10px; padding: 1px 6px; border-radius: 6px; }
.review-tag.pending { background: rgba(251,191,36,0.15); color: var(--warn); }
.review-tag.approved { background: rgba(52,211,153,0.15); color: var(--ok); }
.review-tag.rejected_ai { background: rgba(248,113,113,0.15); color: var(--bad); }
.file-more {
  width: 34px; height: 34px; border-radius: 9px; border: 0; background: transparent;
  color: var(--text2); font-size: 18px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.file-more:active { background: var(--card2); }

/* 空状态 */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text2); }
.empty-state .eicon { font-size: 52px; margin-bottom: 14px; opacity: 0.6; }
.empty-state p { font-size: 14px; }

/* 底部操作栏（移动端） */
.fab-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  display: flex; gap: 10px; padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: rgba(11, 15, 26, 0.9); backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
}
.fab-btn {
  flex: 1; padding: 13px; border-radius: 12px; border: 0; font-size: 15px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.fab-btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; box-shadow: 0 4px 16px rgba(79,124,255,0.4); }
.fab-btn.ghost { background: var(--card2); color: var(--text); border: 1px solid var(--border); }

/* 底部导航 tab */
.tab-bar {
  display: flex; background: rgba(11,15,26,0.92); backdrop-filter: blur(20px);
  border-top: 1px solid var(--border); z-index: 55; flex-shrink: 0;
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 calc(9px + env(safe-area-inset-bottom));
  border: 0; background: transparent; color: var(--text2); font-size: 11px;
}
.tab-item .ticon { font-size: 20px; }
.tab-item.active { color: var(--accent2); }

/* 操作面板（底部弹层） */
.sheet-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 100;
  opacity: 0; pointer-events: none; transition: opacity .2s;
  backdrop-filter: blur(2px);
}
.sheet-mask.show { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 101;
  background: var(--bg2); border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--border);
  padding: 8px 0 calc(16px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .25s cubic-bezier(.32,.72,0,1);
  max-height: 75vh; overflow-y: auto;
}
.sheet.show { transform: translateY(0); }
.sheet-handle { width: 38px; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.2); margin: 6px auto 12px; }
.sheet-title { text-align: center; font-size: 13px; color: var(--text2); padding: 0 20px 10px; border-bottom: 1px solid var(--border); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-item {
  display: flex; align-items: center; gap: 14px; padding: 15px 22px;
  border: 0; background: transparent; color: var(--text); font-size: 15px; width: 100%; text-align: left;
}
.sheet-item:active { background: var(--card2); }
.sheet-item.danger { color: var(--bad); }
.sheet-item .si { font-size: 18px; width: 24px; text-align: center; }
.sheet-cancel { margin-top: 8px; border-top: 6px solid rgba(0,0,0,0.3); text-align: center; padding: 15px; color: var(--text2); font-size: 15px; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 110;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal-mask.show { opacity: 1; pointer-events: auto; }
.modal {
  width: 100%; max-width: 400px; background: var(--bg2);
  border: 1px solid var(--border); border-radius: 20px; padding: 22px;
  transform: scale(0.94); transition: transform .2s;
  max-height: 85vh; overflow-y: auto;
}
.modal-mask.show .modal { transform: scale(1); }
.modal h3 { font-size: 17px; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.mbtn { flex: 1; padding: 12px; border-radius: 11px; border: 0; font-size: 15px; }
.mbtn.primary { background: var(--accent); color: #fff; font-weight: 600; }
.mbtn.ghost { background: var(--card2); color: var(--text); }
.mbtn.danger { background: rgba(248,113,113,0.15); color: var(--bad); }

/* 预览弹层 */
.preview-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 120;
  display: flex; flex-direction: column;
}
.preview-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px; color: #fff;
}
.preview-head .pname { flex: 1; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-close { background: var(--card2); border: 0; color: #fff; width: 34px; height: 34px; border-radius: 9px; font-size: 16px; }
.preview-body { flex: 1; display: flex; align-items: center; justify-content: center; overflow: auto; padding: 12px; }
.preview-body img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.preview-body video, .preview-body audio { max-width: 100%; width: 100%; }
.preview-text {
  width: 100%; max-width: 720px; background: var(--card); border-radius: 12px; padding: 18px;
  font-size: 13px; line-height: 1.7; white-space: pre-wrap; word-break: break-all;
  max-height: 70vh; overflow-y: auto; color: var(--text);
}

/* 上传进度 */
.upload-progress {
  position: fixed; bottom: 90px; left: 16px; right: 16px; z-index: 90;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 16px; box-shadow: var(--shadow);
}
.up-title { font-size: 13px; margin-bottom: 8px; display: flex; justify-content: space-between; }
.up-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; }
.up-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width .2s; }

/* 管理后台 */
.admin-body { background: var(--bg); min-height: 100vh; min-height: 100dvh; }
.admin-wrap { max-width: 960px; margin: 0 auto; padding: 20px 16px 60px; }
.admin-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.admin-head h1 { font-size: 20px; }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.atab {
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--card); color: var(--text2); font-size: 14px;
}
.atab.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.admin-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin-bottom: 14px;
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; color: var(--text2); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table td { padding: 10px; border-bottom: 1px solid rgba(255,255,255,0.04); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.pw-mono { font-family: ui-monospace, monospace; font-size: 12px; background: rgba(0,0,0,0.3); padding: 3px 8px; border-radius: 6px; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 6px; display: inline-block; }
.tag.ok { background: rgba(52,211,153,0.15); color: var(--ok); }
.tag.bad { background: rgba(248,113,113,0.15); color: var(--bad); }
.tag.warn { background: rgba(251,191,36,0.15); color: var(--warn); }
.tag.info { background: rgba(79,124,255,0.15); color: var(--accent2); }
.sbtn {
  padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--card2); color: var(--text); font-size: 12px; margin-right: 6px;
}
.sbtn.bad { color: var(--bad); border-color: rgba(248,113,113,0.3); }
.sbtn.ok { color: var(--ok); border-color: rgba(52,211,153,0.3); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat-box { background: var(--card2); border-radius: 12px; padding: 14px; }
.stat-box .sv { font-size: 20px; font-weight: 700; }
.stat-box .sl { font-size: 12px; color: var(--text2); margin-top: 4px; }

/* Toast */
#toast-box { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; width: calc(100% - 32px); max-width: 400px; }
.toast {
  background: rgba(20, 26, 42, 0.95); border: 1px solid var(--border); color: var(--text);
  padding: 11px 18px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow);
  backdrop-filter: blur(16px); animation: toast-in .25s;
  text-align: center; max-width: 100%;
}
.toast.ok { border-color: rgba(52,211,153,0.4); }
.toast.err { border-color: rgba(248,113,113,0.4); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* 分享页 */
.share-body {
  min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(79, 124, 255, 0.15), transparent),
    var(--bg);
  padding: 20px;
}
.share-card {
  width: 100%; max-width: 420px; background: var(--card); backdrop-filter: blur(20px);
  border: 1px solid var(--border); border-radius: 20px; padding: 28px 24px; box-shadow: var(--shadow);
}
.share-card h2 { font-size: 18px; margin-bottom: 6px; }
.share-card .sub { color: var(--text2); font-size: 13px; margin-bottom: 20px; }

/* 分享页 - 头部 */
.share-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.share-logo { width: 44px; height: 44px; border-radius: 12px; }

/* 分享页 - 信息条 */
.share-meta {
  font-size: 12px; color: var(--text2); text-align: center;
  padding: 8px 12px; background: rgba(255,255,255,0.03); border-radius: 10px;
  margin-bottom: 16px; border: 1px solid var(--border);
}

/* 分享页 - 文件/文件夹信息 */
.share-file, .share-folder {
  display: flex; align-items: center; gap: 14px; margin-bottom: 18px;
  padding: 16px; background: rgba(79,124,255,0.06); border: 1px solid rgba(79,124,255,0.15);
  border-radius: 16px;
}
.file-ico-big {
  width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 30px;
  background: rgba(255,255,255,0.06);
}
.share-file-info { flex: 1; min-width: 0; }
.share-file-name {
  font-size: 16px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.share-file-size { font-size: 13px; color: var(--text2); margin-top: 4px; }

/* 分享页 - 按钮 */
.dl-btn { margin-bottom: 10px; }
.ghost-btn {
  width: 100%; padding: 12px; border-radius: 12px; margin-bottom: 10px;
  background: var(--card2); color: var(--text); border: 1px solid var(--border);
  font-size: 14px; font-weight: 500; transition: background .15s;
}
.ghost-btn:active { background: rgba(255,255,255,0.12); }

/* 分享页 - 文件列表 */
.share-divider {
  font-size: 12px; color: var(--text2); text-align: center;
  margin: 14px 0 10px; position: relative;
}
.share-divider::before, .share-divider::after {
  content: ''; position: absolute; top: 50%; width: 30%; height: 1px;
  background: var(--border);
}
.share-divider::before { left: 0; }
.share-divider::after { right: 0; }
.share-list {
  max-height: 360px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: 14px; padding: 4px 12px;
  background: rgba(0,0,0,0.15);
}
.share-list-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.share-list-item:last-child { border-bottom: 0; }
.share-list-ico { font-size: 20px; flex-shrink: 0; }
.share-list-info { flex: 1; min-width: 0; }
.share-list-name {
  font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.share-list-dir { font-size: 11px; color: var(--text2); margin-top: 2px; }
.share-list-size { font-size: 11px; color: var(--text2); flex-shrink: 0; }
.share-list-dl {
  font-size: 12px; color: var(--accent2); text-decoration: none;
  padding: 5px 12px; border-radius: 8px; background: rgba(79,124,255,0.12);
  flex-shrink: 0; font-weight: 500;
}
.share-list-dl:active { background: rgba(79,124,255,0.25); }

/* 加载动画 */
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.eicon.spin { animation: spin 2s linear infinite; display: inline-block; }

/* 桌面端增强 */
@media (min-width: 768px) {
  html { font-size: 16px; }
  .drive-body { flex-direction: row; }
  .side-nav {
    width: 230px; flex-shrink: 0; border-right: 1px solid var(--border);
    background: rgba(17, 24, 39, 0.6); display: flex; flex-direction: column;
    padding: 18px 12px;
  }
  .main-col { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
  .tab-bar { display: none; }
  .fab-bar {
    position: static; border: 0; background: transparent; padding: 12px 20px;
    justify-content: flex-end; backdrop-filter: none;
  }
  .fab-btn { flex: none; padding: 11px 22px; width: auto; }
  .content { padding: 0 20px 30px; }
  .file-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
  .file-item { flex-direction: column; align-items: flex-start; padding: 16px; }
  .file-icon { width: 48px; height: 48px; font-size: 24px; }
  .file-info { width: 100%; }
  .file-more { position: absolute; top: 8px; right: 8px; }
  .side-nav .sn-item {
    display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 10px;
    color: var(--text2); font-size: 14px; border: 0; background: transparent; width: 100%; text-align: left;
    margin-bottom: 4px;
  }
  .side-nav .sn-item.active { background: var(--card2); color: var(--text); font-weight: 600; }
  .side-nav .sn-item:hover { background: var(--card); }
}
@media (max-width: 767px) {
  .side-nav { display: none; }
}

/* ==========================================================
   付费扩容：VIP 配额卡 + 套餐弹窗（高级金色体系）
   ========================================================== */
:root {
  --gold: #f5c451;
  --gold2: #e8a93e;
  --gold-deep: #8a6420;
}

.quota-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 10px; }
.quota-plan { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vip-badge {
  flex-shrink: 0; font-size: 11px; font-weight: 700; letter-spacing: .5px;
  padding: 3px 9px; border-radius: 999px; line-height: 1.4;
}
.vip-badge.free { background: var(--card2); color: var(--text2); border: 1px solid var(--border); }
.vip-badge.vip {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: #2a1e08; box-shadow: 0 2px 10px rgba(245,196,81,0.35);
}
.quota-expire { font-size: 11px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quota-wrap.is-vip { border-color: rgba(245,196,81,0.35); box-shadow: 0 0 0 1px rgba(245,196,81,0.08), 0 6px 24px rgba(245,196,81,0.08); }
.quota-wrap.is-vip .quota-fill { background: linear-gradient(90deg, var(--gold), var(--gold2)); }

.upgrade-btn {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px;
  border: 0; cursor: pointer; color: #fff; font-size: 12px; font-weight: 700;
  padding: 7px 13px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 4px 14px rgba(79,124,255,0.4);
  transition: transform .15s, box-shadow .15s;
}
.upgrade-btn:active { transform: scale(0.95); }
.quota-wrap.is-vip .upgrade-btn {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: #2a1e08; box-shadow: 0 4px 14px rgba(245,196,81,0.4);
}

/* 套餐弹窗 */
.modal.plans-modal { max-width: 600px; }
.plans-period {
  display: inline-flex; background: var(--card2); border-radius: 999px; padding: 3px;
  margin: 0 auto 16px; position: relative; left: 50%; transform: translateX(-50%);
}
.plans-period button {
  border: 0; background: transparent; color: var(--text2); font-size: 13px; font-weight: 600;
  padding: 7px 18px; border-radius: 999px; cursor: pointer;
}
.plans-period button.on { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; box-shadow: 0 3px 10px rgba(79,124,255,0.35); }
.plans-period .save { font-size: 10px; color: var(--gold); margin-left: 3px; }
.plans-period button.on .save { color: #ffe9b8; }

.plans-scroll {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px; margin-bottom: 16px;
}
.plan-card {
  position: relative; border: 1.5px solid var(--border); border-radius: 16px;
  padding: 14px 12px 12px; background: rgba(255,255,255,0.02);
  cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s, background .15s;
  text-align: center; overflow: hidden;
}
.plan-card:not(.free):active { transform: scale(0.98); }
.plan-card.sel {
  border-color: var(--accent); background: rgba(79,124,255,0.08);
  box-shadow: 0 0 0 3px rgba(79,124,255,0.15);
}
.plan-card.hot { border-color: rgba(245,196,81,0.5); }
.plan-card.hot.sel { box-shadow: 0 0 0 3px rgba(245,196,81,0.18); }
.plan-card.free { opacity: 0.65; cursor: default; }
.plan-ribbon {
  position: absolute; top: 0; right: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold2)); color: #2a1e08;
  font-size: 10px; font-weight: 700; padding: 3px 10px; border-bottom-left-radius: 10px;
}
.plan-name { font-size: 15px; font-weight: 700; }
.plan-tag { font-size: 11px; color: var(--text2); margin-top: 2px; height: 15px; }
.plan-cap {
  font-size: 21px; font-weight: 800; margin: 10px 0 6px;
  background: linear-gradient(135deg, #8fb4ff, var(--accent2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.plan-card.hot .plan-cap {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.plan-price { font-size: 13px; color: var(--text2); }
.plan-price b { font-size: 20px; color: var(--text); }
.plan-unit { font-size: 11px; }
.plan-free { color: var(--text2); font-size: 12px; }
.plan-feats { list-style: none; margin: 10px 0 8px; padding: 0; text-align: left; }
.plan-feats li { font-size: 11px; color: var(--text2); padding: 3px 0 3px 15px; position: relative; }
.plan-feats li::before { content: '✓'; position: absolute; left: 0; color: var(--accent2); font-weight: 700; }
.plan-pick { font-size: 11px; font-weight: 600; color: var(--accent2); min-height: 16px; }
.plan-card.sel .plan-pick { color: var(--gold); }

.pay-guide {
  border: 1px solid var(--border); border-radius: 14px; padding: 13px 15px;
  background: rgba(255,255,255,0.02);
}
.pay-guide-t { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.pay-guide ol { margin: 0; padding-left: 18px; }
.pay-guide li { font-size: 12.5px; color: var(--text2); line-height: 1.9; }
.wx-id { color: var(--gold); font-weight: 700; letter-spacing: .5px; }
.copy-wx {
  border: 1px solid rgba(245,196,81,0.5); background: rgba(245,196,81,0.1); color: var(--gold);
  font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px; cursor: pointer; margin-left: 6px;
}
.copy-wx.lg { padding: 6px 16px; font-size: 13px; }
.plan-contact {
  width: 100%; margin-top: 10px; box-sizing: border-box;
  background: var(--card2); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font-size: 13px; padding: 10px 12px; outline: none;
}
.plan-contact:focus { border-color: var(--accent); }
.order-pending {
  background: rgba(245,196,81,0.1); border: 1px solid rgba(245,196,81,0.35);
  color: #ffd98a; font-size: 12px; line-height: 1.7; border-radius: 12px; padding: 10px 13px; margin-bottom: 14px;
}
.order-done { text-align: center; padding: 6px 0; }
.order-done-t { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.order-wx-row { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 14px; }
.wx-id-lg {
  font-size: 24px; font-weight: 800; letter-spacing: 2px; color: var(--gold);
  background: rgba(245,196,81,0.1); border: 1px dashed rgba(245,196,81,0.45);
  padding: 8px 20px; border-radius: 12px;
}
.order-amount { font-size: 14px; margin-bottom: 8px; }
.order-amount b { color: var(--gold); font-size: 18px; }
.order-tip { font-size: 12px; color: var(--text2); line-height: 1.7; }

@media (max-width: 480px) {
  .plans-scroll { display: flex; overflow-x: auto; gap: 10px; padding-bottom: 6px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
  .plan-card { min-width: 150px; scroll-snap-align: start; }
}

/* 管理后台：扩容订单 */
.ord-badge {
  display: inline-block; min-width: 16px; height: 16px; line-height: 16px;
  background: #ef4444; color: #fff; font-size: 10px; font-weight: 700;
  border-radius: 999px; padding: 0 4px; margin-left: 5px; vertical-align: top;
}
.order-filter { display: flex; gap: 8px; }
.of-btn {
  border: 1px solid var(--border); background: var(--card2); color: var(--text2);
  font-size: 13px; padding: 6px 16px; border-radius: 999px; cursor: pointer;
}
.of-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
