/* Blumeris Panel */
:root {
  --bg: #030306;
  --bg-elevated: #0a0a12;
  --sidebar: rgba(10, 10, 18, 0.75);
  --card: rgba(14, 14, 24, 0.65);
  --card-solid: #0e0e18;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(80, 227, 254, 0.45);
  --text: #f0f2f8;
  --muted: #8b93a8;
  --accent: #50e3fe;
  --accent-2: #ffffff;
  --accent-h: #2bc9ef;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
  --glow: rgba(80, 227, 254, 0.4);
  --radius: 14px;
  --radius-sm: 10px;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sidebar-w: 240px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ——— Animated background ——— */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
  transition: transform 0.15s ease-out;
}

.orb-1 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, #50e3fe 0%, transparent 70%);
  top: -12%; left: -8%;
  animation-delay: 0s;
}

.orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  bottom: -15%; right: -5%;
  animation-delay: -6s;
  animation-duration: 22s;
}

.orb-3 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, #2bc9ef 0%, transparent 70%);
  top: 40%; left: 45%;
  animation-delay: -12s;
  animation-duration: 20s;
  opacity: 0.3;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 75%);
}

@keyframes float-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.05); }
  66% { transform: translate(-25px, 35px) scale(0.95); }
}

#app { position: relative; z-index: 1; }

/* ——— Page transitions ——— */
.page-view {
  animation: page-in 0.55s var(--ease) both;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-2);
  margin: 0 0 0.35rem;
}

.stat-highlight { color: var(--ok); font-weight: 700; }

