/* ═══════════════════════════════════════════════════
   HUB4CREATORS — DESIGN SYSTEM
   Aesthetic: Dark Creator Console
   Fonts: Syne (display) · DM Sans (body) · JetBrains Mono (code)
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Variables ───────────────────────────────────── */
:root {
  --bg:          #0b0b0e;
  --surface:     #131318;
  --surface-2:   #1a1a22;
  --surface-3:   #21212c;
  --border:      #212130;
  --border-2:    #2c2c3c;

  --accent:      #f97316;
  --accent-dim:  rgba(249, 115, 22, 0.15);
  --accent-glow: rgba(249, 115, 22, 0.28);

  --text:        #f0f0f8;
  --text-2:      #8888a8;
  --text-muted:  #484860;

  --green:       #22c55e;
  --green-bg:    rgba(34, 197, 94, 0.1);
  --red:         #f43f5e;
  --red-bg:      rgba(244, 63, 94, 0.1);
  --amber:       #fbbf24;
  --amber-bg:    rgba(251, 191, 36, 0.1);
  --blue:        #60a5fa;
  --blue-bg:     rgba(96, 165, 250, 0.1);

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --r:    6px;
  --r-lg: 12px;
  --r-xl: 16px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ── Base ────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { display: block; max-width: 100%; }
code, pre, .mono { font-family: var(--font-mono); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

/* ── Layout ──────────────────────────────────────── */
main.main-content {
  flex: 1;
  padding: 40px 24px;
  max-width: 1160px;
  margin: 0 auto;
  width: 100%;
}

/* ── Navigation ──────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 11, 14, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.04em;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.logo-mark {
  width: 22px;
  height: 22px;
  background: var(--accent);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: white;
  font-weight: 800;
  flex-shrink: 0;
}

.logo:hover { text-decoration: none; color: var(--text); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  padding: 6px 11px;
  border-radius: var(--r);
  transition: color 150ms, background 150ms;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

/* Cart */
.cart-btn {
  position: relative;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r);
  color: var(--text-2);
  transition: color 150ms, background 150ms;
  text-decoration: none;
  font-size: 1rem;
}

.cart-btn:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }

.cart-badge {
  position: absolute;
  top: 1px; right: 1px;
  background: var(--accent);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 99px;
  padding: 1px 4px;
  min-width: 15px;
  text-align: center;
  line-height: 1.4;
}

/* User dropdown */
.user-dropdown { position: relative; }

.user-menu-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r);
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  color: var(--text-2);
  cursor: pointer;
  font-size: 0.8rem;
  transition: color 150ms, border-color 150ms, background 150ms;
}

.user-menu-btn:hover {
  color: var(--text);
  border-color: var(--border-2);
  background: var(--surface-3);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 176px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  padding: 5px;
  flex-direction: column;
  z-index: 200;
}

.dropdown-username {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  padding: 6px 10px 4px;
  cursor: default;
  letter-spacing: 0.01em;
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 6px;
}

.dropdown-item {
  padding: 7px 10px;
  border-radius: var(--r);
  font-size: 0.85rem;
  color: var(--text-2);
  text-decoration: none;
  display: block;
  transition: color 150ms, background 150ms;
}

.dropdown-item:hover {
  color: var(--text);
  background: var(--surface-3);
  text-decoration: none;
}

/* ── Footer ──────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 18px 24px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: auto;
}

.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text-2); text-decoration: none; }

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--r);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: opacity 120ms, box-shadow 150ms, transform 120ms var(--ease), background 120ms;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: #fb8c38;
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border-2);
}
.btn-secondary:hover {
  background: var(--surface-3);
  color: var(--text);
}

.btn-danger {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(244, 63, 94, 0.25);
}
.btn-danger:hover { background: rgba(244, 63, 94, 0.2); }

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

.btn-sm { padding: 6px 12px; font-size: 0.8125rem; }
.btn-lg { padding: 12px 24px; font-size: 0.95rem; }

/* ── Forms ───────────────────────────────────────── */
label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 5px;
  letter-spacing: 0.01em;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.5;
  transition: border-color 150ms, box-shadow 150ms;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

input::placeholder, textarea::placeholder { color: var(--text-muted); }

.form-group { margin-bottom: 14px; }
.form-group:last-child { margin-bottom: 0; }

.form-error {
  font-size: 0.78rem;
  color: var(--red);
  margin-top: 4px;
  display: block;
}

.form-help {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

.non-field-error {
  background: var(--red-bg);
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-radius: var(--r);
  color: var(--red);
  padding: 10px 14px;
  font-size: 0.875rem;
  margin-bottom: 16px;
}

/* ── Cards ───────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
}

.card + .card { margin-top: 16px; }

/* ── Alerts / Messages ───────────────────────────── */
.alert {
  display: flex;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--r);
  font-size: 0.875rem;
  border: 1px solid transparent;
  margin-bottom: 12px;
  align-items: flex-start;
}
.alert:last-child { margin-bottom: 0; }
.alert p { margin: 0; }

