/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── Custom Properties ────────────────────────────────────── */
:root {
  --bg:          #0e0f14;
  --bg-2:        #141720;
  --bg-3:        #1a1d27;
  --surface:     #1e2130;
  --surface-2:   #252840;
  --border:      rgba(255,255,255,0.07);
  --border-focus: rgba(88,101,242,0.6);
  --discord:     #5865F2;
  --discord-h:   #4752c4;
  --text:        #e8eaf0;
  --muted:       #8b8fa8;
  --faint:       #555872;
  --green:       #57F287;
  --red:         #ED4245;
  --yellow:      #FEE75C;
  --shadow:      0 4px 24px rgba(0,0,0,0.45);
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   18px;
  --radius-xl:   24px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
               'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

/* ── Background Glow ──────────────────────────────────────── */
/* Legacy wrapper (keeps existing PHP templates working) */
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.bg-glow__circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
}
.bg-glow__circle--1 {
  width: 600px; height: 600px;
  background: var(--discord);
  top: -200px; left: -150px;
}
.bg-glow__circle--2 {
  width: 400px; height: 400px;
  background: #a855f7;
  bottom: -100px; right: -80px;
}

/* Standalone glow blobs (spec API) */
.bg-glow--blue {
  position: fixed;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: var(--discord);
  filter: blur(120px);
  opacity: 0.12;
  pointer-events: none;
  top: -200px; left: -150px;
  z-index: 0;
}
.bg-glow--purple {
  position: fixed;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: #a855f7;
  filter: blur(120px);
  opacity: 0.12;
  pointer-events: none;
  bottom: -100px; right: -80px;
  z-index: 0;
}

/* ── Navbar ───────────────────────────────────────────────── */
nav,
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(14,15,20,0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  height: 64px;
  display: flex;
  align-items: center;
}
.navbar__inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.navbar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.navbar__links {
  display: flex;
  gap: 8px;
  align-items: center;
}
.navbar__link {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 0.15s, background 0.15s;
}
.navbar__link:hover {
  color: var(--text);
  background: var(--surface);
}

/* Hamburger (mobile) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  padding: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius-sm);
  color: var(--muted);
  transition: background 0.15s;
}
.hamburger:hover { background: var(--surface); }
.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  border: none;
  outline: none;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s, opacity 0.15s, border-color 0.15s;
  -webkit-user-select: none;
  user-select: none;
}
.btn:active {
  transform: scale(0.97);
}
.btn:disabled,
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn--primary {
  background: var(--discord);
  color: #fff;
}
.btn--primary:hover { background: var(--discord-h); }

.btn--discord {
  background: var(--discord);
  color: #fff;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  width: 100%;
}
.btn--discord:hover { background: var(--discord-h); }

.btn--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}
.btn--ghost:hover {
  background: var(--surface);
  color: var(--text);
}

.btn--danger {
  background: rgba(237,66,69,0.15);
  border: 1px solid rgba(237,66,69,0.3);
  color: var(--red);
}
.btn--danger:hover {
  background: rgba(237,66,69,0.25);
  border-color: rgba(237,66,69,0.5);
}

.btn--sm {
  padding: 6px 14px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn--full { width: 100%; }

/* ── Auth Card ────────────────────────────────────────────── */
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}
.auth-card__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.auth-card__title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.auth-card__subtitle {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 28px;
}

/* Auth Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--faint);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Form Elements ────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  -webkit-appearance: none;
}
.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(88,101,242,0.15);
}
.form-input::placeholder { color: var(--faint); }

/* Password / icon input wrapper */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrapper .form-input {
  padding-right: 44px;
}
.input-toggle {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: color 0.15s;
}
.input-toggle:hover { color: var(--text); }

