/* 
  * Modals Specific CSS
  * These styles define the appearance and theming for modals defined in assets/js/modals.js
*/

:root {
  /* Font */
  --modal-font: "Poppins", sans-serif;
  --pricing-font: "Outfit", sans-serif;

  /* Z-index */
  --z-backdrop: 1040;
  --z-modal: 1050;

  /* Pricing Modal Variables */
  --pricing-card-bg: linear-gradient(to top left, white, rgba(240, 253, 244, 0.35), white);
  --pricing-card-border: #d1f3dd;
  --pricing-card-border-hover: #9fdeb5;
  --pricing-accent: #00a63e;
  --pricing-btn-bg: #ffffff;
  --pricing-btn-gradient: linear-gradient(to right, #28a745, #008bd1);
  --pricing-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  --pricing-shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  --pricing-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

  /* Dashboard Modal Variables */
  --dashboard-primary: #10b981;
  --dashboard-primary-dark: #059669;
  --dashboard-danger: #ef4444;
  --dashboard-danger-dark: #dc2626;

  --dashboard-bg-primary: #f9fafb;
  --dashboard-bg-secondary: #e5e7eb;
  --dashboard-bg-sidebar: #ffffff;
  --dashboard-bg-card: #ffffff;

  --dashboard-text-primary: #111827;
  --dashboard-text-secondary: #6b7280;
  --dashboard-text-muted: #9ca3af;

  --dashboard-border: #e5e7eb;

  --dashboard-gradient-card: linear-gradient(to top left, white, rgba(240, 253, 244, 0.3), white);
  --dashboard-gradient-stats-card: linear-gradient(to top left, white, rgba(220, 252, 231, 0.5), white);
  --dashboard-gradient-button: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --dashboard-gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);

  --dashboard-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  --dashboard-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --dashboard-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

  /* Form Modal Colors */
  --form-bg-primary: #ffffff;
  --form-bg-secondary: #f2f2f2;
  --form-border: #dee2e6;
  --form-text-primary: #212529;
  --form-text-secondary: #61686f;
  --form-text-muted: #6c757d;

  /* Form Toggle Panel */
  --form-toggle-bg: linear-gradient(160deg, #4f46e5 0%, #3b82f6 50%, #2563eb 100%);
  --form-toggle-text: #ffffff;

  /* Form Buttons */
  --form-btn-gradient: linear-gradient(to left, #3b82f6, #0ea5e9);
  --form-btn-gradient-hover: linear-gradient(to left, #2563eb, #0284c7);
  --form-btn-green: #16a34a;
  --form-btn-green-hover: #15803d;
  --form-btn-green-outline: #4ade80;
  --form-btn-green-outline-hover: #86efac;

  /* Form Validation */
  --form-error: #ef4444;
  --form-error-light: rgba(239, 68, 68, 0.1);
  --form-success: #1fd498;
  --form-success-hover: #24f5af;

  /* Form Shadows */
  --form-shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --form-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ========================================
     Dark Theme Variables
     ======================================== */

[data-theme="dark"] {
  /* Pricing Modal Dark Theme */
  --pricing-card-bg: linear-gradient(to top left, rgba(254, 243, 199, 0.03), #1d2023, rgba(254, 243, 199, 0.03));
  --pricing-card-border: #3c4149;
  --pricing-card-border-hover: #4a515c;
  --pricing-accent: #22c55e;
  --pricing-btn-bg: #2d3237;
  --pricing-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.5);
  --pricing-shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  --pricing-shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.25);

  /* Dashboard Modal Dark Theme */
  --dashboard-bg-primary: #1a1b1e;
  --dashboard-bg-secondary: #25262b;
  --dashboard-bg-sidebar: #1f2023;
  --dashboard-bg-card: #25262b;
  --dashboard-text-primary: #f8f9fa;
  --dashboard-text-secondary: #adb5bd;
  --dashboard-text-muted: #868e96;
  --dashboard-border: #373a40;
  --dashboard-gradient-card: linear-gradient(to top left, rgba(134, 149, 162, 0.1), #1c1f23, rgba(134, 149, 162, 0.1));
  --dashboard-gradient-stats-card: linear-gradient(to top left, rgba(117, 130, 142, 0.15), #1d2023, rgba(117, 130, 142, 0.15));

  /* Form Modal Dark Theme */
  --form-bg-primary: #2a292f;
  --form-bg-secondary: #1a1a1a;
  --form-border: #404040;
  --form-text-primary: #f0f0f0;
  --form-text-secondary: #b3b3b3;
  --form-text-muted: #8e8d8d;
}

/* ========================================
     FORM MODAL STYLES
     ======================================== */

#formModal .modal-dialog {
  max-width: min(830px, 97vw);
}

.form-wrapper {
  background-color: var(--form-bg-primary);
  border-radius: 16px;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 580px;
}

.modal-content {
  border: none;
}

.img-invert {
  filter: brightness(0) invert(1);
}

.form-wrapper p {
  font-size: 0.875rem;
  line-height: 1.625;
  letter-spacing: 0.3px;
  margin: 24px 0;
}

.form-wrapper span {
  font-size: 0.75rem;
}

.form-wrapper a {
  font-size: 0.875rem;
  margin: 16px 0 8px;
}

/* Form Buttons */
#register-new-account {
  background: var(--form-btn-green);
  color: var(--form-toggle-text);
  border: none;
  border-radius: 9999px;
  box-shadow: var(--form-shadow-sm);
  outline: 2px solid var(--form-btn-green-outline);
  transition: all 250ms ease;
  padding: 10px 24px;
  font-weight: 600;
  font-size: 0.875rem;
}

#register-new-account:hover {
  background: var(--form-btn-green-hover);
  box-shadow: var(--form-shadow-md);
  outline: 2px solid var(--form-btn-green-outline-hover);
}

#login-to-dashboard {
  background: var(--form-btn-green);
  color: var(--form-toggle-text);
  border: none;
  border-radius: 9999px;
  box-shadow: var(--form-shadow-sm);
  outline: 2px solid var(--form-btn-green-outline);
  transition: all 250ms ease;
  padding: 8px 24px;
  font-weight: 600;
  font-size: 0.875rem;
}

#login-to-dashboard:hover {
  background: var(--form-btn-green-hover);
  box-shadow: var(--form-shadow-md);
  outline: 2px solid var(--form-btn-green-outline-hover);
}