/* ——— Glass cards ——— */
.glass {
  background: var(--card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.glass-sidebar {
  background: var(--sidebar);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

/* ——— Login ——— */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 2rem 2.25rem;
  border-radius: calc(var(--radius) + 4px);
  animation: card-pop 0.6s var(--ease) 0.1s both;
}

@keyframes card-pop {
  from { opacity: 0; transform: scale(0.96) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ——— Blumeris brand ——— */
.brand-logo {
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(80, 227, 254, 0.55));
  animation: logo-glow 3s ease-in-out infinite;
}

.brand-logo-lg { width: 72px; height: 72px; }
.brand-logo-sm { width: 40px; height: 40px; }
.brand-logo-xs { width: 32px; height: 32px; filter: drop-shadow(0 0 10px rgba(80, 227, 254, 0.45)); }

@keyframes logo-glow {
  0%, 100% { filter: drop-shadow(0 0 14px rgba(80, 227, 254, 0.45)); }
  50% { filter: drop-shadow(0 0 26px rgba(80, 227, 254, 0.75)); }
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 1.5rem;
}

.brand-name {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(105deg, #ffffff 0%, #50e3fe 55%, #50e3fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-tagline { margin: 0.25rem 0 0; }

.page-header-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.sidebar-brand-wrap {
  padding: 0 0.35rem 1.1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.85rem;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.sidebar-brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #fff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-server-label {
  margin: 0.45rem 0 0;
  padding-left: 2.35rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.login-brand h1 { margin: 0; }
.login-brand .muted { margin: 0.2rem 0 0; }

.demo-login-box {
  background: linear-gradient(135deg, rgba(80, 227, 254, 0.12), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(80, 227, 254, 0.35);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  animation: shimmer-border 4s linear infinite;
}

@keyframes shimmer-border {
  0%, 100% { border-color: rgba(80, 227, 254, 0.35); }
  50% { border-color: rgba(80, 227, 254, 0.65); }
}

.demo-login-box p { margin: 0.35rem 0; }
.demo-login-box strong { color: var(--accent-2); }
.demo-creds code { color: var(--ok); }
.demo-status { font-size: 0.78rem; color: var(--muted); margin-top: 0.5rem !important; }
.demo-status.ok { color: var(--ok); }
.demo-status.err { color: var(--danger); }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  padding: 0.3rem;
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.auth-tab {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 0.6rem;
  border-radius: 8px;
  font-weight: 600;
  font-family: var(--font);
  transition: all 0.25s var(--ease);
}

.auth-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-h));
  color: #fff;
  box-shadow: 0 4px 16px var(--glow);
}

.auth-tab.hidden-tab { display: none; }
.auth-panel { display: none; }
.auth-panel.active { display: block; animation: fade-in 0.35s var(--ease); }

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.field-hint, .optional {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 400;
  margin-top: 0.15rem;
}
.optional { display: inline; }
.success { color: var(--ok); font-size: 0.85rem; margin-top: 0.5rem; }

/* ——— Typography ——— */
h1, h2 { margin: 0 0 0.75rem; font-weight: 600; }
h1 { font-size: 1.5rem; letter-spacing: -0.02em; }
h2 { font-size: 1rem; color: var(--text); }
.muted { color: var(--muted); font-size: 0.88rem; }
.hint { font-size: 0.78rem; color: var(--muted); margin-top: 0.5rem; }

.error {
  color: var(--danger);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  font-weight: 600;
}
.error:not(.hidden) {
  padding: 0.55rem 0.75rem;
  background: rgba(248, 113, 113, 0.12);
  border-radius: 8px;
  border: 1px solid rgba(248, 113, 113, 0.25);
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ——— Forms ——— */
label {
  display: block;
  margin-bottom: 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

input, textarea, select {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

textarea { resize: vertical; min-height: 80px; }

/* ——— Buttons ——— */
button {
  font: inherit;
  cursor: pointer;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.55rem 1rem;
  font-weight: 600;
  font-family: var(--font);
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s, border-color 0.2s;
}

button:active:not(:disabled) { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-h));
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 6px 24px var(--glow);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--muted);
}
.btn-ghost:hover:not(:disabled) {
  border-color: var(--border-hover);
  color: var(--text);
  background: rgba(99, 102, 241, 0.08);
}

.btn-warn { background: var(--warn); color: #111; }
.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  width: 100%;
  margin-bottom: 0.65rem;
}

.glow-danger:hover { box-shadow: 0 6px 24px rgba(239, 68, 68, 0.35); }

.btn-primary.sm, .btn-ghost.sm, .btn-warn.sm { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
.full { width: 100%; margin-top: 0.5rem; }
.row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.row input, .row textarea { flex: 1; min-width: 140px; margin: 0; }

button.glow { position: relative; overflow: hidden; }
button.busy { opacity: 0.6; cursor: wait; transform: none !important; }

/* ——— Header / user ——— */
.header-user { display: flex; align-items: center; gap: 0.65rem; flex-shrink: 0; }
.user-badge {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  background: rgba(99, 102, 241, 0.15);
  border-radius: 999px;
  color: var(--accent-2);
  border: 1px solid rgba(99, 102, 241, 0.3);
}
.user-badge.admin { color: var(--ok); border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.1); }

/* ——— Servers list ——— */
.page { max-width: 800px; margin: 0 auto; padding: 2rem 1.25rem 3rem; }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.5rem; gap: 1rem; }

.servers-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.server-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1rem;
  padding: 1.15rem 1.25rem;
  background: var(--card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
  animation: slide-up 0.45s var(--ease) both;
}

.server-card:nth-child(1) { animation-delay: 0.05s; }
.server-card:nth-child(2) { animation-delay: 0.1s; }
.server-card:nth-child(3) { animation-delay: 0.15s; }
.server-card:nth-child(4) { animation-delay: 0.2s; }

@keyframes slide-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.server-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(99, 102, 241, 0.15);
}

.server-card-main { display: flex; gap: 0.75rem; align-items: center; }
.status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--ok);
  flex-shrink: 0;
  box-shadow: 0 0 12px var(--ok);
}
.server-card.offline .status-dot {
  background: var(--muted);
  box-shadow: none;
}
.server-id { display: block; font-size: 0.72rem; color: var(--muted); margin-top: 0.15rem; }
.server-meta {
  grid-column: 1;
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-left: 1.5rem;
}
.btn-open {
  pointer-events: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
}

.empty-msg {
  text-align: center;
  padding: 2.5rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  animation: fade-in 0.5s ease;
}

/* ——— Dashboard layout ——— */
.dash-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0.85rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand-dot {
  width: 9px; height: 9px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
}
.brand-dot.pulse { animation: pulse-dot 2s ease-in-out infinite; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.2); }
}

.sidebar-nav { display: flex; flex-direction: column; gap: 0.15rem; flex: 1; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-align: left;
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.88rem;
  position: relative;
  overflow: hidden;
}

.nav-icon {
  font-family: var(--mono);
  font-size: 0.75rem;
  opacity: 0.85;
  width: 1.25rem;
  text-align: center;
}

.nav-item::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 60%;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-radius: 0 4px 4px 0;
  transition: transform 0.25s var(--ease);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.nav-item.active {
  background: rgba(99, 102, 241, 0.12);
  color: #fff;
}
.nav-item.active::before { transform: translateY(-50%) scaleY(1); }