/* Custom checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--muted);
  -webkit-user-select: none;
  user-select: none;
}
.checkbox-label input[type="checkbox"] { display: none; }
.checkbox-box {
  width: 18px; height: 18px;
  flex-shrink: 0;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  background: var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.checkbox-label input[type="checkbox"]:checked + .checkbox-box {
  background: var(--discord);
  border-color: var(--discord);
}
.checkbox-label input[type="checkbox"]:checked + .checkbox-box::after {
  content: '';
  display: block;
  width: 5px; height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px,-1px);
}

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.alert--error {
  background: rgba(237,66,69,0.12);
  border: 1px solid rgba(237,66,69,0.3);
  color: #f87171;
}
.alert--success {
  background: rgba(87,242,135,0.10);
  border: 1px solid rgba(87,242,135,0.28);
  color: var(--green);
}
.alert--info {
  background: rgba(88,101,242,0.10);
  border: 1px solid rgba(88,101,242,0.28);
  color: #818cf8;
}

/* ── Setup Wizard ─────────────────────────────────────────── */
.wizard-container {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

.wizard-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
}
.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  position: relative;
}
/* Connector line between steps */
.wizard-step:not(:first-child)::before {
  content: '';
  position: absolute;
  top: 18px;
  left: calc(-50% + 18px);
  right: calc(50% + 18px);
  height: 2px;
  background: var(--border);
  transition: background 0.3s;
}
.wizard-step--done:not(:first-child)::before,
.wizard-step--active:not(:first-child)::before {
  background: var(--discord);
}
.wizard-step__num {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 600;
  background: var(--surface);
  border: 2px solid var(--border);
  color: var(--faint);
  transition: background 0.25s, border-color 0.25s, color 0.25s;
  z-index: 1;
}
.wizard-step--active .wizard-step__num {
  background: var(--discord);
  border-color: var(--discord);
  color: #fff;
}
.wizard-step--done .wizard-step__num {
  background: rgba(87,242,135,0.15);
  border-color: var(--green);
  color: var(--green);
}
.wizard-step__label {
  font-size: 0.75rem;
  color: var(--faint);
  white-space: nowrap;
  transition: color 0.25s;
}
.wizard-step--active .wizard-step__label { color: var(--text); }
.wizard-step--done .wizard-step__label { color: var(--green); }

/* Step content panels */
.wizard-step-content { display: none; }
.wizard-step-content.active { display: block; }

/* Setup Card */
.setup-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}
.setup-card__title {
  font-size: 1.1rem; font-weight: 600;
  margin-bottom: 4px;
}
.setup-card__sub {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 24px;
}
.setup-card__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* ── Dashboard Layout ─────────────────────────────────────── */
.dashboard-body {
  overflow: hidden;
  height: 100vh;
}
.dashboard-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 12px;
  overflow-y: auto;
  position: relative;
  z-index: 10;
  transition: transform 0.25s ease;
}
.sidebar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 12px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.sidebar__section-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 12px 12px 6px;
}
.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s, background 0.15s;
}
.sidebar__link:hover {
  color: var(--text);
  background: var(--surface);
}
.sidebar__link--active {
  color: var(--text);
  background: var(--surface);
}
.sidebar__link--danger:hover {
  color: var(--red);
  background: rgba(237,66,69,0.08);
}
.sidebar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
  font-size: 0.85rem;
}
.sidebar__user-name { font-weight: 500; }
.sidebar__user-role { font-size: 0.75rem; color: var(--muted); }

/* ── Dashboard Main ───────────────────────────────────────── */
.dashboard-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.dashboard-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  height: 64px;
  flex-shrink: 0;
  background: rgba(14,15,20,0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 5;
}
.dashboard-header__title {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 600;
}
.dashboard-header__actions { display: flex; gap: 8px; }

.dashboard-content {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

/* ── Stats Grid ───────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s, border-color 0.15s;
}
.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(88,101,242,0.3);
}
.stat-card__label {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.stat-card__value {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.stat-card__value--sm { font-size: 1rem; }

/* ── Bot Status Indicator ─────────────────────────────────── */
.bot-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}
.bot-status__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.bot-status--online .bot-status__dot {
  background: var(--green);
  animation: pulse-green 2s infinite;
}
.bot-status--offline .bot-status__dot {
  background: var(--red);
  animation: pulse-red 2s infinite;
}
.bot-status--online { color: var(--green); }
.bot-status--offline { color: var(--red); }

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(87,242,135,0.7); }
  50%       { box-shadow: 0 0 0 6px rgba(87,242,135,0); }
}
@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(237,66,69,0.7); }
  50%       { box-shadow: 0 0 0 6px rgba(237,66,69,0); }
}

/* ── Members Table ────────────────────────────────────────── */
.members-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
/* Legacy alias */
.table-wrapper { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); }

.members-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}
.members-table thead th {
  background: var(--bg-2);
  padding: 10px 14px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
}
.members-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}
.members-table tbody tr:last-child td { border-bottom: none; }
.members-table tbody tr:hover td { background: rgba(255,255,255,0.025); }

.member-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.member-tag { font-weight: 500; }
.member-disc { color: var(--muted); font-size: 0.8rem; }
.text-muted { color: var(--muted); }

.ip-cell {
  cursor: pointer;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.82rem;
  transition: color 0.15s;
}
.ip-cell:hover { color: var(--discord); }

