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

:root {
  --bg: #0a0a0f;
  --bg-secondary: #13131a;
  --bg-tertiary: #1a1a24;
  --panel: rgba(19, 19, 26, 0.8);
  --panel-strong: rgba(26, 26, 36, 0.95);
  --border: rgba(255, 255, 255, 0.08);
  --accent: #58c1ff;
  --accent-2: #a855f7;
  --accent-gradient: linear-gradient(135deg, #58c1ff 0%, #a855f7 100%);
  --text: #ffffff;
  --muted: #9ca3af;
  --danger: #ef4444;
  --success: #10b981;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', -apple-system, sans-serif;
  background: 
    radial-gradient(circle at 20% 20%, rgba(88, 193, 255, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.page {
  padding: 32px 20px;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--panel-strong);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 24px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 12px;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 18px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 0 20px rgba(88, 193, 255, 0.5));
}

.brand__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-gradient);
  box-shadow: 0 0 18px rgba(88, 193, 255, 0.8);
}

.actions { display: flex; gap: 10px; align-items: center; }

.btn {
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--text);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', -apple-system, sans-serif;
}

.btn span {
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--accent-gradient);
  box-shadow: 0 4px 20px rgba(88, 193, 255, 0.3);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(88, 193, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(88, 193, 255, 0.08);
  transform: translateY(-1px);
}