.sidebar-foot {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  cursor: pointer;
}
.toggle-row input { width: auto; margin: 0; }
.toggle-row.sm { margin: 0; font-size: 0.75rem; }

.dash-main {
  padding: 1.5rem 1.75rem 2.5rem;
  overflow: auto;
  max-height: 100vh;
}

.dash-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  gap: 1rem;
  animation: page-in 0.5s var(--ease) both;
}

.dash-top-actions { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }

.badge {
  font-size: 0.72rem;
  padding: 0.3rem 0.7rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid var(--border);
}

.pulse-badge { animation: badge-pulse 2.5s ease-in-out infinite; }

@keyframes badge-pulse {
  0%, 100% { border-color: var(--border); }
  50% { border-color: rgba(99, 102, 241, 0.5); color: var(--accent-2); }
}

/* ——— Tab panels ——— */
.tab-panel { display: none; }
.tab-panel.active {
  display: block;
  animation: tab-in 0.4s var(--ease) both;
}

@keyframes tab-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  background: var(--card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.card:hover { border-color: rgba(255, 255, 255, 0.12); }

/* ——— Stats ——— */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.stat-card {
  background: var(--card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s;
  animation: slide-up 0.5s var(--ease) both;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

.stat-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity 0.3s;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
}
.stat-card:hover::after { opacity: 1; }

.stat-label {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 0.25rem;
  background: linear-gradient(135deg, #fff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

.code-block {
  background: rgba(0, 0, 0, 0.4);
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 0.76rem;
  overflow: auto;
  max-height: 280px;
  margin: 0;
  border: 1px solid var(--border);
}

.mini-list { font-size: 0.85rem; }
.mini-list .player-row {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  transition: padding-left 0.2s;
}
.mini-list .player-row:hover { padding-left: 0.35rem; color: var(--accent-2); }

/* ——— Tables ——— */
.card-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.85rem;
}
.card-toolbar input, .card-toolbar select { width: auto; min-width: 140px; margin: 0; flex: 1; }
.card-toolbar h2 { margin: 0; flex: 1; min-width: 100px; }

.table-wrap { overflow: auto; max-height: 440px; border-radius: var(--radius-sm); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.data-table th, .data-table td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.data-table tbody tr {
  transition: background 0.2s;
}
.data-table tbody tr:hover { background: rgba(99, 102, 241, 0.06); }
.data-table th {
  color: var(--muted);
  font-weight: 600;
  position: sticky;
  top: 0;
  background: var(--card-solid);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.state-started { color: var(--ok); font-weight: 600; }
.state-stopped { color: var(--danger); font-weight: 600; }
.table-actions { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.table-actions button { padding: 0.25rem 0.5rem; font-size: 0.72rem; }

.res-manual { margin-bottom: 0.85rem; }

/* ——— Presets / quick ——— */
.preset-grid, .quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.55rem;
}

.preset-grid button, .quick-grid button {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.7rem;
  font-size: 0.8rem;
  text-align: left;
  border-radius: var(--radius-sm);
}
.preset-grid button:hover, .quick-grid button:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  transform: translateY(-2px);
}
.quick-grid button {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-height: 72px;
}
.quick-grid .qa-icon { font-size: 1.35rem; }

/* ——— Console ——— */
.live-console-card { padding: 0; overflow: hidden; }
.live-console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border);
}
.live-console-header h2 { margin: 0; font-family: var(--mono); font-size: 0.95rem; }
.console-glyph { color: var(--ok); margin-right: 0.35rem; }

.live-console-output {
  height: 420px;
  overflow-y: auto;
  padding: 0.65rem 1rem;
  background: rgba(0, 0, 0, 0.5);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.5;
  scroll-behavior: smooth;
}

.log-line {
  margin: 0;
  padding: 0.15rem 0;
  word-break: break-word;
  animation: log-in 0.25s ease;
}
@keyframes log-in {
  from { opacity: 0; transform: translateX(-4px); }
  to { opacity: 1; transform: translateX(0); }
}

.log-time { color: #6b7a90; margin-right: 0.35rem; }
.log-src { color: #7dd3a8; }
.log-tag { color: #fbbf24; }
.log-msg { color: #c8d4e8; }
.log-line.level-error .log-msg, .log-line.level-error .log-src { color: #f87171; }
.log-line.level-warn .log-msg { color: #fbbf24; }
.log-line.level-cmd .log-msg { color: #93c5fd; }

.live-console-toolbar {
  border-top: 1px solid var(--border);
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.25);
}
.live-cmd-form { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.live-cmd-form input { flex: 1; margin: 0; font-family: var(--mono); font-size: 0.85rem; }
.cmd-prompt { color: var(--ok); font-weight: bold; font-family: var(--mono); }
.live-console-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.console-search { margin: 0 1rem 0.5rem; width: calc(100% - 2rem); }
.preset-grid.compact { padding: 0 1rem 0.75rem; }

/* ——— Activity log ——— */
.activity-log { max-height: 420px; overflow: auto; font-size: 0.82rem; }
.log-entry {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  animation: slide-up 0.35s ease both;
}
.log-entry.ok { border-left: 3px solid var(--ok); padding-left: 0.65rem; }
.log-entry.err { border-left: 3px solid var(--danger); padding-left: 0.65rem; }
.log-time { color: var(--muted); font-size: 0.72rem; }
.admin-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; flex-wrap: wrap; }

/* ——— Demo ——— */
.demo-banner {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.15));
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  animation: fade-in 0.5s ease;
}
.demo-stats { margin-top: -0.25rem; margin-bottom: 1rem; }
.stat-card.accent { border-color: rgba(99, 102, 241, 0.5); }
.stat-card.warn { border-color: rgba(251, 191, 36, 0.5); }

.demo-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.demo-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  transition: transform 0.3s var(--ease);
  animation: slide-up 0.45s var(--ease) both;
}
.demo-card:hover { transform: translateY(-2px); border-color: var(--border-hover); }
.demo-card h3 { margin: 0 0 0.4rem; font-size: 0.85rem; color: var(--accent-2); }
.demo-card p { margin: 0; font-size: 0.82rem; }
.demo-card.event { border-color: rgba(248, 113, 113, 0.4); }
.demo-card.event h3 { color: var(--danger); }
.demo-tag {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.15em 0.5em;
  border-radius: 4px;
  color: var(--muted);
}

.server-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.35rem; }
.server-tag {
  font-size: 0.65rem;
  padding: 0.12em 0.45em;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  border: 1px solid var(--border);
}
.server-tag.demo { background: rgba(168, 85, 247, 0.15); color: #c4b5fd; border-color: rgba(109, 40, 217, 0.4); }

.pill { font-size: 0.65rem; padding: 0.12em 0.4em; border-radius: 4px; margin-left: 0.25rem; }
.pill.staff { background: rgba(52, 211, 153, 0.15); color: var(--ok); }
.pill.flag { background: rgba(248, 113, 113, 0.15); color: var(--danger); }

.col-demo { display: none; }
body.demo-on .col-demo { display: table-cell; }

.data-table tr.flash { animation: row-flash 1.2s ease; }
@keyframes row-flash {
  0%, 100% { background: transparent; }
  30% { background: rgba(99, 102, 241, 0.2); }
}

code {
  background: rgba(0, 0, 0, 0.35);
  padding: 0.12em 0.4em;
  border-radius: 4px;
  font-size: 0.85em;
  font-family: var(--mono);
}
.mono { font-family: var(--mono); font-size: 0.72rem; }

/* ——— Modal ——— */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal:not(.hidden) .modal-backdrop { animation: fade-in 0.25s ease; }
.modal:not(.hidden) .modal-card { animation: modal-in 0.35s var(--ease) both; }

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}
.modal-card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(85vh, 720px);
  overflow: auto;
  border-radius: calc(var(--radius) + 2px);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.modal-header h2 { margin: 0; font-size: 1.1rem; }
.modal-footer {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}
.player-info-grid { display: flex; flex-direction: column; gap: 0.55rem; }
.player-info-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 0.5rem;
  align-items: start;
  font-size: 0.82rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}
.player-info-label { color: var(--muted); font-weight: 600; }
.player-info-value {
  word-break: break-all;
  font-family: var(--mono);
  font-size: 0.76rem;
}

/* ——— Toast ——— */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 0.75rem 1.35rem;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  z-index: 2000;
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.35);
  opacity: 0;
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
  pointer-events: none;
}
.toast.toast-show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.toast.err {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  box-shadow: 0 8px 32px rgba(239, 68, 68, 0.35);
}

/* ——— Responsive ——— */
@media (max-width: 960px) {
  .dash-layout { grid-template-columns: 1fr; }
  .sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid var(--border);
    height: auto;
    position: relative;
  }
  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    flex: none;
    width: 100%;
  }
  .sidebar-foot { width: 100%; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .dash-main { max-height: none; }
}

