:root {
  --bg: #02010a;
  --surface: #0d0b1e;
  --card: rgba(255, 255, 255, 0.035);
  --card-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-active: rgba(168, 85, 247, 0.5);
  --purple: #a855f7;
  --purple-dim: rgba(168, 85, 247, 0.15);
  --purple-glow: rgba(168, 85, 247, 0.35);
  --cyan: #06b6d4;
  --cyan-dim: rgba(6, 182, 212, 0.15);
  --green: #10b981;
  --green-dim: rgba(16, 185, 129, 0.15);
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.15);
  --amber: #f59e0b;
  --amber-dim: rgba(245, 158, 11, 0.15);
  --indigo: #6366f1;
  --ubuntu: #E95420;
  --debian: #A80030;
  --text: #f1f5f9;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --font: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  animation: orbFloat 20s ease-in-out infinite alternate;
}

.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #7c3aed, transparent 70%);
  top: -200px; left: -100px;
  animation-delay: 0s;
}

.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #0891b2, transparent 70%);
  top: 20%; right: -150px;
  animation-delay: -7s;
}

.orb-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #4f46e5, transparent 70%);
  bottom: 10%; left: 30%;
  animation-delay: -14s;
}

@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.05); }
  66% { transform: translate(-20px, 30px) scale(0.95); }
  100% { transform: translate(40px, 20px) scale(1.02); }
}

.noise-overlay {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* ─── NAVBAR ─────────────────────────────────────── */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(2, 1, 10, 0.7);
  backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: var(--purple-dim);
  border-radius: 10px;
  border: 1px solid rgba(168,85,247,0.25);
  transition: all 0.2s;
}

.nav-logo:hover .logo-icon {
  background: rgba(168,85,247,0.25);
  box-shadow: 0 0 16px var(--purple-glow);
}

.logo-text {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  transition: all 0.18s;
}

.nav-link:hover {
  color: var(--text);
  background: var(--card-hover);
}

.nav-link.active {
  color: var(--purple);
  background: var(--purple-dim);
}

.nav-link-admin.active {
  color: var(--amber);
  background: var(--amber-dim);
}

.nav-icon { width: 15px; height: 15px; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem 0.35rem 0.35rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
}

.admin-badge {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--amber);
  background: var(--amber-dim);
  border: 1px solid rgba(245,158,11,0.3);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

/* ─── BUTTONS ────────────────────────────────────── */

.btn-discord {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.1rem;
  background: #5865F2;
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font);
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-discord:hover {
  background: #4752c4;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(88,101,242,0.4);
}

.btn-discord-lg {
  padding: 0.7rem 1.6rem;
  font-size: 1rem;
  border-radius: var(--radius);
}

.btn-primary-lg {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  border-radius: var(--radius);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 0 0 rgba(168,85,247,0);
}

.btn-primary-lg:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--purple-glow);
}

.btn-ghost-lg {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font);
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ghost-lg:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.2);
  background: var(--card-hover);
}

.btn-ghost-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font);
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.18s;
}

.btn-ghost-sm:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.2);
  background: var(--card-hover);
}

.btn-outline-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  background: transparent;
  color: var(--purple);
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font);
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1px solid rgba(168,85,247,0.3);
  cursor: pointer;
  transition: all 0.18s;
}

.btn-outline-sm:hover {
  background: var(--purple-dim);
  border-color: var(--purple);
}

/* ─── LAYOUT ─────────────────────────────────────── */

.main-content {
  flex: 1;
  position: relative;
  z-index: 1;
}

.page-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.page-subtitle {
  color: var(--text-muted);
  margin-top: 0.3rem;
  font-size: 0.9rem;
}

