/* account.css — the /account page, ported 17 September 2026 from
   pages/account_06.txt (highest number = the live Simvoly version).

   PORTED VERBATIM, !important and all. Cleanup is Phase 9.

   ⚠️ IT DEFINES ITS OWN `body` AND `:root`. The `:root` names do not collide
   with the theme (--primary-color here, --primary-green in theme-black.css), but
   the `body` rule DOES override the shell: this page sets its own font stack
   (-apple-system, Segoe UI, Roboto) and its own background, where the rest of the
   site uses the HelveticaNeue stack. That difference exists on the live site too,
   so it is ported rather than silently corrected. If /account should match the
   rest of the site, delete the font-family line from the body rule below — but
   that is a design decision, not a porting fix.
*/

:root {
  --primary-color: #1DB954;
  --primary-hover: #1ed760;
  --background: #0a0a0a;
  --surface: #1a1a1a;
  --surface-elevated: #2a2a2a;
  --border: #333;
  --text-primary: #ffffff;
  --text-secondary: #999;
  --text-on-primary: #000;
  --error-color: #e74c3c;
  --warning-color: #FFA500;
  --success-color: #1DB954;
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

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

body {
  font-family: var(--font-family);
  background: var(--background);
  color: var(--text-primary);
  min-height: 100vh;
}

.account-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 20px;
}

/* ============================================
   LOADING STATE
   ============================================ */
.loading-state {
  text-align: center;
  padding: 80px 20px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ============================================
   AUTH FORM (Login)
   ============================================ */
.auth-section {
  display: none;
  max-width: 500px;
  margin: 0 auto;
}

.auth-section.active {
  display: block;
}

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

.auth-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.auth-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
}

.auth-form {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  font-family: var(--font-family);
  background: var(--background);
  border: 2px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-input::placeholder {
  color: var(--text-secondary);
}

.password-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
}

.password-toggle:hover {
  color: var(--text-primary);
}

.form-error {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid var(--error-color);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  display: none;
}

.form-error.visible {
  display: block;
}

.form-error-text {
  color: var(--error-color);
  font-size: 14px;
}

.form-submit {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-family);
  background: var(--primary-color);
  color: var(--text-on-primary);
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.2s;
}

.form-submit:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(29, 185, 84, 0.3);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-switch {
  text-align: center;
  margin-top: 24px;
  color: var(--text-secondary);
  font-size: 14px;
}

.auth-switch-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

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

.forgot-password {
  text-align: right;
  margin-top: 8px;
}

.forgot-password a {
  color: var(--text-secondary);
  font-size: 13px;
  text-decoration: none;
}

.forgot-password a:hover {
  color: var(--primary-color);
}

/* ============================================
   DASHBOARD (Logged In)
   ============================================ */
.dashboard-section {
  display: none;
}

.dashboard-section.active {
  display: block;
}

.welcome-banner {
  background: linear-gradient(135deg, #1DB954 0%, #1ed760 100%);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  text-align: center;
  display: none;
}

.welcome-banner.visible {
  display: block;
}

.welcome-banner h2 {
  color: #000;
  font-size: 24px;
  margin-bottom: 8px;
}

.welcome-banner p {
  color: rgba(0,0,0,0.7);
  font-size: 14px;
}

.dashboard-header {
  margin-bottom: 32px;
}

.dashboard-greeting {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.dashboard-email {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ============================================
   SUBSCRIPTION STATUS ALERT BOX
   ============================================ */
.status-alert {
  display: none;
  border-left: 4px solid;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}

.status-alert.visible {
  display: block;
}

.status-alert.canceling {
  background: rgba(255, 165, 0, 0.1);
  border-color: var(--warning-color);
}

.status-alert.past_due {
  background: rgba(220, 53, 69, 0.1);
  border-color: var(--error-color);
}

.status-alert.canceled {
  background: rgba(220, 53, 69, 0.1);
  border-color: var(--error-color);
}

.status-alert.pending-change {
  background: rgba(29, 185, 84, 0.1);
  border-color: var(--primary-color);
}

.alert-title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 12px;
}

.status-alert.canceling .alert-title {
  color: var(--warning-color);
}

.status-alert.past_due .alert-title,
.status-alert.canceled .alert-title {
  color: var(--error-color);
}

.status-alert.pending-change .alert-title {
  color: var(--primary-color);
}

.alert-list {
  margin: 0;
  padding-left: 20px;
  color: var(--text-primary);
  line-height: 1.8;
}

.alert-list li {
  margin-bottom: 4px;
}

/* ============================================
   SUBSCRIPTION CARD (UNIFIED)
   ============================================ */
.subscription-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 32px;
}

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

.subscription-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.status-badge.active {
  background: var(--success-color);
  color: white;
}

.status-badge.canceling {
  background: var(--warning-color);
  color: white;
}

.status-badge.past_due {
  background: var(--error-color);
  color: white;
}

.status-badge.canceled {
  background: transparent;
  border: 2px solid var(--error-color);
  color: var(--error-color);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.subscription-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--border);
}

