/* ── Variables ─────────────────────────────────────────── */
:root {
  --bg:         #080810;
  --surface:    #12121f;
  --surface2:   #1a1a2e;
  --border:     #2a2a45;
  --border-h:   #3d3d65;
  --primary:    #7c3aed;
  --primary-h:  #6d28d9;
  --primary-l:  #a78bfa;
  --accent:     #8b5cf6;
  --text:       #f0f0f8;
  --text-2:     #9090b8;
  --text-3:     #55557a;
  --success:    #10b981;
  --error:      #ef4444;
  --warning:    #f59e0b;
  --radius:     12px;
  --radius-s:   8px;
  --shadow:     0 8px 32px rgba(0,0,0,0.4);
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary-l); text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* ── Typography ────────────────────────────────────────── */
h1 { font-size: 2rem; font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.5rem; font-weight: 600; }
h3 { font-size: 1.125rem; font-weight: 600; }
p  { color: var(--text-2); }

/* ── Logo ──────────────────────────────────────────────── */
.logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}
.logo-sm { font-size: 1.25rem; }

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-s);
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-h), var(--primary));
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
}
.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--border);
  border-color: var(--border-h);
}
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface2); color: var(--text); }
.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--success); color: #fff; }
.btn-full { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 0.875rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn-loading { position: relative; color: transparent !important; }
.btn-loading::after {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ── Forms ─────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 8px;
}
.form-input {
  width: 100%;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-s);
  padding: 12px 16px;
  font-size: 0.9375rem;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}
.form-input::placeholder { color: var(--text-3); }
.form-input.error { border-color: var(--error); }

/* ── Alerts ────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-s);
  font-size: 0.875rem;
  margin-bottom: 20px;
  display: none;
}
.alert.show { display: block; }
.alert-error { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.alert-success { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3); color: #6ee7b7; }
.alert-info { background: rgba(124,58,237,0.12); border: 1px solid rgba(124,58,237,0.3); color: var(--primary-l); }

/* ── Auth layout ───────────────────────────────────────── */
.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-brand {
  background: linear-gradient(145deg, #0e0e1f 0%, #1a0a35 50%, #0e0e1f 100%);
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.auth-brand::before {
  content: "";
  position: absolute;
  top: -200px; right: -200px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(124,58,237,0.2) 0%, transparent 70%);
  pointer-events: none;
}
.auth-brand::after {
  content: "";
  position: absolute;
  bottom: -150px; left: -150px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(139,92,246,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.auth-brand-logo { margin-bottom: 48px; }
.auth-brand h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #f0f0f8 60%, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-brand p { font-size: 1.0625rem; color: #7070a0; max-width: 380px; }
.auth-features { margin-top: 48px; display: flex; flex-direction: column; gap: 16px; }
.auth-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #8080b0;
  font-size: 0.9375rem;
}
.auth-feature-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(124,58,237,0.2);
  border: 1px solid rgba(124,58,237,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.auth-form-side {
  background: var(--surface);
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-form-wrap { max-width: 400px; width: 100%; margin: 0 auto; }
.auth-form-header { margin-bottom: 32px; }
.auth-form-header h2 { color: var(--text); margin-bottom: 8px; }
.auth-form-header p { color: var(--text-2); font-size: 0.9375rem; }

/* Divider */
.divider {
  display: flex; align-items: center; gap: 16px;
  margin: 24px 0;
  color: var(--text-3);
  font-size: 0.875rem;
}
.divider::before, .divider::after {
  content: ""; flex: 1;
  height: 1px; background: var(--border);
}

/* Social buttons */
.btn-social {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  color: var(--text);
  width: 100%;
  padding: 11px 20px;
  border-radius: var(--radius-s);
  font-size: 0.9375rem;
  font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 10px;
}
.btn-social:hover { background: var(--border); border-color: var(--border-h); }
.btn-social svg { width: 20px; height: 20px; }

/* Auth footer */
.auth-footer {
  margin-top: 28px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-2);
}
.auth-footer a { color: var(--primary-l); font-weight: 500; }
.auth-footer a:hover { color: var(--accent); }

/* ── Navbar ────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8,8,16,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.navbar-left { display: flex; align-items: center; gap: 32px; }
.navbar-right { display: flex; align-items: center; gap: 12px; }
.navbar-nav { display: flex; gap: 4px; }
.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-s);
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}
.nav-link:hover, .nav-link.active {
  background: var(--surface2);
  color: var(--text);
}

/* Credits badge */
.credits-badge {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.875rem;
  color: var(--text-2);
}
.credits-badge .amount {
  font-weight: 600;
  color: var(--primary-l);
}

/* User menu */
.user-menu { position: relative; }
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.875rem;
  cursor: pointer;
  border: none;
  color: #fff;
  transition: opacity 0.2s;
}
.user-avatar:hover { opacity: 0.85; }
.dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 180px;
  padding: 6px;
  box-shadow: var(--shadow);
  display: none;
  z-index: 200;
}
.dropdown.open { display: block; }
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-s);
  color: var(--text-2);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.dropdown-item:hover { background: var(--border); color: var(--text); }
