/* ============================================================
   SubHub – Main Stylesheet
   Space Grotesk + Inter | Deep navy + electric violet palette
   ============================================================ */

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

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  --bg:       #0a0d16;
  --surface:  #111827;
  --surface2: #1a2235;
  --border:   #1f2d45;
  --accent:   #7c3aed;
  --accent2:  #a78bfa;
  --success:  #10b981;
  --warning:  #f59e0b;
  --danger:   #ef4444;
  --text:     #e2e8f0;
  --muted:    #64748b;
  --white:    #ffffff;
  --radius:   12px;
  --radius-sm:8px;
  --shadow:   0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 40px rgba(124,58,237,0.15);
  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition: 0.2s ease;
}

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

main { flex: 1; }
a { color: var(--accent2); text-decoration: none; }
a:hover { color: var(--white); }
img { max-width: 100%; display: block; }

/* ── Typography ─────────────────────────────────────────────── */
h1,h2,h3,h4,h5 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }

/* ── Nav ────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,13,22,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: 1200px;
  margin: auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.logo-dot {
  display: inline-block;
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav__link { color: var(--muted); font-size: 0.9rem; transition: color var(--transition); }
.nav__link:hover { color: var(--white); }
.nav__link--admin { color: var(--warning) !important; }
.nav__link--logout { color: var(--danger); }
.nav__burger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; }
.nav__burger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn--primary { background: var(--accent); color: var(--white); box-shadow: 0 4px 14px rgba(124,58,237,0.3); }
.btn--primary:hover { background: #6d28d9; box-shadow: 0 4px 20px rgba(124,58,237,0.5); transform: translateY(-1px); }
.btn--secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn--secondary:hover { background: var(--border); }
.btn--success { background: var(--success); color: var(--white); }
.btn--danger  { background: var(--danger);  color: var(--white); }
.btn--warning { background: var(--warning); color: #000; }
.btn--sm { padding: 0.4rem 1rem; font-size: 0.8rem; }
.btn--lg { padding: 0.8rem 2rem; font-size: 1rem; }
.btn--full { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── Forms ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.2rem; }
.form-label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.4rem; font-weight: 500; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}
.form-select option { background: var(--surface); }
.form-hint { font-size: 0.8rem; color: var(--muted); margin-top: 0.3rem; }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card--hover:hover { border-color: var(--accent); box-shadow: var(--shadow-glow); }

/* ── Alerts ─────────────────────────────────────────────────── */
.alert {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.alert--success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); color: var(--success); }
.alert--danger  { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.3);  color: var(--danger); }
.alert--warning { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3); color: var(--warning); }
.alert--info    { background: rgba(124,58,237,0.1); border: 1px solid rgba(124,58,237,0.3); color: var(--accent2); }

/* ── Badge ──────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge--pending   { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge--active    { background: rgba(16,185,129,0.15);  color: var(--success); }
.badge--rejected  { background: rgba(239,68,68,0.15);   color: var(--danger); }
.badge--suspended { background: rgba(100,116,139,0.15); color: var(--muted); }

/* ── Table ──────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.table th, .table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.table th { font-family: var(--font-head); font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.table tbody tr:hover { background: var(--surface2); }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(124,58,237,0.25) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(167,139,250,0.1) 0%, transparent 60%);
  pointer-events: none;
}
.hero__eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 1rem;
  font-weight: 600;
}
.hero__title { margin-bottom: 1.2rem; }
.hero__title span { color: var(--accent2); }
.hero__sub { color: var(--muted); max-width: 520px; margin: 0 auto 2.5rem; font-size: 1.05rem; }

/* ── Search Box ─────────────────────────────────────────────── */
.search-box {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  max-width: 700px;
  width: 100%;
  margin: 0 auto 1rem;
}
.search-box__input {
  flex: 1;
  min-width: 180px;
  padding: 0.85rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font-head);
}
.search-box__input::placeholder { color: var(--muted); }
.search-box__input:focus { outline: none; border-color: var(--accent); }
.search-box__select {
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
}
.search-box__select option { background: var(--surface); }
.search-result {
  max-width: 700px;
  width: 100%;
  margin: 0.5rem auto 0;
}