.overview-card {
  text-align: center;
  padding: 20px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative;
}

.overview-card:nth-child(2) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.overview-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.overview-label {
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* Buy Credits Button (in overview card) */
.buy-credits-btn {
  padding: 8px 20px;
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-family);
  margin-top: 8px;
}

.buy-credits-btn:hover {
  background: var(--primary-color);
  color: var(--text-on-primary);
  transform: translateY(-2px);
}

.plan-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  text-align: center;
}

.plan-tier {
  display: inline-block;
  background: var(--primary-color);
  color: var(--text-on-primary);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.subscription-details {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.detail-value {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  text-align: right;
}

.credits-info {
  background: rgba(29, 185, 84, 0.1);
  border: 1px solid rgba(29, 185, 84, 0.3);
  border-radius: 10px;
  padding: 12px;
  margin: 16px 0;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}

.manage-subscription-btn {
  width: 100%;
  padding: 16px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-family);
  background: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 12px;
}

.manage-subscription-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(29, 185, 84, 0.3);
}

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

/* Update Payment Method Button */
.update-payment-btn {
  width: 100%;
  padding: 14px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-family);
  background: transparent;
  color: var(--text-secondary);
  border: 2px solid var(--border);
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 12px;
}

.update-payment-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.update-payment-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.portal-features {
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 8px;
}

.no-subscription {
  text-align: center;
  padding: 32px 20px;
}

.no-subscription-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.no-subscription-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.no-subscription-text {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
}

.subscribe-btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--primary-color);
  color: var(--text-on-primary);
  text-decoration: none;
  font-weight: 600;
  border-radius: 30px;
  transition: all 0.2s;
}

.subscribe-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(29, 185, 84, 0.3);
}

/* ============================================
   QUICK ACTIONS
   ============================================ */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.action-btn {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
  text-decoration: none;
  color: var(--text-primary) !important;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  font-family: var(--font-family);
}

.action-btn:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  color: var(--primary-color) !important;
}

.action-btn-icon {
  font-size: 24px;
  margin-bottom: 8px;
  display: block;
}

/* ============================================
   CREDIT PURCHASE MODAL
   ============================================ */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9998;
  backdrop-filter: blur(4px);
}

.modal-overlay.active {
  display: block;
}

.credit-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 9999;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.credit-modal.active {
  display: block;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}

.modal-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.bundles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.credit-bundle {
  background: var(--surface-elevated);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px 16px;
  transition: all 0.2s ease;
  text-align: center;
}

.credit-bundle:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(29, 185, 84, 0.2);
}

.bundle-credits {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.bundle-credits-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.bundle-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.bundle-btn {
  width: 100%;
  background: var(--primary-color);
  color: var(--text-on-primary);
  border: none;
  padding: 12px 16px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-family);
}

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

.upgrade-divider {
  text-align: center;
  margin: 28px 0 20px 0;
  position: relative;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.upgrade-divider::before,
.upgrade-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}

.upgrade-divider::before {
  left: 0;
}

.upgrade-divider::after {
  right: 0;
}

