/* ===================================
   CSS Custom Properties
   =================================== */

:root {
  /* Primary Colors */
  --primary-purple: #9c27b0;
  --primary-purple-hover: #7b1fa2;
  --primary-purple-light: #ba68c8;

  /* Text Colors */
  --text-primary: #212121;
  --text-secondary: #636363;
  --text-body: #333;

  /* Border Colors */
  --border-color: rgba(0, 0, 0, 0.23);
  --border-color-hover: rgba(0, 0, 0, 0.87);

  /* Status Colors */
  --error-color: #d32f2f;
  --success-color: #2e7d32;
  --info-color: #1976d2;

  /* Background Colors */
  --background-white: #ffffff;
  --background-light: #f8f9fa;
  --background-overlay-light: rgba(0, 0, 0, 0.15);
  --background-overlay-dark: rgba(0, 0, 0, 0.65);
  --glass-background: rgba(255, 255, 255, 0.98);
  --glass-border: rgba(255, 255, 255, 0.3);

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --spacing-xl: 24px;
  --spacing-2xl: 32px;

  /* Border Radius */
  --border-radius: 2px;
  --border-radius-lg: 4px;
  --border-radius-xl: 4px;

  /* Font Sizes */
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.5rem;
  --font-size-xl: 2.125rem;

  /* Shadows */
  --shadow-sm: 0 0 24px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 12px 48px rgba(0, 0, 0, 0.35);
}

/* ===================================
   Bootstrap Overrides
   =================================== */
:root {
  --bs-primary: #9c27b0;
  --bs-primary-rgb: 156, 39, 176;
}

html[data-bs-theme="dark"] {
  /* Primary Colors - Lighter for dark mode */
  --primary-purple: #ba68c8;
  --primary-purple-hover: #ce93d8;
  --primary-purple-light: #e1bee7;
  /* Text Colors */
  --text-primary: #f5f5f5;
  --text-secondary: #cccccc;
  --text-body: #ffffff;
  /* Border Colors */
  --border-color: rgba(255, 255, 255, 0.23);
  --border-color-hover: rgba(255, 255, 255, 0.87);
  /* Status Colors */
  --error-color: #ef5350;
  --success-color: #66bb6a;
  --info-color: #42a5f5;
  /* Background Colors */
  --background-white: #1a1a1a;
  --background-light: #2a2a2a;
  --background-dark: #1a1a1a;
  --background-darker: #121212;
  --background-overlay-light: rgba(255, 255, 255, 0.08);
  --background-overlay-dark: rgba(255, 255, 255, 0.12);
  --glass-background: rgba(26, 26, 26, 0.95);
  --glass-border: rgba(255, 255, 255, 0.1);
  /* Shadows */
  --shadow-sm: 0 0 24px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 12px 48px rgba(0, 0, 0, 0.8);

  --bs-primary: #ba68c8;
  --bs-primary-rgb: 186, 104, 200;
  --bs-body-bg: var(--background-white);
  --bs-body-color: var(--text-body);
}

.btn-primary {
  --bs-btn-bg: var(--primary-purple);
  --bs-btn-border-color: var(--primary-purple);
  --bs-btn-hover-bg: var(--primary-purple-hover);
  --bs-btn-hover-border-color: var(--primary-purple-hover);
  --bs-btn-active-bg: var(--primary-purple-hover);
  --bs-btn-active-border-color: var(--primary-purple-hover);
}

.form-check-input:checked {
  background-color: var(--primary-purple);
  border-color: var(--primary-purple);
}

.form-check-input:focus {
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 0.125rem rgba(156, 39, 176, 0.25);
}

/* ===================================
   Logo SVG Import - Blue Logo for Light Mode
   =================================== */
.auth-logo-svg {
  width: 180px;
  height: 60px;
  background: url("../imgs/auth/sentinel-logo-blue.svg") no-repeat center;
  background-size: contain;
  display: inline-block;
  transition: opacity 0.3s ease;
}

html[data-bs-theme="dark"] .auth-logo-svg {
  background: url("../imgs/auth/sentinel-logo-white.svg") no-repeat center;
  background-size: contain;
}

/* ===================================
   Base Styles
   =================================== */