.page-header {
  background: linear-gradient(180deg, rgba(168,85,247,0.06) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
  padding: 2rem 0 1.5rem;
  margin-bottom: 2rem;
}

.page-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.text-gradient {
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── HERO ───────────────────────────────────────── */

.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem 4rem;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple);
  background: var(--purple-dim);
  border: 1px solid rgba(168,85,247,0.2);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.eyebrow-dot {
  width: 6px; height: 6px;
  background: var(--purple);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 5rem;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.2s;
}

.feature-card:hover {
  background: var(--card-hover);
  border-color: rgba(168,85,247,0.2);
  transform: translateY(-3px);
}

.feature-icon {
  width: 44px; height: 44px;
  background: var(--purple-dim);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple);
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── GREETING / DASHBOARD ───────────────────────── */

.greeting-block {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.greeting-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 3px solid var(--purple-dim);
  object-fit: cover;
}

.greeting-title {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.greeting-sub {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 0.2rem;
}

.dashboard-stats {
  max-width: 1200px;
  margin: 0 auto 2.5rem;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s;
}

.stat-card:hover {
  background: var(--card-hover);
  transform: translateY(-2px);
}

.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-purple { background: var(--purple-dim); color: var(--purple); }
.stat-icon-green  { background: var(--green-dim);  color: var(--green);  }
.stat-icon-red    { background: var(--red-dim);    color: var(--red);    }
.stat-icon-cyan   { background: var(--cyan-dim);   color: var(--cyan);   }

.stat-number {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-weight: 500;
}

/* ─── SECTION ────────────────────────────────────── */

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}

/* ─── INSTANCE CARDS ─────────────────────────────── */

.instances-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.instance-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.22s;
  position: relative;
  overflow: hidden;
}

.instance-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.instance-card:hover {
  background: var(--card-hover);
  border-color: rgba(168,85,247,0.2);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.instance-card:hover::before { opacity: 1; }

.instance-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.instance-os-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--os-color, var(--text-muted));
  background: color-mix(in srgb, var(--os-color, #888) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--os-color, #888) 25%, transparent);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-running { background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 2s ease-in-out infinite; }
.status-stopped { background: var(--red); }
.status-creating { background: var(--amber); animation: pulse 1.5s ease-in-out infinite; }
.status-error { background: var(--red); }

.instance-name {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  word-break: break-all;
}

.instance-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--mono);
}

.meta-icon { width: 12px; height: 12px; }

.instance-date {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.instance-date svg { width: 12px; height: 12px; }

.instance-actions { display: flex; gap: 0.5rem; }

/* ─── EMPTY STATE ────────────────────────────────── */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  text-align: center;
}

.empty-icon {
  width: 80px; height: 80px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.empty-icon svg { width: 36px; height: 36px; }

.empty-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.empty-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  max-width: 340px;
}

/* ─── DEPLOY FORM ────────────────────────────────── */

.deploy-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
  padding-top: 0.5rem;
  flex-shrink: 0;
}

.back-link:hover { color: var(--text); }
.back-link svg { width: 16px; height: 16px; }

.deploy-form { max-width: 760px; }

.form-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.step-num {
  font-size: 0.65rem;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--purple);
  background: var(--purple-dim);
  border: 1px solid rgba(168,85,247,0.2);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.os-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.os-radio { display: none; }

.os-card {
  display: block;
  cursor: pointer;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  transition: all 0.2s;
  overflow: hidden;
}

.os-card:hover {
  border-color: rgba(168,85,247,0.35);
  background: var(--card-hover);
}

.os-card.selected {
  border-color: var(--purple);
  background: var(--purple-dim);
  box-shadow: 0 0 0 1px var(--purple), 0 0 24px rgba(168,85,247,0.15);
}

.os-card-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
}

.os-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
}

.os-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.os-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.os-info { flex: 1; }

.os-check {
  color: var(--purple);
  opacity: 0;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.os-card.selected .os-check { opacity: 1; }

.os-check svg { width: 20px; height: 20px; }

.form-row { margin-bottom: 1.25rem; }

.form-group { display: flex; flex-direction: column; gap: 0.5rem; }

.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: auto;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 0.875rem;
  width: 16px; height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.form-input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.75rem;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--font);
  outline: none;
  transition: all 0.18s;
}