/* Sign In Form Button */
#signin-form .form-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--form-btn-gradient);
  color: var(--form-toggle-text);
  border: none;
  border-radius: 9999px;
  box-shadow: var(--form-shadow-sm);
  transition: all 250ms ease;
  padding: 10px 24px;
  font-weight: 600;
  font-size: 0.875rem;
  margin-top: 16px;
}

#signin-form .form-btn:hover {
  background: var(--form-btn-gradient-hover);
  box-shadow: var(--form-shadow-md);
}

/* Sign Up Form Button */
#signup-form .form-btn {
  background: var(--form-btn-gradient);
  color: var(--form-toggle-text);
  border: none;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  box-shadow: var(--form-shadow-sm);
  transition: all 250ms ease;
  padding: 10px 24px;
  font-weight: 600;
  font-size: 0.875rem;
  margin-top: 16px;
}

#signup-form .form-btn:hover {
  background: var(--form-btn-gradient-hover);
  box-shadow: var(--form-shadow-md);
}

/* Form Container */
.form-wrapper form {
  background-color: var(--form-bg-primary);
  display: flex;
  border-radius: 24px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 25px;
  height: 100%;
}

/* Close Button */
button.btn-close-form {
  position: absolute;
  z-index: 99999;
  right: -13px;
  top: -15px;
  margin-top: 0 !important;
  border: none;
  padding: 0 !important;
  background-color: var(--form-bg-secondary) !important;
  color: var(--form-text-primary);
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.07), 0 4px 12px -2px rgba(0, 0, 0, 0.04);
  width: 30px;
  height: 30px;
  border-radius: 9999px !important;
  outline: none !important;
}

/* Form Labels */
.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0;
  color: var(--form-text-primary);
}

/* Form Inputs */
.form-wrapper input:not([type="checkbox"]) {
  background-color: var(--form-bg-secondary);
  border: none;
  margin: 3px 0;
  padding: 8px 15px;
  font-size: 0.875rem;
  border-radius: 6px;
  width: 100%;
  outline: none;
  transition: 250ms ease;
  color: var(--form-text-primary);
}

.form-wrapper input:not([type="checkbox"]):focus {
  background-color: var(--form-bg-secondary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Form Container Positioning */
.form-container {
  position: absolute;
  top: 0;
  height: 100%;
  transition: all 0.6s ease-in-out;
}

.sign-in {
  left: 0;
  width: 50%;
  z-index: 2;
}

.form-wrapper.active .sign-in {
  transform: translateX(100%);
}

.sign-up {
  left: 0;
  width: 50%;
  opacity: 0;
  z-index: 1;
}

.form-wrapper.active .sign-up {
  transform: translateX(100%);
  opacity: 1;
  z-index: 5;
  animation: move 0.6s;
}

@keyframes move {
  0%,
  49.99% {
    opacity: 0;
    z-index: 1;
  }

  50%,
  100% {
    opacity: 1;
    z-index: 5;
  }
}

/* Toggle Container */
.toggle-container {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  overflow: hidden;
  transition: all 0.6s ease-in-out;
  border-radius: 16px;
  z-index: 1000;
}

.form-wrapper.active .toggle-container {
  transform: translateX(-100%);
}

.toggle {
  height: 100%;
  background: var(--form-toggle-bg);
  color: var(--form-toggle-text);
  position: relative;
  left: -100%;
  height: 100%;
  width: 200%;
  transform: translateX(0);
  transition: all 0.6s ease-in-out;
}

.form-wrapper.active .toggle {
  transform: translateX(50%);
}

.toggle-panel {
  position: absolute;
  width: 50%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 30px;
  text-align: center;
  top: 0;
  transform: translateX(0);
  transition: all 0.6s ease-in-out;
}

.toggle-left {
  transform: translateX(-200%);
}

.form-wrapper.active .toggle-left {
  transform: translateX(0);
}

.toggle-right {
  right: 0;
  transform: translateX(0);
}

.form-wrapper.active .toggle-right {
  transform: translateX(200%);
}

/* Auth Switch Link Styles */
.form-container .auth-switch-link {
  position: absolute;
  bottom: 0px;
  display: none;
  margin-top: 24px;
  text-align: center;
  padding: 24px 0;
}

.form-container .auth-switch-link p {
  margin: 0;
  font-size: 13px;
  color: var(--form-text-primary);
}

.auth-switch-link .auth-switch-btn {
  color: #b37876;
  text-decoration: none;
  font-weight: 600;
  transition: 250ms ease;
  cursor: pointer;
}

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

/* Form Validation */
.is-invalid {
  border: 2px solid var(--form-error) !important;
  color: var(--form-error);
}

.is-invalid::placeholder {
  color: var(--form-error);
  opacity: 0.8;
}

.is-invalid:focus {
  outline: none;
  border-color: var(--form-error);
  box-shadow: 0 0 5px var(--form-error-light);
}

.error-message {
  color: var(--form-error);
  font-size: 0.75rem;
  margin-top: 4px;
  display: none;
  font-weight: 600;
}

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

/* Checkbox Styles */
.checkbox-container {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--form-text-primary);
  margin-bottom: 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 500;
  color: var(--form-text-secondary);
  font-size: 0.8rem;
}

.checkbox-label a {
  font-size: 0.8rem;
}

.checkbox-container .custom-checkbox {
  align-self: flex-start;
  margin-top: 3px;
}

/* Feature Box */
.feature-box {
  line-height: 1.625;
  font-weight: 500;
}

.feature-box ul {
  padding: 0;
  font-size: 0.875rem;
  list-style: none;
}

.feature-box ul li {
  display: flex;
  align-items: start;
  margin: 13px 0;
}

.feature-box ul li p {
  margin: 0;
  margin-left: 13px;
}

.feature-box .checkmark {
  width: 22px;
  height: 22px;
  flex: none;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background-color: var(--form-success);
  padding: 8px;
  fill: var(--form-toggle-text);
}

.feature-box p {
  font-size: 0.85rem;
  line-height: 1.625;
}

.feature-box a {
  color: var(--form-success);
  font-size: 0.85rem;
  text-decoration: none;
  transition: 250ms ease;
}

.feature-box a:hover {
  color: var(--form-success-hover);
  text-decoration: underline;
}

/* Password Toggle Button */
.form-container .password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  z-index: 10;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--form-text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: 250ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.form-container .password-toggle-btn:hover {
  background-color: var(--form-bg-primary);
  color: var(--form-text-primary);
}

.form-container .password-toggle-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ========================================
     DASHBOARD MODAL STYLES
     ======================================== */

#dashboardModal .modal-dialog {
  max-width: min(1250px, 97vw);
}

