/* ============ theme variables ============ */
:root {
  --bg: #f3f5f9;
  --card: #ffffff;
  --card-border: #e2e8f0;
  --text: #1e293b;
  --text2: #556074;
  --text3: #6b7688;
  --input-bg: #ffffff;
  --soft: #eef2f7;
  --shadow: 0 6px 22px rgba(15, 23, 42, .05);
  --navy: #101a30;
  --navy-grad: linear-gradient(180deg, #0f172a 0%, #13203a 100%);
}
html.dark {
  --bg: #0b1220;
  --card: #111c31;
  --card-border: #223049;
  --text: #e7ecf5;
  --text2: #c6d0e0;
  --text3: #a9b5c9;
  --input-bg: #0e1728;
  --soft: #1a2540;
  --shadow: 0 6px 22px rgba(0, 0, 0, .35);
  --navy: #0c1526;
  --navy-grad: linear-gradient(180deg, #0c1526 0%, #101c33 100%);
}

html.dark .el-message { --el-message-bg-color: #0f2b1d; --el-message-text-color: #a7f3d0; border-color: #14532d; }

* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
em { font-style: normal; }

/* 浏览器自动填充会把输入框染成蓝/黄色,与卡片底色不一致 —— 统一压回卡片色 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--card) inset !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text) !important;
  transition: background-color 99999s ease-in-out 0s !important;
}

/* ============ login ============ */
.auth-wrap {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(1200px 600px at 15% -10%, #312e81 0%, transparent 55%),
              radial-gradient(1000px 500px at 110% 20%, #0e7490 0%, transparent 50%),
              linear-gradient(160deg, #0f172a 0%, #1e1b4b 55%, #0f172a 100%);
}
.auth-orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; animation: float 14s ease-in-out infinite; }
.orb-a { width: 420px; height: 420px; background: #6366f1; top: -120px; left: -80px; }
.orb-b { width: 360px; height: 360px; background: #0ea5e9; bottom: -140px; right: -60px; animation-delay: -5s; }
.orb-c { width: 260px; height: 260px; background: #8b5cf6; top: 45%; left: 60%; animation-delay: -9s; }
@keyframes float { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-36px) scale(1.06); } }

.auth-card {
  position: relative;
  width: 400px;
  padding: 44px 40px 30px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px rgba(2, 6, 23, .55);
  text-align: center;
}
html.dark .auth-card { background: rgba(17, 28, 49, .92); }
.auth-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px; height: 62px;
  border-radius: 18px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  box-shadow: 0 12px 26px rgba(99, 102, 241, .45);
}
.auth-logo-icon svg { width: 30px; height: 30px; }
.auth-name { font-size: 30px; font-weight: 800; letter-spacing: .5px; margin-top: 16px; color: var(--text); }
.auth-name em { background: linear-gradient(135deg, #6366f1, #06b6d4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-slogan { color: var(--text2); font-size: 13px; margin: 8px 0 28px; letter-spacing: 2px; }
.auth-input .el-input__wrapper { border-radius: 10px; }
/* 登录/注册切换:胶囊分段控件 */
.auth-mode {
  width: 100%;
  background: var(--soft);
  border-radius: 999px;
  padding: 4px;
}
.auth-mode .el-radio-button { flex: 1; }
.auth-mode .el-radio-button__inner {
  width: 100%;
  border: none !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  background: transparent;
  color: var(--text2);
  font-weight: 500;
  padding: 10px 0;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.auth-mode .el-radio-button__inner:hover { color: var(--text); }
.auth-mode .el-radio-button.is-active .el-radio-button__inner {
  background: var(--card);
  color: #4f46e5;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .14) !important;
}
.auth-reg-hint { margin-top: 12px; color: var(--text2); font-size: 12px; line-height: 1.7; text-align: center; }
.auth-remember { display: flex; justify-content: flex-start; margin-bottom: 14px; height: 24px; }
.auth-remember .el-checkbox { color: var(--text2); height: 24px; }
.prefix-ic { display: inline-flex; color: var(--text3); }
.prefix-ic svg { width: 17px; height: 17px; }
.pw-eye { display: inline-flex; color: var(--text3); cursor: pointer; }
.pw-eye:hover { color: var(--text2); }
.pw-eye svg { width: 17px; height: 17px; }
.btn-gradient {
  width: 100%;
  height: 46px;
  border: none !important;
  border-radius: 12px !important;
  font-size: 16px;
  letter-spacing: 6px;
  color: #fff !important;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
  box-shadow: 0 12px 24px rgba(99, 102, 241, .38);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-gradient:hover { transform: translateY(-1px); box-shadow: 0 16px 30px rgba(99, 102, 241, .5); }
.auth-features { margin-top: 22px; color: var(--text2); font-size: 12px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.auth-features i { opacity: .4; font-style: normal; }
.mini-ic { display: inline-flex; color: #818cf8; }
.mini-ic svg { width: 13px; height: 13px; }
.auth-foot { position: absolute; bottom: 22px; width: 100%; text-align: center; color: rgba(190, 202, 220, .6); font-size: 12px; }

/* theme toggle (shared) */.theme-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.1);
  color: #e2e8f0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.theme-btn:hover { background: rgba(255,255,255,.2); }
.theme-btn svg { width: 16px; height: 16px; }
.theme-btn.on-light { border-color: var(--card-border); background: var(--soft); color: var(--text2); }

/* ============ shared ============ */
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 17px; color: #fff; letter-spacing: .5px; }
.brand em { background: linear-gradient(135deg, #a5b4fc, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff; box-shadow: 0 6px 14px rgba(99, 102, 241, .4);
}
.brand-icon svg { width: 15px; height: 15px; }
.spacer { flex: 1; }

.page { min-height: 100%; display: flex; flex-direction: column; }
.topbar {
  height: 60px;
  display: flex; align-items: center; gap: 14px;
  padding: 0 28px;
  background: var(--navy);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 20;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06);
}
.user-chip { display: flex; align-items: center; gap: 8px; color: #e2e8f0; cursor: pointer; font-size: 13px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  color: #fff; font-weight: 700; font-size: 13px;
}
.content { max-width: 1120px; width: 100%; margin: 0 auto; padding: 26px 20px 60px; flex: 1; }

/* ============ user portal ============ */
.hero {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  border-radius: 20px;
  padding: 30px 34px;
  margin-bottom: 18px;
  color: #fff;
  background: linear-gradient(120deg, #312e81 0%, #4f46e5 45%, #0e7490 100%);
  box-shadow: 0 20px 45px rgba(49, 46, 129, .35);
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -80px;
  width: 280px; height: 280px; border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}
.hero-title { font-size: 24px; font-weight: 300; }
.hero-title b { font-weight: 800; margin-left: 6px; }
.hero-sub { margin-top: 10px; font-size: 13px; opacity: .95; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; margin-top: 22px; flex-wrap: wrap; }
.hs i { display: block; font-style: normal; font-size: 12px; opacity: .8; margin-bottom: 4px; }
.hs b { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hero-ring { position: relative; z-index: 1; }
.ring-label { font-size: 26px; font-weight: 800; line-height: 1.1; color: #ffffff; text-shadow: 0 1px 4px rgba(2,6,23,.45); }
.ring-sub { font-size: 12px; color: rgba(255,255,255,.88); margin-top: 2px; text-shadow: 0 1px 3px rgba(2,6,23,.45); }
.sub-variants { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.sub-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--soft); color: var(--text2);
  font-size: 12.5px; cursor: pointer; font-family: inherit;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.sub-chip:hover { border-color: #a5b4fc; color: var(--text); background: rgba(99, 102, 241, .08); }
.sub-chip-ic { display: inline-flex; color: #818cf8; }
.sub-chip-ic svg { width: 14px; height: 14px; }

.grid { margin-top: 2px; }
.glass-card { border-radius: 16px; border: 1px solid var(--card-border); background: var(--card); box-shadow: var(--shadow) !important; }
.glass-card .el-card__header { padding: 16px 22px; border-bottom: 1px solid var(--card-border); }
.glass-card .el-card__body { padding: 20px 22px; }
.card-title { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; color: var(--text); }
.ct-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 9px; color: #fff;
}
.ct-ic svg { width: 15px; height: 15px; }
.c-indigo { background: linear-gradient(135deg, #6366f1, #818cf8); box-shadow: 0 5px 12px rgba(99,102,241,.35); }
.c-amber { background: linear-gradient(135deg, #f59e0b, #fbbf24); box-shadow: 0 5px 12px rgba(245,158,11,.35); }
.c-emerald { background: linear-gradient(135deg, #10b981, #34d399); box-shadow: 0 5px 12px rgba(16,185,129,.35); }
.c-rose { background: linear-gradient(135deg, #f43f5e, #fb7185); box-shadow: 0 5px 12px rgba(244,63,94,.35); }
.hint { color: var(--text2); font-size: 12.5px; margin-top: 12px; line-height: 1.8; }
.qr-area { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 16px; }
.qrbox { padding: 10px; background: #fff; border: 1px solid var(--card-border); border-radius: 12px; line-height: 0; }
.dl-list { display: flex; flex-direction: column; gap: 10px; }
.dl-item {
  display: flex; align-items: center; gap: 13px;
  padding: 12px 14px; border: 1px solid var(--card-border); border-radius: 12px;
  background: var(--card);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.dl-item:hover { border-color: #a5b4fc; box-shadow: 0 4px 14px rgba(99, 102, 241, .12); }
.dl-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 11px; color: #fff; flex-shrink: 0;
  background: linear-gradient(135deg, #6366f1, #818cf8);
}
.dl-ic svg { width: 19px; height: 19px; }
.dl-info { flex: 1; line-height: 1.3; }
.dl-info b { display: block; font-size: 14px; color: var(--text); }
.dl-info i { font-style: normal; font-size: 12px; color: var(--text3); }
.dl-mini-btn {
  padding: 7px 18px; border-radius: 8px; text-decoration: none;
  background: linear-gradient(135deg, #10b981, #34d399); color: #fff;
  font-size: 13px; font-weight: 600;
  box-shadow: 0 6px 14px rgba(16, 185, 129, .28);
}
.dl-mini-btn:hover { color: #fff; opacity: .92; }

/* ============ admin ============ */
.admin-wrap { display: flex; min-height: 100%; }
.admin-aside {
  width: 224px; flex-shrink: 0;
  background: var(--navy-grad);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.aside-brand { display: flex; align-items: center; gap: 10px; padding: 22px 22px 18px; border-bottom: 1px solid rgba(255,255,255,.07); }
.aside-nav { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.aside-nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 14px; border-radius: 10px;
  color: #aeb9c9; font-size: 14px; cursor: pointer;
  transition: all .15s ease;
}
.aside-nav a svg { width: 17px; height: 17px; }
.aside-nav a:hover { color: #e2e8f0; background: rgba(255, 255, 255, .05); }
.aside-nav a.on {
  color: #fff;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  box-shadow: 0 8px 20px rgba(79, 70, 229, .4);
}
.aside-foot {
  padding: 12px 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.aside-foot a {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; border-radius: 9px;
  color: #93a1b8; font-size: 13px; cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.aside-foot a svg { width: 15px; height: 15px; }
.aside-foot a:hover { color: #e2e8f0; background: rgba(255,255,255,.06); }
.aside-foot a.danger:hover { color: #fb7185; background: rgba(251,113,133,.12); }

.admin-main { flex: 1; padding: 26px 30px 60px; min-width: 0; background: var(--bg); }
.admin-topbar { display: flex; align-items: center; margin-bottom: 8px; min-height: 34px; }
.at-title { margin-right: auto; font-size: 12px; letter-spacing: 2px; color: var(--text3); }
.page-head { margin-bottom: 20px; }
.page-head h2 { margin: 0; font-size: 20px; font-weight: 800; color: var(--text); }
.page-head p { margin: 6px 0 0; font-size: 13px; color: var(--text2); }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat-card {
  display: flex; align-items: center; gap: 15px;
  background: var(--card); border-radius: 16px; padding: 20px 22px;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
}
.sc-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 13px; color: #fff; flex-shrink: 0;
}
.sc-ic svg { width: 22px; height: 22px; }
.sc-indigo .sc-ic { background: linear-gradient(135deg, #6366f1, #818cf8); box-shadow: 0 8px 18px rgba(99,102,241,.35); }
.sc-emerald .sc-ic { background: linear-gradient(135deg, #10b981, #34d399); box-shadow: 0 8px 18px rgba(16,185,129,.35); }
.sc-amber .sc-ic { background: linear-gradient(135deg, #f59e0b, #fbbf24); box-shadow: 0 8px 18px rgba(245,158,11,.35); }
.sc-rose .sc-ic { background: linear-gradient(135deg, #f43f5e, #fb7185); box-shadow: 0 8px 18px rgba(244,63,94,.35); }
.stat-card b { display: block; font-size: 22px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-card i { font-style: normal; font-size: 12px; color: var(--text2); }
.card-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.code-font { font-family: "SF Mono", Consolas, monospace; letter-spacing: .5px; }
.edit-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.edit-row .unit { color: var(--text2); font-size: 12px; }

/* settings page: row-style layout */
.setting-group-title {
  font-size: 12px; font-weight: 700; color: var(--text3);
  letter-spacing: 1.5px; margin: 20px 4px 2px;
}
.setting-row {
  display: flex; align-items: center; gap: 20px;
  padding: 15px 4px; border-bottom: 1px solid var(--card-border);
}
.setting-info { flex: 1; min-width: 0; }
.setting-info b { display: block; font-size: 14px; font-weight: 600; color: var(--text); }
.setting-info i { display: block; font-style: normal; font-size: 12px; color: var(--text3); margin-top: 3px; line-height: 1.6; }
.setting-ctl { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.setting-ctl .unit { color: var(--text2); font-size: 12px; }
.quota-preset-row { align-items: flex-start; }
.quota-preset-row .setting-info { flex: 0 0 auto; max-width: 260px; }
.quota-presets { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.quota-chip {
  border: 1px solid var(--card-border); background: var(--card); color: var(--text2);
  font-size: 12px; padding: 3px 10px; border-radius: 999px; cursor: pointer; line-height: 1.5;
  transition: all .15s;
}
.quota-chip:hover { color: var(--text); border-color: var(--indigo, #6366f1); }
.quota-chip.on { color: #fff; background: var(--indigo, #6366f1); border-color: var(--indigo, #6366f1); }
.setting-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--card-border);
}
.hint-inline { font-size: 12px; color: var(--text3); line-height: 1.6; }

/* codes toolbar */
.code-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.code-actions .sel-count { font-size: 12.5px; color: var(--text2); margin-right: auto; }
.code-cb { width: 15px; height: 15px; cursor: pointer; accent-color: #4f46e5; }
.pager-row { display: flex; justify-content: flex-end; margin-top: 12px; }

/* users table: 操作列收进「更多」下拉,窄窗口不再换行堆叠 */
.el-table .el-dropdown { margin-left: 12px; vertical-align: middle; }
.more-btn .caret-ic { display: inline-flex; margin-left: 3px; }
.more-btn .caret-ic svg { width: 12px; height: 12px; }
.el-dropdown-menu .danger-item { color: #f43f5e; }
.el-dropdown-menu .danger-item:not(.is-disabled):hover { color: #f43f5e; background: rgba(244, 63, 94, .09); }

/* ============ admin mobile shell (hidden on desktop) ============ */
.admin-mtop { display: none; }
.drawer-mask { display: none; }
.aside-close { display: none; }
.m-card-list { display: none; }

/* ============ responsive ============ */
@media (max-width: 768px) {
  /* login */
  .auth-wrap { padding: 24px 0; flex-direction: column; align-items: center; }
  .auth-card { width: calc(100vw - 28px); max-width: 400px; padding: 34px 20px 24px; }
  .auth-foot { position: static; margin-top: 16px; width: auto; }
  .auth-orb { filter: blur(50px); }

  /* user portal */
  .topbar { padding: 0 14px; gap: 8px; }
  .brand { font-size: 15px; }
  .content { padding: 14px 12px 40px; }
  .hero { flex-direction: column; text-align: center; padding: 22px 16px; gap: 14px; }
  .hero-title { font-size: 20px; }
  .hero-sub { justify-content: center; }
  .hero-stats { justify-content: center; gap: 18px 22px; margin-top: 14px; }
  .hs b { font-size: 18px; }
  .glass-card .el-card__header { padding: 13px 16px; }
  .glass-card .el-card__body { padding: 16px 14px; }
  .grid .el-col + .el-col { margin-top: 16px; }

  /* admin: hamburger + slide-in drawer sidebar, content stays full-width */
  .admin-mtop {
    display: flex; align-items: center; gap: 10px;
    height: 54px; padding: 0 12px;
    margin: -12px -12px 12px;
    background: var(--navy);
    position: sticky; top: 0; z-index: 20;
  }
  .admin-mtop .brand { font-size: 15px; }
  .menu-btn {
    width: 36px; height: 36px; border: none; border-radius: 9px;
    background: rgba(255,255,255,.1); color: #dbe4f2; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .menu-btn:hover { background: rgba(255,255,255,.2); }
  .menu-btn svg { width: 18px; height: 18px; }
  .drawer-mask {
    display: block; position: fixed; inset: 0; z-index: 90;
    background: rgba(2, 6, 23, .55);
  }
  .admin-aside {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 100;
    width: 246px; height: 100vh; height: 100dvh;
    transform: translateX(-103%);
    transition: transform .28s cubic-bezier(.2, .9, .3, 1);
    box-shadow: none;
  }
  .admin-aside.open { transform: none; box-shadow: 24px 0 60px rgba(2, 6, 23, .5); }
  .aside-close {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; margin-left: auto;
    border: none; border-radius: 8px; cursor: pointer;
    background: rgba(255,255,255,.08); color: #aeb9c9;
  }
  .aside-close:hover { background: rgba(255,255,255,.16); color: #e2e8f0; }
  .aside-close svg { width: 14px; height: 14px; }
  .aside-brand { padding: 18px 16px 14px; }
  .admin-topbar { display: none; }
  .admin-main { padding: 12px 12px 40px; }

  /* users & codes render as card lists instead of wide tables */
  .m-card-list { display: flex; flex-direction: column; gap: 10px; }
  .m-user-card, .m-code-card {
    background: var(--card); border: 1px solid var(--card-border);
    border-radius: 14px; padding: 13px 14px; box-shadow: var(--shadow);
  }
  .m-user-head { display: flex; align-items: center; gap: 10px; }
  .m-user-head .avatar { width: 36px; height: 36px; font-size: 15px; flex-shrink: 0; }
  .m-user-name { flex: 1; min-width: 0; }
  .m-user-name b { display: flex; align-items: center; font-size: 15px; color: var(--text); min-width: 0; }
  .m-user-name b > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .m-user-name i { display: block; font-style: normal; font-size: 11.5px; color: var(--text3); margin-top: 2px; }
  .m-user-grid {
    display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center;
    margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--card-border);
  }
  .m-user-grid i { display: block; font-style: normal; font-size: 11px; color: var(--text3); margin-bottom: 2px; }
  .m-user-grid b { font-size: 13px; font-variant-numeric: tabular-nums; }
  .m-hy2 { display: flex; flex-direction: column; align-items: flex-end; }
  .m-user-note { margin-top: 8px; font-size: 11.5px; color: var(--text3); }
  .m-user-acts {
    display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
    margin-top: 11px; padding-top: 11px; border-top: 1px dashed var(--card-border);
  }
  .m-user-acts .el-button { margin-left: 0 !important; }
  .m-code-top { display: flex; align-items: center; gap: 9px; }
  .m-code-top .el-link { flex: 1; min-width: 0; font-size: 13px; }
  .m-code-meta { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; font-size: 11.5px; color: var(--text3); }
  .m-empty { text-align: center; color: var(--text3); font-size: 13px; padding: 18px 0; }

  /* cards & tables */
  .stat-cards { gap: 10px; }
  .stat-card { padding: 14px 16px; gap: 11px; }
  .sc-ic { width: 38px; height: 38px; border-radius: 11px; }
  .sc-ic svg { width: 18px; height: 18px; }
  .stat-card b { font-size: 18px; }
  .el-table { font-size: 12.5px; }
  .el-table .cell { padding: 0 8px; }
  .el-button + .el-button { margin-left: 6px; }
  .pager-row { justify-content: center; }
  .page-head h2 { font-size: 18px; }

  /* dialogs & message boxes fit small screens */
  .el-dialog { width: calc(100vw - 24px) !important; max-width: 440px; margin-top: 8vh !important; }
  .el-message-box { width: calc(100vw - 32px) !important; max-width: 420px; }
  .el-date-editor.el-input__wrapper { width: 100%; }

  /* settings rows stack vertically on phones */
  .setting-row { flex-direction: column; align-items: stretch; gap: 10px; padding: 13px 2px; }
  .setting-ctl { justify-content: flex-end; flex-wrap: wrap; }
  .quota-preset-row .setting-info { max-width: none; }
  .quota-presets { justify-content: flex-start; }
  .setting-footer { flex-direction: column-reverse; align-items: stretch; }
  .setting-footer .el-button { width: 100%; }
}

/* ============ admin backup page ============ */
.bk-status {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 10px; font-size: 13.5px;
  border: 1px solid var(--card-border); background: var(--soft);
}
.bk-status a { color: #3b82f6; }
.bk-ok { color: #059669; }
.bk-err { color: #e11d48; }
.mini-spin {
  width: 13px; height: 13px; flex: 0 0 13px; border-radius: 50%;
  border: 2px solid var(--card-border); border-top-color: #3b82f6;
  animation: bk-rot .8s linear infinite; display: inline-block;
  vertical-align: -2px; margin-right: 2px;
}
.bk-running .mini-spin { border-top-color: #3b82f6; }
@keyframes bk-rot { to { transform: rotate(360deg); } }

/* 备份留存策略设置行 */
.bk-keep {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 14px; padding: 12px 14px; border-radius: 10px;
  border: 1px dashed var(--card-border); background: var(--soft);
  flex-wrap: wrap;
}
.bk-keep-info b { display: block; font-size: 13.5px; }
.bk-keep-info i { font-size: 12px; color: var(--text3); }
.bk-keep-ctl { display: flex; align-items: center; gap: 7px; font-size: 13px; flex-wrap: wrap; }
.bk-keep-ctl .el-button { margin-left: 6px; }

/* 用户状态列:上线/下线时间小字(与受保护标签同级的紧凑说明) */
.stamp-line { margin-top: 3px; font-size: 10px; color: #8a94a6; line-height: 1.4; display: flex; flex-direction: column; gap: 1px; white-space: nowrap; }
.m-stamp { display: flex; gap: 12px; font-size: 10.5px; color: #8a94a6; margin: 3px 0 2px 46px; }

/* 备份列表工具栏:左侧 全选/反选/取消选择,右侧 一键删除 */
.bk-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.bk-bar-left { display: flex; align-items: center; }
.bk-bar .el-button + .el-button { margin-left: 8px; }