@media (max-width: 520px) {
  .stats-row { grid-template-columns: 1fr; }
  .server-card { grid-template-columns: 1fr; }
  .btn-open { grid-column: 1; grid-row: auto; width: 100%; margin-top: 0.5rem; }
}

/* ═══ Antigravity / Blumeris v12 ═══ */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

#cursor-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  margin: -210px 0 0 -210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(80, 227, 254, 0.12) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.3s;
  mix-blend-mode: screen;
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  transition:
    opacity 0.75s var(--ease),
    transform 0.85s var(--ease);
  transition-delay: calc(var(--reveal-i, 0) * 0.06s);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
.reveal-stagger.is-visible {
  transition-delay: calc(var(--stagger, 0) * 0.07s);
}

@keyframes ag-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
.ag-float { animation: ag-float 5s ease-in-out infinite; }

.float-chip {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(80, 227, 254, 0.25);
  background: rgba(80, 227, 254, 0.06);
  animation: chip-drift 6s ease-in-out infinite;
}
.float-chip-1 { width: 48px; height: 48px; top: 12%; left: 8%; }
.float-chip-2 { width: 72px; height: 72px; bottom: 18%; left: 15%; opacity: 0.6; }
.float-chip-3 { width: 36px; height: 36px; top: 22%; right: 12%; }
@keyframes chip-drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(12px, -18px) rotate(8deg); }
  66% { transform: translate(-8px, 10px) rotate(-5deg); }
}