.dashboard-modal {
  border-radius: 13px;
  background: var(--dashboard-bg-primary);
  max-width: 100%;
  width: 100%;
  max-height: 90vh;
  height: 90vh;
}

.dashboard-modal .dashboard-container {
  display: flex;
  height: 100%;
}

/* Close Button */
.dashboard-close-btn {
  position: absolute;
  right: -12px;
  top: -12px;
  width: 32px;
  height: 32px;
  background: var(--dashboard-bg-secondary);
  color: var(--dashboard-text-primary);
  border: none;
  border-radius: 50%;
  box-shadow: var(--dashboard-shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 1001;
}

.dashboard-close-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--dashboard-shadow-lg);
}

.dashboard-close-btn svg {
  width: 16px;
  height: 16px;
}

/* Layout Container */
.dashboard-container {
  display: flex;
  height: 100%;
  overflow: hidden;
}

/* Sidebar */
.dashboard-sidebar {
  width: 260px;
  background: var(--dashboard-bg-sidebar);
  border-right: 1px solid var(--dashboard-border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: thin;
  border-radius: 13px 0 0 13px;
}

.dashboard-sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 0 8px;
}

.dashboard-sidebar-header h5 {
  color: var(--dashboard-text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.dashboard-nav-toggle-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--dashboard-border);
  color: var(--dashboard-text-secondary);
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dashboard-nav-toggle-btn:hover {
  background: var(--dashboard-bg-secondary);
  color: var(--dashboard-text-primary);
}

.dashboard-nav-toggle-btn svg {
  width: 20px;
  height: 20px;
}

/* Navigation */
.dashboard-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.dashboard-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--dashboard-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--modal-font);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.dashboard-nav-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.dashboard-nav-link:hover {
  background: var(--dashboard-bg-secondary);
  color: var(--dashboard-text-primary);
}

.dashboard-nav-link.active {
  background: var(--dashboard-gradient-button);
  color: #ffffff;
}

/* Logout Section */
.dashboard-logout-section {
  margin-top: auto;
  padding-top: 16px;
}

.dashboard-logout-btn {
  color: var(--dashboard-danger);
}

.dashboard-logout-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--dashboard-danger);
}

/* Content Area */
.dashboard-content {
  flex: 1;
  padding: 25px 30px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #999 transparent;
}

/* Tab System */
.dashboard-tab {
  display: none;
  animation: dashboardFadeIn 0.3s ease;
}

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

@keyframes dashboardFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

.dashboard-header h4 {
  color: var(--dashboard-text-primary);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 13px 0;
}