.form-input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(168,85,247,0.12);
  background: rgba(168,85,247,0.04);
}

.form-input::placeholder { color: var(--text-muted); }

.input-toggle {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.input-toggle:hover { color: var(--text); }
.input-toggle svg { width: 16px; height: 16px; }

.password-strength {
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.strength-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: all 0.3s;
}

.strength-label {
  font-size: 0.72rem;
  font-weight: 500;
  margin-top: 0.25rem;
}

.resource-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.resource-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
}

.resource-item svg { width: 14px; height: 14px; color: var(--cyan); flex-shrink: 0; }

.form-submit {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.btn-deploy {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 2rem;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: white;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font);
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.01em;
}

.btn-deploy:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--purple-glow);
}

.btn-deploy:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-deploy.loading svg { animation: spin 0.8s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

.deploy-note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.deploy-note svg { width: 13px; height: 13px; }

.error-banner {
  display: flex;
  gap: 0.75rem;
  background: var(--red-dim);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--red);
  font-size: 0.875rem;
}

.error-banner svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
.error-banner p { margin: 0; line-height: 1.6; }

/* ─── CONFIRMATION PAGE ──────────────────────────── */

.confirm-page { max-width: 960px; }

.confirm-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 0 2.5rem;
}

.confirm-icon-wrap {
  position: relative;
  width: 90px; height: 90px;
  margin-bottom: 1.5rem;
}

.confirm-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid;
  animation: ringExpand 2s ease-in-out infinite;
}

.confirm-ring-1 { border-color: rgba(168,85,247,0.4); animation-delay: 0s; }
.confirm-ring-2 { border-color: rgba(168,85,247,0.2); animation-delay: 0.5s; }

