/* =========================================================
   Cloud Server Admin — visionOS Liquid Glass Design System
   深色基底 + 大块鲜艳柔光球 + 磨砂玻璃面板 + 超大圆角 + 悬浮投影
   ========================================================= */

:root {
  /* Surfaces — deep near-black with a faint blue cast */
  --bg-0: #070810;
  --bg-1: #0c0d16;

  /* Text */
  --text: #f6f7fb;
  --text-2: rgba(246, 247, 251, 0.66);
  --text-3: rgba(246, 247, 251, 0.42);

  /* Brand — single restrained cyan accent (icons / active) */
  --primary: #5eead4;
  --primary-strong: #2dd4bf;
  --primary-soft: rgba(94, 234, 212, 0.16);
  --primary-faint: rgba(94, 234, 212, 0.08);
  --primary-line: rgba(94, 234, 212, 0.34);

  /* Semantic */
  --success: #4ade80;
  --success-soft: rgba(74, 222, 128, 0.16);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.16);
  --error: #fb7185;
  --error-soft: rgba(251, 113, 133, 0.16);
  --info: #60a5fa;
  --info-soft: rgba(96, 165, 250, 0.16);

  /* Glass material — translucent frosted, lets the orbs refract through */
  --glass-fill: linear-gradient(180deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.03) 100%);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-border-strong: rgba(255, 255, 255, 0.22);
  --glass-shadow: 0 26px 64px rgba(0, 0, 0, 0.50), 0 6px 16px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.22);

  /* Radii — visionOS is generous and round */
  --radius: 17px;
  --radius-md: 13px;
  --radius-sm: 9px;

  --font-sans: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, "Consolas", monospace;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: radial-gradient(140% 120% at 18% 0%, var(--bg-1) 0%, var(--bg-0) 55%, #05060c 100%);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body { overflow: hidden; }

/* ---- Ambient orbs: the vivid soft color blobs behind the glass ---- */
.ambient {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
}
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(95px); opacity: 0.62;
  animation: orbFloat 30s ease-in-out infinite alternate;
}
.orb-1 { width: 660px; height: 660px; top: -150px; left: -130px;
  background: radial-gradient(circle at 35% 35%, #2dd4bf, #0ea5e9 48%, transparent 72%); }
.orb-2 { width: 720px; height: 720px; top: -110px; right: -170px;
  background: radial-gradient(circle at 50% 50%, #8b5cf6, #6d28d9 48%, transparent 72%); animation-delay: -7s; }
.orb-3 { width: 600px; height: 600px; bottom: -200px; right: 4%;
  background: radial-gradient(circle at 50% 50%, #ec4899, #db2777 48%, transparent 72%); animation-delay: -14s; }
.orb-4 { width: 540px; height: 540px; bottom: -150px; left: 4%;
  background: radial-gradient(circle at 50% 50%, #f59e0b, #f97316 48%, transparent 72%); animation-delay: -21s; opacity: 0.5; }
@keyframes orbFloat {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(3%, -3%, 0) scale(1.08); }
}

/* ---- Frosted glass primitive (visionOS) ---- */
.glass {
  position: relative;
  background: var(--glass-fill);
  backdrop-filter: blur(42px) saturate(185%);
  -webkit-backdrop-filter: blur(42px) saturate(185%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
}
/* top rim glow — light catching the upper edge */
.glass::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 46%;
  border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent);
}
/* specular sheen from the top-left corner */
.glass::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(130% 80% at 10% 0%, rgba(255, 255, 255, 0.20), transparent 42%);
}

/* Solid-ish content card — frosted, slightly more body for readability */
.card-solid {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.025) 100%);
  backdrop-filter: blur(42px) saturate(185%);
  -webkit-backdrop-filter: blur(42px) saturate(185%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
}
.card-solid::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 46%;
  border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent);
}

/* Colored frosted glass — the iridescent visionOS chips */
.tint-cyan   { background: linear-gradient(165deg, rgba(45, 212, 191, 0.26) 0%, rgba(45, 212, 191, 0.05) 100%); border: 1px solid rgba(45, 212, 191, 0.32); box-shadow: 0 18px 44px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.24); backdrop-filter: blur(30px) saturate(185%); -webkit-backdrop-filter: blur(30px) saturate(185%); }
.tint-blue   { background: linear-gradient(165deg, rgba(96, 165, 250, 0.26) 0%, rgba(96, 165, 250, 0.05) 100%); border: 1px solid rgba(96, 165, 250, 0.32); box-shadow: 0 18px 44px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.24); backdrop-filter: blur(30px) saturate(185%); -webkit-backdrop-filter: blur(30px) saturate(185%); }
.tint-purple { background: linear-gradient(165deg, rgba(167, 139, 250, 0.26) 0%, rgba(167, 139, 250, 0.05) 100%); border: 1px solid rgba(167, 139, 250, 0.32); box-shadow: 0 18px 44px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.24); backdrop-filter: blur(30px) saturate(185%); -webkit-backdrop-filter: blur(30px) saturate(185%); }
.tint-rose   { background: linear-gradient(165deg, rgba(244, 114, 182, 0.26) 0%, rgba(244, 114, 182, 0.05) 100%); border: 1px solid rgba(244, 114, 182, 0.32); box-shadow: 0 18px 44px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.24); backdrop-filter: blur(30px) saturate(185%); -webkit-backdrop-filter: blur(30px) saturate(185%); }
.tint-amber  { background: linear-gradient(165deg, rgba(251, 191, 36, 0.24) 0%, rgba(251, 146, 60, 0.05) 100%); border: 1px solid rgba(251, 191, 36, 0.32); box-shadow: 0 18px 44px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.24); backdrop-filter: blur(30px) saturate(185%); -webkit-backdrop-filter: blur(30px) saturate(185%); }
.tint-cyan::after, .tint-blue::after, .tint-purple::after, .tint-rose::after, .tint-amber::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(130% 80% at 10% 0%, rgba(255, 255, 255, 0.22), transparent 42%);
}