.dashboard-divider {
  height: 2px;
  width: 100%;
  border: none;
  border-radius: 8px;
  background: linear-gradient(to right, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #ff4e50 50%, #ff4e50 62.5%, #8e9eab 62.5%, #8e9eab 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4);
}

/* Welcome Banner */
.dashboard-welcome {
  background: var(--dashboard-gradient-card);
  border: 1px solid var(--dashboard-border);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  margin-bottom: 32px;
}

.dashboard-welcome h4 {
  color: var(--dashboard-text-primary);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.dashboard-welcome p {
  color: var(--dashboard-text-secondary);
  font-size: 1rem;
  margin: 0;
  line-height: 1.6;
}

/* Stats Grid */
.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.dashboard-stat-card {
  background: var(--dashboard-gradient-stats-card);
  border: 1px solid #d1f3dd;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--dashboard-shadow-sm);
  transition: all 0.3s ease;
}

[data-theme="dark"] .dashboard-stat-card {
  border-color: #3c4149;
}

.dashboard-modal .dashboard-stat-card:hover {
  transform: translateY(-4px);
  border-color: #9fdeb5;
  box-shadow: var(--dashboard-shadow-md);
}

[data-theme="dark"] .dashboard-modal .dashboard-stat-card:hover {
  border-color: #454f44;
}

.dashboard-stat-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  gap: 8px;
}

.dashboard-stat-header h6 {
  color: var(--dashboard-text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.dashboard-stat-value {
  color: var(--dashboard-primary);
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  text-align: center;
}

.dashboard-stat-label {
  color: var(--dashboard-text-muted);
  font-size: 0.875rem;
  margin-top: 8px;
}

/* Tooltip */
.dashboard-tooltip {
  position: relative;
  cursor: help;
  color: var(--dashboard-text-muted);
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-tooltip svg {
  width: 16px;
  height: 16px;
}

.dashboard-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: #ffffff;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1060;
}

[data-theme="dark"] .dashboard-tooltip::after {
  background: rgba(255, 255, 255, 0.95);
  color: #000000;
}

.dashboard-tooltip:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

/* Action Cards */
.dashboard-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.dashboard-action-card {
  background: var(--dashboard-gradient-card);
  border: 1px solid var(--dashboard-border);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  box-shadow: var(--dashboard-shadow-sm);
  transition: all 0.3s ease;
}

.dashboard-action-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--dashboard-shadow-md);
}

.dashboard-modal .dashboard-action-card h6 {
  color: var(--dashboard-text-primary);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 10px 0;
}

.dashboard-modal .dashboard-action-card p {
  color: var(--dashboard-text-secondary);
  margin: 0 0 24px 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.dashboard-action-card .dashboard-btn {
  margin-inline: auto;
}

/* Forms */
.dashboard-description {
  color: var(--dashboard-text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  background: var(--dashboard-gradient-card);
  border: 1px solid var(--dashboard-border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 30px;
}

.dashboard-form {
  background: var(--dashboard-gradient-card);
  border: 1px solid var(--dashboard-border);
  border-radius: 16px;
  padding: 20px;
}

.dashboard-form-group {
  margin-bottom: 24px;
}

.dashboard-form-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--dashboard-text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.dashboard-form-input {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--dashboard-border);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: var(--modal-font);
  color: var(--dashboard-text-primary);
  background: var(--dashboard-bg-sidebar);
  transition: all 0.2s ease;
}

.dashboard-form-input:focus-visible {
  outline: none;
  border-color: var(--dashboard-primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.dashboard-form-hint {
  display: block;
  color: var(--dashboard-text-muted);
  font-size: 0.8rem;
  margin-top: 6px;
  line-height: 1.5;
}

.dashboard-form-hint a {
  color: var(--dashboard-primary);
  text-decoration: none;
  font-weight: 500;
}

.dashboard-form-hint a:hover {
  text-decoration: underline;
}

/* Radio Group */
.dashboard-radio-group {
  display: flex;
  gap: 24px;
  margin-top: 8px;
}

.dashboard-radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--dashboard-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}

.dashboard-radio-label input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--dashboard-primary);
}

/* Form Notice */
.dashboard-form-notice {
  background: rgba(251, 191, 36, 0.1);
  border-left: 4px solid #fbbf24;
  padding: 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--dashboard-text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.dashboard-form-notice strong {
  color: var(--dashboard-text-primary);
}

/* Form Row */
.dashboard-form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* Profile Tabs */
.dashboard-profile-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 30px;
  border-bottom: 2px solid var(--dashboard-border);
}

.dashboard-profile-tab-btn {
  padding: 10px 18px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--dashboard-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--modal-font);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: -2px;
}

.dashboard-profile-tab-btn:hover {
  color: var(--dashboard-text-primary);
  background: var(--dashboard-bg-secondary);
  border-radius: 8px 8px 0 0;
}

.dashboard-profile-tab-btn.active {
  color: var(--dashboard-primary);
  border-bottom-color: var(--dashboard-primary);
}

.dashboard-profile-tab-content {
  display: none;
  animation: dashboardFadeIn 0.3s ease;
}

.dashboard-profile-tab-content.active {
  display: block;
}

/* Account Details */
.dashboard-account-details {
  background: var(--dashboard-gradient-card);
  border: 1px solid var(--dashboard-border);
  border-radius: 16px;
  padding: 12px 24px;
  margin-bottom: 30px;
}

.dashboard-account-row {
  display: flex;
  padding: 16px 0;
  border-bottom: 1px solid var(--dashboard-border);
}

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

.dashboard-account-label {
  flex: 0 0 180px;
  color: var(--dashboard-text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
}

.dashboard-account-value {
  flex: 1;
  color: var(--dashboard-text-primary);
  font-size: 0.9rem;
  font-weight: 500;
}

.dashboard-account-status {
  color: var(--dashboard-primary);
  font-weight: 600;
}

/* Delete Account Section */
.dashboard-delete-section {
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 16px;
  padding: 28px;
}

.dashboard-delete-section h4 {
  color: var(--dashboard-danger);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 12px 0;
}

.dashboard-delete-section p {
  color: var(--dashboard-text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0 0 20px 0;
}

.dashboard-delete-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--dashboard-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 20px;
  cursor: pointer;
}

.dashboard-delete-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--dashboard-danger);
}