body {
  font-family: "Manrope", "Nunito Sans", "Open Sans", system-ui, -apple-system,
    sans-serif !important;
  line-height: 1.6;
  color: var(--text-body);
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.loading-gif {
  width: 150px;
  height: 150px;
}

/* ===================================
    Razor Forms list messages
    ================================== */
.invalid-feedback .validation-summary-errors ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.invalid-feedback .validation-summary-errors li {
  margin-left: 0;
}

/* Auth Layout */
.auth-layout {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  position: relative;
  overflow: hidden;
}

.form-panel {
  width: 55%;
  min-height: 100vh;
  background-color: var(--background-white);
  display: flex;
  flex-direction: column;
  z-index: 2;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.background-panel {
  flex: 1;
  min-height: 100vh;
  background-image: url("../imgs/auth/login-background-2.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.background-panel::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--background-overlay-light);
  z-index: 1;
}

/* ===================================
   Theme & Language Controls
   =================================== */
.form-panel .position-absolute {
  background: var(--background-white);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.theme-icon-sun,
.theme-icon-moon {
  transition: opacity 0.3s ease;
}

#themeToggle {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

#themeToggle:hover .theme-icon-sun,
#themeToggle:hover .theme-icon-moon {
  opacity: 0.7;
}

.dropdown-toggle {
  transition: all 0.3s ease;
}

.dropdown-menu {
  border-radius: var(--border-radius);
}

.dropdown-item {
  transition: background-color 0.2s ease;
}

.dropdown-item:hover {
  background-color: var(--background-light);
  color: var(--primary-purple);
}

.d-flex.gap-2 > * + * {
  margin-left: 0;
}

/* ===================================
   Auth Card
   =================================== */
.auth-card {
  background-color: var(--background-white);
  border-radius: var(--border-radius-lg);
  padding: 1rem;
  box-shadow: none;
  border: none;
}

/* ===================================
   Auth Header
   =================================== */
.auth-header {
  margin-bottom: 2rem;
}

.auth-logo {
  height: 80px;
  width: auto;
}

.auth-subtitle {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

.auth-description {
  font-size: var(--font-size-base);
  font-weight: 400;
  color: var(--text-secondary);
}

/* ===================================
   Form Controls
   =================================== */
.form-control {
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  padding: 0.875rem 1rem;
  font-size: var(--font-size-base);
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 0.2rem rgba(156, 39, 176, 0.25);
}

.form-label {
  font-weight: 500;
  color: var(--text-body);
  margin-bottom: 0.5rem;
}

.input-group .form-control:not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-group .btn:not(:first-child) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  margin-left: -1px;
}

.input-group .form-control {
  z-index: 1;
}

/* ===================================
   Password Toggle
   =================================== */
.password-toggle {
  border-color: var(--border-color);
}

.password-toggle:hover {
  border-color: var(--border-color-hover);
  background-color: var(--background-light);
}

.eye-icon {
  font-style: normal;
  font-size: 1rem;
}

/* ===================================
   Submit Button
   =================================== */
.submit-button {
  padding: 0.875rem 1rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
}

.submit-button:disabled,
.submit-button.disabled {
  background-color: #e0e0e0 !important;
  color: #9e9e9e !important;
  border-color: #e0e0e0 !important;
  opacity: 1;
  cursor: not-allowed;
  pointer-events: none;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:disabled,
.btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.btn:focus,
.btn:focus-visible {
  outline: 2px solid var(--primary-purple);
  outline-offset: 2px;
}

/* ===================================
   Status Icons & Circles
   =================================== */
.success-icon,
.email-icon,
.security-icon,
.error-icon {
  display: flex;
  justify-content: center;
  align-items: center;
}

.success-circle,
.email-circle,
.security-circle,
.error-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--success-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.email-circle {
  background-color: var(--info-color);
}

.security-circle {
  background-color: var(--primary-purple);
}

.error-circle {
  background-color: var(--error-color);
}

.checkmark,
.envelope,
.shield {
  color: white;
  font-size: 2rem;
  font-weight: bold;
}

.email-circle svg,
.security-circle svg,
.error-circle svg {
  color: white;
}

/* ===================================
   Two-Factor Code Input
   =================================== */
.verification-code-input {
  gap: 0.5rem;
}

.code-input {
  width: 50px;
  height: 50px;
  font-size: 1.25rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  text-align: center;
}

.code-input:focus {
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 0.125rem rgba(156, 39, 176, 0.25);
}

/* ===================================
   Validation & Error Messages
   =================================== */
.error-message {
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Alert Overrides */
.alert {
  border-radius: var(--border-radius);
  border: none;
  font-weight: 500;
}

.alert-success {
  background-color: rgba(46, 125, 50, 0.1);
  color: var(--success-color);
}

.alert-info {
  background-color: rgba(25, 118, 210, 0.1);
  color: var(--info-color);
}

.alert-danger {
  background-color: rgba(211, 47, 47, 0.1);
  color: var(--error-color);
}

/* Input Group Override */
.input-group .form-control:not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-group .btn:not(:first-child) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-radius: var(--border-radius);
}

.input-group .form-control {
  border-radius: var(--border-radius);
}

/* Bootstrap Validation Override */
.invalid-feedback {
  display: block !important;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.invalid-feedback.d-none {
  display: none !important;
}

.form-control.is-invalid {
  border-color: var(--error-color);
  box-shadow: 0 0 0 0.125rem rgba(211, 47, 47, 0.25);
}

/* Focus States for Accessibility */
input:focus,
textarea:focus,
select:focus,
button:focus,
.btn:focus {
  outline: 2px solid var(--primary-purple);
  outline-offset: 2px;
}

/* Theme Toggle and Language Dropdown */
.theme-icon-sun,
.theme-icon-moon {
  transition: opacity 0.2s ease;
}

#themeToggle {
  padding: 0.375rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#themeToggle:hover .theme-icon-sun,
#themeToggle:hover .theme-icon-moon {
  opacity: 0.8;
}

.dropdown-toggle {
  min-width: 50px;
}

.dropdown-menu {
  font-size: 0.875rem;
}

.dropdown-item {
  padding: 0.375rem 0.75rem;
}

.dropdown-item:hover {
  background-color: var(--primary-purple);
  color: white;
}

.d-flex.gap-2 > * + * {
  margin-left: 0.5rem;
}

/* Transparent parent containers for top navigation */
.d-flex.justify-content-end,
.d-flex.gap-2 {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Dropdown and buttons match form background in light mode */
.dropdown-menu {
  background-color: var(--background-white) !important;
  border: 1px solid var(--border-color) !important;
}

.btn-outline-secondary {
  background-color: var(--background-white) !important;
  border-color: var(--border-color) !important;
}

/* Light mode hover effects - light gray on white background */
.btn-outline-secondary:hover {
  background-color: var(--background-light) !important; /* Light gray #f8f9fa */
  border-color: var(--border-color-hover) !important;
  color: var(--text-primary) !important;
}

.dropdown-item:hover {
  background-color: var(--background-light) !important;
  color: var(--text-primary) !important;
}

.setup-progress {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.progress-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--background-light);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.progress-item:hover {
  background: var(--background-white);
  border-color: var(--primary-purple);
  transform: translateX(4px);
}

.progress-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-purple);
  color: white;
  border-radius: 50%;
  flex-shrink: 0;
}

.progress-text {
  font-weight: 500;
  color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 991.98px) {
  .auth-layout {
    flex-direction: column;
    background-image: url("../imgs/auth/login-background-2.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    position: relative;
  }

  .auth-layout::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-overlay-light);
    z-index: 1;
  }

  .form-panel {
    width: 100%;
    background-color: transparent;
    box-shadow: none;
    z-index: 2;
    padding: 6rem 1rem 2rem 1rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
  }

  .form-panel .container-fluid {
    width: 100%;
  }

  .auth-card {
    background-color: var(--glass-background);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-xl);
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--glass-border);
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
  }

  .background-panel {
    display: none !important;
  }

  .form-panel .position-absolute {
    position: fixed;
  }
}