/* ---- App shell ---- */
.app-shell {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 252px 1fr;
  grid-template-rows: 68px 1fr;
  grid-template-areas: "sidebar header" "sidebar main";
  height: 100vh; width: 100vw; min-width: 1080px;
}

/* ---- Sidebar ---- */
.sidebar {
  grid-area: sidebar;
  background: linear-gradient(180deg, rgba(16, 18, 30, 0.55) 0%, rgba(10, 12, 20, 0.62) 100%);
  backdrop-filter: blur(48px) saturate(180%);
  -webkit-backdrop-filter: blur(48px) saturate(180%);
  border-right: 1px solid var(--glass-border);
  display: flex; flex-direction: column;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06);
}
.sidebar-header {
  height: 68px; display: flex; align-items: center; gap: 11px; padding: 0 20px;
  border-bottom: 1px solid var(--glass-border);
}
.logo { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 15px; letter-spacing: 0.2px; }
.logo .mark {
  width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(155deg, var(--primary), #0891b2);
  color: #04201d; box-shadow: 0 6px 18px rgba(45, 212, 191, 0.40), inset 0 1px 0 rgba(255,255,255,0.5);
}
.logo .mark .icon { width: 20px; height: 20px; }
.nav-list { flex: 1; padding: 18px 13px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.nav-link {
  display: flex; align-items: center; gap: 11px; padding: 11px 14px;
  border-radius: var(--radius-sm); color: var(--text-2); font-size: 13.5px; font-weight: 500;
  text-decoration: none; transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  border: 1px solid transparent; position: relative;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.nav-link.active {
  background: linear-gradient(90deg, var(--primary-soft), rgba(45, 212, 191, 0.04));
  color: var(--primary); border-color: var(--primary-line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
}
.nav-link.active::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 22px; border-radius: 0 4px 4px 0; background: var(--primary);
  box-shadow: 0 0 14px var(--primary);
}
.nav-link .icon { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-footer { padding: 15px 18px; border-top: 1px solid var(--glass-border); }
.version-row { display: flex; align-items: center; gap: 9px; font-size: 11.5px; color: var(--text-3); }
.version-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 9px var(--success); }

/* ---- Topbar ---- */
.topbar {
  grid-area: header;
  background: rgba(12, 14, 24, 0.50);
  backdrop-filter: blur(44px) saturate(180%);
  -webkit-backdrop-filter: blur(44px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 26px;
}
.topbar-left { display: flex; align-items: center; gap: 13px; }
.topbar-title { font-size: 16px; font-weight: 700; letter-spacing: 0.2px; }
.live-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  background: var(--success-soft); color: var(--success); font-size: 11px; font-weight: 600;
  border: 1px solid rgba(74, 222, 128, 0.28);
}
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); animation: pulse 2.4s ease-in-out infinite; }
.topbar-right { display: flex; align-items: center; gap: 13px; }
.search-box {
  display: flex; align-items: center; gap: 9px; padding: 9px 14px; width: 248px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border); transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.search-box:focus-within { border-color: var(--primary-line); box-shadow: 0 0 0 3px var(--primary-faint); }
.search-box input { flex: 1; background: transparent; border: none; outline: none; color: var(--text); font-size: 12.5px; font-family: var(--font-sans); }
.search-box input::placeholder { color: var(--text-3); }
.clock-box { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-family: var(--font-mono); color: var(--text-2); letter-spacing: 0.5px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--glass-border); color: var(--text-2);
  cursor: pointer; transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease; position: relative;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.10); color: var(--text); border-color: var(--glass-border-strong); }