/* Login split */
.login-scene {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem clamp(1.25rem, 4vw, 3rem);
  max-width: 1200px;
  margin: 0 auto;
}

.login-hero {
  position: relative;
  padding: 1rem 0;
}

.hero-logo-wrap {
  margin-bottom: 1.5rem;
}

.hero-logo {
  width: clamp(88px, 12vw, 128px);
  height: auto;
  filter: drop-shadow(0 0 40px rgba(80, 227, 254, 0.5));
}

.hero-title {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: #fff;
}

.hero-lead {
  margin: 1rem 0 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 28ch;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.tag-pill {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(80, 227, 254, 0.3);
  background: rgba(80, 227, 254, 0.08);
  color: var(--accent);
}

.login-panel {
  position: relative;
  border-radius: 20px;
  background: rgba(8, 8, 14, 0.75);
  backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 0 0 1px rgba(80, 227, 254, 0.08) inset,
    0 24px 80px rgba(0, 0, 0, 0.55);
  transition: box-shadow 0.4s var(--ease);
}
.login-panel:hover {
  box-shadow:
    0 0 0 1px rgba(80, 227, 254, 0.2) inset,
    0 28px 90px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(80, 227, 254, 0.08);
}

.panel-inner { padding: 2rem 2.25rem; }
.panel-head h2 { margin: 0.2rem 0 0; font-size: 1.5rem; font-weight: 700; }
.panel-head { margin-bottom: 1.25rem; }

.page-shell {
  max-width: 880px;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 3vw, 2rem) 3rem;
  animation: page-in 0.6s var(--ease) both;
}

/* Sidebar nav */
.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
  transition: background 0.25s, box-shadow 0.25s, transform 0.25s;
}
.nav-item.active .nav-dot {
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  transform: scale(1.3);
}
.nav-item { gap: 0.65rem; }

/* Cards premium */
.card, .stat-card, .server-card, .login-panel {
  position: relative;
}
.card::before, .stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(80, 227, 254, 0.35), transparent 45%, rgba(255, 255, 255, 0.08));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.6;
}

.server-card {
  transform-style: preserve-3d;
  will-change: transform;
}

.btn-primary {
  background: linear-gradient(135deg, #50e3fe 0%, #2bc9ef 50%, #1a9fd4 100%);
  color: #031016;
  font-weight: 700;
  box-shadow: 0 4px 24px rgba(80, 227, 254, 0.25);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 8px 32px rgba(80, 227, 254, 0.4);
}

.brand-name, .hero-title, .sidebar-brand-name {
  background: linear-gradient(100deg, #fff 20%, #50e3fe 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tab-panel.active {
  animation: tab-in 0.5s var(--ease) both;
}

@media (max-width: 900px) {
  .login-scene {
    grid-template-columns: 1fr;
    padding-top: 1.5rem;
  }
  .login-hero { text-align: center; }
  .hero-lead { margin-left: auto; margin-right: auto; }
  .hero-tags { justify-content: center; }
  .float-chip { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .orb { animation: none; }
}