.alert-success { background: var(--green-bg); border-color: rgba(34,197,94,.2); color: var(--green); }
.alert-error   { background: var(--red-bg);   border-color: rgba(244,63,94,.2);  color: var(--red);   }
.alert-warning { background: var(--amber-bg); border-color: rgba(251,191,36,.2); color: var(--amber); }
.alert-info    { background: var(--blue-bg);  border-color: rgba(96,165,250,.2); color: var(--blue);  }

.messages-stack { margin-bottom: 24px; }

/* ── Badges ──────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.badge-green  { background: var(--green-bg);  color: var(--green);  }
.badge-amber  { background: var(--amber-bg);  color: var(--amber);  }
.badge-red    { background: var(--red-bg);    color: var(--red);    }
.badge-blue   { background: var(--blue-bg);   color: var(--blue);   }
.badge-muted  { background: var(--surface-2); color: var(--text-muted); }

/* ── Tables ──────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
}

table { width: 100%; border-collapse: collapse; }

th {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  padding: 10px 16px;
  background: var(--surface-2);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 13px 16px;
  font-size: 0.875rem;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tbody tr { transition: background 120ms; }
tbody tr:hover { background: var(--surface-2); }

/* ── Page header ─────────────────────────────────── */
.page-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.page-header h1 { font-size: 1.6rem; margin-bottom: 4px; }
.page-header p  { color: var(--text-2); font-size: 0.875rem; margin: 0; }

.section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ── Auth pages ──────────────────────────────────── */
.auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-xl);
  padding: 32px;
}

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

.auth-header h1 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.auth-header p {
  font-size: 0.875rem;
  color: var(--text-2);
  margin: 0;
}

.auth-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

.auth-alt {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-2);
}

/* ── Landing page ────────────────────────────────── */
.hero {
  padding: 80px 0 64px;
  text-align: center;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-dim);
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 99px;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 22px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin-bottom: 18px;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-desc {
  max-width: 520px;
  margin: 0 auto 32px;
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1.75;
}

.hero-desc strong { color: var(--text); font-weight: 500; }

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Feature strip */
.features-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin: 52px 0;
}

.feature-item {
  background: var(--surface);
  padding: 24px 20px;
}

.feature-icon {
  font-size: 1.4rem;
  margin-bottom: 10px;
  line-height: 1;
}

.feature-item h3 {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.feature-item p {
  font-size: 0.8rem;
  color: var(--text-2);
  margin: 0;
  line-height: 1.55;
}

/* Pricing */
.pricing-section { margin-bottom: 64px; }

.pricing-header {
  text-align: center;
  margin-bottom: 32px;
}

.pricing-header h2 { font-size: 1.6rem; margin-bottom: 8px; }
.pricing-header p   { color: var(--text-2); margin: 0; }

.pricing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  max-width: 640px;
  margin: 0 auto 32px;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: border-color 200ms, box-shadow 200ms;
}

.pricing-card:hover {
  border-color: var(--border-2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.pricing-card.is-featured {
  border-color: rgba(249, 115, 22, 0.35);
  background: linear-gradient(145deg, rgba(249,115,22,0.05) 0%, var(--surface) 60%);
}

.pricing-card.is-featured:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 32px var(--accent-dim);
}

.pricing-card-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.pricing-card-note {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0;
}

.pricing-price-amount {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.05em;
  line-height: 1;
}

.pricing-price-period {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0;
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.45;
}

.pricing-features li .check {
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 0.75rem;
}

/* ── Account dashboard ───────────────────────────── */
.domain-table td:first-child {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
}

.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

/* ── Redirect management home ────────────────────── */
.domain-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.domain-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 150ms;
}

.domain-row:hover { border-color: var(--border-2); }

.domain-row-name {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  min-width: 0;
}

/* ── Redirect editor ─────────────────────────────── */
.redirect-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  margin-bottom: 28px;
}

.redirect-form-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 16px;
}

.redirect-form-row {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 10px;
  align-items: end;
}

.redirect-form-row .form-group { margin-bottom: 0; }

.redirects-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 0.875rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.path-cell {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
}

.target-cell {
  font-size: 0.8rem;
  color: var(--text-2);
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

/* ── Confirm / detail pages ──────────────────────── */
.confirm-wrap { max-width: 600px; }

.detail-list {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 20px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.detail-row:last-child { border-bottom: none; }
.detail-label  { color: var(--text-muted); flex-shrink: 0; }
.detail-value  { color: var(--text); font-weight: 500; text-align: right; }

.plan-change-row {
  display: grid;
  grid-template-columns: 1fr 28px 1fr;
  gap: 12px;
  align-items: center;
  text-align: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.plan-change-arrow { color: var(--text-muted); font-size: 1.25rem; }

.plan-label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; }
.plan-name  { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; }

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

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 20px;
  transition: color 150ms;
}

.back-link:hover { color: var(--text-2); text-decoration: none; }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 680px) {
  main.main-content { padding: 24px 16px; }

  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 2rem; }

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

  .pricing-cards { grid-template-columns: 1fr; max-width: 100%; }

  .page-header { flex-direction: column; }

  .redirect-form-row { grid-template-columns: 1fr; }

  .domain-row { flex-wrap: wrap; }

  .auth-card { padding: 24px; }

  .plan-change-row { grid-template-columns: 1fr; }
  .plan-change-arrow { display: none; }

  .nav-links { display: none; }

  .table-actions { justify-content: flex-start; }
}