.icon-btn .icon { width: 17px; height: 17px; }
.ip-act {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 9px;
  font-size: 11.5px; font-weight: 600; cursor: pointer; border: 1px solid transparent;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease; white-space: nowrap;
}
.ip-act .icon { width: 14px; height: 14px; }
.ip-act.ban { background: rgba(255,255,255,0.06); color: var(--text-2); border-color: var(--glass-border); }
.ip-act.ban:hover { background: rgba(244,63,94,0.14); color: var(--error); border-color: rgba(244,63,94,0.4); }
.ip-act.unban { background: rgba(94,234,212,0.12); color: var(--primary); border-color: var(--primary-line); }
.ip-act.unban:hover { background: rgba(94,234,212,0.2); }
.notif-dot { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--error); box-shadow: 0 0 8px var(--error); }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: var(--primary);
  background: var(--primary-faint); border: 1px solid var(--primary-line);
}

/* ---- Main ---- */
.main-content { grid-area: main; overflow: auto; padding: 28px; }
.dashboard { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; }
.page-title-group { display: flex; flex-direction: column; gap: 6px; }
.page-subtitle { font-size: 11px; color: var(--text-3); letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; }
.page-title { font-size: 30px; font-weight: 800; letter-spacing: -0.9px; }
.page-meta { font-size: 12.5px; color: var(--text-3); }

/* ---- Cards ---- */
.card { padding: 0; overflow: hidden; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--glass-border);
}
.card-title { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 700; }
.card-title .icon { color: var(--primary); width: 18px; height: 18px; }
.card-sub { font-size: 11.5px; color: var(--text-3); font-weight: 500; }
.card-body { padding: 20px; }
.card-actions { display: flex; align-items: center; gap: 8px; }
.link-btn { font-size: 12.5px; color: var(--primary); text-decoration: none; transition: opacity 0.15s; }
.link-btn:hover { opacity: 0.78; }