@media (max-width: 767.98px) {
  .form-panel .position-absolute {
    padding: 0.75rem;
  }

  .auth-card {
    padding: 1.5rem 1rem;
  }
}

@media (max-width: 575.98px) {
  .form-panel {
    padding: 5rem 0.75rem 1rem 0.75rem;
  }

  .form-panel .position-absolute {
    top: 0.75rem !important;
    right: 0.75rem !important;
    padding: 0.5rem !important;
  }

  .auth-card {
    padding: 1.5rem 1rem;
    border-radius: var(--border-radius-lg);
    margin: 0;
  }

  .auth-logo {
    height: 60px;
  }

  .auth-subtitle {
    font-size: 1.25rem;
  }

  .auth-description {
    font-size: 0.875rem;
  }

  .form-control {
    padding: 0.75rem 0.875rem;
    font-size: 1rem;
  }

  .form-label {
    font-size: 0.9rem;
  }

  .submit-button {
    padding: 0.875rem;
    font-size: 1rem;
  }

  .code-input {
    width: 36px;
    height: 44px;
    font-size: 1rem;
  }

  .verification-code-input {
    gap: 0.15rem;
  }

  .success-circle,
  .email-circle,
  .security-circle {
    width: 64px;
    height: 64px;
  }

  .checkmark,
  .envelope,
  .shield {
    font-size: 1.75rem;
  }

  .btn-sm {
    font-size: 0.8rem;
    padding: 0.375rem 0.625rem;
  }

  .dropdown-menu {
    font-size: 0.9rem;
  }
}

@media (max-width: 374.98px) {
  .auth-card {
    padding: 1.25rem 0.875rem;
  }

  .auth-logo {
    height: 50px;
  }

  .auth-subtitle {
    font-size: 1.125rem;
  }

  .code-input {
    width: 32px;
    height: 40px;
    font-size: 0.8 rem;
  }

  .form-control {
    padding: 0.625rem 0.75rem;
  }

  .submit-button {
    padding: 0.75rem;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .form-panel {
    width: 50%;
  }

  .auth-card {
    padding: 2rem 1.5rem;
  }
}

@media (min-width: 1200px) {
  .form-panel {
    width: 55%;
  }

  .auth-card {
    padding: 2rem;
    max-width: 550px;
  }
}

/* Loading State */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Link Styles */
a {
  color: var(--primary-purple);
  text-decoration: none;
}

a:hover {
  color: var(--primary-purple-hover);
  text-decoration: underline;
}

/* Form Check Override */
.form-check-input:checked {
  background-color: var(--primary-purple);
  border-color: var(--primary-purple);
}

.form-check-input:focus {
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 0.125rem rgba(156, 39, 176, 0.25);
}

/* Server Status */
.server-status {
  margin-top: 1.5rem;
}

.server-status-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.server-status-title svg {
  color: var(--text-secondary);
  vertical-align: middle;
}

.server-status-items {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.server-status-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-label {
  font-size: 0.875rem;
  color: var(--text-body);
  font-weight: 500;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  position: relative;
  display: inline-block;
}

.status-dot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  opacity: 0.3;
}

.status-online {
  background-color: #4caf50;
}

.status-online::after {
  background-color: #4caf50;
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
}

.status-offline {
  background-color: #f44336;
}

.status-offline::after {
  background-color: #f44336;
  box-shadow: 0 0 8px rgba(244, 67, 54, 0.6);
}

/* Responsive adjustments for server status */
@media (max-width: 575.98px) {
  .server-status-items {
    gap: 1.25rem;
  }

  .status-label {
    font-size: 0.8rem;
  }

  .server-status-title {
    font-size: 0.85rem;
  }

  .server-status-title svg {
    width: 16px;
    height: 16px;
  }
}

@media (orientation: landscape) and (max-height: 600px) {
  .form-panel {
    padding: 1rem;
  }

  .auth-card {
    margin: 1rem auto;
    padding: 1.25rem 1rem;
  }

  .auth-logo {
    height: 50px;
    margin-bottom: 0.5rem !important;
  }

  .auth-header {
    margin-bottom: 1rem !important;
  }

  .auth-subtitle {
    font-size: 1.125rem;
    margin-bottom: 0.25rem !important;
  }

  .auth-description {
    font-size: 0.875rem;
  }

  .mb-3 {
    margin-bottom: 0.75rem !important;
  }

  .mb-4 {
    margin-bottom: 1rem !important;
  }

  .server-status {
    margin-top: 1rem;
  }

  .server-status-title {
    font-size: 0.8rem;
    margin-bottom: 0.5rem !important;
  }

  .server-status-items {
    gap: 1rem;
  }

  .status-label {
    font-size: 0.75rem;
  }

  hr.my-4 {
    margin-top: 0.75rem !important;
    margin-bottom: 0.75rem !important;
  }
}

/*
    Modal
*/

.sentinel-modal {
  border: none;
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-md);
  background-color: var(--background-white);
}

.sentinel-modal .modal-header {
  padding: var(--spacing-2xl) var(--spacing-2xl) var(--spacing-lg);
  background-color: transparent;
}

.sentinel-modal .modal-title {
  color: var(--text-primary);
  font-size: var(--font-size-lg);
}