@keyframes ringExpand {
  0% { transform: scale(0.8); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

.confirm-icon {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.confirm-icon svg { width: 36px; height: 36px; }

.confirm-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.confirm-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.confirm-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 800px) {
  .confirm-grid { grid-template-columns: 1fr; }
}

.confirm-side { display: flex; flex-direction: column; gap: 1rem; }

.confirm-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.confirm-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
}

.confirm-card-header svg { width: 15px; height: 15px; }

.confirm-card-main { }

/* ─── TERMINAL ───────────────────────────────────── */

.terminal-block {
  background: #050505;
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 1.25rem;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.85rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.t-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}

.t-red { background: #ff5f57; }
.t-yellow { background: #ffbd2e; }
.t-green { background: #28ca42; }

.t-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--mono);
  margin-left: auto;
}

.terminal-body { padding: 1rem 1.25rem; }

.t-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.8;
}

.t-prompt { color: #10b981; }

.t-cmd {
  color: #e2e8f0;
  flex: 1;
  word-break: break-all;
}

.t-output { padding-left: 1.25rem; }

.t-muted { color: #64748b; }

.t-password {
  color: #f59e0b;
  font-weight: 500;
}

.t-copy {
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.t-copy:hover { color: var(--text); background: rgba(255,255,255,0.08); }
.t-copy svg { width: 12px; height: 12px; }

.copied-flash { animation: flashGreen 0.5s ease; }
@keyframes flashGreen { 50% { color: var(--green); } }

.cred-alert {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 1.25rem 1.25rem;
  padding: 0.7rem 1rem;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--amber);
}

.cred-alert svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ─── DETAIL LIST ────────────────────────────────── */

.detail-list { padding: 0.25rem 0; }

.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.25rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.detail-row:last-child { border-bottom: none; }

.detail-key {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}

.detail-val {
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.detail-code {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  background: rgba(0,0,0,0.3);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.inline-copy {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.1rem;
  display: inline-flex;
  transition: color 0.15s;
}
.inline-copy:hover { color: var(--text); }
.inline-copy svg { width: 12px; height: 12px; }

/* ─── PORT LIST ──────────────────────────────────── */

.port-list { padding: 0.25rem 0; }

.port-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.port-row:last-child { border-bottom: none; }

.port-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
}

.port-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.port-ssh {
  background: rgba(6,182,212,0.1);
  color: var(--cyan);
  border: 1px solid rgba(6,182,212,0.25);
}

.port-app {
  background: rgba(168,85,247,0.1);
  color: var(--purple);
  border: 1px solid rgba(168,85,247,0.25);
}

.port-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.port-num {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-left: auto;
}

/* ─── CONFIRM ACTIONS ────────────────────────────── */

.confirm-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ─── MANAGE TABLE ───────────────────────────────── */

.manage-table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  overflow-x: auto;
}

.manage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.manage-table thead {
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid var(--border);
}

.manage-table th {
  padding: 0.85rem 1.25rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  white-space: nowrap;
}

.manage-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.instance-row:last-child td { border-bottom: none; }

.instance-row:hover td { background: rgba(255,255,255,0.02); }

.inst-name-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.inst-avatar {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.inst-name {
  font-weight: 600;
  display: block;
  font-size: 0.875rem;
}

.inst-id {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--mono);
}

.os-tag {
  font-size: 0.75rem;
  font-weight: 600;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-pill.status-running { background: var(--green-dim); color: var(--green); }
.status-pill.status-stopped { background: var(--red-dim); color: var(--red); }
.status-pill.status-creating { background: var(--amber-dim); color: var(--amber); }
.status-pill.status-error { background: var(--red-dim); color: var(--red); }

.ssh-info-cell {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ssh-snippet {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.icon-btn:hover {
  color: var(--text);
  background: var(--card-hover);
  border-color: rgba(255,255,255,0.15);
}

.icon-btn svg { width: 13px; height: 13px; }

.ports-cell {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.port-chip {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-dim);
}

.port-chip-ssh {
  background: rgba(6,182,212,0.08);
  border-color: rgba(6,182,212,0.2);
  color: var(--cyan);
}

.date-cell {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.action-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.act-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  transition: all 0.15s;
}

.act-btn svg { width: 14px; height: 14px; }

.act-start:hover { color: var(--green); border-color: rgba(16,185,129,0.3); background: var(--green-dim); }
.act-stop:hover { color: var(--amber); border-color: rgba(245,158,11,0.3); background: var(--amber-dim); }
.act-restart:hover { color: var(--cyan); border-color: rgba(6,182,212,0.3); background: var(--cyan-dim); }
.act-delete:hover { color: var(--red); border-color: rgba(239,68,68,0.3); background: var(--red-dim); }
.act-stats:hover { color: var(--purple); border-color: rgba(168,85,247,0.3); background: var(--purple-dim); }

/* ─── MODAL ──────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: #0d0b1e;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.2s;
}

.modal-overlay.open .modal-box { transform: scale(1); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.modal-title svg { width: 18px; height: 18px; color: var(--purple); }

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  border-radius: 6px;
  transition: all 0.15s;
}

.modal-close:hover { color: var(--text); background: var(--card-hover); }
.modal-close svg { width: 18px; height: 18px; }

.modal-body { padding: 1.25rem 1.5rem; }

.modal-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  justify-content: center;
  padding: 1.5rem;
}

.modal-loading svg { width: 18px; height: 18px; }
.spin { animation: spin 0.8s linear infinite; }

.modal-creds { display: flex; flex-direction: column; gap: 0; }

.cred-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.cred-row:last-child { border-bottom: none; }

.cred-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}

.cred-val {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text);
  word-break: break-all;
  text-align: right;
}

.cred-password { color: var(--amber); }

/* ─── ADMIN ──────────────────────────────────────── */

.admin-header {
  margin-bottom: 2rem;
}

.admin-badge-header {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  background: var(--amber-dim);
  border: 1px solid rgba(245,158,11,0.2);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.admin-badge-header svg { width: 12px; height: 12px; }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.astat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.astat-icon {
  width: 42px; height: 42px;
  background: var(--purple-dim);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple);
  flex-shrink: 0;
}

.astat-icon svg { width: 18px; height: 18px; }

.astat-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.astat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  text-transform: capitalize;
  transition: all 0.15s;
}

.filter-chip:hover {
  background: var(--card-hover);
  color: var(--text);
}

.filter-chip.active {
  background: var(--purple-dim);
  border-color: rgba(168,85,247,0.3);
  color: var(--purple);
}

.filter-clear {
  color: var(--red);
  background: var(--red-dim);
  border-color: rgba(239,68,68,0.2);
}

.admin-log-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  overflow-x: auto;
}

.admin-log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.admin-log-table thead {
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid var(--border);
}

.admin-log-table th {
  padding: 0.8rem 1rem;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  white-space: nowrap;
}

.admin-log-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}

.admin-log-table tr:last-child td { border-bottom: none; }
.admin-log-table tr:hover td { background: rgba(255,255,255,0.015); }

.log-id { color: var(--text-muted); font-family: var(--mono); font-size: 0.7rem; }
.log-time { color: var(--text-muted); font-family: var(--mono); font-size: 0.72rem; white-space: nowrap; }
.log-user { font-weight: 500; }
.log-discord code { font-size: 0.7rem; color: var(--text-muted); font-family: var(--mono); }
.log-details { color: var(--text-dim); font-size: 0.8rem; max-width: 300px; }
.log-ip { font-family: var(--mono); font-size: 0.72rem; color: var(--text-muted); }

.action-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid;
  text-transform: capitalize;
  white-space: nowrap;
}

.action-chip svg { width: 11px; height: 11px; }

/* ─── PAGINATION ─────────────────────────────────── */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 1.5rem;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-family: var(--font);
  color: var(--text-dim);
  text-decoration: none;
  transition: all 0.15s;
}

.page-btn:hover { background: var(--card-hover); color: var(--text); }
.page-btn-active { background: var(--purple-dim) !important; border-color: var(--purple) !important; color: var(--purple) !important; }
.page-ellipsis { color: var(--text-muted); padding: 0 0.25rem; }

/* ─── USERS TABLE ────────────────────────────────── */

.user-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-cell-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.user-cell-name { font-weight: 600; font-size: 0.875rem; display: block; }
.user-cell-tag { font-size: 0.72rem; color: var(--text-muted); display: block; }

/* ─── DETAIL LAYOUT ──────────────────────────────── */

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 768px) { .detail-layout { grid-template-columns: 1fr; } }