/* Buttons */
.dashboard-btn:not(#dashboard-btn) {
  padding: 10px 20px;
  border: none;
  width: auto;
  height: auto;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--modal-font);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dashboard-btn-primary {
  background: var(--dashboard-gradient-button);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.dashboard-btn-primary:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
  transform: translateY(-2px);
}

.dashboard-btn-primary:active {
  transform: translateY(0);
}

.dashboard-btn-danger {
  background: var(--dashboard-gradient-danger);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.dashboard-btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.3);
  transform: translateY(-2px);
}

.dashboard-btn-danger:active {
  transform: translateY(0);
}

.dashboard-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ========================================
   DASHBOARD HISTORY TAB STYLES
   ======================================== */

/* History Stats Grid */
.history-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
  width: 100%;
}

.history-stat-card {
  background: var(--dashboard-gradient-stats-card);
  border: 1px solid #d1f3dd;
  border-radius: var(--radius-xl);
  box-shadow: var(--dashboard-shadow-sm);
  transition: all var(--transition-normal);
}

[data-theme="dark"] .history-stat-card {
  border-color: #3c4149;
}

.history-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--dashboard-shadow-md);
}

.history-stat-card .card-body,
.history-stat-body {
  padding: var(--spacing-lg);
}

.history-stat-card h6 {
  color: var(--dashboard-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--spacing-md);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.history-stat-card h5 {
  color: var(--dashboard-primary);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: 0;
}

/* History Filters */
.history-filters {
  margin-bottom: var(--spacing-lg);
}

.filters-container {
  background: var(--dashboard-gradient-card);
  border: 1px solid var(--dashboard-border);
  border-radius: var(--radius-xl);
  padding: var(--spacing-lg);
  box-shadow: var(--dashboard-shadow-sm);
}

.filters-row {
  display: flex;
  align-items: end;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  min-width: 0;
  flex: 1;
}

.filter-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--dashboard-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--spacing-xs);
}

.filter-select {
  min-width: 140px;
  border: 1px solid var(--dashboard-border);
  border-radius: var(--radius-md);
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-size-sm);
  font-family: var(--font-family-primary);
  color: var(--dashboard-text-primary);
  background-color: var(--dashboard-bg-sidebar);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: var(--transition-normal);
  cursor: pointer;
}

.filter-select:focus-visible {
  outline: none;
  border-color: var(--dashboard-primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* View Toggle Group */
.view-toggle-group {
  display: flex;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--dashboard-shadow-sm);
}

.history-view-btn {
  border: 1px solid var(--dashboard-border);
  background: var(--dashboard-bg-sidebar);
  color: var(--dashboard-text-secondary);
  padding: var(--spacing-sm) var(--spacing-md);
  height: 38px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family-primary);
  transition: all var(--transition-normal);
  cursor: pointer;
}

.history-view-btn:first-child {
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
}

.history-view-btn:last-child {
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  border-left: none;
}

.history-view-btn:hover:not(.active) {
  background: var(--dashboard-bg-secondary);
  color: var(--dashboard-text-primary);
}

.history-view-btn.active {
  background: var(--dashboard-gradient-button);
  color: #ffffff;
  border-color: var(--dashboard-primary);
}

/* Clear All Button */
.clear-all-btn {
  align-self: end;
  height: 38px;
  border-radius: var(--radius-md);
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--dashboard-danger);
  background: rgba(239, 68, 68, 0.05);
  font-family: var(--font-family-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  transition: all var(--transition-normal);
  cursor: pointer;
}

.clear-all-btn:hover:not(:disabled) {
  background: var(--dashboard-danger);
  color: #ffffff;
  border-color: var(--dashboard-danger);
  transform: translateY(-1px);
  box-shadow: var(--dashboard-shadow-sm);
}

.clear-all-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* History Views */
.history-view {
  animation: dashboardFadeIn 0.3s ease;
}

/* Grid View */
#historyGridView .view-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--spacing-md);
}

/* List View */
#historyListView .view-container {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

/* History Item Cards */
.history-item,
.history-list-item {
  background: var(--dashboard-gradient-card);
  border: 1px solid var(--dashboard-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--dashboard-shadow-sm);
  overflow: hidden;
  transition: all var(--transition-normal);
  position: relative;
}

.history-item:hover,
.history-list-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--dashboard-shadow-lg);
}

/* History Item Preview */
.history-item-preview {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--dashboard-bg-secondary);
}

.history-item-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: var(--transition-normal);
}

/* History Item Info */
.history-item-info,
.history-list-info {
  padding: var(--spacing-md);
}

.history-item-filename,
.history-list-filename {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--dashboard-text-primary);
  margin-bottom: var(--spacing-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item-details,
.history-list-details {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.history-item-size,
.history-item-type,
.history-item-date,
.history-list-size,
.history-list-type,
.history-list-date {
  padding: 2px var(--spacing-sm);
  background: var(--dashboard-bg-secondary);
  font-size: var(--font-size-xs);
  color: var(--dashboard-text-secondary);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-sm);
}

/* History Item Actions */
.history-item-actions,
.history-list-actions {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  display: flex;
  gap: var(--spacing-xs);
  opacity: 0;
  transition: opacity var(--transition-normal);
  z-index: 10;
}

.history-item:hover .history-item-actions,
.history-list-item:hover .history-list-actions {
  opacity: 1;
}

.history-item-action,
.history-list-action {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--dashboard-shadow-sm);
}

/* Preview button */
.history-item-action.preview,
.history-list-action.preview {
  background: var(--dashboard-primary);
  color: #ffffff;
}