.sentinel-modal .btn-close {
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

html[data-bs-theme="dark"] .sentinel-modal .btn-close {
  filter: invert(1);
}

.sentinel-modal .btn-close:hover {
  opacity: 1;
}

.sentinel-modal .modal-body {
  padding: 0 var(--spacing-2xl) var(--spacing-lg);
}

.sentinel-modal .modal-footer {
  padding: var(--spacing-lg) var(--spacing-2xl) var(--spacing-2xl);
  background-color: transparent;
}

.sentinel-modal .modal-footer .btn {
  border-radius: var(--border-radius);
}

.service-status-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 80px;
  height: 80px;
  background-color: rgba(211, 47, 47, 0.1);
  border-radius: 50%;
  margin: 0 auto;
}

html[data-bs-theme="dark"] .service-status-icon {
  background-color: rgba(239, 83, 80, 0.15);
}

.service-status-list {
  background-color: var(--background-light);
  border-radius: var(--border-radius);
  padding: var(--spacing-lg);
}

.service-item {
  display: flex;
  align-items: center;
  padding: var(--spacing-sm) 0;
}

.service-item:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
  margin-bottom: var(--spacing-sm);
  padding-bottom: var(--spacing-md);
}

.service-item .status-dot {
  margin-right: var(--spacing-md);
}

.service-name {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

/* ===============================
   Legal Document & Modal Styles
   =============================== */
.legal-document {
  font-family: "Nunito Sans", "Manrope", "Open Sans", Arial, sans-serif;
  color: var(--text-body);
  background: none;
  font-size: 1rem;
  line-height: 1.7;
}

.legal-document h4,
.legal-document h5,
.legal-document h6 {
  color: var(--primary-purple);
  font-weight: 700;
  margin-bottom: 0.75rem;
  border: none;
}

.legal-document h4 {
  font-size: 1.5rem;
}

.legal-document h5 {
  font-size: 1.15rem;
}

.legal-document h6 {
  font-size: 1rem;
}

.legal-document .alert {
  background: var(--background-light);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

html[data-bs-theme="dark"] .legal-document .alert {
  background: #23232b;
  color: #f5f5f5;
  border: 1px solid #444;
}

.legal-document ul.list-unstyled {
  padding-left: 0;
  margin-bottom: 1.25rem;
}

.legal-document ul.list-unstyled li {
  position: relative;
  padding-left: 1.5em;
  margin-bottom: 0.5em;
  list-style: none;
}

.legal-document ul.list-unstyled li::before {
  content: "\2022";
  color: var(--primary-purple);
  font-weight: bold;
  position: absolute;
  left: 0;
  top: 0.1em;
  font-size: 1.2em;
}

.legal-document .bg-light {
  background: var(--background-light) !important;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

html[data-bs-theme="dark"] .legal-document .bg-light {
  background: #23232b !important;
  border: 1px solid #444;
  color: #f5f5f5;
}

.legal-document .contact-section {
  background: var(--background-light);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1rem 1.25rem;
  font-size: 1rem;
  color: var(--text-primary);
}

html[data-bs-theme="dark"] .legal-document .contact-section {
  background: #23232b;
  border: 1px solid #444;
  color: #f5f5f5;
}

.legal-document address {
  font-style: normal;
  margin-bottom: 0;
}

.legal-document a {
  color: var(--primary-purple);
  text-decoration: underline;
}

.legal-document a:hover {
  color: var(--primary-purple-hover);
}

.legal-document hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 2rem 0;
}

/* Boxed lists for refund eligibility */
.legal-document .bg-light ul.list-unstyled {
  margin-bottom: 0;
}

/* Responsive adjustments for modal legal documents */
@media (max-width: 575.98px) {
  .sentinel-modal .modal-dialog {
    margin: 0.5rem;
  }

  .sentinel-modal .modal-content {
    padding: 0.5rem;
  }

  .legal-document {
    font-size: 0.97rem;
  }
}

/* ===================================
   Admin Dashboard Styles
   =================================== */

.admin-layout {
  background-image: url("../imgs/auth/login-background-2.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.admin-layout::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--background-overlay-light);
  z-index: 1;
  pointer-events: none;
}

.admin-layout .form-panel {
  z-index: 2;
}

.admin-layout .form-panel-wide {
  width: 90% !important;
  max-width: 90% !important;
}

.users-table {
  margin-bottom: 0;
}

.users-table thead th {
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.users-table thead th:hover {
  opacity: 0.8;
}

.users-table thead th .sort-icon {
  font-size: 12px;
  opacity: 0.6;
  margin-left: 4px;
}

.users-table tbody tr {
  cursor: pointer;
}

.users-table tbody td:last-child,
.users-table thead th:last-child {
  white-space: nowrap;
}

.pagination .page-link {
  color: var(--primary-purple);
  transition: all 0.2s ease;
}

.pagination .page-link:hover {
  color: var(--primary-purple-hover);
  background-color: rgba(156, 39, 176, 0.08);
  border-color: var(--primary-purple);
}

.pagination .page-link:focus {
  box-shadow: 0 0 0 0.2rem rgba(156, 39, 176, 0.25);
}

.pagination .page-item.active .page-link {
  background-color: var(--primary-purple);
  border-color: var(--primary-purple);
  color: white;
}

.pagination .page-item.disabled .page-link {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

html[data-bs-theme="dark"] .pagination .page-link {
  color: var(--primary-purple);
  background-color: var(--background-white);
}

html[data-bs-theme="dark"] .pagination .page-link:hover {
  color: var(--primary-purple-hover);
  background-color: rgba(186, 104, 200, 0.12);
  border-color: var(--primary-purple);
}

html[data-bs-theme="dark"] .pagination .page-item.active .page-link {
  background-color: var(--primary-purple);
  border-color: var(--primary-purple);
  color: white;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 0.2rem rgba(156, 39, 176, 0.25);
}

html[data-bs-theme="dark"] .form-control:focus,
html[data-bs-theme="dark"] .form-select:focus {
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 0.2rem rgba(186, 104, 200, 0.25);
}

.form-control-sm,
.form-select-sm {
  height: calc(1.5em + 0.5rem + 2px);
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  padding-left: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .users-table {
    font-size: 14px;
  }
}

/* ===================================
   Subscription Plan Styles
   =================================== */

.subscription-container {
  max-width: 1200px;
  margin: var(--spacing-lg) auto;
  padding: var(--spacing-2xl);
  background: var(--background-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

/* Subscription Header */
.subscription-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
  /*
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
  */
}

.subscription-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--primary-purple);
  margin-bottom: var(--spacing-sm);
  letter-spacing: -0.3px;
}

.subscription-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
  font-weight: 400;
}

/* New 3-Column Layout: Price + Account + Price */
.pricing-account-row {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: var(--spacing-xl);
  align-items: stretch;
}

.price-card-compact {
  padding: var(--spacing-lg);
  background: var(--background-light);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.3s ease;
  min-height: 140px;
}

.price-card-compact:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(156, 39, 176, 0.4);
  border-color: var(--primary-purple);
}

.price-card-compact .pricing-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 1px;
  margin-bottom: var(--spacing-sm);
}

.price-card-compact .pricing-amount {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-xs);
}