.controls-row {
  display: flex;
  gap: 0.75rem;
  padding: 1.25rem;
  flex-wrap: wrap;
}

.ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid;
}

.ctrl-start { background: var(--green-dim); color: var(--green); border-color: rgba(16,185,129,0.3); }
.ctrl-start:hover { background: rgba(16,185,129,0.25); box-shadow: 0 0 16px rgba(16,185,129,0.2); }
.ctrl-stop { background: var(--amber-dim); color: var(--amber); border-color: rgba(245,158,11,0.3); }
.ctrl-stop:hover { background: rgba(245,158,11,0.25); }
.ctrl-restart { background: var(--cyan-dim); color: var(--cyan); border-color: rgba(6,182,212,0.3); }
.ctrl-restart:hover { background: rgba(6,182,212,0.25); }
.ctrl-delete { background: var(--red-dim); color: var(--red); border-color: rgba(239,68,68,0.3); }
.ctrl-delete:hover { background: rgba(239,68,68,0.25); }

.ctrl-btn svg { width: 15px; height: 15px; }

/* ─── ERROR PAGES ────────────────────────────────── */

.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 2rem;
}

.error-code {
  font-size: 6rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 1rem;
}

.error-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.error-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  max-width: 400px;
}

/* ─── FLASH MESSAGES ─────────────────────────────── */

