/* XiaoMao AI · 科幻主题
   深空底 + 网格 + 呼吸光晕 + 玻璃拟态面板；只做视觉层，不动功能类名 */

:root {
  --bg: #05070f;
  --panel: rgba(14, 21, 36, 0.72);
  --panel2: rgba(18, 27, 46, 0.66);
  --line: rgba(120, 190, 255, 0.14);
  --line-strong: rgba(120, 220, 220, 0.30);
  --text: #e9f0ff;
  --muted: #8d9dbb;
  --accent: #37d9c4;
  --accent2: #7c6cff;
  --gold: #e6d3a3;
  --ok: #3ddc97;
  --bad: #ff6b81;
  --warn: #ffc45c;
  --glow: 0 0 0 1px rgba(55, 217, 196, 0.18), 0 12px 40px rgba(0, 0, 0, 0.55);
}

/* hidden 属性必须能压住 display:flex */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(55, 217, 196, 0.16), transparent 62%),
    radial-gradient(760px 520px at 88% 4%, rgba(124, 108, 255, 0.16), transparent 60%),
    radial-gradient(1200px 700px at 50% 108%, rgba(30, 90, 140, 0.20), transparent 66%),
    linear-gradient(180deg, #05070f 0%, #070d18 42%, #04060c 100%);
  background-attachment: fixed;
  color: var(--text);
  overflow: hidden;
  position: relative;
}

/* 网格 + 星点 */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(120, 190, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 190, 255, 0.055) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
}
body::after {
  content: "";
  position: fixed; inset: -10%; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 22%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(1.2px 1.2px at 68% 12%, rgba(200,240,255,.45), transparent 60%),
    radial-gradient(1.6px 1.6px at 42% 68%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(1.2px 1.2px at 82% 52%, rgba(180,220,255,.40), transparent 60%),
    radial-gradient(1px 1px at 26% 82%, rgba(255,255,255,.30), transparent 60%);
  animation: xm-drift 26s ease-in-out infinite alternate;
}
@keyframes xm-drift {
  from { transform: translate3d(0, 0, 0); opacity: .75; }
  to   { transform: translate3d(-18px, 12px, 0); opacity: 1; }
}

/* 所有内容压在背景之上 */
body > * { position: relative; z-index: 1; }

/* ---------- 品牌 ---------- */
.xm-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.xm-logo {
  width: 34px; height: 34px; border-radius: 50%;
  background: #08201f url("/static/logo.png") center/cover no-repeat;
  border: 1px solid rgba(90, 230, 210, 0.45);
  box-shadow: 0 0 14px rgba(55, 217, 196, 0.35), inset 0 0 10px rgba(0,0,0,.4);
  flex: 0 0 auto;
}
.xm-logo.lg { width: 62px; height: 62px; box-shadow: 0 0 26px rgba(55, 217, 196, 0.42); }
.xm-name {
  font-size: 14.5px; font-weight: 650; letter-spacing: .3px;
  background: linear-gradient(92deg, #ffffff 8%, #9ff2e6 52%, #b6adff 96%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  white-space: nowrap;
}
.xm-sub {
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(150, 230, 220, .75);
  border: 1px solid rgba(55, 217, 196, .28);
  border-radius: 999px; padding: 1px 7px; margin-left: 2px;
}

/* ---------- 玻璃面板 ---------- */
.bar, .top {
  background: linear-gradient(180deg, rgba(12, 19, 33, .86), rgba(9, 14, 25, .62)) !important;
  border-bottom: 1px solid var(--line) !important;
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
}
.panel, .login-card, .modal-card {
  background: var(--panel) !important;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  box-shadow: var(--glow);
}

/* ---------- 控件 ---------- */
.btn {
  border-radius: 10px !important;
  border: 1px solid var(--line) !important;
  background: rgba(22, 32, 52, .78) !important;
  color: var(--text) !important;
  transition: transform .12s ease, box-shadow .18s ease, border-color .18s ease;
}
.btn:hover { border-color: var(--line-strong) !important; box-shadow: 0 0 0 1px rgba(55,217,196,.18), 0 6px 18px rgba(0,0,0,.35); }
.btn:active { transform: translateY(1px); }
.btn:not(.ghost):not(.danger) {
  background: linear-gradient(135deg, #2ad0bb 0%, #4bb3e8 55%, #7c6cff 100%) !important;
  border-color: transparent !important;
  color: #04121a !important;
  font-weight: 650;
  box-shadow: 0 8px 24px rgba(55, 200, 210, .28);
}
.btn.danger { background: rgba(70, 22, 34, .7) !important; border-color: rgba(255,107,129,.30) !important; color: #ffc2cb !important; }
.btn.ghost { background: rgba(18, 26, 44, .55) !important; }

input, select, textarea {
  background: rgba(10, 16, 28, .78) !important;
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  color: var(--text) !important;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(55, 217, 196, .55) !important;
  box-shadow: 0 0 0 3px rgba(55, 217, 196, .12);
}

.tag { border-radius: 999px !important; }
.tag.ok { background: rgba(61, 220, 151, .12) !important; color: #7df0bd !important; border-color: rgba(61,220,151,.3) !important; }
.tag.warn { background: rgba(255, 196, 92, .12) !important; color: #ffd692 !important; border-color: rgba(255,196,92,.3) !important; }
.tag.bad { background: rgba(255, 107, 129, .12) !important; color: #ffa8b6 !important; border-color: rgba(255,107,129,.3) !important; }

/* 表格 */
table { border-collapse: separate !important; border-spacing: 0 6px !important; }
th { color: var(--muted) !important; font-weight: 600; letter-spacing: .04em; }
td { background: rgba(13, 20, 34, .55); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
tr td:first-child { border-left: 1px solid var(--line); border-radius: 10px 0 0 10px; }
tr td:last-child { border-right: 1px solid var(--line); border-radius: 0 10px 10px 0; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(55,217,196,.35), rgba(124,108,255,.35));
  border-radius: 999px; border: 2px solid transparent; background-clip: content-box;
}

/* 登录页 */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
}
.login-card {
  width: 380px; padding: 34px 30px 26px; text-align: center;
  animation: xm-rise .5s cubic-bezier(.2,.8,.2,1);
}
.login-card .logo {
  width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 50%;
  background: #08201f url("/static/logo.png") center/cover no-repeat;
  border: 1px solid rgba(90, 230, 210, .5);
  box-shadow: 0 0 28px rgba(55, 217, 196, .45);
  display: flex; align-items: center; justify-content: center; font-size: 0;
}
.login-card h1 {
  font-size: 19px; margin: 0 0 6px; letter-spacing: .5px;
  background: linear-gradient(92deg, #fff, #9ff2e6 55%, #b6adff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-card .hint { color: var(--muted); }
@keyframes xm-rise {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

/* 状态徽标 */
.xm-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: #9ff2e6;
  background: rgba(55, 217, 196, .10);
  border: 1px solid rgba(55, 217, 196, .28);
  border-radius: 999px; padding: 3px 10px;
}
.xm-chip::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #37d9c4; box-shadow: 0 0 8px #37d9c4;
  animation: xm-pulse 2s ease-in-out infinite;
}
@keyframes xm-pulse { 50% { opacity: .35; } }
