/* ========================================
   Settings Page Styles
   ======================================== */

.settings-body {
  background: linear-gradient(135deg, var(--primary, #0A2A43) 0%, #0D3A5C 100%);
  min-height: 100vh;
  font-family: var(--font-family);
}

/* Header */
.settings-header {
  background: var(--primary, #0A2A43);
  padding: var(--spacing-sm) var(--spacing-md);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
}

.settings-header .navbar {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.settings-header .logo {
  height: 40px;
  cursor: pointer;
}

.settings-header .nav-links {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.user-name {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* Loading Spinner */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  color: var(--text-primary);
}

.spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid var(--accent-primary);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin-bottom: var(--spacing-sm);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Banners */
.error-banner,
.success-banner {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  max-width: 600px;
  width: 90%;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.error-banner {
  background: #d32f2f;
  color: white;
}

.success-banner {
  background: #388e3c;
  color: white;
}

.error-content,
.success-content {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  gap: var(--spacing-sm);
}

.error-icon,
.success-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.error-text,
.success-text {
  flex: 1;
  font-weight: 500;
}

.btn-retry,
.btn-close {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.btn-retry:hover,
.btn-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.btn-close {
  padding: 0.4rem 0.8rem;
  font-weight: bold;
  font-size: 1.2rem;
  line-height: 1;
}

/* Settings Container */
.settings-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--spacing-md);
  min-height: calc(100vh - 80px);
}

.settings-layout {
  display: flex;
  gap: var(--spacing-md);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  min-height: 600px;
}

/* Sidebar Navigation */
.settings-sidebar {
  width: 250px;
  background: var(--bg-secondary);
  padding: var(--spacing-md);
  border-right: 2px solid var(--accent, #3BA2FF);
  overflow-y: auto;
  max-height: calc(100vh - 80px);
}

.sidebar-header {
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid rgba(59, 162, 255, 0.2);
}

.sidebar-header h3 {
  color: var(--accent, #3BA2FF);
  font-size: 1.1rem;
  margin: 0;
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-link {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
  width: 100%;
  display: block;
  box-sizing: border-box;
}

.nav-link:hover {
  background: rgba(59, 162, 255, 0.1);
  color: var(--accent, #3BA2FF);
}

.nav-link.active {
  background: var(--accent, #3BA2FF);
  color: white;
  font-weight: 600;
}

/* Content Area */
.settings-content {
  flex: 1;
  padding: var(--spacing-lg);
  overflow-y: auto;
  max-height: calc(100vh - 80px);
}

.settings-page {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.settings-page.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-header {
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 2px solid var(--accent, #3BA2FF);
}

.page-header h1 {
  color: var(--primary, #0A2A43);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.page-description {
  color: #666;
  font-size: 0.95rem;
  margin: 0;
}

/* Under Construction */
.under-construction {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl);
  background: rgba(59, 162, 255, 0.05);
  border: 2px dashed var(--accent, #3BA2FF);
  border-radius: 12px;
  text-align: center;
}

.construction-icon {
  font-size: 4rem;
  color: var(--accent, #3BA2FF);
  margin-bottom: var(--spacing-sm);
  opacity: 0.7;
}

.under-construction h2 {
  color: var(--primary, #0A2A43);
  margin-bottom: 0.5rem;
}

.under-construction p {
  color: #666;
  margin: 0;
  max-width: 400px;
}

/* User Info Card */
.user-info-card {
  background: linear-gradient(135deg, var(--primary, #0A2A43) 0%, #0D3A5C 100%);
  color: white;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 8px;
  margin-bottom: var(--spacing-lg);
}

.user-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.user-info-row:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.user-label {
  font-weight: 600;
  font-size: 0.95rem;
}

.user-value {
  font-size: 1rem;
}

.status-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.3rem 0.8rem;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: capitalize;
}

.status-active {
  background: #4caf50;
}

.status-pending {
  background: #ff9800;
}

.status-suspended {
  background: #f44336;
}

/* Preferences Form */
.preferences-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.preferences-form fieldset {
  border: 2px solid var(--accent, #3BA2FF);
  border-radius: 8px;
  padding: var(--spacing-sm) var(--spacing-md);
  background: rgba(59, 162, 255, 0.05);
  transition: all 0.3s ease;
}

.preferences-form fieldset:hover {
  border-color: var(--primary, #0A2A43);
  box-shadow: 0 2px 8px rgba(10, 42, 67, 0.1);
}

.preferences-form legend {
  color: var(--primary, #0A2A43);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0 0.5rem;
}

.fieldset-description {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: var(--spacing-sm);
  font-style: italic;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.radio-group label {
  display: flex;
  align-items: center;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  color: #333;
  font-size: 0.95rem;
}

.radio-group label:hover {
  background: rgba(59, 162, 255, 0.1);
}

.radio-group input[type="radio"] {
  margin-right: 0.8rem;
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: var(--accent, #3BA2FF);
}

/* Checkbox Group Styling */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  padding: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  border: 1px solid var(--french-gray);
  background: white;
}

.checkbox-label:hover {
  background: rgba(59, 162, 255, 0.1);
  border-color: var(--accent, #3BA2FF);
}

.checkbox-label input[type="checkbox"] {
  margin-right: 1rem;
  margin-top: 0.2rem;
  cursor: pointer;
  width: 20px;
  height: 20px;
  accent-color: var(--accent, #3BA2FF);
  flex-shrink: 0;
}

.checkbox-text {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.checkbox-text strong {
  color: var(--primary, #0A2A43);
  font-size: 1rem;
}

.checkbox-description {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: var(--spacing-sm);
  padding-top: var(--spacing-sm);
  border-top: 2px solid var(--french-gray);
  margin-top: var(--spacing-md);
  align-items: center;
}

.auto-save-indicator {
  font-size: 0.9rem;
  color: #999;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auto-save-indicator.saving {
  color: var(--accent, #3BA2FF);
  font-weight: 600;
}

.auto-save-indicator.saved {
  color: #4caf50;
  font-weight: 600;
}

.auto-save-indicator.error {
  color: #d32f2f;
  font-weight: 600;
}

.auto-save-text {
  display: inline;
}

/* Auth Required Message */
.auth-required {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  color: var(--text-primary);
}

.auth-message {
  background: rgba(255, 255, 255, 0.95);
  padding: var(--spacing-lg);
  border-radius: 12px;
  text-align: center;
  max-width: 500px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.auth-message h2 {
  color: var(--primary, #0A2A43);
  margin-bottom: var(--spacing-sm);
}

.auth-message p {
  color: #555;
  margin-bottom: var(--spacing-md);
  font-size: 1.1rem;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
  .settings-layout {
    flex-direction: column;
  }

  .settings-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid var(--accent, #3BA2FF);
    padding: var(--spacing-sm);
  }

  .settings-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
  }

  .nav-link {
    padding: 0.75rem 0.75rem 0.75rem 1rem;
    font-size: 0.9rem;
    text-align: left;
  }

  .settings-content {
    padding: var(--spacing-md);
  }
}

@media (max-width: 768px) {
  .settings-container {
    padding: var(--spacing-sm);
  }

  .settings-layout {
    border-radius: 8px;
    min-height: auto;
  }

  .settings-sidebar {
    padding: var(--spacing-sm);
  }

  .settings-content {
    padding: var(--spacing-md);
    max-height: auto;
  }

  .settings-header .user-name {
    display: none;
  }

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

  .preferences-form fieldset {
    padding: var(--spacing-sm);
  }

  .user-info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }
}

@media (max-width: 480px) {
  .settings-nav {
    grid-template-columns: 1fr;
  }

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

  .under-construction {
    padding: var(--spacing-md);
  }

  .construction-icon {
    font-size: 3rem;
  }

  .radio-group {
    gap: 0.6rem;
  }

  .radio-group label {
    padding: 0.5rem;
    font-size: 0.9rem;
  }

  .error-banner,
  .success-banner {
    top: 70px;
    width: 95%;
  }
}

/* ========================================
   ACCOUNT MANAGEMENT STYLES
   ======================================== */

/* Setup Welcome Card (New User Activation) */
.setup-welcome-card {
  background: linear-gradient(135deg, #2e7d32 0%, #388e3c 100%);
  color: white;
  padding: var(--spacing-lg);
  border-radius: 12px;
  margin-bottom: var(--spacing-lg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.setup-welcome-header h2 {
  margin: 0 0 var(--spacing-md) 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.setup-welcome-body {
  margin-bottom: var(--spacing-md);
}

.setup-welcome-body p {
  margin: 0 0 var(--spacing-sm) 0;
  line-height: 1.6;
}

.setup-steps {
  margin: var(--spacing-sm) 0;
  padding-left: var(--spacing-lg);
}

.setup-steps li {
  margin-bottom: var(--spacing-xs);
  line-height: 1.5;
}

.setup-note {
  font-style: italic;
  opacity: 0.9;
  margin-top: var(--spacing-md);
}

.setup-welcome-actions {
  text-align: center;
  padding-top: var(--spacing-sm);
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.setup-welcome-actions .btn-primary {
  background: white;
  color: #2e7d32;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.setup-welcome-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.setup-welcome-actions .btn-primary:disabled {
  opacity: 0.7;
  transform: none;
  cursor: not-allowed;
}

/* Account Info Card */
.account-info-card {
  background: linear-gradient(135deg, var(--primary, #0A2A43) 0%, #0D3A5C 100%);
  color: white;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 8px;
  margin-bottom: var(--spacing-lg);
}

.account-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
}

.account-info-row:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.account-label {
  font-weight: 600;
  font-size: 0.95rem;
  min-width: 180px;
}

.account-value {
  font-size: 1rem;
  text-align: right;
}

.account-name-edit {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-edit {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s;
  white-space: nowrap;
}

.btn-edit:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-in;
}

.modal-content {
  background: white;
  padding: var(--spacing-lg);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--french-gray);
}

.modal-header h3 {
  color: var(--primary, #0A2A43);
  margin: 0;
  font-size: 1.3rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #000;
}

.modal-body {
  margin: var(--spacing-md) 0;
  color: #333;
  line-height: 1.6;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: var(--primary, #0A2A43);
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  padding: 0.8rem;
  border: 2px solid var(--french-gray);
  border-radius: 6px;
  font-family: var(--font-family);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent, #3BA2FF);
  box-shadow: 0 0 0 3px rgba(59, 162, 255, 0.15);
}

.modal-actions {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: flex-end;
  padding-top: var(--spacing-md);
  border-top: 2px solid var(--french-gray);
}

/* Members Section */
.members-section {
  margin-top: var(--spacing-lg);
}

.members-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--accent, #3BA2FF);
}

.members-header h3 {
  color: var(--primary, #0A2A43);
  font-size: 1.1rem;
  margin: 0;
}

.members-table-container {
  overflow-x: auto;
}

.members-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 2px solid var(--french-gray);
  border-radius: 8px;
  overflow: hidden;
}

.members-table thead {
  background: rgba(59, 162, 255, 0.1);
  color: var(--primary, #0A2A43);
}

.members-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 2px solid var(--accent, #3BA2FF);
}

.members-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--french-gray);
  color: #333;
}

.members-table tbody tr:hover {
  background: rgba(59, 162, 255, 0.05);
}

.actions-col {
  text-align: center;
}

.blocker-col {
  text-align: center;
  font-size: 0.9rem;
  padding: 0.75rem 0.5rem;
  cursor: help;
}

.blocker-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent, #3BA2FF);
  transition: all 0.2s ease;
}

.blocker-checkbox:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.blocker-checkbox.saved {
  accent-color: #28a745;
}

.blocker-checkbox.error {
  accent-color: #dc3545;
}

.role-badge {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: capitalize;
}

.role-owner {
  background: #e3f2fd;
  color: #1976d2;
}

.role-member {
  background: #f3e5f5;
  color: #7b1fa2;
}

.no-data-message {
  padding: var(--spacing-lg);
  text-align: center;
  color: #999;
  font-style: italic;
  background: rgba(59, 162, 255, 0.05);
  border-radius: 8px;
  border: 2px dashed var(--french-gray);
}

.btn-primary,
.btn-secondary,
.btn-danger {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-family);
}

.btn-primary {
  background: var(--accent, #3BA2FF);
  color: white;
}

.btn-primary:hover:not(:disabled):not(.btn-disabled) {
  background: var(--accent-hover, #2B8CE6);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 162, 255, 0.3);
}

.btn-secondary {
  background: var(--french-gray);
  color: #333;
}

.btn-secondary:hover {
  background: #d4d9e2;
}

.btn-danger {
  background: #d32f2f;
  color: white;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

.btn-danger:hover {
  background: #b71c1c;
}

.btn-disabled,
.btn-primary:disabled,
.btn-primary.btn-disabled,
.btn-danger:disabled,
.btn-danger.btn-disabled {
  background: #9e9e9e;
  color: #e0e0e0;
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-disabled:hover,
.btn-primary:disabled:hover,
.btn-primary.btn-disabled:hover,
.btn-danger:disabled:hover,
.btn-danger.btn-disabled:hover {
  background: #9e9e9e;
  transform: none;
  box-shadow: none;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

/* Account Status Styles */
.status-trial {
  background: #ff9800;
}

.status-active {
  background: #4caf50;
}

.status-past-due {
  background: #f44336;
}

.status-canceled {
  background: #757575;
}

.status-free {
  background: #2196f3;
}

/* Account Blocking Ensured Section */
.account-blocking-section {
  margin-top: var(--spacing-lg);
  padding: var(--spacing-md);
  background: white;
  border: 2px solid var(--french-gray);
  border-radius: 8px;
}

.blocking-section-header {
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--accent, #3BA2FF);
}

.blocking-section-header h3 {
  color: var(--primary, #0A2A43);
  font-size: 1.1rem;
  margin: 0;
}

.blocking-description {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: var(--spacing-md);
  line-height: 1.5;
}

.blocking-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.blocking-form-row {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.blocking-form-row .form-group {
  flex: 1;
  min-width: 250px;
}

.field-error {
  display: block;
  color: #d32f2f;
  font-size: 0.85rem;
  margin-top: 0.3rem;
  font-weight: 500;
}

.blocking-form-actions {
  display: flex;
  gap: var(--spacing-sm);
  align-items: flex-start;
}

.blocking-form-actions button {
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
}

.blocking-error-message {
  color: #d32f2f;
  font-size: 0.9rem;
  padding: 0.5rem;
  background: rgba(211, 47, 47, 0.1);
  border-left: 3px solid #d32f2f;
  border-radius: 4px;
  flex: 1;
}

/* Confirmation Modal Styles */
.blocking-confirm-dates {
  background: rgba(59, 162, 255, 0.05);
  padding: var(--spacing-md);
  border-radius: 6px;
  margin: var(--spacing-md) 0;
}

.confirm-date-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
}

.confirm-date-row:not(:last-child) {
  border-bottom: 1px solid rgba(59, 162, 255, 0.2);
}

.confirm-label {
  font-weight: 600;
  color: var(--primary, #0A2A43);
  min-width: 120px;
}

.confirm-value {
  color: #333;
  font-size: 1rem;
}

/* Mobile Responsiveness for Account Section */
@media (max-width: 768px) {
  .account-info-row,
  .members-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .account-label {
    min-width: auto;
  }

  .account-value {
    text-align: left;
  }

  .members-table {
    font-size: 0.85rem;
  }

  .members-table th,
  .members-table td {
    padding: 0.75rem 0.5rem;
  }

  .modal-content {
    width: 95%;
    max-width: 100%;
  }

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

  .modal-actions button {
    width: 100%;
  }

  /* Blocking Section Mobile Responsiveness */
  .blocking-form-row {
    flex-direction: column;
  }

  .blocking-form-row .form-group {
    min-width: 100%;
  }

  .blocking-form-actions {
    flex-direction: column;
    width: 100%;
  }

  .blocking-form-actions button {
    width: 100%;
  }

  .blocking-error-message {
    width: 100%;
  }
}

/* ========================================
   Processing Status Toggle Switch
   ======================================== */

.processing-status-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.processing-status-label {
  font-size: inherit;
  color: inherit;
  transition: opacity 0.3s;
}

/* Dim the inactive label */
.processing-status-container.active #processing-status-text-off {
  opacity: 0.4;
}

.processing-status-container.active #processing-status-text-on {
  opacity: 1;
}

.processing-status-container.paused #processing-status-text-off {
  opacity: 1;
}

.processing-status-container.paused #processing-status-text-on {
  opacity: 0.4;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
  flex-shrink: 0;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #dc3545;
  transition: 0.3s;
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #28a745;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.toggle-switch input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Visual feedback for save states */
.toggle-switch input.saved + .toggle-slider {
  box-shadow: 0 0 8px rgba(40, 167, 69, 0.6);
}

.toggle-switch input.error + .toggle-slider {
  box-shadow: 0 0 8px rgba(220, 53, 69, 0.6);
}

/* ========================================
   Timezone Dropdown Styles
   ======================================== */

.timezone-select {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  min-width: 250px;
  transition: all 0.2s ease;
}

.timezone-select:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.timezone-select:focus {
  outline: none;
  border-color: var(--accent, #3BA2FF);
  box-shadow: 0 0 0 3px rgba(59, 162, 255, 0.3);
}

.timezone-select option {
  background: var(--primary, #0A2A43);
  color: white;
  padding: 0.5rem;
}

.timezone-select.saving {
  opacity: 0.7;
  cursor: wait;
}

.timezone-select.saved {
  border-color: #28a745;
  box-shadow: 0 0 8px rgba(40, 167, 69, 0.4);
}

.timezone-select.error {
  border-color: #dc3545;
  box-shadow: 0 0 8px rgba(220, 53, 69, 0.4);
}

/* Timezone select for light background (activate page) */
.user-info-card .timezone-select {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

/* Mobile responsiveness for timezone dropdown */
@media (max-width: 768px) {
  .timezone-select {
    min-width: 100%;
    width: 100%;
  }
}

/* ========================================
   Admin Page Styles
   ======================================== */

.admin-section {
  background: white;
  border: 2px solid var(--french-gray);
  border-radius: 8px;
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.admin-section h2 {
  color: var(--primary, #0A2A43);
  font-size: 1.2rem;
  margin: 0 0 var(--spacing-sm) 0;
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--accent, #3BA2FF);
}

.admin-section-description {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: var(--spacing-md);
}

/* Admin Status Indicator */
.admin-status {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  margin-bottom: var(--spacing-md);
}

.admin-status.success {
  background: #e8f5e9;
  color: #2e7d32;
  border-left: 4px solid #2e7d32;
}

.admin-status.error {
  background: #ffebee;
  color: #c62828;
  border-left: 4px solid #c62828;
}

/* Analytics Date Range */
.admin-date-range {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
}

.admin-date-range label {
  color: #666;
  font-weight: 500;
}

.admin-date-range input[type="date"] {
  padding: 0.5rem;
  border: 2px solid var(--french-gray);
  border-radius: 6px;
  font-size: 0.95rem;
}

/* Analytics Stats Grid */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.admin-stat-box {
  background: rgba(59, 162, 255, 0.1);
  border: 2px solid var(--accent, #3BA2FF);
  border-radius: 8px;
  padding: var(--spacing-md);
  text-align: center;
}

.admin-stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary, #0A2A43);
  line-height: 1.2;
}

.admin-stat-label {
  color: #666;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* Admin Table */
.admin-table-container {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 2px solid var(--french-gray);
  border-radius: 8px;
  overflow: hidden;
}

.admin-table thead {
  background: rgba(59, 162, 255, 0.1);
}

.admin-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--primary, #0A2A43);
  border-bottom: 2px solid var(--accent, #3BA2FF);
  font-size: 0.9rem;
}

.admin-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--french-gray);
  color: #333;
  font-size: 0.9rem;
}

.admin-table tbody tr:hover {
  background: rgba(59, 162, 255, 0.05);
}

/* Admin Config Form */
.admin-config-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.admin-form-row {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.admin-form-row .form-group {
  flex: 1;
  min-width: 200px;
}

.admin-form-row input[type="number"] {
  width: 100%;
  padding: 0.5rem;
  border: 2px solid var(--french-gray);
  border-radius: 6px;
  font-size: 0.95rem;
}

.admin-form-row label {
  display: block;
  margin-bottom: 0.5rem;
  color: #333;
  font-weight: 500;
  font-size: 0.9rem;
}

/* Admin Generate Section */
.admin-generate-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.admin-generate-row {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.admin-generate-row label {
  color: #333;
  font-weight: 500;
}

.admin-generate-row select {
  padding: 0.5rem;
  border: 2px solid var(--french-gray);
  border-radius: 6px;
  font-size: 0.95rem;
  min-width: 250px;
}

/* Mobile Responsiveness for Admin Section */
@media (max-width: 768px) {
  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-form-row {
    flex-direction: column;
  }

  .admin-form-row .form-group {
    min-width: 100%;
  }

  .admin-generate-row {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-generate-row select {
    min-width: 100%;
  }

  .admin-date-range {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-date-range input[type="date"] {
    width: 100%;
  }
}

/* ========================================
   Notification Email Enhanced Controls
   ======================================== */

.notification-option {
  margin-bottom: 0.5rem;
}

.notification-enhanced-controls {
  margin-left: 2.5rem;
  margin-top: 0.75rem;
  padding: 1rem;
  background: rgba(59, 162, 255, 0.05);
  border-left: 3px solid var(--accent, #3BA2FF);
  border-radius: 0 8px 8px 0;
}

.notification-control-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.notification-control-row:last-child {
  margin-bottom: 0;
}

.notification-control-row label {
  color: #555;
  font-size: 0.9rem;
  min-width: 80px;
}

.notification-select {
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  background: white;
  cursor: pointer;
  min-width: 180px;
}

.notification-select:focus {
  outline: none;
  border-color: var(--accent, #3BA2FF);
  box-shadow: 0 0 0 2px rgba(59, 162, 255, 0.2);
}

.notification-date {
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  background: white;
  cursor: pointer;
}

.notification-date:focus {
  outline: none;
  border-color: var(--accent, #3BA2FF);
  box-shadow: 0 0 0 2px rgba(59, 162, 255, 0.2);
}

/* Responsive adjustments for notification controls */
@media (max-width: 768px) {
  .notification-enhanced-controls {
    margin-left: 0;
    margin-top: 1rem;
    border-left: none;
    border-top: 3px solid var(--accent, #3BA2FF);
    border-radius: 0 0 8px 8px;
  }

  .notification-control-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .notification-control-row label {
    min-width: auto;
  }

  .notification-select,
  .notification-date {
    width: 100%;
  }
}

/* ==========================================
   BILLING PAGE STYLES
   ========================================== */

/* Billing Loading State */
/* Billing Loading */
.billing-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #666;
}

.billing-loading .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(59, 162, 255, 0.2);
  border-top-color: var(--accent, #3BA2FF);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Billing Error Card */
.billing-error-card {
  background: rgba(244, 67, 54, 0.05);
  border: 2px solid rgba(244, 67, 54, 0.3);
  border-radius: 8px;
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.billing-error-card h2 {
  color: #d32f2f;
  margin: 0 0 8px 0;
}

.billing-error-card p {
  color: #666;
  margin-bottom: 16px;
}

/* Billing Sections (light themed, matches other pages) */
.billing-section {
  margin-bottom: var(--spacing-lg);
}

.billing-section-title {
  color: var(--primary, #0A2A43);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.billing-section-description {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: var(--spacing-sm);
}

/* Billing Fieldsets (matches preferences fieldset pattern) */
.billing-fieldset {
  border: 2px solid var(--accent, #3BA2FF);
  border-radius: 8px;
  padding: var(--spacing-sm) var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  background: rgba(59, 162, 255, 0.05);
  transition: all 0.3s ease;
}

.billing-fieldset:hover {
  border-color: var(--primary, #0A2A43);
  box-shadow: 0 2px 8px rgba(10, 42, 67, 0.1);
}

.billing-fieldset legend {
  color: var(--primary, #0A2A43);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0 0.5rem;
}

/* Billing Alerts */
.billing-alert {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: var(--spacing-md);
}

.billing-alert-warning {
  background: rgba(255, 193, 7, 0.08);
  border: 2px solid rgba(255, 193, 7, 0.4);
}

.billing-alert-danger {
  background: rgba(244, 67, 54, 0.08);
  border: 2px solid rgba(244, 67, 54, 0.4);
}

.alert-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
  flex-shrink: 0;
}

.billing-alert-warning .alert-icon {
  background: rgba(255, 193, 7, 0.2);
  color: #e6a800;
}

.billing-alert-danger .alert-icon {
  background: rgba(244, 67, 54, 0.2);
  color: #d32f2f;
}

.alert-content h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
}

.billing-alert-warning .alert-content h3 {
  color: #e6a800;
}

.billing-alert-danger .alert-content h3 {
  color: #d32f2f;
}

.alert-content p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.alert-content .btn-primary {
  margin-top: 12px;
}

/* Subscribe Form */
.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.subscribe-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subscribe-form label {
  color: var(--primary, #0A2A43);
  font-weight: 600;
  font-size: 0.95rem;
}

.billing-select {
  background: white;
  border: 2px solid var(--french-gray, #ccc);
  border-radius: 6px;
  padding: 12px 16px;
  color: var(--primary, #0A2A43);
  font-size: 14px;
  cursor: pointer;
}

.billing-select:focus {
  outline: none;
  border-color: var(--accent, #3BA2FF);
}

.btn-large {
  padding: 14px 28px;
  font-size: 16px;
}

/* Pricing table current row indicator */
.pricing-current {
  color: var(--accent, #3BA2FF);
  font-weight: 600;
  font-size: 0.85rem;
}

/* Status Badge Extensions for Billing */
.status-badge.status-trial {
  background: rgba(33, 150, 243, 0.15);
  color: #1976d2;
}

.status-badge.status-active,
.status-badge.status-paid {
  background: #4caf50;
  color: white;
}

.status-badge.status-past_due {
  background: #ff9800;
  color: white;
}

.status-badge.status-canceled {
  background: #f44336;
  color: white;
}

.status-badge.status-free {
  background: rgba(158, 158, 158, 0.2);
  color: #666;
}

/* Responsive Billing */
@media (max-width: 768px) {
  .billing-fieldset {
    padding: var(--spacing-sm);
  }

  .billing-alert {
    flex-direction: column;
    gap: 12px;
  }

  .alert-icon {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }
}
