/* Billing pages — subscription dashboard + order history */

.billing-page {
  min-height: calc(100vh - 200px);
  padding: 100px 0 60px;
}

.page-header {
  margin-bottom: 40px;
}

.page-header h1 {
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 8px;
}

.page-sub {
  color: var(--fg-muted);
  font-size: 0.95rem;
}

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

/* --- Status Card --- */
.status-card {
  background: var(--bg-card);
  border: 1px solid rgba(201, 168, 76, 0.15);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 32px;
}

.status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.status-header h2 {
  font-size: 1.3rem;
  color: var(--fg);
}

.status-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.status-active {
  background: rgba(76, 175, 80, 0.15);
  color: #66bb6a;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.status-trialing {
  background: rgba(33, 150, 243, 0.15);
  color: #42a5f5;
  border: 1px solid rgba(33, 150, 243, 0.3);
}

.status-past_due {
  background: rgba(255, 152, 0, 0.15);
  color: #ffa726;
  border: 1px solid rgba(255, 152, 0, 0.3);
}

.status-canceled, .status-none {
  background: rgba(158, 158, 158, 0.15);
  color: #9e9e9e;
  border: 1px solid rgba(158, 158, 158, 0.3);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.status-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-label {
  font-size: 0.8rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-value {
  font-size: 1.1rem;
  color: var(--fg);
  font-weight: 600;
}

.cancel-warning {
  background: rgba(255, 152, 0, 0.1);
  border: 1px solid rgba(255, 152, 0, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 24px;
  color: #ffa726;
  font-size: 0.9rem;
}

.warning-icon {
  margin-right: 8px;
}

.status-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--sans);
}

.btn-primary {
  background: var(--gold);
  color: var(--bg);
}

.btn-primary:hover {
  background: #d4b35c;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
}

.btn-secondary:hover {
  background: var(--gold-glow);
}

.btn-sm {
  padding: 6px 16px;
  font-size: 0.85rem;
}

/* --- Orders Table --- */
.orders-table-wrap {
  overflow-x: auto;
  margin-bottom: 24px;
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.orders-table th {
  text-align: left;
  padding: 12px 16px;
  color: var(--fg-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(201, 168, 76, 0.15);
}

.orders-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--fg);
}

.orders-table tbody tr:hover {
  background: rgba(201, 168, 76, 0.04);
}

.order-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.order-status-paid {
  color: #66bb6a;
  background: rgba(76, 175, 80, 0.12);
}

.order-status-failed {
  color: #ef5350;
  background: rgba(244, 67, 54, 0.12);
}

.order-status-refunded {
  color: #ffa726;
  background: rgba(255, 152, 0, 0.12);
}

.invoice-link {
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
}

.invoice-link:hover {
  text-decoration: underline;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px 0;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 6px;
  color: var(--gold);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--gold-dim);
  transition: all 0.2s;
}

.page-btn:hover {
  background: var(--gold-glow);
}

.page-info {
  color: var(--fg-muted);
  font-size: 0.85rem;
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 80px 24px;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h2 {
  color: var(--fg);
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--fg-muted);
  font-size: 0.95rem;
}

/* --- Currency Toggle --- */
.pricing-header {
  text-align: center;
}

.currency-toggle {
  display: inline-flex;
  background: var(--bg-card);
  border-radius: 8px;
  border: 1px solid rgba(201, 168, 76, 0.15);
  padding: 3px;
  margin-top: 20px;
  gap: 2px;
}

.curr-btn {
  padding: 6px 18px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--fg-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--sans);
}

.curr-btn.active {
  background: var(--gold);
  color: var(--bg);
}

.curr-btn:hover:not(.active) {
  color: var(--fg);
}

/* --- Trial Banner --- */
.trial-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(33, 150, 243, 0.08);
  border: 1px solid rgba(33, 150, 243, 0.2);
  border-radius: 10px;
  padding: 14px 20px;
  margin-bottom: 32px;
  color: #64b5f6;
  font-size: 0.9rem;
}

.trial-icon {
  font-size: 1.2rem;
}

.trial-reassurance {
  text-align: center;
  color: var(--fg-muted);
  font-size: 0.85rem;
  margin-top: 12px;
}

/* --- Pricing Grid --- */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.pricing-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid rgba(201, 168, 76, 0.12);
  border-radius: 16px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s;
}

.pricing-card:hover {
  transform: translateY(-2px);
  border-color: rgba(201, 168, 76, 0.3);
}

.pricing-card-featured {
  border: 2px solid var(--gold);
  background: linear-gradient(180deg, rgba(201, 168, 76, 0.06) 0%, var(--bg-card) 40%);
}

.pricing-card-featured:hover {
  border-color: #d4b35c;
}

.card-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: linear-gradient(135deg, #c9a84c, #e0c068);
  color: #0a0a0a;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.card-header h3 {
  font-family: var(--sans);
  font-size: 1.3rem;
  color: var(--fg);
  margin-bottom: 2px;
}

.card-label {
  color: var(--fg-muted);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.card-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 4px;
}

.price-main {
  font-family: var(--sans);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.02em;
}

.price-period {
  color: var(--fg-muted);
  font-size: 1rem;
}

.price-alt {
  color: var(--fg-dim);
  font-size: 0.8rem;
  margin-bottom: 24px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px 0;
  flex: 1;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  color: var(--fg);
  font-size: 0.9rem;
}

.feature-list .check {
  color: #66bb6a;
  font-weight: 700;
  font-size: 0.9rem;
}

.feature-list .gold-check {
  color: var(--gold);
}

/* --- Subscribe Buttons --- */
.btn-subscribe {
  display: block;
  width: 100%;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  border: 1px solid var(--gold-dim);
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--sans);
  text-align: center;
}

.btn-subscribe:hover {
  background: var(--gold-glow);
  border-color: var(--gold);
  transform: translateY(-1px);
}

.btn-subscribe-gold {
  background: linear-gradient(135deg, #c9a84c, #b8860b);
  color: #0a0a0a;
  border: none;
}

.btn-subscribe-gold:hover {
  background: linear-gradient(135deg, #d4b35c, #c9a84c);
}

.btn-subscribe:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.pricing-footer-note {
  text-align: center;
  color: var(--fg-dim);
  font-size: 0.8rem;
  max-width: 720px;
  margin: 0 auto;
}

/* --- Mobile --- */
@media (max-width: 640px) {
  .billing-page {
    padding: 80px 0 40px;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

  .status-card {
    padding: 20px;
  }

  .status-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .status-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .orders-table th,
  .orders-table td {
    padding: 10px 8px;
    font-size: 0.8rem;
  }

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

  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .pricing-card {
    padding: 24px 20px;
  }

  .price-main {
    font-size: 2rem;
  }

  .pricing-header {
    text-align: left;
  }
}