.history-item-action.preview:hover,
.history-list-action.preview:hover {
  background: var(--dashboard-primary-dark);
  transform: scale(1.1);
}

/* Download button */
.history-item-action.download,
.history-list-action.download {
  background: var(--color-primary);
  color: #ffffff;
}

.history-item-action.download:hover,
.history-list-action.download:hover {
  background: var(--color-primary-hover);
  transform: scale(1.1);
}

/* Delete button */
.history-item-action.delete,
.history-list-action.delete {
  background: var(--dashboard-danger);
  color: #ffffff;
}

.history-item-action.delete:hover,
.history-list-action.delete:hover {
  background: var(--dashboard-danger-dark);
  transform: scale(1.1);
}

/* List Item Specific Styles */
.history-list-item {
  flex-direction: row;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  display: flex;
  align-items: center;
}

.history-list-thumbnail {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--dashboard-bg-secondary);
}

.history-list-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.history-list-info {
  flex: 1;
  min-width: 0;
  padding: 0;
}

.history-list-actions {
  top: 50%;
  right: var(--spacing-md);
  transform: translateY(-50%);
}

/* Empty State */
.empty-history {
  background: var(--dashboard-gradient-card);
  border: 2px dashed var(--dashboard-border);
  border-radius: var(--radius-xl);
  padding: var(--spacing-4xl);
  text-align: center;
}

.empty-history-icon {
  opacity: 0.5;
  margin-bottom: var(--spacing-lg);
}

.empty-history h5 {
  color: var(--dashboard-text-secondary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--spacing-sm);
}

.empty-history p {
  color: var(--dashboard-text-muted);
  font-size: var(--font-size-base);
  margin-bottom: var(--spacing-xl);
}

/* ========================================
     PRICING MODAL STYLES
     ======================================== */

#pricingModal .modal-dialog {
  max-width: min(1250px, 97vw);
  font-family: var(--pricing-font);
}

.pricing-modal {
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  border-radius: 13px;
  overflow: hidden;
  border: none;
}

[data-theme="dark"] .pricing-modal {
  background: #202225;
}

/* Header */
.pricing-modal__header {
  padding: 30px;
  text-align: center;
  position: relative;
}

.pricing-modal__logo-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.pricing-modal__logo-brand img {
  filter: brightness(0) saturate(100%);
}

[data-theme="dark"] .pricing-modal__logo-brand img {
  filter: brightness(0) invert(1);
}

.pricing-modal__main-title {
  font-size: 2rem;
  font-weight: 700;
  color: #212529;
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

[data-theme="dark"] .pricing-modal__main-title {
  color: #f0f0f0;
}

.pricing-modal__description {
  font-size: 1.1rem;
  color: #61686f;
  margin: 12px auto 0;
  line-height: 1.6;
  max-width: max-content;
}

[data-theme="dark"] .pricing-modal__description {
  color: #b3b3b3;
}

.pricing-modal__close {
  position: absolute;
  right: 28px;
  top: 28px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.3s;
}

.pricing-modal__close:hover {
  background: rgba(0, 0, 0, 0.07);
}

[data-theme="dark"] .pricing-modal__close:hover {
  background: rgba(255, 255, 255, 0.07);
}

.pricing-modal__close svg {
  stroke: #61686f;
  stroke-width: 2;
}

[data-theme="dark"] .pricing-modal__close svg {
  stroke: #b3b3b3;
}

/* Body */
.pricing-modal__body {
  padding: 28px 40px 30px;
  overflow-y: auto;
  scrollbar-width: thin;
}

/* Pricing Cards Grid */
.pricing-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 50px;
}

.pricing-card {
  background: var(--pricing-card-bg);
  border: 1px solid var(--pricing-card-border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--pricing-shadow-sm);
  transition: all 0.3s;
}

.pricing-card:hover {
  transform: translateY(-4px);
  border-color: var(--pricing-card-border-hover);
  box-shadow: var(--pricing-shadow-md);
}

.pricing-card--highlight {
  border-color: #92c9a5;
  box-shadow: var(--pricing-shadow-md);
}

.pricing-card--highlight:hover {
  box-shadow: var(--pricing-shadow-lg);
}

[data-theme="dark"] .pricing-card--highlight {
  box-shadow: var(--pricing-shadow-lg);
  border-color: var(--pricing-card-border-hover);
}

/* Best Value Badge */
.pricing-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #0095df;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
}

/* Card Header */
.pricing-card__header {
  margin-bottom: 12px;
}

.pricing-card__name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--pricing-accent);
  margin-bottom: 14px;
}

.pricing-card__credits {
  background: linear-gradient(to top left, white, rgba(220, 252, 231, 1), white);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 18px;
}

[data-theme="dark"] .pricing-card__credits {
  background: linear-gradient(to top left, rgba(97, 107, 117, 0.15), #1d2023, rgba(97, 107, 117, 0.15));
}

.pricing-card__credits-amount {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 4px;
}

.credits-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--pricing-accent);
}

.credits-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #61686f;
}

[data-theme="dark"] .credits-label {
  color: #b3b3b3;
}

.pricing-card__credits-rate {
  font-size: 0.875rem;
  font-weight: 500;
  color: #61686f;
  margin-top: 4px;
  margin-bottom: 0;
}

[data-theme="dark"] .pricing-card__credits-rate {
  color: #b3b3b3;
}

.pricing-card__price {
  display: flex;
  align-items: baseline;
  margin-bottom: 10px;
}