.flash-container {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.flash {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.flash-success { background: var(--green-dim); border: 1px solid rgba(16,185,129,0.25); color: var(--green); }
.flash-error { background: var(--red-dim); border: 1px solid rgba(239,68,68,0.25); color: var(--red); }
.flash svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ─── FOOTER ─────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.3);
  padding: 1.25rem 0;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.footer-brand {
  font-weight: 700;
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-dot {
  width: 4px; height: 4px;
  background: var(--border);
  border-radius: 50%;
  flex-shrink: 0;
}
.footer-tagline { color: var(--text-muted); }
.footer-spacer { flex: 1; }
.footer-note { color: var(--text-muted); }

/* ─── RESPONSIVE ─────────────────────────────────── */

@media (max-width: 640px) {
  .nav-inner { padding: 0 1rem; gap: 1rem; }
  .page-section { padding: 2rem 1rem; }
  .section { padding: 0 1rem 3rem; }
  .dashboard-stats { padding: 0 1rem; margin-bottom: 2rem; }
  .page-header-inner { padding: 0 1rem; }
  .hero { padding: 3rem 1rem 3rem; }
  .hero-title { font-size: 2.5rem; }
  .confirm-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

/* ─── SCROLLBAR ──────────────────────────────────── */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ─── SELECTION ──────────────────────────────────── */

::selection { background: rgba(168,85,247,0.3); }

.ml-auto { margin-left: auto; }

/* --- LOGO IMG ---------------------------------------- */

.logo-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 4px;
}

/* --- ADMIN TABS -------------------------------------- */

.admin-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  padding-bottom: 0;
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.18s;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.admin-tab svg { width: 15px; height: 15px; }

.admin-tab:hover {
  color: var(--text);
  background: var(--card);
}

.admin-tab.active {
  color: var(--purple);
  border-bottom-color: var(--purple);
  background: var(--purple-dim);
}

/* --- USER ACCORDION ---------------------------------- */

.user-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.uacc-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}

.uacc-item:hover { border-color: rgba(168,85,247,0.2); }

.uacc-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  gap: 1rem;
  text-align: left;
  transition: background 0.15s;
}

.uacc-header:hover { background: rgba(255,255,255,0.02); }

.uacc-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.uacc-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.uacc-names { min-width: 0; }

.uacc-name {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.uacc-tag {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.uacc-discord {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  background: rgba(0,0,0,0.3);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.uacc-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.uacc-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.uacc-pill svg { width: 11px; height: 11px; }

.uacc-pill-green {
  color: var(--green);
  background: var(--green-dim);
  border-color: rgba(16,185,129,0.2);
}

.uacc-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.uacc-chevron {
  width: 16px; height: 16px;
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.uacc-body {
  border-top: 1px solid var(--border);
}

.uacc-empty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.uacc-empty svg { width: 15px; height: 15px; }

/* --- OWNER CELL -------------------------------------- */

.owner-cell {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.owner-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.owner-name {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.owner-id {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--mono);
}

/* --- STATS PANEL ------------------------------------- */

.stats-row td { padding: 0 !important; }

.stats-cell { padding: 0 !important; }

.stats-panel {
  padding: 1.25rem 1.5rem;
  background: rgba(0,0,0,0.25);
  border-top: 1px solid var(--border);
}

.stats-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.stats-loading svg { width: 16px; height: 16px; }

.stats-error {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--red);
  font-size: 0.85rem;
}

.stats-error svg { width: 16px; height: 16px; }

.stats-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stat-gauge {
  display: grid;
  grid-template-columns: 140px 1fr 180px;
  align-items: center;
  gap: 1rem;
}

.gauge-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.gauge-label svg { width: 13px; height: 13px; }

.gauge-bar {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
}

.gauge-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
}

.gauge-val {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  text-align: right;
}

.stat-row-pair {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.stat-mini {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
}

.stat-mini svg { width: 15px; height: 15px; flex-shrink: 0; }

.stat-mini-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex: 1;
}

.stat-mini-val {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .stat-gauge { grid-template-columns: 100px 1fr; }
  .gauge-val { display: none; }
  .stat-row-pair { grid-template-columns: repeat(2, 1fr); }
}