.price-card-compact .amount {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-purple);
}

.price-card-compact .period {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.price-card-compact .pricing-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Account Selector Card */
.account-selector-card {
  padding: var(--spacing-lg);
  background: var(--background-light);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--spacing-md);
  min-height: 140px;
}

.selector-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--spacing-lg) 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
}

.selection-step {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(
    135deg,
    var(--primary-purple),
    var(--primary-purple-light)
  );
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(156, 39, 176, 0.3);
}

.selector-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0 0 var(--spacing-md) 0;
  text-align: center;
}

.account-selector-card .account-summary {
  display: flex;
  gap: var(--spacing-lg);
  justify-content: center;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
}

.account-selector-card .summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
}

.account-selector-card .summary-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.account-selector-card .summary-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-purple);
}

/* Billing Section */
.billing-section {
  text-align: center;
}

.billing-section-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--spacing-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
}

.billing-section-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0 0 var(--spacing-lg) 0;
  text-align: center;
}

.billing-period-horizontal {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: var(--spacing-md) !important;
}

.billing-period-horizontal .period-option {
  margin-bottom: 0;
  width: 100%;
}

.billing-period-horizontal .period-label {
  padding: var(--spacing-md);
  min-height: 90px;
}

.billing-period-horizontal .period-name {
  font-size: 0.85rem;
}

.billing-period-horizontal .period-note {
  font-size: 0.75rem;
}

/* Checkout Section */
.checkout-section {
  text-align: center;
  padding: 0 0 var(--spacing-xl) 0;
}

.checkout-section .btn-subscribe {
  min-width: 300px;
  padding: 1rem 3rem;
  font-size: 1.125rem;
}

/* Pricing Section */
.pricing-section {
  background: var(--background-white);
  border-radius: var(--border-radius);
  padding: 0;
  text-align: center;
  border: none;
  transition: all 0.3s ease;
}

.pricing-section.pricing-section-dual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--spacing-lg);
  align-items: stretch;
  text-align: center;
}

/* Account Selector */
.account-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-lg);
  margin: auto 0 0 0;
}

.btn-account-control {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--border-color);
  background: var(--background-white);
  color: var(--text-body);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  font-weight: 600;
}

.btn-account-control:hover {
  border-color: var(--primary-purple);
  color: var(--primary-purple);
  background: rgba(156, 39, 176, 0.05);
  box-shadow: 0 2px 8px rgba(156, 39, 176, 0.2);
}

.btn-account-control:active {
  transform: scale(0.95);
}

.account-input {
  width: 80px;
  padding: var(--spacing-sm) var(--spacing-md);
  text-align: center;
  font-size: 1.125rem;
  font-weight: 700;
  border: 2px solid var(--primary-purple);
  border-radius: var(--border-radius);
  color: var(--primary-purple);
  background: var(--background-light);
}

.account-input:focus {
  outline: none;
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 0.3rem rgba(156, 39, 176, 0.25);
}

/* Remove number input arrows */
.account-input::-webkit-outer-spin-button,
.account-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.account-input[type="number"] {
  -moz-appearance: textfield;
}

/* Billing Period Selector */
.billing-period-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
  margin: auto 0 0 0;
}

.period-option {
  position: relative;
  cursor: pointer;
}

.period-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.period-option input[type="radio"]:checked + .period-label {
  background: linear-gradient(
    135deg,
    var(--primary-purple),
    var(--primary-purple-light)
  );
  color: white;
  border-color: var(--primary-purple);
  box-shadow: 0 4px 12px rgba(156, 39, 176, 0.3);
}

.period-option input[type="radio"]:checked + .period-label .period-note {
  color: rgba(255, 255, 255, 0.9);
}

.period-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--background-white);
  transition: all 0.3s ease;
  min-height: 120px;
  cursor: pointer;
  position: relative;
}

.period-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  display: inline-block;
  line-height: 1.2;
}