.pricing-card__currency {
  font-size: 1.5rem;
  font-weight: 600;
  color: #212529;
  margin-right: 3px;
}

[data-theme="dark"] .pricing-card__currency {
  color: #f0f0f0;
}

.pricing-card__amount {
  font-size: 2.25rem;
  font-weight: 600;
  color: #212529;
}

[data-theme="dark"] .pricing-card__amount {
  color: #f0f0f0;
}

.pricing-card__period {
  font-size: 1.125rem;
  color: #61686f;
  margin-left: 4px;
}

[data-theme="dark"] .pricing-card__period {
  color: #b3b3b3;
}

/* Divider */
.pricing-divider {
  height: 1px;
  width: 100%;
  border-radius: 6px;
  background: linear-gradient(to right, #79c1e1, #709adb, #ed5c57, #e17e71, #f7d07f, #cadf8b);
}

.pricing-colorful-hr {
  position: relative;
  height: 1px;
  width: 100%;
  border: none;
  border-radius: 13px;
  margin: 20px 0;
  background: linear-gradient(to right, #79c1e1, #709adb, #ed5c57, #e17e71, #f7d07f, #cadf8b);
}

.pricing-colorful-hr::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to left, #ffffff, transparent);
}

[data-theme="dark"] .pricing-colorful-hr::before {
  background: linear-gradient(to left, #1a1a19, transparent);
}

/* Description */
.pricing-card__description {
  flex-grow: 1;
  margin-top: 16px;
}

.description-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #212529;
  margin-bottom: 6px;
}

[data-theme="dark"] .description-title {
  color: #f0f0f0;
}

.description-text {
  color: #212529;
  line-height: 1.5;
  margin-bottom: 16px;
}

[data-theme="dark"] .description-text {
  color: #f0f0f0;
}

/* Button */
.pricing-card__btn-container {
  position: relative;
  margin-top: 25px;
}

.pricing-card__btn {
  position: relative;
  width: 100%;
  padding: 12px 24px;
  border: none;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #212529;
  background: var(--pricing-btn-gradient);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  font-family: var(--pricing-font);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .pricing-card__btn {
  color: #f0f0f0;
}

.pricing-card__btn::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 1px;
  background: var(--pricing-btn-bg);
  border-radius: 999px;
  opacity: 1;
  transition: opacity 0.3s;
}

.pricing-card__btn .btn-text {
  position: relative;
  z-index: 2;
  transition: color 0.3s;
}

.pricing-card__btn:not(:disabled):hover {
  box-shadow: 0 6px 13px rgba(34, 197, 94, 0.2);
  transform: translateY(-2px);
}

html:not([data-theme="dark"]) .pricing-card__btn:not(:disabled):hover::before {
  opacity: 0;
}

html:not([data-theme="dark"]) .pricing-card__btn:not(:disabled):hover span {
  color: #ffffff;
}

.pricing-btn--highlight {
  color: #ffffff;
  box-shadow: 0 6px 13px rgba(34, 197, 94, 0.1);
}

[data-theme="dark"] .pricing-btn--highlight {
  box-shadow: 0 6px 13px rgba(34, 197, 94, 0.2);
}

html:not([data-theme="dark"]) .pricing-btn--highlight::before {
  opacity: 0;
  inset: 0;
}

html:not([data-theme="dark"]) .pricing-btn--highlight .btn-text {
  color: #ffffff;
}

html:not([data-theme="dark"]) .pricing-btn--highlight:not(:disabled):hover::before {
  opacity: 0;
}

html:not([data-theme="dark"]) .pricing-btn--highlight:not(:disabled):hover .btn-text {
  color: #ffffff;
}

.pricing-card__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pricing-card__btn:not(:disabled):active {
  transform: translateY(0);
}

.pricing-card__btn .spinner-border {
  z-index: 5;
}

/* Button Tooltip */
.pricing-card__btn-container::after {
  content: "Top-up your PixLab account with lifetime non-expiring API Credits";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(100% + 10px);
  opacity: 0;
  pointer-events: none;
  color: #fff;
  background: rgba(0, 0, 0, 0.9);
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: opacity 0.2s, transform 0.2s;
  white-space: normal;
  min-width: 220px;
  max-width: 280px;
  text-align: center;
  line-height: 1.5;
  text-transform: none;
  font-family: var(--pricing-font);
  z-index: 1060;
}

[data-theme="dark"] .pricing-card__btn-container::after {
  color: #000;
  background: rgba(255, 255, 255, 0.95);
}

.pricing-card__btn-container::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(100% + 5px);
  opacity: 0;
  pointer-events: none;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid rgba(0, 0, 0, 0.9);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 1060;
}

[data-theme="dark"] .pricing-card__btn-container::before {
  border-top-color: rgba(255, 255, 255, 1);
}

