/* ===== Furina Homelab Dashboard ===== */
:root {
  --sky: #7dd3fc;
  --violet: #a78bfa;
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #fb7185;
  --text: #eaf6ff;
  --muted: #a8c3d9;
  --glass: rgba(13, 33, 55, 0.42);
  --glass-border: rgba(160, 220, 255, 0.22);
  --radius: 18px;
  --sidebar-w: 224px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { min-height: 100%; }

body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--text);
  background: #07121f;
  overflow-x: hidden;
}

/* ===== 背景层 ===== */
.video-bg {
  position: fixed; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -3; opacity: 0;
  transition: opacity 1.2s ease;
}
.video-bg.show { opacity: 1; }

.bg-fallback {
  position: fixed; inset: 0; z-index: -4;
  background:
    radial-gradient(circle at 18% 22%, rgba(125, 211, 252, 0.35), transparent 40%),
    radial-gradient(circle at 82% 30%, rgba(167, 139, 250, 0.32), transparent 42%),
    radial-gradient(circle at 55% 85%, rgba(56, 189, 248, 0.22), transparent 45%),
    linear-gradient(135deg, #04101d 0%, #0a1f36 45%, #0d2440 100%);
  background-size: cover; background-position: center;
  transition: opacity 1.2s ease;
}

.bg-overlay {
  position: fixed; inset: 0; z-index: -2;
  background:
    linear-gradient(180deg, rgba(4, 12, 22, 0.6) 0%, rgba(4, 12, 22, 0.4) 40%, rgba(4, 12, 22, 0.75) 100%),
    radial-gradient(circle at 50% 0%, rgba(10, 30, 50, 0.1), rgba(3, 10, 18, 0.55));
  backdrop-filter: blur(1px);
}

/* ===== 侧栏 ===== */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  z-index: 40;
  display: flex; flex-direction: column;
  padding: 18px 12px 14px;
  background: linear-gradient(180deg, rgba(10, 28, 48, 0.78), rgba(6, 18, 32, 0.86));
  border-right: 1px solid rgba(160, 220, 255, 0.14);
  backdrop-filter: blur(16px);
  transition: transform 0.28s ease;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.brand-icon { font-size: 26px; filter: drop-shadow(0 0 10px rgba(125, 211, 252, 0.6)); }
.brand-text { font-size: 15px; font-weight: 700; letter-spacing: 1px; color: #d6efff; line-height: 1.25; }
.brand-text span { display: block; font-size: 10px; font-weight: 500; letter-spacing: 3px; color: var(--muted); }

.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.nav::-webkit-scrollbar { width: 0; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px;
  color: var(--muted); text-decoration: none;
  font-size: 13.5px; transition: background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}
.nav-item .ni { font-size: 15px; width: 20px; text-align: center; }
.nav-item:hover { background: rgba(125, 211, 252, 0.08); color: #d6efff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(125, 211, 252, 0.18), rgba(167, 139, 250, 0.14));
  color: #eaf6ff;
  box-shadow: inset 2px 0 0 var(--sky);
}

.sidebar-foot {
  padding: 12px 8px 2px; border-top: 1px solid rgba(160, 220, 255, 0.1);
  font-size: 12px; color: var(--muted);
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.sf-sub { width: 100%; font-size: 10.5px; opacity: 0.8; margin-top: 2px; }

.side-mask { display: none; }

.menu-btn {
  display: none; position: fixed; top: 14px; left: 14px; z-index: 45;
  width: 38px; height: 38px; border-radius: 11px;
  border: 1px solid var(--glass-border);
  background: rgba(12, 30, 50, 0.8); color: var(--text);
  font-size: 17px; cursor: pointer; backdrop-filter: blur(10px);
}

/* ===== 页面容器 ===== */
.page {
  position: relative;
  margin-left: var(--sidebar-w);
  max-width: 1240px;
  padding: 26px 24px 24px;
}

.view { animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.view-head { margin-bottom: 16px; }
.view-head h2 { font-size: 21px; font-weight: 700; letter-spacing: 0.5px; color: #d9f0ff; }
.view-head p { margin-top: 4px; font-size: 12.5px; color: var(--muted); }

/* ===== 欢迎区 ===== */
.hero {
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
  padding: 22px 26px; margin-bottom: 18px; border-radius: 24px;
  background: linear-gradient(135deg, rgba(20, 48, 78, 0.55), rgba(14, 32, 56, 0.4));
  border: 1px solid var(--glass-border);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(14px);
}
.hero-left { display: flex; align-items: center; gap: 20px; min-width: 0; }
.avatar-wrap { position: relative; width: 84px; height: 84px; flex: 0 0 auto; }
.avatar {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(190, 235, 255, 0.65);
  box-shadow: 0 0 24px rgba(125, 211, 252, 0.45);
  position: relative; z-index: 1;
}
.avatar-glow {
  position: absolute; inset: -8px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--sky), var(--violet), var(--sky));
  filter: blur(12px); opacity: 0.55; animation: spin 8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hero-text { min-width: 0; }
.greeting { font-size: 13px; letter-spacing: 2px; color: var(--sky); margin-bottom: 4px; }
.welcome {
  font-size: 26px; font-weight: 700;
  background: linear-gradient(90deg, #bfe9ff, #c9b8ff 60%, #9fe8ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tip { margin-top: 6px; font-size: 13px; color: var(--muted); }
.hero-right { text-align: right; flex: 0 0 auto; }
.clock { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.date { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ===== 网格 ===== */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card-wide { grid-column: span 2; }
.card-full { grid-column: 1 / -1; }

/* ===== 卡片 ===== */
.card {
  border-radius: var(--radius);
  padding: 16px 18px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  min-width: 0;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.card.clickable { cursor: pointer; }
.card.clickable:hover {
  border-color: rgba(125, 211, 252, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(125, 211, 252, 0.25) inset;
}

.card-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.card-title { font-size: 14px; font-weight: 600; letter-spacing: 1px; color: #cfeaff; }
.card-sub { font-size: 11px; color: var(--muted); letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.big-num { font-size: 44px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.big-num small { font-size: 15px; font-weight: 500; color: var(--muted); margin-left: 2px; }

/* CPU */
.cpu-main { display: flex; align-items: center; gap: 16px; }
.cores { flex: 1; display: flex; align-items: flex-end; gap: 4px; height: 46px; }
.cores-lg { height: 110px; gap: 6px; }
.core {
  flex: 1; min-width: 5px; border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, var(--sky), var(--violet));
  transition: height 0.6s ease, background 0.6s ease;
  align-self: flex-end;
}

/* 内存 */
.mem-main { display: flex; align-items: center; gap: 16px; }
.donut {
  width: 86px; height: 86px; border-radius: 50%; flex: 0 0 auto;
  background: conic-gradient(var(--sky) 0deg, var(--violet) 0deg, rgba(255,255,255,0.08) 0deg);
  display: grid; place-items: center; transition: background 0.6s ease;
}
.donut-inner {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(8, 22, 38, 0.92);
  display: grid; place-items: center;
  font-weight: 700; font-size: 19px; font-variant-numeric: tabular-nums;
}
.donut-inner small { font-size: 10px; color: var(--muted); margin-left: 1px; }
.mem-detail { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.mem-detail .row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.mem-detail .row b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.mem-detail .row.swap { border-top: 1px dashed rgba(160, 220, 255, 0.18); padding-top: 6px; }

/* 磁盘 */
.disk-list { display: flex; flex-direction: column; gap: 10px; }
.disk-item .disk-top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; color: var(--muted); }
.disk-item .disk-top b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.disk-bar { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.disk-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--sky), var(--violet)); transition: width 0.6s ease; }

/* 负载 */
.load-row { display: flex; gap: 12px; }
.load-item {
  flex: 1; text-align: center; padding: 10px 4px;
  border-radius: 12px; background: rgba(255, 255, 255, 0.05);
}
.load-item b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.load-item span { font-size: 11px; color: var(--muted); }

/* 温度 */
.temp-main { display: flex; flex-direction: column; gap: 8px; }
.temp-bar { height: 8px; border-radius: 4px; background: rgba(255,255,255,0.08); overflow: hidden; }
.temp-fill { height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, var(--ok), var(--warn), var(--bad)); transition: width 0.6s ease; }
.temp-state { font-size: 12px; color: var(--muted); }

/* 网络 */
.card-net { display: flex; flex-direction: column; }
.net-heads { display: flex; align-items: baseline; gap: 22px; margin-bottom: 6px; flex-wrap: wrap; }
.net-item { display: flex; align-items: baseline; gap: 4px; font-size: 15px; }
.net-item .arrow { font-size: 14px; }
.net-item.down .arrow { color: var(--sky); }
.net-item.up .arrow { color: var(--violet); }
.net-item b { font-size: 20px; font-variant-numeric: tabular-nums; }
.net-item small { color: var(--muted); font-size: 11px; }
.net-total { font-size: 11.5px; color: var(--muted); margin-left: 8px; }
.net-total i { font-style: normal; color: #cfeaff; font-variant-numeric: tabular-nums; }
.net-peak { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.net-chart { width: 100%; height: 118px; display: block; }
.net-chart-lg { height: 170px; }
.net-chart-xl { height: 220px; }

/* 网络详情页 */
.net-hero { padding: 20px 24px; }
.net-hero-row { display: flex; gap: 34px; flex-wrap: wrap; align-items: center; }
.net-hero-item { display: flex; align-items: center; gap: 10px; }
.net-hero-item .arrow { font-size: 26px; }
.net-hero-item.down .arrow { color: var(--sky); }
.net-hero-item.up .arrow { color: var(--violet); }
.net-hero-item b { font-size: 30px; font-variant-numeric: tabular-nums; display: block; line-height: 1.1; }
.net-hero-item small { color: var(--muted); font-size: 13px; }
.net-hero-label { font-size: 11px; color: var(--muted); letter-spacing: 1px; }

/* Docker */
.docker-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.docker-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(160, 220, 255, 0.08);
  min-width: 0;
}
.st-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.st-dot.run { background: var(--ok); box-shadow: 0 0 8px rgba(52, 211, 153, 0.8); }
.st-dot.stop { background: #64748b; }
.st-dot.other { background: var(--warn); }
.docker-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.docker-status { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 占位卡片 */
.placeholder-card {
  border-radius: var(--radius);
  padding: 46px 26px;
  text-align: center;
  background: var(--glass);
  border: 1px dashed rgba(160, 220, 255, 0.28);
  backdrop-filter: blur(12px);
}
.ph-icon { font-size: 40px; margin-bottom: 12px; filter: grayscale(0.2); }
.placeholder-card h3 { font-size: 17px; margin-bottom: 8px; color: #d9f0ff; }
.placeholder-card p { font-size: 13px; color: var(--muted); line-height: 1.7; max-width: 560px; margin: 0 auto; }

/* 页脚状态点 */
.dot-live {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok); box-shadow: 0 0 8px rgba(52, 211, 153, 0.9);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }

/* ===== 响应式 ===== */
@media (max-width: 1100px) {
  .page { padding: 22px 18px; }
}

@media (max-width: 980px) {
  .sidebar { transform: translateX(-100%); box-shadow: 0 0 40px rgba(0,0,0,0.5); }
  .sidebar.open { transform: none; }
  .side-mask {
    display: none; position: fixed; inset: 0; z-index: 35;
    background: rgba(2, 8, 14, 0.55); backdrop-filter: blur(2px);
  }
  .side-mask.show { display: block; }
  .menu-btn { display: block; }
  .page { margin-left: 0; padding-top: 62px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-wide, .card-full { grid-column: span 2; }
  .welcome { font-size: 22px; }
}

@media (max-width: 640px) {
  .page { padding: 56px 12px 16px; }
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .card-wide, .card-full { grid-column: auto; }
  .hero { flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px; }
  .hero-right { text-align: left; }
  .welcome { font-size: 19px; white-space: normal; }
  .avatar-wrap, .avatar { width: 64px; height: 64px; }
  .big-num { font-size: 36px; }
  .net-heads { gap: 12px; }
  .net-peak { margin-left: 0; }
  .net-chart { height: 100px; }
  .net-chart-xl { height: 170px; }
  .net-hero-row { gap: 18px; }
  .net-hero-item b { font-size: 24px; }
}


/* ---------- 第二阶段：服务 / Docker / 端口 / SMB ---------- */
.chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(125, 211, 252, 0.08);
  border: 1px solid rgba(125, 211, 252, 0.22);
  color: #d9f0ff; font-size: 12.5px; line-height: 1;
  cursor: default; transition: 0.2s;
}
.chip:hover { background: rgba(125, 211, 252, 0.18); border-color: rgba(125, 211, 252, 0.5); transform: translateY(-1px); }
.table-wrap { overflow-x: auto; margin: 4px 0 2px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left; padding: 8px 10px; font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1px solid rgba(125, 211, 252, 0.16); white-space: nowrap;
}
.data-table td {
  padding: 8px 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e6f2fb; vertical-align: top; line-height: 1.5;
}
.data-table tr:hover td { background: rgba(125, 211, 252, 0.05); }
.state { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; }
.state.on { color: #6ee7b7; background: rgba(110, 231, 183, 0.12); }
.state.off { color: #fca5a5; background: rgba(252, 165, 165, 0.12); }


/* ---------- 第三阶段：安全审计 ---------- */
.kv-row { display: flex; flex-wrap: wrap; gap: 12px 28px; padding: 4px 0; }
.kv-row .kv { display: flex; flex-direction: column; gap: 2px; }
.kv-row .kv b { font-size: 15px; color: #e6f2fb; font-weight: 600; }
.kv-row .kv span { font-size: 11px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.badge-on { color: #6ee7b7; }
.badge-off { color: #fca5a5; }
.cmd-cell { font-family: var(--mono, monospace); font-size: 12px; color: #bfe6ff; word-break: break-all; }


/* ---------- 第四阶段：服务探测 ---------- */
.probe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin-top: 14px; }
.probe-card { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: rgba(10, 26, 42, 0.55); display: flex; flex-direction: column; gap: 6px; transition: border-color 0.2s; }
.probe-card.ok { border-color: rgba(52, 211, 153, 0.35); }
.probe-card.down { border-color: rgba(248, 113, 113, 0.55); background: rgba(60, 16, 20, 0.35); }
.probe-card.fail { border-color: rgba(251, 191, 36, 0.45); }
.probe-top { display: flex; align-items: center; gap: 8px; }
.probe-top b { font-size: 14px; color: var(--text); font-weight: 600; flex: 1; }
.probe-kind { font-size: 10px; color: var(--muted); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; letter-spacing: 0.08em; text-transform: uppercase; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex-shrink: 0; box-shadow: 0 0 8px transparent; }
.probe-card.ok .dot { background: #34d399; box-shadow: 0 0 8px rgba(52, 211, 153, 0.8); }
.probe-card.down .dot { background: #f87171; box-shadow: 0 0 8px rgba(248, 113, 113, 0.8); }
.probe-card.fail .dot { background: #fbbf24; box-shadow: 0 0 8px rgba(251, 191, 36, 0.8); }
.probe-target { font-size: 11.5px; color: var(--muted); word-break: break-all; }
.probe-foot { display: flex; justify-content: space-between; font-size: 12px; color: #bfe6ff; }
.probe-foot .detail { color: var(--muted); text-align: right; }


/* ---------- 第五阶段：历史页 ---------- */
.range-bar { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.range-bar button { background: rgba(10, 26, 42, 0.6); border: 1px solid var(--border); color: var(--muted); border-radius: 9px; padding: 6px 14px; font-size: 13px; cursor: pointer; transition: all 0.2s; }
.range-bar button:hover { border-color: rgba(125, 211, 252, 0.5); color: var(--text); }
.range-bar button.active { background: rgba(125, 211, 252, 0.16); border-color: rgba(125, 211, 252, 0.6); color: #bfe6ff; }
.echart-box { width: 100%; height: 260px; }


/* ---------- 第六阶段：登录 ---------- */
.login-overlay {
  position: fixed; inset: 0; z-index: 300;
  display: none; align-items: center; justify-content: center;
  background: rgba(5, 12, 24, 0.72);
  backdrop-filter: blur(10px);
}
.login-overlay.show { display: flex; }
.login-card {
  position: relative;
  width: min(480px, calc(100vw - 40px));
  background: rgba(15, 28, 48, 0.94);
  border: 1px solid rgba(125, 211, 252, 0.35);
  border-radius: 18px;
  padding: 34px 34px 30px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
  display: flex; flex-direction: column; gap: 12px;
}
.login-card h2 {
  margin: 0; font-size: 22px;
  background: linear-gradient(90deg, #7dd3fc, #a78bfa);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-card .small { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.6; }
.login-card input {
  width: 100%; padding: 11px 13px; border-radius: 10px;
  border: 1px solid rgba(125, 211, 252, 0.25);
  background: rgba(9, 18, 32, 0.9); color: var(--text); font-size: 14px;
}
.login-card input:focus { outline: none; border-color: #7dd3fc; }
.login-card button {
  padding: 11px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, #38bdf8, #8b5cf6);
  color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
}
.login-card button:disabled { opacity: 0.6; cursor: default; }
.login-err { min-height: 18px; color: #fca5a5; font-size: 13px; }
#authState a { color: #7dd3fc; text-decoration: none; margin-left: 4px; }


/* ---------- 登录悬浮框（论坛式） ---------- */
.login-close {
  position: absolute; top: 12px; right: 14px;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(125, 211, 252, 0.25);
  background: rgba(9, 18, 32, 0.7); color: var(--muted);
  font-size: 18px; line-height: 1; cursor: pointer;
}
.login-close:hover { color: #fca5a5; border-color: rgba(252, 165, 165, 0.5); }
.login-head { text-align: center; display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.login-logo {
  width: 64px; height: 64px; margin: 0 auto 4px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  background: radial-gradient(circle at 30% 25%, rgba(125, 211, 252, 0.35), rgba(167, 139, 250, 0.2) 60%, rgba(15, 28, 48, 0.9));
  border: 1px solid rgba(125, 211, 252, 0.35);
  box-shadow: 0 0 24px rgba(125, 211, 252, 0.25);
}
.login-field { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.login-field span { font-size: 12px; color: var(--muted); letter-spacing: 0.05em; }
.login-field input {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid rgba(125, 211, 252, 0.25);
  background: rgba(9, 18, 32, 0.9); color: var(--text); font-size: 14px;
}
.login-field input:focus { outline: none; border-color: #7dd3fc; box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.12); }
.login-foot { text-align: center; font-size: 12px; color: var(--muted); opacity: 0.75; margin-top: 2px; }

/* ===== 手机兼容补丁（2026-11-22）：旧 WebView 不支持 inset 简写时显式四边定位 ===== */
.video-bg, .bg-fallback, .bg-overlay, .side-mask, .login-overlay {
  top: 0; left: 0; right: 0; bottom: 0;
}
.video-bg { display: block; }

/* ---------- 欢迎横幅（毛玻璃） ---------- */
.welcome-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 9, 18, .38);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  animation: maskIn .35s ease;
}
.welcome-mask.hide {
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
.welcome-banner {
  position: relative;
  width: min(640px, 100%);
  display: flex;
  gap: 22px;
  align-items: center;
  padding: 30px 30px 26px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: linear-gradient(145deg, rgba(18, 32, 52, .72), rgba(10, 18, 32, .62));
  box-shadow: 0 30px 90px rgba(0, 0, 0, .5), 0 0 0 1px rgba(120, 200, 255, .06) inset;
  animation: bannerIn .4s cubic-bezier(.2, .9, .3, 1);
}
@keyframes bannerIn {
  from { transform: translateY(16px) scale(.97); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.wb-avatar {
  flex: 0 0 auto;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(120, 200, 255, .5);
  box-shadow: 0 0 30px rgba(80, 180, 255, .35);
}
.wb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.wb-content { flex: 1; min-width: 0; }
.wb-tag {
  display: inline-block;
  font-size: 11.5px;
  letter-spacing: .1em;
  color: #8fd8ff;
  border: 1px solid rgba(120, 200, 255, .3);
  background: rgba(40, 120, 180, .18);
  padding: 4px 10px;
  border-radius: 999px;
}
.wb-content h2 {
  margin: 10px 0 6px;
  font-size: 22px;
  background: linear-gradient(90deg, #9fe8ff, #c9b8ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.wb-greet { margin: 0; color: #cfe3ff; font-size: 14px; line-height: 1.7; }
.wb-tip {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #a9c4e6;
  border-left: 2px solid rgba(120, 200, 255, .45);
  padding-left: 10px;
}
.wb-actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.wb-btn {
  border: 1px solid rgba(120, 200, 255, .45);
  background: linear-gradient(135deg, #2a7fd4, #6a5acd);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, opacity .2s;
}
.wb-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(60, 140, 255, .35); }
.wb-btn.ghost { background: transparent; border-color: rgba(255, 255, 255, .25); color: #cfe3ff; }
.wb-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .06);
  color: #cfe3ff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.wb-close:hover { background: rgba(255, 255, 255, .14); }
@media (max-width: 620px) {
  .welcome-banner { flex-direction: column; text-align: center; padding: 26px 20px 22px; }
  .wb-avatar { width: 88px; height: 88px; }
}

/* 小屏（手机竖屏）欢迎横幅优化 */
@media (max-width: 480px) {
  .welcome-mask { padding: 12px; }
  .welcome-banner { gap: 14px; padding: 22px 16px 18px; border-radius: 18px; }
  .wb-content h2 { font-size: 19px; }
  .wb-greet, .wb-tip { font-size: 12.5px; }
  .wb-actions { flex-direction: column; }
  .wb-btn { width: 100%; text-align: center; }
}