/* ── Features Grid ──────────────────────────────────────────── */
.features { padding: 5rem 1.5rem; max-width: 1100px; margin: auto; }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title p { color: var(--muted); margin-top: 0.5rem; }
.features__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition: all var(--transition);
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.feature-card__icon { font-size: 2rem; margin-bottom: 1rem; }
.feature-card__title { font-family: var(--font-head); font-size: 1.05rem; margin-bottom: 0.5rem; }
.feature-card__text { color: var(--muted); font-size: 0.9rem; }

/* ── Dashboard ──────────────────────────────────────────────── */
.dashboard { max-width: 1100px; margin: 2rem auto; padding: 0 1.5rem; }
.dashboard__header { margin-bottom: 2rem; }
.dashboard__header h1 { font-size: 1.8rem; }
.dashboard__header p { color: var(--muted); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.stat-card__icon { font-size: 1.5rem; width: 44px; height: 44px; background: rgba(124,58,237,0.1); border-radius: var(--radius-sm); display: grid; place-items: center; }
.stat-card__num { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; }
.stat-card__label { color: var(--muted); font-size: 0.8rem; }

/* ── Auth Pages ─────────────────────────────────────────────── */
.auth-page {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
}
.auth-card__logo {
  text-align: center;
  margin-bottom: 2rem;
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
}
.auth-card__title { font-size: 1.4rem; margin-bottom: 0.3rem; }
.auth-card__sub   { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.8rem; }
.auth-card__footer { text-align: center; margin-top: 1.5rem; color: var(--muted); font-size: 0.85rem; }

/* ── Admin ──────────────────────────────────────────────────── */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
}
.admin-sidebar__logo { padding: 0 1.5rem 1.5rem; font-family: var(--font-head); font-size: 1.2rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.admin-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  transition: all var(--transition);
}
.admin-sidebar__link:hover,
.admin-sidebar__link.active { color: var(--white); background: rgba(124,58,237,0.1); border-right: 2px solid var(--accent); }
.admin-sidebar__link i { width: 16px; }
.admin-main { flex: 1; overflow-x: hidden; padding: 2rem; }
.admin-header { margin-bottom: 2rem; }
.admin-header h1 { font-size: 1.6rem; }

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 500px;
  animation: slideUp 0.2s ease;
}
@keyframes slideUp { from { opacity:0; transform: translateY(20px); } }
.modal__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal__close { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.2rem; }
.modal__close:hover { color: var(--white); }

/* ── Tabs ───────────────────────────────────────────────────── */
.tabs { display: flex; gap: 0.3rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.tab-btn {
  padding: 0.6rem 1.2rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  margin-bottom: -1px;
}
.tab-btn.active { color: var(--white); border-bottom-color: var(--accent); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── Utilities ──────────────────────────────────────────────── */
.container { max-width: 1100px; margin: auto; padding: 0 1.5rem; }
.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:1rem}.mt-4{margin-top:1.5rem}.mt-5{margin-top:2rem}
.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:1rem}.mb-4{margin-bottom:1.5rem}
.flex{display:flex}.flex-center{justify-content:center;align-items:center}
.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:1rem}.gap-4{gap:1.5rem}
.text-muted{color:var(--muted)}.text-sm{font-size:.85rem}.text-center{text-align:center}
.w-full{width:100%}.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:1rem}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
}
.footer__inner { max-width: 1100px; margin: auto; }
.footer__brand { font-family: var(--font-head); font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 0.4rem; margin-bottom: 0.5rem; }
.footer__copy { color: var(--muted); font-size: 0.85rem; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav__links { display: none; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: var(--surface); padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); gap: 0.8rem; }
  .nav__links.open { display: flex; }
  .nav__burger { display: flex; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; padding: 1rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 3rem 1rem; }
}

/* ── Spinner ─────────────────────────────────────────────────── */
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3); border-top-color: var(--white); border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Domain result ──────────────────────────────────────────── */
.domain-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.domain-result-item .domain-name { font-family: var(--font-head); font-weight: 600; }
.domain-result-item .domain-avail { color: var(--success); font-size: 0.85rem; display: flex; align-items: center; gap: 0.3rem; }
.domain-result-item .domain-taken { color: var(--danger); font-size: 0.85rem; display: flex; align-items: center; gap: 0.3rem; }