.pricing-card__btn-container:has(.pricing-card__btn:not(:disabled)):hover::before,
.pricing-card__btn-container:has(.pricing-card__btn:not(:disabled)):hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* Features Section */
.pricing-features__list {
  max-width: max-content;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.pricing-feature {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pricing-feature svg {
  color: #10b981;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
}

.pricing-feature div {
  font-size: 1.1rem;
  line-height: 1.5;
  color: #61686f;
  font-weight: 500;
}

[data-theme="dark"] .pricing-feature div {
  color: #b3b3b3;
}

.pricing-feature strong {
  font-weight: 600;
  color: #212529;
}

[data-theme="dark"] .pricing-feature strong {
  color: #f0f0f0;
}

/* Footer */
.pricing-footer {
  text-align: center;
  margin-top: 30px;
}

.pricing-footer p {
  font-size: 1rem;
  color: #61686f;
  margin: 0;
  line-height: 1.6;
  font-weight: 500;
}

[data-theme="dark"] .pricing-footer p {
  color: #b3b3b3;
}

.pricing-footer a {
  color: var(--pricing-accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.pricing-footer a:hover {
  color: #10b981;
  text-decoration: underline;
}

/* ========================================
     RESPONSIVE
     ======================================== */

@media (max-width: 768px) {
  /* Dashboard Modal Mobile */
  #dashboardModal .modal-dialog {
    max-width: 100vw;
    margin: 0;
    max-height: 100vh;
    height: 100vh;
  }

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

  .dashboard-content {
    flex: 1;
    height: 100%;
    padding: 20px;
  }

  .dashboard-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-height: 100vh;
    position: relative;
  }

  .dashboard-sidebar {
    width: 100%;
    padding: 16px;
    min-height: auto;
    border-bottom: 1px solid var(--dashboard-border);
    scrollbar-width: none;
    max-height: 600px;
    overflow: auto;
    border-radius: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .dashboard-sidebar:not(.open) {
    max-height: 70px;
    overflow: hidden;
  }

  .dashboard-sidebar-header {
    padding: 0;
  }

  .dashboard-nav-toggle-btn {
    display: inline-flex;
  }

  .dashboard-sidebar button:not(.dashboard-nav-toggle-btn) {
    padding: 8px 16px;
    font-size: 0.875rem;
  }

  .dashboard-close-btn {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    z-index: 10;
  }

  .dashboard-close-btn svg {
    width: 20px;
    height: 20px;
  }

  /* Pricing Modal Mobile */
  #pricingModal .modal-dialog {
    margin: 0;
    max-width: 100vw !important;
    height: 100vh;
  }

  .pricing-modal {
    height: 100vh;
    border-radius: 0;
  }

  .pricing-modal__header {
    padding: 13px 12px;
  }

  .pricing-modal__main-title {
    font-size: 1.25rem;
  }

  .pricing-modal__description {
    font-size: 1rem;
  }

  .pricing-modal__close {
    right: 10px;
    top: 10px;
  }

  .pricing-modal__body {
    padding: 12px 12px 24px;
  }

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

  .pricing-features__list {
    max-width: 100%;
  }

  .pricing-feature div {
    font-size: 1rem;
  }

  .pricing-footer {
    margin-top: 24px;
    padding: 13px 0;
  }

  .pricing-footer p {
    font-size: 0.875rem;
  }

  .pricing-card__btn-container::before,
  .pricing-card__btn-container::after {
    visibility: hidden;
  }

  /* Form Modal Mobile */
  #formModal .modal-dialog {
    margin: 0;
    max-width: 100vw;
    max-height: 100vh;
    height: 100vh;
  }

  .form-wrapper {
    width: 100%;
    border-radius: 0;
  }

  .form-wrapper .toggle-container,
  .form-wrapper .toggle {
    display: none;
  }

  .form-wrapper .form-container {
    position: relative;
    left: 0;
    top: 0;
    width: 100%;
    height: auto;
    opacity: 1;
    transform: none;
    transition: none;
    padding: 48px 24px;
    box-sizing: border-box;
    height: 100vh;
  }

  .form-wrapper .form-container.sign-in {
    display: block;
    z-index: 2;
  }

  .form-wrapper .form-container.sign-up {
    display: none;
    z-index: 1;
    animation: none;
  }

  .form-wrapper.active .form-container.sign-in {
    display: none;
    z-index: 1;
  }

  .form-wrapper.active .form-container.sign-up {
    display: block;
    z-index: 2;
    transform: translateX(0);
  }

  .form-wrapper form {
    padding: 0;
    min-height: auto;
    justify-content: flex-start;
  }

  .form-wrapper .form-container .form-label {
    margin-bottom: 5px;
    font-size: 13px;
  }

  .form-wrapper .btn-close-form {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 40px;
    height: 40px;
    padding: 8px;
    border-radius: var(--radius-full);
    z-index: 1060;
  }

  .form-wrapper .btn-close-form svg {
    width: 18px;
    height: 18px;
  }

  .form-wrapper .forgot-pass-link {
    position: unset !important;
    margin-top: 20px;
  }

  /* Show switch links on mobile only */
  .form-container .auth-switch-link {
    display: block;
  }

  .history-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .history-stat-card .card-body,
  .history-stat-body {
    padding: 15px;
  }

  .history-stat-card h6 {
    font-size: 13px;
    margin-bottom: 10px;
  }

  .history-stat-card h5 {
    font-size: 20px;
  }

  #historyGridView .view-container {
    grid-template-columns: 1fr;
  }

  .filters-row {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .filter-group {
    flex: none;
    width: 100%;
  }

  .filter-select {
    min-width: auto;
    width: 100%;
  }

  .clear-all-btn {
    align-self: stretch;
    width: 100%;
    margin-top: 20px;
  }

  .view-toggle-group {
    width: 100%;
  }

  .history-list-item {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .history-list-thumbnail {
    width: 100%;
    height: 120px;
    margin: 0 auto;
  }

  .history-list-actions {
    position: static;
    transform: none;
    justify-content: center;
    margin-top: 10px;
    opacity: 1;
  }

  .history-item-actions {
    opacity: 1;
  }
}

@media (min-width: 769px) and (max-width: 991px) {
  .pricing-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}