.dropdown-item.danger:hover { background: rgba(239,68,68,0.15); color: #fca5a5; }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ── Dashboard ─────────────────────────────────────────── */
.page { max-width: 1200px; margin: 0 auto; padding: 40px 24px; }
.page-title { font-size: 1.75rem; font-weight: 700; margin-bottom: 4px; }
.page-subtitle { color: var(--text-2); font-size: 0.9375rem; }

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: 32px 0;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.stat-label { font-size: 0.8125rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--text); margin-top: 4px; }
.stat-sub { font-size: 0.8125rem; color: var(--text-3); margin-top: 4px; }

/* Tools grid */
.section-title {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  font-weight: 600;
  margin-bottom: 16px;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}
.tool-card:hover {
  border-color: var(--border-h);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.tool-card.disabled {
  opacity: 0.6;
  cursor: default;
}
.tool-card.disabled:hover { transform: none; box-shadow: none; }
.tool-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.25);
}
.tool-name { font-size: 1rem; font-weight: 600; color: var(--text); }
.tool-desc { font-size: 0.875rem; color: var(--text-2); line-height: 1.5; flex: 1; }
.tool-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 4px;
}
.tool-badge {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 600;
}
.badge-free { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.badge-pro { background: rgba(245,158,11,0.15); color: #fcd34d; border: 1px solid rgba(245,158,11,0.3); }
.badge-soon { background: rgba(90,90,120,0.3); color: var(--text-3); border: 1px solid var(--border); }

/* Plan banner */
.plan-banner {
  background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(139,92,246,0.05));
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}
.plan-info { display: flex; flex-direction: column; gap: 4px; }
.plan-name { font-weight: 700; font-size: 1rem; color: var(--primary-l); }
.plan-detail { font-size: 0.875rem; color: var(--text-2); }

/* ── Admin ─────────────────────────────────────────────── */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 64px);
}
.admin-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 12px;
}
.sidebar-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  padding: 0 12px;
  margin-bottom: 8px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-s);
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
  border: none; background: none; width: 100%; text-align: left;
}
.sidebar-link:hover, .sidebar-link.active {
  background: var(--surface2);
  color: var(--text);
}
.admin-main { padding: 40px; }
.admin-section { display: none; }
.admin-section.active { display: block; }

/* Tables */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.table-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
}
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
td {
  padding: 12px 16px;
  font-size: 0.875rem;
  color: var(--text-2);
  border-bottom: 1px solid rgba(42,42,69,0.5);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(26,26,46,0.5); }

/* Status badges */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-ok { background: rgba(16,185,129,0.15); color: #34d399; }
.badge-no { background: rgba(239,68,68,0.15); color: #fca5a5; }

/* Search */
.search-input {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 9px 14px;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  width: 240px;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--primary); }

/* ── Verify / Info pages ───────────────────────────────── */
.info-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 56px 48px;
  max-width: 500px; width: 100%;
  text-align: center;
}
.info-icon {
  width: 72px; height: 72px;
  border-radius: 20px;
  margin: 0 auto 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
}
.info-icon-success { background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.3); }
.info-icon-error { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.3); }
.info-icon-info { background: rgba(124,58,237,0.15); border: 1px solid rgba(124,58,237,0.3); }
.info-card h2 { margin-bottom: 12px; }
.info-card p { margin-bottom: 32px; line-height: 1.7; }
.info-meta {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 12px 16px;
  font-size: 0.875rem;
  color: var(--text-3);
  margin-bottom: 24px;
  text-align: left;
}

/* ── Animations ────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fade-in { animation: fadeIn 0.3s ease; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-form-side { padding: 40px 24px; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .tools-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .navbar { padding: 0 16px; }
  .page { padding: 24px 16px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .info-card { padding: 40px 24px; }
  h1 { font-size: 1.5rem; }
}