/* ---- Stats ---- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat-card {
  padding: 20px; display: flex; flex-direction: column; gap: 14px;
  position: relative; border-radius: var(--radius);
  transition: transform 0.25s cubic-bezier(0.22,1,0.36,1), border-color 0.25s ease;
}
.stat-card:hover { transform: translateY(-4px); border-color: var(--glass-border-strong); }
.stat-head { display: flex; align-items: center; justify-content: space-between; }
.stat-icon {
  width: 42px; height: 42px; border-radius: 9px; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.18); color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}
.stat-icon .icon { width: 19px; height: 19px; }
.stat-badge { font-size: 11px; font-weight: 600; padding: 5px 10px; border-radius: 999px; }
.stat-value { font-size: 34px; font-weight: 800; font-family: var(--font-mono); font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -0.6px; }
.stat-label { font-size: 12.5px; color: var(--text-2); }

/* ---- Main grid ---- */
.main-grid { display: grid; grid-template-columns: 1.45fr 0.55fr; gap: 22px; }

/* ---- Trend chart ---- */
.trend-canvas { height: 236px; position: relative; }
.trend-canvas svg { display: block; }
.trend-legend { display: flex; align-items: center; gap: 14px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-2); }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }
.trend-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.trend-mini { padding: 15px; background: rgba(255, 255, 255, 0.05); border-radius: var(--radius-md); border: 1px solid var(--glass-border); }
.trend-mini-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.trend-mini-name { font-size: 12px; color: var(--text-2); }
.trend-mini-val { font-size: 14px; font-weight: 700; font-family: var(--font-mono); }
.sparkline { width: 100%; height: 46px; display: block; }

/* ---- Activity ---- */
.activity-list { display: flex; flex-direction: column; gap: 10px; }
.activity-item { display: flex; gap: 11px; padding: 12px 13px; border-radius: var(--radius-md); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-border); transition: background 0.15s ease; }
.activity-item:hover { background: rgba(255, 255, 255, 0.08); }
.activity-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.activity-text { font-size: 12.5px; color: var(--text); line-height: 1.5; }
.activity-time { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* ---- Services ---- */
.svc-list { display: flex; flex-direction: column; gap: 9px; }
.svc-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: var(--radius-md); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-border); transition: background 0.15s ease; }
.svc-row:hover { background: rgba(255, 255, 255, 0.08); }
.svc-left { display: flex; align-items: center; gap: 11px; }
.svc-icon { width: 32px; height: 32px; border-radius: 7px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.07); color: var(--text-2); }
.svc-icon .icon { width: 15px; height: 15px; }
.svc-name { font-size: 13px; font-weight: 600; }
.svc-meta { font-size: 11px; color: var(--text-3); }
.svc-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; font-size: 11px; font-weight: 600; }

/* ---- Security ---- */
.sec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.sec-item { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--radius-md); border: 1px solid var(--glass-border); position: relative; overflow: hidden; transition: transform 0.2s cubic-bezier(0.22,1,0.36,1); }
.sec-item:hover { transform: translateY(-3px); }
.sec-icon { width: 44px; height: 44px; border-radius: 9px; display: grid; place-items: center; }
.sec-icon .icon { width: 19px; height: 19px; }
.sec-info { flex: 1; }
.sec-name { font-size: 12px; color: var(--text-2); }
.sec-val { font-size: 23px; font-weight: 800; font-family: var(--font-mono); }

/* ---- Status helpers ---- */
.bg-success { background: var(--success-soft); color: var(--success); }
.bg-warning { background: var(--warning-soft); color: var(--warning); }
.bg-error { background: var(--error-soft); color: var(--error); }
.bg-info { background: var(--info-soft); color: var(--info); }
.bg-primary { background: var(--primary-soft); color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }
.text-info { color: var(--info); }
.text-primary { color: var(--primary); }

/* ---- Icons ---- */
.icon { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: middle; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

@media (max-width: 1320px) { .main-grid { grid-template-columns: 1fr; } .sec-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 1120px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