.btn--danger { 
  background: var(--danger); 
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.btn--danger:hover {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(239, 68, 68, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn--small { 
  padding: 8px 14px; 
  font-size: 13px; 
  gap: 6px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.panel__title { 
  font-size: 1.1rem; 
  font-weight: 700; 
  margin: 0; 
  color: var(--text);
}

.panel__subtitle { 
  color: var(--muted); 
  margin: 6px 0 0 0; 
  font-size: 0.95rem; 
  line-height: 1.5;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border-radius: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.stat:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.stat__label { 
  color: var(--muted); 
  font-size: 0.9rem; 
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.stat__value { 
  font-size: 1.4rem; 
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(88, 193, 255, 0.1);
  border: 1px solid rgba(88, 193, 255, 0.2);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
}

.pill--success { 
  color: var(--success); 
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.2);
}

.pill--danger { 
  color: var(--danger); 
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
}

.form-grid {
  display: grid;
  gap: 12px;
}

label { font-size: 0.95rem; color: var(--text); font-weight: 600; cursor: pointer; user-select: none; }

input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  vertical-align: middle;
  margin-right: 8px;
  flex-shrink: 0;
}

input[type="checkbox"]:hover {
  border-color: var(--accent);
}

input[type="checkbox"]:checked {
  background: var(--accent-gradient);
  border-color: var(--accent);
}

input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
}

input[type="checkbox"]:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 11px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

input[type="checkbox"]:focus {
  outline: 2px solid rgba(88, 193, 255, 0.3);
  outline-offset: 2px;
}

input[type="checkbox"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: all 0.3s ease;
}

input:hover, select:hover, textarea:hover {
  border-color: rgba(88, 193, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

select {
  background-image: url('data:image/svg+xml;charset=UTF-8,<svg width="12" height="8" viewBox="0 0 12 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L6 6L11 1" stroke="%2358C1FF" stroke-width="2" stroke-linecap="round"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  appearance: none;
  cursor: pointer;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88, 193, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

select option {
  background: var(--bg);
  color: var(--text);
  padding: 10px;
}

.embed-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.blacklist-list {
  margin-top: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  min-height: 100px;
}

.blacklist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.blacklist-header h3 {
  margin: 0;
  font-size: 18px;
  color: var(--text);
}

.blacklist-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.blacklist-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(88, 193, 255, 0.3);
}

.blacklist-value {
  font-family: 'Courier New', monospace;
  color: var(--text);
  font-size: 14px;
}

.btn--sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn--danger {
  background: rgba(220, 38, 38, 0.1);
  color: #f87171;
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.btn--danger:hover {
  background: rgba(220, 38, 38, 0.2);
  border-color: rgba(220, 38, 38, 0.5);
}

.status-text--success {
  color: #4ade80;
}

.btn--secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.helper { color: var(--muted); font-size: 0.9rem; }

.status-text { 
  font-size: 0.95rem; 
  margin-top: 8px; 
  min-height: 18px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.status-text--error { 
  color: var(--danger);
  animation: shake 0.4s ease;
}

.status-text--success { 
  color: var(--success);
  animation: slideInSuccess 0.4s ease;
}

@keyframes slideInSuccess {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.bots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
}

.bot-card {
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 12px;
  box-shadow: var(--shadow);
}

.bot-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bot-meta { color: var(--muted); font-size: 0.9rem; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
}

.badge--online { color: #22c55e; background: rgba(34, 197, 94, 0.14); }
.badge--offline { color: #f97316; background: rgba(249, 115, 22, 0.16); }

.card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.checkbox-row { display: flex; gap: 10px; align-items: center; }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: background 0.2s;
}

.checkbox-label:hover {
  background: rgba(255, 255, 255, 0.03);
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  cursor: pointer;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 6px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.tab-btn {
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 500;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-content {
  min-height: 200px;
}

.bot-card--expanded {
  grid-column: 1 / -1;
}

.loading {
  text-align: center;
  color: var(--muted);
  padding: 20px;
}

.section-group {
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.section-title {
  margin: 0 0 12px 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.btn--accent {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
}

.btn--accent:hover {
  background: linear-gradient(135deg, #5568d3 0%, #63408a 100%);
  transform: translateY(-1px);
}

.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.account-card, .user-card {
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
}

.account-header, .user-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.account-details, .user-card__info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
}

.account-details div, .user-card__info div {
  display: flex;
  gap: 6px;
}

.account-details strong, .user-card__info strong {
  color: var(--muted);
  min-width: 110px;
}

.subtle {
  color: var(--muted);
  font-size: 0.9rem;
}

.hero {
  max-width: 520px;
  padding: 32px;
}

.eyebrow {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 16px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h1 {
  margin: 0 0 20px 0;
  font-size: 2.5rem;
  line-height: 1.2;
  font-weight: 800;
}

.embed-editor-container {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.embed-preview h4,
.embed-form h4 {
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--text);
  font-size: 16px;
}

.discord-embed {
  background: rgba(47, 49, 54, 0.8);
  border-left: 4px solid #5865F2;
  border-radius: 4px;
  padding: 16px;
  color: #dcddde;
  max-width: 520px;
}

.embed-author {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.embed-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #ffffff;
}

.embed-description {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 8px;
  white-space: pre-wrap;
}

.embed-field {
  margin-top: 12px;
  font-size: 14px;
}

.embed-field strong {
  color: #ffffff;
}

.embed-footer {
  font-size: 12px;
  margin-top: 12px;
  color: #b9bbbe;
}

.embed-form label {
  display: block;
  margin-top: 16px;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.embed-form label:first-of-type {
  margin-top: 0;
}

@media (max-width: 1024px) {
  .embed-editor-container {
    grid-template-columns: 1fr;
  }
}

.button-types {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.button-types .btn--small {
  flex: 0 0 auto;
}

.editor-container {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.preset-item {
  transition: all 0.2s ease;
}

.preset-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(88, 193, 255, 0.3) !important;
}

.button-preview {
  padding: 16px;
  background: rgba(47, 49, 54, 0.5);
  border-radius: 6px;
  border: 1px solid var(--border);
}

.button-preview h5 {
  margin: 0 0 12px 0;
  color: var(--text);
  font-size: 14px;
}

.auth-shell {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 32px;
  align-items: start;
}

.panel--ghost { 
  background: rgba(255, 255, 255, 0.02); 
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn--discord {
  background: #5865F2 !important;
  color: white !important;
  font-weight: 600;
  padding: 14px 24px;
  font-size: 15px;
}

.btn--discord:hover {
  background: #4752C4 !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(88, 101, 242, 0.5) !important;
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 8px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.divider span {
  padding: 0 12px;
}

.grid--1 {
  grid-template-columns: 1fr;
}

/* Auth Page Styles */
.page--auth {
  background: 
    radial-gradient(circle at 20% 20%, rgba(88, 193, 255, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
    var(--bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.auth-hero {
  text-align: center;
  margin-bottom: 48px;
}

.auth-logo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}

.auth-logo {
  width: 120px;
  height: 120px;
  filter: drop-shadow(0 0 40px rgba(88, 193, 255, 0.8));
  animation: pulse 3s ease-in-out infinite;
}

.auth-brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.auth-title {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 16px 0;
  color: var(--text);
  text-align: center;
}

.auth-subtitle {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.auth-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

.auth-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  backdrop-filter: blur(20px);
  transition: all 0.3s;
}

.auth-panel:hover {
  border-color: rgba(88, 193, 255, 0.3);
  transform: translateY(-2px);
}

.auth-panel--secondary {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-panel__header {
  margin-bottom: 24px;
}

.auth-panel__header h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--text);
}

.auth-panel__header p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.auth-panel__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.form-field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s;
}

.form-field input:hover {
  border-color: rgba(88, 193, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.form-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88, 193, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.form-field .helper {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 8px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.auth-divider span {
  padding: 0 12px;
}

.auth-redeem {
  margin-top: 32px;
}

.redeem-grid {
  display: grid;
  grid-template-columns: 2fr 2fr auto;
  gap: 16px;
  align-items: end;
}

.status-text {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  display: none;
}

.status-text.error {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
}

.status-text.success {
  display: block;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--success);
}

.status-text.info {
  display: block;
  background: rgba(88, 193, 255, 0.1);
  border: 1px solid rgba(88, 193, 255, 0.3);
  color: var(--accent);
}

@media (max-width: 968px) {
  .auth-panels {
    grid-template-columns: 1fr;
  }
  
  .redeem-grid {
    grid-template-columns: 1fr;
  }
  
  .auth-title {
    font-size: 32px;
  }
}

@media (max-width: 720px) {
  .topbar { position: static; }
  .page { padding: 18px 14px; }
}

/* ===== WELCOME SCREEN ===== */
.welcome-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, rgba(10, 10, 15, 0.98) 0%, rgba(19, 19, 26, 0.98) 100%);
  backdrop-filter: blur(30px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.5s ease-out;
}

.welcome-overlay.hidden {
  animation: fadeOut 0.5s ease-out forwards;
  pointer-events: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.welcome-content {
  max-width: 900px;
  text-align: center;
  padding: 48px;
  animation: slideUp 0.8s ease-out 0.2s backwards;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.welcome-logo {
  margin-bottom: 32px;
}

.logo-circle {
  width: 120px;
  height: 120px;
  margin: 0 auto;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 60px rgba(88, 193, 255, 0.3);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 60px rgba(88, 193, 255, 0.3);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 80px rgba(88, 193, 255, 0.5);
    transform: scale(1.05);
  }
}

.welcome-title {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 16px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-subtitle {
  font-size: 20px;
  color: var(--muted);
  margin-bottom: 48px;
}

.welcome-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.welcome-step {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 24px;
  transition: all 0.3s;
}

.welcome-step:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 30px rgba(88, 193, 255, 0.2);
}

.step-icon {
  font-size: 48px;
  margin-bottom: 16px;
  line-height: 1;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  display: inline-block;
}

.welcome-step h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.welcome-step p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.btn--large {
  padding: 16px 48px;
  font-size: 16px;
  font-weight: 700;
}

.welcome-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 48px;
}

.welcome-btn {
  min-width: 200px;
}

.welcome-skip {
  color: var(--muted);
  font-size: 14px;
}

.welcome-skip:hover {
  color: var(--text);
}

/* ===== SIDEBAR NAVIGATION ===== */
.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px 24px;
  margin-bottom: 8px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.sidebar-brand-text {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.sidebar-nav {
  flex: 1;
  padding: 0 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 4px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s;
  font-weight: 500;
  font-size: 14px;
}

.nav-item:hover {
  background: var(--bg-tertiary);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 12px rgba(88, 193, 255, 0.3);
}

.nav-icon {
  font-size: 18px;
  width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
}

.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 12px;
}

.sidebar-footer {
  padding: 0 24px;
  margin-top: 16px;
}

.btn--block {
  width: 100%;
  text-align: center;
  justify-content: center;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: 260px;
  flex: 1;
  padding: 16px 40px 32px;
  max-width: 100%;
}

.dashboard-section {
  display: none;
  margin-bottom: 48px;
  animation: fadeIn 0.3s ease-out;
}

.dashboard-section.active {
  display: block;
}

.dashboard-section:first-child {
  margin-top: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-header {
  margin-bottom: 24px;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}

.section-subtitle {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
}

/* ===== IMPROVED STATS ===== */
.stat {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  transition: all 0.3s;
}

.stat:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(88, 193, 255, 0.15);
}

.stat-icon {
  font-size: 32px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: 12px;
  border: 1px solid var(--border);
  line-height: 1;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
}

.stat__label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 4px;
}

.stat__value {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

/* ===== HELP FEATURES ===== */
.help-tip {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  transition: all 0.3s;
}

.help-tip:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: scale(1.1);
}

.help-tooltip {
  position: fixed;
  top: 50%;
  right: 24px;
  transform: translateY(-50%);
  width: 320px;
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateY(-50%) translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

.help-tooltip-content h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.help-tooltip-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.help-tooltip-content li {
  padding: 8px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.help-tooltip-content li strong {
  color: var(--accent);
  font-weight: 600;
}

.help-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
}

.help-close:hover {
  background: var(--bg-tertiary);
  color: var(--text);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
  .sidebar {
    width: 80px;
  }

  .sidebar-brand-text,
  .nav-text {
    display: none;
  }

  .main-content {
    margin-left: 80px;
  }

  .sidebar-nav {
    padding: 0 8px;
  }

  .nav-item {
    justify-content: center;
  }

  .sidebar-footer {
    padding: 0 12px;
  }

  .welcome-title {
    font-size: 36px;
  }

  .welcome-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .dashboard-wrapper {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
  }

  .sidebar-nav {
    display: flex;
    overflow-x: auto;
    padding: 0 12px;
  }

  .nav-item {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .sidebar-brand-text,
  .nav-text {
    display: inline;
  }

  .main-content {
    margin-left: 0;
    padding: 24px 16px;
  }

  .welcome-content {
    padding: 24px;
  }

  .welcome-title {
    font-size: 28px;
  }

  .section-title {
    font-size: 24px;
  }
}