.upgrade-option {
  background: var(--background);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.upgrade-option:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.upgrade-tier-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.upgrade-tier-badge.heartbeat {
  background: rgba(29, 185, 84, 0.2);
  color: var(--primary-color);
}

.upgrade-tier-badge.pinnacle {
  background: rgba(255, 215, 0, 0.2);
  color: var(--warning-color);
}

.upgrade-details {
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 4px;
}

.upgrade-subtext {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.upgrade-btn {
  width: 100%;
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 10px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-family);
}

.upgrade-btn:hover {
  background: var(--primary-color);
  color: var(--text-on-primary);
}

.modal-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .credit-modal {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    border-radius: 16px 16px 0 0;
    max-width: 100%;
    width: 100%;
    max-height: 85vh;
    padding: 24px;
  }
  
  .modal-title {
    font-size: 20px;
  }
  
  .bundles-grid {
    grid-template-columns: 1fr;
  }
  
  .bundle-credits {
    font-size: 24px;
  }
  
  .bundle-price {
    font-size: 18px;
  }
}

/* ============================================
   DOWNLOADS SECTION
   ============================================ */
.downloads-section {
  margin-top: 40px;
}

.section-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.section-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.download-entry {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
}

.download-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.download-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.download-date {
  font-size: 14px;
  color: var(--text-secondary);
}

.download-credits {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-color);
  white-space: nowrap;
}

.download-items {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

/* Product group within downloads */
.download-product-group {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.download-product-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.download-product-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.download-product-credits {
  font-size: 13px;
  color: var(--text-secondary);
  margin-left: 8px;
  font-weight: 400;
}

.download-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  flex-wrap: wrap;
  gap: 8px;
}

.download-item-name {
  font-size: 14px;
  color: var(--text-primary);
  flex: 1;
  min-width: 200px;
}

.download-item-size {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 16px;
}

.download-link {
  color: var(--primary-color) !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 6px 16px;
  border: 2px solid var(--primary-color);
  border-radius: 20px;
  transition: all 0.2s;
  white-space: nowrap;
}

.download-link:hover {
  background: var(--primary-color);
  color: var(--text-on-primary) !important;
}

.expiry-warning {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--warning-color);
  margin-left: 12px;
}

.expired-status {
  color: var(--error-color);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.regenerate-btn {
  padding: 12px 24px;
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: 24px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-family);
  transition: all 0.2s;
}

.regenerate-btn:hover {
  background: var(--primary-color);
  color: var(--text-on-primary);
}

.regenerate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.empty-state-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.logout-btn {
  width: 100%;
  padding: 14px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-family);
  background: transparent;
  color: var(--text-secondary);
  border: 2px solid var(--border);
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 32px;
}

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

.data-load-error {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid var(--error-color);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin-bottom: 24px;
}

.data-load-error-title {
  color: var(--error-color);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.data-load-error-text {
  color: var(--text-secondary);
  font-size: 14px;
}

@media (max-width: 768px) {
  .subscription-overview {
    grid-template-columns: 1fr;
  }
  
  .quick-actions {
    grid-template-columns: 1fr;
  }
  
  .download-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .download-item-size,
  .expiry-warning {
    margin-left: 0;
  }
  
  .subscription-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
/* NEW: Regeneration Counter */
.regen-counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 12px;
  padding: 6px 12px;
  background: var(--surface-elevated);
  border-radius: 16px;
}

.regen-counter.warning {
  background: rgba(255, 167, 38, 0.15);
  color: var(--warning-color);
}

.regen-counter.exhausted {
  background: rgba(231, 76, 60, 0.15);
  color: var(--error-color);
}

.regen-counter-icon {
  font-size: 14px;
}

/* NEW: Limit Reached Message */
.limit-reached-message {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid var(--error-color);
  border-radius: 8px;
  padding: 16px;
  margin-top: 12px;
}

.limit-reached-title {
  color: var(--error-color);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.limit-reached-text {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.limit-reached-link {
  color: var(--primary-color) !important;
  text-decoration: none;
  font-weight: 600;
}

.limit-reached-link:hover {
  text-decoration: underline;
}

/* Shown instead of credit bundles to anyone not paid up (rbCreditGate, 19 Sep 2026). */
.credit-gate { grid-column: 1 / -1; text-align: center; padding: 8px 4px; }
.credit-gate p { margin: 0 0 16px; line-height: 1.6; }
