/* ========================================
   Account pages — login + dashboard
   ======================================== */

.account-page {
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.account-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 24px;
}

/* ─── Card ────────────────────────────────── */

.account-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 40px;
  width: 100%;
  max-width: 460px;
}

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

.account-card-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--fg);
  letter-spacing: -0.03em;
  margin: 12px 0 8px;
}

.account-card-header p {
  color: var(--fg-body);
  font-size: 0.95rem;
}

/* ─── Form ────────────────────────────────── */

.account-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.form-field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg);
}

.form-field input {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  color: var(--fg);
  background: var(--bg-white);
  transition: border-color 0.15s;
  outline: none;
}

.form-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}

/* ─── Buttons ──────────────────────────────── */

.btn-primary {
  padding: 11px 20px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  padding: 8px 16px;
  background: transparent;
  color: var(--fg-body);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.btn-ghost:hover {
  background: var(--bg-accent);
}

/* ─── Alerts ──────────────────────────────── */

.account-success {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  border-radius: var(--radius-sm);
  color: var(--green);
  margin-bottom: 16px;
}

.account-success svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.account-success strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.account-success p {
  font-size: 0.875rem;
  color: var(--fg-body);
}

.account-error {
  padding: 12px 14px;
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.account-hint {
  text-align: center;
  font-size: 0.875rem;
  color: var(--fg-muted);
  margin-top: 20px;
}

.account-hint a {
  color: var(--accent);
  text-decoration: none;
}

.account-hint a:hover {
  text-decoration: underline;
}

/* ─── Dashboard ───────────────────────────── */

.account-container {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.account-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.account-greeting {
  font-size: 0.875rem;
  color: var(--fg-muted);
  margin-bottom: 4px;
}

.account-business {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--fg);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 8px;
}

.account-plan {
  display: flex;
  align-items: center;
  gap: 12px;
}

.plan-badge {
  padding: 3px 10px;
  background: var(--accent-lighter);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 99px;
}

.account-email {
  font-size: 0.875rem;
  color: var(--fg-muted);
}

.logout-form {
  flex-shrink: 0;
}

/* ─── Dashboard card ─────────────────────── */

.dashboard-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 28px;
}

.dashboard-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.dashboard-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-lighter);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dashboard-card-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.02em;
}

.dashboard-card-header p {
  font-size: 0.875rem;
  color: var(--fg-body);
  margin-top: 2px;
}

/* ─── Referral link ─────────────────────── */

.referral-link-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 8px;
}

.referral-url-row {
  display: flex;
  gap: 8px;
}

.referral-url-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--fg-body);
  background: var(--bg);
  cursor: text;
  outline: none;
}

.referral-url-input:focus {
  border-color: var(--accent);
}

.btn-copy {
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  min-width: 72px;
}

.btn-copy:hover {
  background: var(--accent-hover);
}

/* ─── Referral stats ────────────────────── */

.referral-stats {
  display: flex;
  align-items: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

.referral-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.referral-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--fg);
  letter-spacing: -0.04em;
}

.referral-stat-label {
  font-size: 0.8rem;
  color: var(--fg-muted);
  font-weight: 500;
}

.referral-stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-light);
}

.referral-info {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--bg-accent);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--fg-body);
}

.referral-info strong {
  color: var(--accent);
}

/* ─── Quick links ───────────────────────── */

.dashboard-quick-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg-body);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.quick-link:hover {
  border-color: var(--accent);
  background: var(--accent-lighter);
}

.quick-link svg {
  color: var(--green);
  flex-shrink: 0;
}