.period-badge-popular {
  background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
  color: white;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

.period-badge-best {
  background: linear-gradient(135deg, #4caf50, #66bb6a);
  color: white;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
}

.period-option:hover .period-label {
  border-color: var(--primary-purple);
  background: rgba(156, 39, 176, 0.02);
}

.period-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: var(--spacing-xs);
}

.period-note {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* CTA Section */
.cta-section {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.btn-subscribe {
  padding: 0.875rem 2.5rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
  min-width: 280px;
  background: linear-gradient(
    135deg,
    var(--primary-purple),
    var(--primary-purple-light)
  );
  border: none;
}

.btn-subscribe:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(156, 39, 176, 0.35);
}

.btn-subscribe:active {
  transform: translateY(-1px);
}

/* Disabled State for Checkout Button */
.btn-subscribe.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.btn-subscribe.disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Disabled State for Account Control Buttons */
.btn-account-control.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  border-color: var(--border-color);
  color: var(--text-secondary);
  background: var(--background-light);
}

.btn-account-control.disabled:hover {
  border-color: var(--border-color);
  color: var(--text-secondary);
  background: var(--background-light);
  box-shadow: none;
}

/* Error Message Styling */
.error-message-container {
  background: rgba(211, 47, 47, 0.1);
  border: 1px solid var(--error-color);
  border-radius: var(--border-radius);
  padding: var(--spacing-lg);
  margin: var(--spacing-md) 0;
  display: flex;
  gap: var(--spacing-md);
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
  text-align: left;
}

.error-message-container svg,
.error-message-container .error-icon {
  color: var(--error-color);
  flex-shrink: 0;
  align-self: center;
}

.error-message-content {
  flex: 1;
  text-align: left;
}

.error-message-title {
  gap: var(--spacing-sm);
  font-weight: 600;
  color: var(--error-color);
  margin-bottom: var(--spacing-xs);
  font-size: 0.95rem;
}

.error-message-text {
  color: var(--text-body);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

/* Dark Mode - Error Messages */
html[data-bs-theme="dark"] .error-message-container {
  background: rgba(239, 83, 80, 0.15);
  border-color: var(--error-color);
}

html[data-bs-theme="dark"] .error-message-title {
  color: var(--error-color);
}

html[data-bs-theme="dark"] .error-message-text {
  color: var(--text-secondary);
}

/* Table Error Row */
.pricing-table-error {
  background: rgba(211, 47, 47, 0.1) !important;
  border: 1px solid var(--error-color) !important;
  border-top: 1px solid var(--error-color) !important;
}

.pricing-table-error td {
  border: none !important;
  border-top: 1px solid var(--error-color) !important;
  padding: var(--spacing-lg) !important;
}

.pricing-table-error-content {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--spacing-md);
}

.pricing-table-error-content svg {
  color: var(--error-color);
  flex-shrink: 0;
  margin-top: 0;
}

.pricing-table-error-text {
  flex: 1;
}

.pricing-table-error-title {
  font-weight: 600;
  color: var(--error-color);
  margin-bottom: var(--spacing-xs);
  font-size: 0.95rem;
}

.pricing-table-error-message {
  color: var(--text-body);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

/* Dark Mode - Table Error */
html[data-bs-theme="dark"] .pricing-table-error {
  background: rgba(239, 83, 80, 0.15) !important;
  border-color: var(--error-color) !important;
}

html[data-bs-theme="dark"] .pricing-table-error-title {
  color: var(--error-color);
}

html[data-bs-theme="dark"] .pricing-table-error-message {
  color: var(--text-secondary);
}

/* Volume Discounts Section */
.volume-discounts-section {
  background: var(--background-light);
  border-radius: var(--border-radius);
  padding: var(--spacing-2xl);
  border: 1px solid var(--border-color);
}

.discount-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.discount-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

.discount-description {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Pricing Table */
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.pricing-table thead {
  background: var(--background-light);
  border-bottom: 2px solid var(--border-color);
}

.pricing-table thead th {
  padding: var(--spacing-lg);
  text-align: center;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
  white-space: nowrap;
}

.pricing-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s ease;
}

.pricing-table tbody tr:hover {
  background-color: rgba(156, 39, 176, 0.03);
}

.pricing-table tbody tr:last-child {
  border-bottom: none;
}

.pricing-table tbody td {
  /*padding: var(--spacing-lg);*/
  text-align: center;
  color: var(--text-body);
  font-size: 0.95rem;
}

.account-tier {
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

.pricing-table tbody td:first-child {
  text-align: center;
}

/* Responsive Design for Subscription */
@media (max-width: 991.98px) {
  .subscription-container {
    padding: var(--spacing-xl);
  }

  .pricing-account-row {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .billing-period-horizontal {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-sm);
  }

  .billing-period-horizontal .period-label {
    padding: var(--spacing-sm);
    min-height: 80px;
  }

  .billing-period-horizontal .period-name {
    font-size: 0.75rem;
  }

  .billing-period-horizontal .period-note {
    font-size: 0.7rem;
  }

  .pricing-section.pricing-section-dual {
    grid-template-columns: 1fr;
  }

  .subscription-title {
    font-size: 1.75rem;
  }

  .subscription-subtitle {
    font-size: 0.95rem;
  }

  .checkout-section .btn-subscribe {
    min-width: 100%;
  }

  .billing-period-selector {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 767.98px) {
  .subscription-container {
    padding: var(--spacing-lg);
    background: var(--background-white);
    margin: var(--spacing-md) auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    max-width: 100%;
  }

  .subscription-title {
    font-size: 1.5rem;
  }

  .subscription-subtitle {
    font-size: 0.9rem;
  }

  .pricing-account-row {
    grid-template-columns: 1fr;
  }

  .billing-period-horizontal {
    grid-template-columns: 1fr !important;
    gap: var(--spacing-md) !important;
  }

  .billing-period-horizontal .period-option {
    width: 100%;
  }

  .billing-period-horizontal .period-label {
    min-height: 80px;
  }

  .price-card-compact {
    padding: var(--spacing-lg);
  }

  .price-card-compact .amount {
    font-size: 1.75rem;
  }

  .checkout-section .btn-subscribe {
    width: 100%;
    min-width: unset;
    padding: 0.875rem 2rem;
    font-size: 1rem;
  }

  .pricing-section {
    padding: var(--spacing-lg);
    background: var(--background-white);
    margin-bottom: var(--spacing-lg);
  }

  .pricing-label {
    font-size: 0.75rem;
    margin-bottom: var(--spacing-xs);
  }

  .pricing-amount {
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-lg);
  }

  .amount {
    font-size: 2rem;
  }

  .currency {
    font-size: 1rem;
  }

  .period {
    font-size: 0.9rem;
  }

  .pricing-description {
    font-size: 0.85rem;
  }

  .selection-section {
    margin-bottom: var(--spacing-xl);
  }

  .selection-title {
    font-size: 1rem;
    gap: var(--spacing-md);
  }

  .selection-step {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .selection-subtitle {
    margin-bottom: var(--spacing-lg);
    font-size: 0.9rem;
  }

  .account-selector {
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
  }

  .btn-account-control {
    width: 44px;
    height: 44px;
  }

  .account-input {
    width: 90px;
    font-size: 1.2rem;
  }

  .account-summary {
    gap: var(--spacing-md);
    padding: var(--spacing-md);
  }

  .summary-label {
    font-size: 0.8rem;
  }

  .summary-value {
    font-size: 1.5rem;
  }

  .period-option {
    margin-bottom: var(--spacing-sm);
  }

  .period-label {
    min-height: 90px;
    padding: var(--spacing-md);
  }

  .period-name {
    font-size: 0.9rem;
  }

  .period-note {
    font-size: 0.75rem;
  }

  .cta-section {
    margin-bottom: var(--spacing-lg);
  }

  .btn-subscribe {
    width: 100%;
    min-width: unset;
    padding: 0.8rem 1.5rem;
  }

  .pricing-table-section {
    margin: 0 calc(var(--spacing-lg) * -1);
    border-radius: 0;
  }

  .pricing-table thead th {
    padding: var(--spacing-md) var(--spacing-sm);
    font-size: 0.85rem;
  }

  .pricing-table tbody td {
    padding: var(--spacing-md) var(--spacing-sm);
    font-size: 0.9rem;
  }

  .discount-header {
    margin-bottom: var(--spacing-lg);
  }

  .discount-title {
    font-size: 1.5rem;
  }

  .discount-description {
    font-size: 0.95rem;
  }

  .volume-discounts-section {
    padding: var(--spacing-xl);
    background: var(--background-light);
  }

  .table-responsive {
    overflow-x: auto;
  }
}

@media (max-width: 575.98px) {
  .subscription-container {
    padding: var(--spacing-md);
  }

  .subscription-title {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
  }

  .subscription-subtitle {
    font-size: 1.05rem;
  }

  .account-selector {
    gap: var(--spacing-sm);
  }

  .btn-account-control {
    width: 40px;
    height: 40px;
  }

  .account-input {
    width: 80px;
    font-size: 1.1rem;
  }

  .billing-period-selector {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .period-label {
    min-height: 75px;
    padding: var(--spacing-md) var(--spacing-sm);
  }

  .period-name {
    font-size: 0.85rem;
  }

  .period-note {
    font-size: 0.7rem;
  }

  .btn-subscribe {
    padding: 0.7rem 1.25rem;
    font-size: 0.95rem;
  }

  .pricing-table {
    font-size: 0.8rem;
  }

  .pricing-table thead th {
    padding: var(--spacing-sm);
    font-size: 0.7rem;
  }

  .pricing-table tbody td {
    padding: var(--spacing-sm);
    font-size: 0.75rem;
  }

  .discount-title {
    font-size: 1.25rem;
  }

  .discount-description {
    font-size: 0.9rem;
  }

  .volume-discounts-section {
    padding: var(--spacing-lg);
  }
}

/* Dark Mode Adjustments - Subscription */
html[data-bs-theme="dark"] {
  .pricing-section {
    background: var(--background-white);
    border-color: var(--border-color);
  }

  .volume-discounts-section {
    background: var(--background-light);
    border-color: var(--border-color);
  }

  .btn-account-control {
    background: var(--background-light);
    border-color: var(--border-color);
    color: var(--text-body);

    &:hover {
      background: rgba(186, 104, 200, 0.08);
      border-color: var(--primary-purple);
      color: var(--primary-purple);
    }
  }

  .account-input {
    background: var(--background-light);
    color: var(--primary-purple);
    border-color: var(--primary-purple);
  }

  .period-label {
    background: var(--background-white);
    border-color: var(--border-color);

    &:hover {
      background: rgba(186, 104, 200, 0.05);
    }
  }

  .period-option input[type="radio"]:checked + .period-label {
    background: linear-gradient(
      135deg,
      var(--primary-purple),
      var(--primary-purple-light)
    );
    border-color: var(--primary-purple);
    color: white;
  }

  .pricing-table thead {
    background: var(--background-light);
    border-bottom-color: var(--border-color);
  }

  .pricing-table tbody tr {
    border-bottom-color: var(--border-color);

    &:hover {
      background-color: rgba(186, 104, 200, 0.03);
    }
  }

  @media (max-width: 767.98px) {
    .subscription-container {
      background: var(--background-white);
    }
  }
}


/* ===================================
   Payment Status Pages
   =================================== */

.status-container {
    max-width: 800px;
    margin: 1rem auto 2rem auto;
    padding: var(--spacing-2xl);
    background: var(--background-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

/* Status Icon */
.status-icon-wrapper {
    text-align: center;
    margin-bottom: var(--spacing-sm);
}

.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin: 0 auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.status-icon-success {
    background: linear-gradient(135deg, var(--success-color), #66bb6a);
    color: white;
}

.status-icon-error {
    background: linear-gradient(135deg, var(--error-color), #ef5350);
    color: white;
}

/* Status Header */
.status-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 2px solid var(--border-color);
}

.status-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.5px;
}

.status-success .status-title {
    color: var(--success-color);
}

.status-error .status-title {
    color: var(--error-color);
}

.status-subtitle {
  font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

/* Status Card */
.status-card {
    background: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-2xl);
    margin-bottom: var(--spacing-2xl);
    box-shadow: var(--shadow-sm);
}

.status-card-title {
  font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

/* Detail Grid */
.status-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.status-detail-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.status-detail-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-detail-value {
  font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Total Amount */
.status-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xl);
    background: var(--background-white);
    border: 2px solid var(--success-color);
    border-radius: var(--border-radius);
    margin-top: var(--spacing-xl);
}

.status-total-label {
  font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.status-total-value {
  font-size: 1.75rem;
    font-weight: 700;
    color: var(--success-color);
}

/* Error Message */
.status-error-message {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-body);
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--background-white);
    border-left: 4px solid var(--error-color);
    border-radius: var(--border-radius);
}

/* Help Box */
.status-help-box {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-xl);
    background: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.status-help-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.status-help-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

/* Action Buttons */
.status-actions {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    flex-wrap: wrap;
}

.status-btn-primary,
.status-btn-secondary {
    min-width: 140px;
    padding: 0.625rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.status-btn-primary.btn-lg,
.status-btn-secondary.btn-lg {
    padding: 0.625rem 1.25rem;
    font-size: 0.95rem;
}

.status-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.status-btn-secondary {
    background: var(--background-white);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.status-btn-secondary:hover {
    background: var(--background-light);
    border-color: var(--primary-purple);
    color: var(--primary-purple);
    transform: translateY(-2px);
}

/* Responsive Design for Status Pages */
@media (max-width: 767.98px) {
    .status-container {
        padding: var(--spacing-xl);
        margin-bottom: var(--spacing-2xl);
    }

    .status-icon {
      width: 72px;
      height: 72px;
    }

    .status-icon svg {
      width: 38px;
      height: 38px;
    }

    .status-title {
      font-size: 1.35rem;
    }

    .status-subtitle {
    font-size: 1rem;
    }

    .status-card {
        padding: var(--spacing-xl);
    }

    .status-detail-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .status-total {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }

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

    .status-btn-primary,
    .status-btn-secondary {
        width: 100%;
        min-width: unset;
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 575.98px) {
    .status-container {
        padding: var(--spacing-lg);
    }

    .status-icon {
      width: 56px;
      height: 56px;
    }

    .status-icon svg {
      width: 32px;
      height: 32px;
    }

    .status-title {
      font-size: 1.25rem;
    }

    .status-subtitle {
    font-size: 0.95rem;
    }

    .status-card {
        padding: var(--spacing-lg);
    }

    .status-card-title {
      font-size: 1.05rem;
    }

    .status-detail-label {
        font-size: 0.8rem;
    }

    .status-detail-value {
      font-size: 0.95rem;
    }

    .status-total-label {
      font-size: 0.95rem;
    }

    .status-total-value {
      font-size: 1.35rem;
    }

    .status-btn-primary,
    .status-btn-secondary {
        font-size: 0.85rem;
    }
}

/* Dark Mode Adjustments - Status Pages */
html[data-bs-theme="dark"] {
    .status-card,
    .status-help-box {
        background: var(--background-light);
        border-color: var(--border-color);
    }

    .status-total,
    .status-error-message {
        background: var(--background-light);
    }

    .status-btn-secondary {
        background: var(--background-light);
        border-color: var(--border-color);
        color: var(--text-primary);
    }

    .status-btn-secondary:hover {
        background: rgba(186, 104, 200, 0.08);
        border-color: var(--primary-purple);
        color: var(--primary-purple);
    }
}


/* price cell wrapper */
.price-cell {
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    border-radius: 6px;
    width:90px;
}

    /* visual for selected column ? adjust to taste */

    .tier-row-dim {
        opacity: 0.5;
    }

    .price-cell.selected {
      position:relative;
    }
    .price-cell.selected::before {
        content: "";
        left: -.5em;
        right: -.5em;
        top: 0.3em;
        border-width: 3px;
        border-style: solid;
        border-color: var(--primary-purple);
        position: absolute;
        border-right-color: transparent;
        height: 1.7em;
        transform: rotate(1deg);
        opacity: .9;
        border-radius: 50%;
    }

    .price-cell.selected::after {
        content: "";
        left: -.3em;
        right: -.5em;
        top: 0.45em;
        border-width: 3px;
        border-style: solid;
        border-color: var(--primary-purple);
        border-left-color: transparent;
        border-top-color: transparent;
        position: absolute;
        height: 1.7em;
        transform: rotate(-2deg);
        opacity: .9;
        border-radius: 50%;
    }

/* ??? Payment Status Loading ??? */
.status-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 0;
    margin-bottom: 1rem;
}

.status-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color, #e0e0e0);
    border-top-color: var(--primary-purple, #9c27b0);
    border-radius: 50%;
    animation: statusSpin 0.8s linear infinite;
}

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

.status-loading-text {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-muted, #6c757d);
    font-weight: 500;
}

/* ===================================
   Grid Row Action Flash Animation
   =================================== */
@keyframes gridRowFlash {
    0%   { background-color: rgba(46, 125, 50, 0.22); }
    40%  { background-color: rgba(46, 125, 50, 0.10); }
    100% { background-color: transparent; }
}

.grid-row-action-flash {
    animation: gridRowFlash 1.4s ease-out !important;
}

html[data-bs-theme="dark"] .grid-row-action-flash {
    animation: gridRowFlashDark 1.4s ease-out !important;
}

@keyframes gridRowFlashDark {
    0%   { background-color: rgba(102, 187, 106, 0.20); }
    40%  { background-color: rgba(102, 187, 106, 0.08); }
    100% { background-color: transparent; }
}

/* ===================================
   Subscription Status Cell (compact)
   =================================== */
.sub-status-cell {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    white-space: nowrap;
    font-size: 0.85em;
    font-weight: 500;
    text-align: left;
}

.sub-detail {
    color: var(--text-secondary);
    font-weight: 400;
}

/* ===================================
   Subscription grid ? Actions column
   =================================== */
.subscription-actions-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    min-height: 2rem;
}

.subscription-action-btn {
    white-space: nowrap;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    padding: 0.35rem 0.6rem !important;
}

/* Evitar truncagem com "..." nos botões da grid */
.subscription-actions-cell .subscription-action-btn,
.subscription-actions-cell .subscription-action-btn span {
    overflow: visible;
    text-overflow: unset;
    min-width: fit-content;
}