﻿:root {
  --bg: #060b16;
  --bg-2: #091224;
  --panel: rgba(10, 18, 34, 0.88);
  --panel-2: rgba(16, 26, 50, 0.92);
  --panel-3: rgba(22, 36, 68, 0.9);
  --line: rgba(126, 167, 255, 0.16);
  --line-strong: rgba(126, 167, 255, 0.36);
  --text: #f5f8ff;
  --muted: #93a4c7;
  --primary: #6cb6ff;
  --primary-2: #7c8cff;
  --success: #57f287;
  --danger: #ff6b7a;
  --warning: #f6c26b;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(108, 182, 255, 0.14), transparent 30%),
    radial-gradient(circle at top right, rgba(124, 140, 255, 0.12), transparent 24%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  min-height: 100vh;
}
.backdrop-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(130, 151, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 151, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.12));
  pointer-events: none;
}
.backdrop-glow {
  position: fixed;
  width: 26rem;
  height: 26rem;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.18;
  pointer-events: none;
}
.glow-a { top: -8rem; left: -5rem; background: var(--primary); }
.glow-b { top: 4rem; right: -6rem; background: #5e7eff; }
.shell {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px;
}
.topbar,
.panel,
.login-card,
.hero,
.profile-hero {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 24px;
  margin-bottom: 18px;
}
.brand-lockup h1,
.panel h2,
.hero h2,
.login-card h1,
.profile-hero h2 { margin: 0; }
.brand-lockup p,
.panel-head p,
.hero p,
.help,
.muted,
.profile-meta,
.card-copy,
small { color: var(--muted); }
.brand-lockup p { margin: 8px 0 0; max-width: 620px; }
.eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 12px;
  font-weight: 700;
}
.nav-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.nav-link,
.ghost-btn,
button.subtle,
button {
  transition: .18s ease;
}
.nav-link,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--muted);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 700;
}
.nav-link:hover,
.nav-link.active,
.ghost-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(108, 182, 255, 0.08);
}
.user-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  border-radius: 18px;
}
.user-pill span { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  background: rgba(108, 182, 255, 0.12);
}
.avatar-fallback {
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.flash {
  margin-bottom: 16px;
  padding: 15px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(9, 15, 29, 0.92);
}
.flash.success { border-color: rgba(87, 242, 135, 0.36); box-shadow: inset 3px 0 0 var(--success); }
.flash.error { border-color: rgba(255, 107, 122, 0.36); box-shadow: inset 3px 0 0 var(--danger); }
.page { display: grid; gap: 18px; }
.hero,
.profile-hero { padding: 26px; overflow: hidden; position: relative; }
.hero::after,
.profile-hero::after {
  content: '';
  position: absolute;
  inset: auto -20% -35% auto;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108,182,255,.18), transparent 60%);
}
.hero h2,
.profile-hero h2 { font-size: clamp(28px, 4vw, 38px); }
.stats {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.stat {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(18,29,56,.92), rgba(10,17,31,.92));
  border: 1px solid var(--line);
}
.stat span,
.stat small { display: block; }
.stat span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.stat strong { display: block; margin: 10px 0 4px; font-size: 30px; }
.stat.success { border-color: rgba(87, 242, 135, 0.28); }
.stat.danger { border-color: rgba(255, 107, 122, 0.28); }
.stat.default { border-color: rgba(126, 167, 255, 0.18); }
.panel { padding: 22px; }
.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.panel-head p { margin: 6px 0 0; max-width: 760px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
input, select, textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(11, 19, 36, 0.94);
  color: var(--text);
  padding: 13px 14px;
  font: inherit;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(108, 182, 255, 0.1);
}
textarea { min-height: 128px; resize: vertical; }
button {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 800;
  cursor: pointer;
  color: #071120;
  background: linear-gradient(135deg, var(--primary), #9fc9ff);
}
button:hover { transform: translateY(-1px); filter: brightness(1.03); }
button.danger { background: linear-gradient(135deg, var(--danger), #ff8c98); color: white; }
button.success { background: linear-gradient(135deg, var(--success), #8ff7b1); }
button.subtle {
  background: rgba(255,255,255,0.03);
  color: var(--text);
  border: 1px solid var(--line);
}
.table-wrap {
  overflow: auto;
  border: 1px solid rgba(126, 167, 255, 0.08);
  border-radius: 18px;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
  background: rgba(9, 15, 28, 0.66);
}
th, td {
  padding: 14px 14px;
  border-bottom: 1px solid rgba(151, 165, 203, 0.1);
  text-align: left;
  vertical-align: top;
}
th {
  position: sticky;
  top: 0;
  background: rgba(13, 21, 40, 0.96);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .1em;
}
code {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(126, 167, 255, 0.08);
  color: #dce8ff;
  font-family: Consolas, monospace;
  word-break: break-all;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
}
.badge.active, .badge.owner { border-color: rgba(87,242,135,.34); color: var(--success); }
.badge.expired, .badge.inactive { border-color: rgba(255,107,122,.36); color: #ff9aa4; }
.badge.staff, .badge.admin { border-color: rgba(108,182,255,.36); color: var(--primary); }
.badge.disabled { border-color: rgba(246,194,107,.36); color: var(--warning); }
.badge.customer { border-color: rgba(151,165,203,.25); color: #c7d2ee; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.login-shell { max-width: 560px; margin: 8vh auto 0; }
.login-card { padding: 30px; }
.login-card form { margin-top: 18px; }
.login-actions { display: grid; gap: 12px; }
.discord-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  border-radius: 14px;
  padding: 13px 16px;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, #5865f2, #7682ff);
}
.separator {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .14em;
}
.separator::before,
.separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(151,165,203,.14);
}
.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr);
  gap: 18px;
}
.profile-stack,
.info-stack { display: grid; gap: 18px; }
.info-list {
  display: grid;
  gap: 12px;
}
.info-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(151,165,203,.08);
}
.info-row strong { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.pill-note {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(108,182,255,.18);
  background: rgba(108,182,255,.06);
}
.inline-form { display: inline; }
form.inline-form input[type='hidden'] { display: none; }
@media (max-width: 1080px) {
  .topbar,
  .profile-grid,
  .grid.two,
  .grid.three,
  .grid.four { grid-template-columns: 1fr; }
  .topbar { align-items: stretch; }
}
@media (max-width: 720px) {
  .shell { padding: 16px; }
  .user-pill { flex-wrap: wrap; justify-content: flex-start; }
  .nav-cluster { width: 100%; }
  .nav-link { flex: 1 1 calc(50% - 10px); }
  .hero,
  .profile-hero,
  .panel,
  .topbar,
  .login-card { padding: 18px; border-radius: 20px; }
}
