/* NileCapitalCollective - Auth & Payment Styles */
/* Matches the dark financial aesthetic of the main site */

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

:root {
  --gold: #c9a84c;
  --gold-light: #e8c96d;
  --dark: #0a0a0a;
  --dark-2: #111111;
  --dark-3: #1a1a1a;
  --dark-4: #222222;
  --border: #2a2a2a;
  --text: #e8e8e8;
  --text-muted: #888;
  --green: #22c55e;
  --red: #ef4444;
  --radius: 10px;
}

body {
  background: var(--dark);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── HEADER ── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--dark-2);
}

.site-header .logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.05em;
}

.site-header nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.site-header nav a:hover { color: var(--gold); }

/* ── MAIN LAYOUT ── */
.auth-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
}

.auth-card {
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
}

.auth-card h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.auth-card h1 span { color: var(--gold); }

.auth-card .subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

/* ── FORM ELEMENTS ── */
.field {
  margin-bottom: 1.2rem;
}

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.field input {
  width: 100%;
  background: var(--dark-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.field input:focus {
  border-color: var(--gold);
}

.field input::placeholder { color: #444; }

.btn-primary {
  width: 100%;
  background: var(--gold);
  color: #000;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.85rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 0.5rem;
  letter-spacing: 0.02em;
}

.btn-primary:hover { background: var(--gold-light); }
.btn-primary:active { transform: scale(0.99); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.auth-switch {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.auth-switch a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}

.auth-switch a:hover { text-decoration: underline; }

/* ── MESSAGES ── */
.msg {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.88rem;
  margin-bottom: 1rem;
  display: none;
}

.msg.error {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
  display: block;
}

.msg.success {
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.3);
  color: #86efac;
  display: block;
}

/* ── DIVIDER ── */
.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

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

/* ── PAYMENT PAGE ── */
.payment-wrapper {
  flex: 1;
  padding: 3rem 1rem;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.payment-wrapper h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.payment-wrapper h1 span { color: var(--gold); }

.payment-wrapper .subtitle {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.billing-toggle {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.billing-toggle span {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--dark-4);
  border: 1px solid var(--border);
  border-radius: 28px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}

.toggle-switch input:checked + .toggle-slider { background: var(--gold); }
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(24px);
  background: #000;
}

.billing-label.active { color: var(--gold); font-weight: 600; }

.tiers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.tier-card {
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.1s;
  position: relative;
}

.tier-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.tier-card.selected {
  border-color: var(--gold);
  background: rgba(201,168,76,0.06);
}

.tier-card .badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: #000;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tier-card .tier-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.tier-card .tier-price {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 0.2rem;
}

.tier-card .tier-period {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.tier-card ul {
  list-style: none;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.tier-card ul li {
  padding: 0.2rem 0;
}

.tier-card ul li::before {
  content: '✓ ';
  color: var(--green);
}

.checkout-bar {
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.checkout-bar .summary {
  font-size: 0.9rem;
}

.checkout-bar .summary strong {
  color: var(--gold);
  font-size: 1.1rem;
}

.btn-checkout {
  background: var(--gold);
  color: #000;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.85rem 2.5rem;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.btn-checkout:hover { background: var(--gold-light); }
.btn-checkout:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── DASHBOARD ── */
.dashboard-wrapper {
  flex: 1;
  padding: 2rem 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.dashboard-header h1 { font-size: 1.5rem; }
.dashboard-header h1 span { color: var(--gold); }

.btn-logout {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.btn-logout:hover { border-color: var(--red); color: var(--red); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.stat-card .label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.stat-card .value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
}

.stat-card .sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.upgrade-banner {
  background: linear-gradient(135deg, rgba(201,168,76,0.08), rgba(201,168,76,0.02));
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  margin-top: 1.5rem;
}

.upgrade-banner h2 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.upgrade-banner p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }

.btn-upgrade {
  display: inline-block;
  background: var(--gold);
  color: #000;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.75rem 2rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-upgrade:hover { background: var(--gold-light); }

/* ── SUCCESS PAGE ── */
.success-card {
  text-align: center;
  max-width: 500px;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: rgba(34,197,94,0.12);
  border: 2px solid rgba(34,197,94,0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 1.8rem;
}

.success-card h1 { font-size: 1.8rem; margin-bottom: 0.5rem; }
.success-card p { color: var(--text-muted); margin-bottom: 2rem; }

/* ── FOOTER ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .auth-card { padding: 1.8rem 1.5rem; }
  .tiers-grid { grid-template-columns: 1fr 1fr; }
  .checkout-bar { flex-direction: column; align-items: stretch; }
  .btn-checkout { text-align: center; }
}

@media (max-width: 400px) {
  .tiers-grid { grid-template-columns: 1fr; }
}
