.subscription-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 70px;
}

.business-header {
  min-height: 70px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #111827;
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #111827;
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: #6b7280;
  font-size: 12px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-nav a,
.help-link {
  color: #4b5563;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.header-nav a:hover,
.header-nav a.active,
.help-link:hover {
  color: #111827;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.eyebrow,
.section-label {
  color: #6b7280;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.page-heading h1 {
  margin: 6px 0;
  font-size: 34px;
  color: #111827;
}

.page-heading p,
.section-heading p {
  margin: 0;
  color: #6b7280;
}

.back-button {
  text-decoration: none;
  color: #111827;
  border: 1px solid #d1d5db;
  padding: 10px 16px;
  border-radius: 9px;
  font-weight: 700;
  background: #fff;
}

.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
}

.current-subscription {
  padding: 28px;
  margin-bottom: 45px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 25px;
}

.section-title h2,
.section-heading h2 {
  margin: 5px 0 0;
  color: #111827;
}

.status-badge {
  padding: 7px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-size: 12px;
  font-weight: 800;
}

.status-badge.active {
  background: #dcfce7;
  color: #166534;
}

.status-badge.expired,
.status-badge.cancelled {
  background: #fee2e2;
  color: #991b1b;
}

.subscription-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.subscription-info {
  padding: 20px;
  border-right: 1px solid #e5e7eb;
}

.subscription-info:last-child {
  border-right: 0;
}

.subscription-info span,
.billing-row span {
  display: block;
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 6px;
}

.subscription-info strong {
  color: #111827;
  font-size: 16px;
}

.subscription-actions {
  display: flex;
  gap: 12px;
  margin-top: 25px;
}

.primary-btn,
.secondary-btn {
  border: 0;
  border-radius: 9px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
}

.primary-btn {
  background: #111827;
  color: #fff;
}

.primary-btn:hover {
  background: #000;
}

.secondary-btn {
  background: #f3f4f6;
  color: #111827;
}

.full-width {
  width: 100%;
}

.section-heading {
  margin-bottom: 20px;
}

.benefits-section,
.plans-section,
.billing-section,
.invoice-section {
  margin-bottom: 50px;
}

.benefits-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.benefit-item {
  padding: 18px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.benefit-item strong {
  display: block;
  margin-bottom: 5px;
  color: #111827;
}

.benefit-item span {
  color: #6b7280;
  font-size: 13px;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.plan-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 25px;
  display: flex;
  flex-direction: column;
}

.plan-card.current {
  border: 2px solid #111827;
}

.plan-card h3 {
  margin: 8px 0;
  font-size: 21px;
}

.plan-description {
  min-height: 42px;
  color: #6b7280;
  font-size: 14px;
}

.plan-price {
  margin: 20px 0;
}

.plan-price strong {
  font-size: 30px;
  color: #111827;
}

.plan-price span {
  color: #6b7280;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 25px;
}

.plan-features li {
  padding: 8px 0;
  color: #374151;
  font-size: 14px;
}

.plan-features li::before {
  content: "✓";
  margin-right: 8px;
  font-weight: 800;
}

.plan-card .primary-btn,
.plan-card .secondary-btn {
  margin-top: auto;
}

.billing-card {
  overflow: hidden;
}

.billing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid #e5e7eb;
}

.billing-row:last-child {
  border-bottom: 0;
}

.billing-row strong {
  color: #111827;
}

.invoice-table-wrapper {
  overflow-x: auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 750px;
}

.invoice-table th,
.invoice-table td {
  padding: 15px 18px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.invoice-table th {
  background: #f9fafb;
  color: #6b7280;
  font-size: 12px;
  text-transform: uppercase;
}

.invoice-table td {
  color: #374151;
  font-size: 14px;
}

.invoice-status {
  font-size: 12px;
  font-weight: 800;
}

.invoice-status.paid {
  color: #15803d;
}

.invoice-status.pending {
  color: #b45309;
}

.invoice-status.failed {
  color: #b91c1c;
}

.invoice-link {
  color: #111827;
  font-weight: 700;
  text-decoration: none;
}

.loading-card,
.table-loading {
  padding: 25px;
  color: #6b7280;
  text-align: center;
}

.security-note {
  display: flex;
  gap: 15px;
  padding: 20px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
}

.note-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: #111827;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.security-note strong {
  color: #111827;
}

.security-note p {
  margin: 5px 0 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.6;
}

.page-message {
  padding: 14px 18px;
  margin-bottom: 20px;
  border-radius: 10px;
  background: #fef3c7;
  color: #92400e;
}

.hidden {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .55);
}

.modal-box {
  position: relative;
  z-index: 2;
  width: min(500px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 30px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, .2);
}

.modal-box h2 {
  margin: 8px 0;
}

.modal-box p {
  color: #6b7280;
  line-height: 1.6;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  border: 0;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.modal-price {
  margin: 20px 0;
}

.modal-price strong {
  font-size: 32px;
}

.modal-features {
  padding-left: 20px;
  color: #374151;
}

.modal-features li {
  margin: 8px 0;
}

.payment-note {
  text-align: center;
  font-size: 12px;
  margin-top: 15px;
}

.business-footer {
  border-top: 1px solid #e5e7eb;
  padding: 25px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #6b7280;
  font-size: 13px;
}

.business-footer a {
  color: #4b5563;
  text-decoration: none;
  margin-left: 15px;
}

@media (max-width: 900px) {
  .header-nav {
    display: none;
  }

  .subscription-grid,
  .plans-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .benefits-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .subscription-page {
    padding: 25px 15px 50px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-heading h1 {
    font-size: 27px;
  }

  .subscription-grid,
  .plans-grid,
  .benefits-list {
    grid-template-columns: 1fr;
  }

  .subscription-info {
    border-right: 0;
    border-bottom: 1px solid #e5e7eb;
  }

  .subscription-info:last-child {
    border-bottom: 0;
  }

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

  .billing-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .business-footer {
    flex-direction: column;
  }

  .business-footer a {
    margin-left: 0;
    margin-right: 15px;
  }
}