.guild-id {
  font-size: 0.75rem;
  background: var(--bg-2);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.table-empty {
  text-align: center;
  color: var(--muted);
  padding: 32px;
}

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge--green {
  background: rgba(87,242,135,0.12);
  color: var(--green);
  border: 1px solid rgba(87,242,135,0.25);
}
.badge--blue {
  background: rgba(88,101,242,0.12);
  color: #818cf8;
  border: 1px solid rgba(88,101,242,0.25);
}
.badge--red {
  background: rgba(237,66,69,0.12);
  color: var(--red);
  border: 1px solid rgba(237,66,69,0.25);
}
.badge--gray {
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  border: 1px solid var(--border);
}

/* ── Main Content (public pages) ──────────────────────────── */
.main-content {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 40px;
}

/* ── Verify Card ──────────────────────────────────────────── */
.verify-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.verify-card__icon {
  width: 72px; height: 72px;
  background: rgba(88,101,242,0.10);
  border: 1px solid rgba(88,101,242,0.22);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.verify-card__icon--error {
  background: rgba(237,66,69,0.10);
  border-color: rgba(237,66,69,0.22);
}
.verify-card__title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.verify-card__subtitle {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}
.verify-card__guild { color: var(--text); }
.verify-card__guild-id { color: var(--muted); font-size: 0.8rem; }
.verify-card__footer { font-size: 0.75rem; color: var(--faint); margin-top: 4px; }

/* ── Verify Steps (CSS counter) ───────────────────────────── */
.verify-steps {
  list-style: none;
  width: 100%;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  counter-reset: verify-step-counter;
}
.verify-steps__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  counter-increment: verify-step-counter;
}
.verify-steps__num {
  flex-shrink: 0;
  width: 28px; height: 28px;
  background: rgba(88,101,242,0.15);
  border: 1px solid rgba(88,101,242,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--discord);
}
.verify-steps__num::before {
  content: counter(verify-step-counter);
}
.verify-steps__content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 4px;
}
.verify-steps__content strong { font-size: 0.875rem; font-weight: 600; }
.verify-steps__content span  { font-size: 0.8rem; color: var(--muted); line-height: 1.45; }

/* ── Verified Card ────────────────────────────────────────── */
.verified-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  box-shadow: var(--shadow);
}
.verified-card__title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.verified-card__avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--green);
}
.verified-card__name { font-weight: 600; font-size: 1.1rem; }
.verified-card__msg  { font-size: 0.9rem; color: var(--muted); line-height: 1.5; }

/* Check circle / SVG animation */
.check-circle {
  width: 80px; height: 80px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(87,242,135,0.12);
  border: 2px solid rgba(87,242,135,0.35);
}
.checkmark,
.verified-card__check { width: 80px; height: 80px; }
.checkmark__circle {
  stroke: var(--green);
  stroke-width: 2;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  fill: none;
  animation: draw-check 0.6s cubic-bezier(0.65,0,0.45,1) forwards;
}
.checkmark__check {
  transform-origin: 50% 50%;
  stroke: var(--green);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  fill: none;
  animation: draw-check 0.3s cubic-bezier(0.65,0,0.45,1) 0.6s forwards;
}
@keyframes draw-check {
  100% { stroke-dashoffset: 0; }
}
/* Legacy alias */
@keyframes stroke { 100% { stroke-dashoffset: 0; } }

/* ── Toast System ─────────────────────────────────────────── */
.toast-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 320px;
  animation: toast-in 0.25s ease forwards;
  transition: opacity 0.3s, transform 0.3s;
}
.toast--success { border-left: 3px solid var(--green); }
.toast--error   { border-left: 3px solid var(--red);   }
.toast--info    { border-left: 3px solid var(--discord); }
.toast.toast--out {
  opacity: 0;
  transform: translateX(20px);
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Legacy alias */
@keyframes slideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Search Wrapper ───────────────────────────────────────── */
.search-wrapper {
  position: relative;
  margin-bottom: 16px;
}
.search-wrapper__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px 10px 40px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(88,101,242,0.15);
}
.search-input::placeholder { color: var(--faint); }

/* ── Section / Card wrappers ──────────────────────────────── */
.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
}
.section-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.section-sub {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ── Invite-link display ──────────────────────────────────── */
.invite-link-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.82rem;
  color: var(--muted);
  word-break: break-all;
  margin-top: 8px;
}

/* ── Divider ──────────────────────────────────────────────── */
hr,
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    transform: translateX(-100%);
    z-index: 50;
    box-shadow: var(--shadow);
  }
  .sidebar.open { transform: translateX(0); }

  .hamburger { display: flex; }

  .dashboard-body  { overflow: auto; height: auto; }
  .dashboard-layout { height: auto; flex-direction: column; }
  .dashboard-main  { height: auto; }
  .dashboard-content { overflow: visible; padding: 20px 16px; }

  .verify-card { padding: 28px 20px; }
  .stats-grid  { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .verify-card,
  .verified-card,
  .auth-card {
    padding: 24px 16px;
    border-radius: var(--radius-lg);
  }
  .dashboard-content { padding: 16px 12px; }
  .stats-grid  { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card   { padding: 14px; }
  .stat-card__value { font-size: 1.5rem; }
  .wizard-step__label { font-size: 0.65rem; }

  .toast-wrap { right: 12px; bottom: 12px; }
  .toast { max-width: calc(100vw - 24px); }
}
