@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* =============================================
   AFFILIATE PROGRAM STYLES - COMPLETE
   ============================================= */

/* ===== FORCE PARENT CONTAINERS FULL WIDTH ===== */
#row-html1-0 {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

#row-html1-0 .am-element {
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
  padding: 0 !important;
}

#html1 {
  width: 100% !important;
  max-width: 100% !important;
}

/* ===== AFFILIATE PAYOUT TYPE DROPDOWN ===== */
#row-aff_payout_type-0 {
  width: 100% !important;
  max-width: 100% !important;
  margin: 1.5rem 0 !important;
  padding: 1.25rem !important;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-sizing: border-box;
}

.dark #row-aff_payout_type-0 {
  background: #1e293b;
  border-color: #334155;
}

#row-aff_payout_type-0 .am-element-title {
  margin-bottom: 0.75rem;
}

#row-aff_payout_type-0 .am-element-title label {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #334155;
  display: block;
}

.dark #row-aff_payout_type-0 .am-element-title label {
  color: #e2e8f0;
}

#row-aff_payout_type-0 .am-element {
  width: 100% !important;
  display: block !important;
}

#row-aff_payout_type-0 select,
#aff_payout_type-0 {
  width: 100% !important;
  max-width: 400px;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  color: #1e293b;
  background-color: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

#row-aff_payout_type-0 select:hover,
#aff_payout_type-0:hover {
  border-color: #6366f1;
}

#row-aff_payout_type-0 select:focus,
#aff_payout_type-0:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.dark #row-aff_payout_type-0 select,
.dark #aff_payout_type-0 {
  background-color: #0f172a;
  border-color: #334155;
  color: #f1f5f9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a78bfa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.dark #row-aff_payout_type-0 select:hover,
.dark #aff_payout_type-0:hover {
  border-color: #8b5cf6;
}

.dark #row-aff_payout_type-0 select:focus,
.dark #aff_payout_type-0:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

/* ===== AFFILIATE CONTAINER ===== */
.affiliate-container {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  background: transparent;
  padding: 0;
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Main Title */
.affiliate-container .affiliate-title {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  text-align: center;
  margin: 0 0 1.5rem 0;
  letter-spacing: -0.5px;
}

.dark .affiliate-container .affiliate-title {
  color: #f1f5f9;
}

/* Section Titles */
.affiliate-container .section-title {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #334155;
  text-align: center;
  margin: 1.5rem 0 1rem;
  position: relative;
}

.affiliate-container .section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, #10b981, #06b6d4);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

.dark .affiliate-container .section-title {
  color: #e2e8f0;
}

/* ===== PROGRESS BAR - ALWAYS 100% WIDTH ===== */
.affiliate-container .progress-section {
  width: 100% !important;
  margin: 1rem 0 0 0;
  padding: 0;
  box-sizing: border-box;
}

.affiliate-container .progress-bar-wrapper {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  height: 22px;
  background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 100%);
  border-radius: 11px;
  overflow: visible;
  margin-bottom: 70px;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

.dark .affiliate-container .progress-bar-wrapper {
  background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
}

/* Progress Fill - Max 45% */
.affiliate-container .progress-fill {
  height: 100%;
  background: linear-gradient(90deg,
      #10b981 0%,
      #34d399 20%,
      #06b6d4 40%,
      #22d3ee 60%,
      #3b82f6 80%,
      #6366f1 100%);
  background-size: 200% 100%;
  border-radius: 11px;
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  animation: affiliateFill 4s ease-out forwards, shimmer 3s ease-in-out infinite;
  box-shadow:
    0 0 10px rgba(16, 185, 129, 0.5),
    0 0 20px rgba(6, 182, 212, 0.4);
}

@keyframes affiliateFill {
  0% {
    width: 0%;
  }

  25% {
    width: 12%;
  }

  50% {
    width: 25%;
  }

  75% {
    width: 38%;
  }

  100% {
    width: 45%;
  }
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Progress Markers - Percentage based (always relative to 100% tube) */
.affiliate-container .marker {
  position: absolute;
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  top: 32px;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  padding: 6px 14px;
  border-radius: 18px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
  z-index: 10;
  white-space: nowrap;
}

.affiliate-container .marker::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 7px solid #6366f1;
}

/* Markers at 20%, 40%, 60%, 80% of the 100% tube */
.affiliate-container .marker.m1 {
  left: 10%;
}

.affiliate-container .marker.m2 {
  left: 21%;
}

.affiliate-container .marker.m3 {
  left: 32%;
}

.affiliate-container .marker.m4 {
  left: 45%;
}

/* Tiers Grid */
.affiliate-container .tiers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 1rem 0;
  width: 100% !important;
  box-sizing: border-box;
}

.affiliate-container .tier-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem 1rem;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
}

.affiliate-container .tier-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.dark .affiliate-container .tier-card {
  background: #1e293b;
  border-color: #334155;
}

.affiliate-container .tier-card.starter {
  border-top: 4px solid #10b981;
}

.affiliate-container .tier-card.bronze {
  border-top: 4px solid #f59e0b;
}

.affiliate-container .tier-card.silver {
  border-top: 4px solid #94a3b8;
}

.affiliate-container .tier-card.gold {
  border-top: 4px solid #eab308;
}

.affiliate-container .tier-name {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  margin: 0 0 0.5rem;
}

.dark .affiliate-container .tier-name {
  color: #94a3b8;
}

.affiliate-container .tier-rate {
  font-size: 2.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0.25rem 0;
  line-height: 1.2;
}

.affiliate-container .tier-sales {
  font-size: 0.85rem;
  font-weight: 500;
  color: #64748b;
  margin-top: 0.25rem;
}

.dark .affiliate-container .tier-sales {
  color: #94a3b8;
}

/* Example Box */
.affiliate-container .example-box {
  width: 100% !important;
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.7;
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid #10b981;
  text-align: left;
  box-sizing: border-box;
}

.dark .affiliate-container .example-box {
  background: #1e293b;
  color: #cbd5e1;
}

.affiliate-container .example-box .highlight {
  color: #10b981;
  font-weight: 700;
}

/* Lifetime Badge */
.affiliate-container .lifetime-badge {
  text-align: center;
  margin: 1rem 0;
}

.affiliate-container .lifetime-badge span {
  display: inline-block;
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

/* Warning Note */
.affiliate-container .warning-note {
  width: 100% !important;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1rem 0 0 0;
  font-size: 0.85rem;
  color: #92400e;
  text-align: left;
  box-sizing: border-box;
}

.dark .affiliate-container .warning-note {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.dark .affiliate-container .warning-note strong {
  color: #fbbf24;
}

/* ===== RESPONSIVE - Tablet ===== */
@media (max-width: 992px) {
  .affiliate-container .tiers-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }

  .affiliate-container .tier-rate {
    font-size: 1.75rem;
  }

  #row-aff_payout_type-0 select,
  #aff_payout_type-0 {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .affiliate-container .affiliate-title {
    font-size: 1.25rem;
  }

  .affiliate-container .section-title {
    font-size: 1rem;
  }

  /* Tube stays 100%, just adjust height */
  .affiliate-container .progress-bar-wrapper {
    height: 18px;
    margin-bottom: 60px;
  }

  .affiliate-container .marker {
    font-size: 0.7rem;
    padding: 5px 10px;
    top: 26px;
  }

  .affiliate-container .marker::before {
    top: -5px;
    border-left-width: 6px;
    border-right-width: 6px;
    border-bottom-width: 6px;
  }

  .affiliate-container .tiers-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .affiliate-container .tier-card {
    padding: 1rem 0.75rem;
  }

  .affiliate-container .tier-rate {
    font-size: 1.75rem;
  }

  .affiliate-container .tier-name {
    font-size: 0.7rem;
  }

  .affiliate-container .tier-sales {
    font-size: 0.8rem;
  }

  #row-aff_payout_type-0 {
    padding: 1rem !important;
  }

  #row-aff_payout_type-0 select,
  #aff_payout_type-0 {
    padding: 10px 14px;
    font-size: 0.9rem;
  }
}

/* ===== RESPONSIVE - Mobile ===== */
@media (max-width: 480px) {
  .affiliate-container .affiliate-title {
    font-size: 1.1rem;
  }

  .affiliate-container .section-title {
    font-size: 0.95rem;
  }

  /* Tube stays 100%, just adjust height */
  .affiliate-container .progress-bar-wrapper {
    height: 14px;
    margin-bottom: 55px;
  }

  .affiliate-container .marker {
    font-size: 0.55rem;
    padding: 4px 6px;
    top: 20px;
    border-radius: 10px;
  }

  .affiliate-container .marker::before {
    top: -4px;
    border-left-width: 4px;
    border-right-width: 4px;
    border-bottom-width: 4px;
  }

  .affiliate-container .tiers-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .affiliate-container .tier-card {
    padding: 0.875rem 0.5rem;
    border-radius: 8px;
  }

  .affiliate-container .tier-name {
    font-size: 0.6rem;
  }

  .affiliate-container .tier-rate {
    font-size: 1.4rem;
  }

  .affiliate-container .tier-sales {
    font-size: 0.7rem;
  }

  .affiliate-container .example-box,
  .affiliate-container .warning-note {
    font-size: 0.8rem;
    padding: 0.875rem 1rem;
  }

  .affiliate-container .lifetime-badge span {
    font-size: 0.75rem;
    padding: 0.6rem 1rem;
  }

  #row-aff_payout_type-0 {
    padding: 0.875rem !important;
    margin: 1rem 0 !important;
  }

  #row-aff_payout_type-0 .am-element-title label {
    font-size: 0.85rem;
  }

  #row-aff_payout_type-0 select,
  #aff_payout_type-0 {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
}

/* ============================
   Profile Form - Clean & Simple
   ============================ */

/* Form Container - Responsive Width */
.am-profile-form {
  width: 100% !important;
  max-width: 100% !important;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* Input Fields - Clean & Visible */
.am-profile-form input[type="text"],
.am-profile-form input[type="email"],
.am-profile-form input[type="password"],
.am-profile-form .am-change-pass {
  width: 100% !important;
  padding: 12px 16px;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2937;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.am-profile-form input[type="text"]:hover,
.am-profile-form input[type="email"]:hover,
.am-profile-form input[type="password"]:hover,
.am-profile-form .am-change-pass:hover {
  border-color: #9ca3af;
}

.am-profile-form input[type="text"]:focus,
.am-profile-form input[type="email"]:focus,
.am-profile-form input[type="password"]:focus,
.am-profile-form .am-change-pass:focus {
  outline: none;
  border-color: #2b7fff;
  box-shadow: 0 0 0 3px rgba(43, 127, 255, 0.15);
}

.am-profile-form input::placeholder {
  color: #9ca3af;
}

/* Dark Mode Inputs */
.dark .am-profile-form input[type="text"],
.dark .am-profile-form input[type="email"],
.dark .am-profile-form input[type="password"],
.dark .am-profile-form .am-change-pass {
  background: #18181b !important;
  border: 2px solid #3f3f46 !important;
  color: #f4f4f5 !important;
}

.dark .am-profile-form input[type="text"]:hover,
.dark .am-profile-form input[type="email"]:hover,
.dark .am-profile-form input[type="password"]:hover,
.dark .am-profile-form .am-change-pass:hover {
  border-color: #52525b !important;
}

.dark .am-profile-form input[type="text"]:focus,
.dark .am-profile-form input[type="email"]:focus,
.dark .am-profile-form input[type="password"]:focus,
.dark .am-profile-form .am-change-pass:focus {
  border-color: #2b7fff !important;
  box-shadow: 0 0 0 3px rgba(43, 127, 255, 0.25) !important;
}

.dark .am-profile-form input::placeholder {
  color: #71717a !important;
}

/* Row Styling */
.am-profile-form .am-row {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

/* Full Width Rows */
.am-profile-form #row-name-0,
.am-profile-form #row-qfauto-1,
.am-profile-form #row-_submit_-0,
.am-profile-form #row-_oldpass-0,
.am-profile-form #row-pass-0,
.am-profile-form #row-pass-confirm {
  grid-column: 1 / -1;
}

/* Labels */
.am-profile-form .am-element-title {
  margin-bottom: 8px;
}

.am-profile-form .am-element-title label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  font-family: 'Inter', sans-serif;
}

.dark .am-profile-form .am-element-title label {
  color: #e4e4e7 !important;
}

/* Required */
.am-profile-form .required {
  color: #ef4444;
}

/* Comment Box */
.am-profile-form .comment {
  background: #f3f4f6;
  padding: 10px 14px;
  border-radius: 6px;
  margin-top: 8px;
  font-size: 13px;
  color: #6b7280;
  text-transform: none;
  line-height: 1.5;
}

.dark .am-profile-form .comment {
  background: #1f1f23 !important;
  color: #a1a1aa !important;
}

/* Name Fields Side by Side */
#profile .am-element.group {
  display: flex !important;
  gap: 16px;
}

#profile .am-element.group input {
  flex: 1;
}

/* Change Password Button */
.am-profile-form .am-change-pass-toggle {
  display: inline-block;
  background: #2b7fff;
  color: white !important;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.am-profile-form .am-change-pass-toggle:hover {
  background: #1a6fe8;
}

/* Save Button */
.am-profile-form .am-cta-profile {
  background: #2b7fff !important;
  color: white !important;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.am-profile-form .am-cta-profile:hover {
  background: #1a6fe8 !important;
}

/* Submit Row Border */
.am-profile-form .am-element:has(> .am-cta-profile) {
  display: block;
  border-top: 1px solid #e5e7eb;
  padding-top: 24px;
  margin-top: 8px;
}

.dark .am-profile-form .am-element:has(> .am-cta-profile) {
  border-top-color: #27272a !important;
}

/* Login Display */
#row-login-0 .am-element {
  background: #eff6ff;
  padding: 8px 14px;
  border-radius: 6px;
  display: inline-block;
  color: #1e40af;
  font-weight: 600;
}

.dark #row-login-0 .am-element {
  background: #1e3a5f !important;
  color: #93c5fd !important;
}

/* Error Messages */
.am-profile-form .am-error {
  display: block;
  margin-top: 6px;
  padding: 8px 12px;
  background: #fef2f2;
  color: #dc2626;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
}

.dark .am-profile-form .am-error {
  background: #1c1917;
  color: #fca5a5;
}

/* Responsive */
@media (max-width: 768px) {
  .am-profile-form {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  #profile .am-element.group {
    flex-direction: column;
    gap: 12px;
  }

  .am-profile-form input[type="text"],
  .am-profile-form input[type="email"],
  .am-profile-form input[type="password"],
  .am-profile-form .am-change-pass {
    padding: 14px 16px;
    font-size: 16px;
  }
}

.am-product-terms {
  padding-top: 0.5rem !important;
}

.am-product-desc {
  line-height: 1rem !important;
  padding-top: 0.3rem !important;
}

.am-product-title {
  padding-bottom: 0.3rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  letter-spacing: -0.5px;
}


.am-helpdesk-message-header {
  position: relative;
}

.am-helpdesk-message-action-fold {
  position: absolute;
  right: 0;
  top: 0;
}

#price-summary-content {
  padding-left: 1rem;
  padding-right: 1rem;
}

/* ============================
   Helpdesk Ticket List Styles
   Scoped under #grid-user
   ============================ */

/* Table layout */
#grid-user .am-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

#grid-user .am-grid th {
  background: #f8f9fb;
  color: #555;
  font-weight: 600;
  text-align: left;
  padding: 14px;
}

#grid-user .am-grid td {
  padding: 14px;
  vertical-align: middle;
  border-bottom: 1px solid #f0f0f0;
}

/* Subject column */
#grid-user .am-helpdesk-grid-subject a.link {
  color: #0056d6;
  font-weight: 600;
  font-size: 16px;
  display: block;
  margin-bottom: 4px;
  text-decoration: none;
}

#grid-user .am-helpdesk-grid-subject a.link:hover {
  text-decoration: underline;
}

/* Message text */
#grid-user .am-helpdesk-grid-msg {
  color: #777;
  font-size: 14px;
  display: inline-block;
  vertical-align: middle;
  max-width: 80%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Emoji alignment */
#grid-user .am-helpdesk-grid-msg span,
#grid-user .am-helpdesk-grid-msg {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Status icons */
#grid-user .glyph.sprite-icon {
  width: 18px;
  height: 18px;
  background-repeat: no-repeat;
  background-size: auto;
  margin: 0 auto;
}

/* Responsive table */
@media (max-width: 768px) {
  #grid-user .am-grid-container {
    max-width: 100%;
    padding: 10px;
    border-radius: 8px;
  }

  #grid-user .am-grid th,
  #grid-user .am-grid td {
    padding: 10px;
    font-size: 14px;
  }

  #grid-user .am-helpdesk-grid-subject a.link {
    font-size: 15px;
  }

  #grid-user .am-helpdesk-grid-msg {
    display: block;
    max-width: 100%;
  }
}

/* Inside specific ticket message box */
#grid-user .am-helpdesk-reply-panel textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border-radius: 8px;
  border: 1px solid #ddd;
  padding: 10px;
  font-size: 15px;
  line-height: 1.5;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  #grid-user .am-helpdesk-reply-panel textarea {
    min-height: 100px;
  }
}



/* Message Header - Flex layout */
.am-helpdesk-message-header {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #6b7280;
  padding-right: 40px;
}

/* Fold/Close Button - Corner Position */
.am-helpdesk-message-action-fold {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.am-helpdesk-message-action-fold a {
  font-size: 20px;
  font-weight: bold;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #6b7280;
  text-decoration: none;
  background: #f3f4f6;
  transition: all 0.2s ease;
}

.am-helpdesk-message-action-fold a:hover {
  background-color: #e5e7eb;
  color: #374151;
}

/* Preview - After time, before + button */
.am-helpdesk-message-preview {
  display: none;
  color: #dc2626 !important;
  background: #fef2f2 !important;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-style: italic;
  margin-right: 0;
  max-width: 500px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid #fecaca !important;
  order: 99;
}

/* Show preview when message is closed/collapsed */
.am-helpdesk-message-closed .am-helpdesk-message-preview {
  display: inline-block !important;
}

/* Dark mode */
.dark .am-helpdesk-message-action-fold a {
  color: #9ca3af;
  background: #27272a;
}

.dark .am-helpdesk-message-action-fold a:hover {
  background-color: #3f3f46;
  color: #e5e7eb;
}

.dark .am-helpdesk-message-preview {
  color: #fca5a5 !important;
  background: #450a0a !important;
  border-color: #7f1d1d !important;
}

/* Message Badges - Support & Me */
.am-message-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.am-badge-support {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.am-badge-me {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.dark .am-badge-support {
  background: #14532d;
  color: #86efac;
  border-color: #166534;
}

.dark .am-badge-me {
  background: #1e3a8a;
  color: #93c5fd;
  border-color: #1e40af;
}

/* Separator & Date */
.am-helpdesk-message-separator {
  color: #d1d5db;
  flex-shrink: 0;
}

.am-helpdesk-message-date {
  color: #9ca3af;
  font-size: 12px;
  flex-shrink: 0;
}

/* Attachments indicator */
.am-helpdesk-message-has-attachments {
  font-size: 12px;
  color: #2b7fff;
  font-weight: 500;
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .am-helpdesk-message-header {
    padding-right: 35px;
    gap: 6px;
  }

  .am-helpdesk-message-preview {
    max-width: 120px;
    font-size: 10px;
  }

  .am-helpdesk-message-action-fold a {
    width: 26px;
    height: 26px;
    font-size: 18px;
  }

  .am-message-badge {
    padding: 2px 8px;
    font-size: 10px;
  }

  .am-helpdesk-message-date {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .am-helpdesk-message-header {
    padding-right: 32px;
    gap: 4px;
  }

  .am-helpdesk-message-preview {
    max-width: 80px;
    font-size: 9px;
    padding: 2px 5px;
  }

  .am-helpdesk-message-action-fold a {
    width: 24px;
    height: 24px;
    font-size: 16px;
  }

  .am-message-badge {
    padding: 2px 6px;
    font-size: 9px;
  }

  .am-helpdesk-message-date {
    font-size: 10px;
  }

  .am-helpdesk-message-separator {
    display: none;
  }
}



.am-helpdesk-message-content pre a {
  color: #3b82f6;
  /* Light blue color */
  text-decoration: underline;
}

.am-helpdesk-message-content pre a:hover {
  color: #60a5fa;
  /* Slightly lighter on hover */
}

/* Dark mode support */
.dark .am-helpdesk-message-content pre a {
  color: #60a5fa;
  /* Light blue for dark mode */
}

.dark .am-helpdesk-message-content pre a:hover {
  color: #93c5fd;
  /* Even lighter on hover in dark mode */
}

/* Send Message & Submit Ticket Buttons */
input[value="Send Message"],
input[value="Submit Ticket"] {
  background-color: #2b7fff;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

input[value="Send Message"]:hover,
input[value="Submit Ticket"]:hover {
  background-color: #1a6fe8;
}

/* Disabled/Loading State after click */
input[value="Send Message"]:disabled,
input[value="Submit Ticket"]:disabled {
  background-color: #93c5fd !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  opacity: 0.7 !important;
}

/* Discard Button */
input[value="Discard"] {
  background-color: transparent;
  color: #6b7280;
  padding: 8px 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  margin-left: 8px;
}

input[value="Discard"]:hover {
  background-color: #f3f4f6;
}

/* Make the fold/close button bigger */
.am-helpdesk-message-action-fold a {
  font-size: 24px;
  font-weight: bold;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #6b7280;
  text-decoration: none;
}

.am-helpdesk-message-action-fold a:hover {
  background-color: #f3f4f6;
  color: #374151;
}

/* Dark mode */
.dark .am-helpdesk-message-action-fold a {
  color: #9ca3af;
}

.dark .am-helpdesk-message-action-fold a:hover {
  background-color: #374151;
  color: #e5e7eb;
}

/* File Input Styling */
input[type="file"]#external-upload-files,
input[name="external_files[]"] {
  padding: 8px 12px;
  border: 1px dashed #d1d5db;
  border-radius: 6px;
  background-color: #f9fafb;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
}

input[type="file"]#external-upload-files:hover,
input[name="external_files[]"]:hover {
  border-color: #2b7fff;
  background-color: #eff6ff;
}

/* Style the file input button part */
input[type="file"]#external-upload-files::file-selector-button,
input[name="external_files[]"]::file-selector-button {
  background-color: #2b7fff;
  color: white;
  padding: 5px 8px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 12px;
  transition: all 0.2s ease;
}

input[type="file"]#external-upload-files::file-selector-button:hover,
input[name="external_files[]"]::file-selector-button:hover {
  background-color: #1a6fe8;
}

/* Dark mode */
.dark input[type="file"]#external-upload-files,
.dark input[name="external_files[]"] {
  background-color: #1f2937;
  border-color: #4b5563;
  color: #e5e7eb;
}

.dark input[type="file"]#external-upload-files:hover,
.dark input[name="external_files[]"]:hover {
  border-color: #2b7fff;
  background-color: #1e3a5f;
}

.dark input[type="file"]#external-upload-files::file-selector-button,
.dark input[name="external_files[]"]::file-selector-button {
  background-color: #2b7fff;

  .morris-hover {
    position: absolute !important;
  }

  #Am_Form {
    /*display: grid;*/
    grid-template-columns: repeat(2, 1fr);
    /* exactly 2 columns */
    gap: 20px;
    /* space between fields */
  }

  #Am_Form .am-row {
    display: flex;
    flex-direction: column;
  }

  #Am_Form .am-element-title {
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
  }

  #Am_Form input[type="text"],
  #Am_Form select {
    width: 100%;
    box-sizing: border-box;
  }

  /* Make the Save button full width across both columns */
  #Am_Form #row-_save-0 {
    grid-column: span 2;
    display: flex;
    justify-content: center;
  }

  .dark #row-login-0 .am-element {
    color: black !important;
  }

  .dark #row-paysys_id .am-element-title {
    background: black !important;
    color: white !important;
  }

  .dark #row-paysys_id .am-element {
    background: black !important;
    color: white !important;
  }

  span.am-error {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    background: #fef2f2;
    color: #b91c1c;
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 3px solid #dc2626;
    font-size: 13px;
    font-weight: 500;
    margin: 0 auto;
    max-width: fit-content;
  }

  /* Make sure the form container has relative positioning */
  .am-signup-form,
  .am-form {
    position: relative;
    padding-bottom: 10px;
    /* Add space for error message */
  }

  /* Dark mode */
  .dark span.am-error {
    background: #450a0a;
    color: #fca5a5;
    border-left-color: #ef4444;
  }


  /* Match select with input styles */
  .dark select,
  .dark input[type="text"],
  .dark input[type="email"],
  .dark input[type="password"],
  .dark textarea {
    background-color: #121212;
    border: 1px solid #2a2a2a;
    color: #f5f5f5;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    height: 38px;
    line-height: 1.4;
    box-sizing: border-box;
    width: 100%;
  }

  /* Fix vertical alignment for select */
  .dark select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
    top: 1px;
    /* adjusts the slightly higher appearance */
  }

  /* Optional: add dropdown arrow consistency */
  .dark select::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
  }

  /* Optional hover/focus */
  .dark select:focus,
  .dark input:focus {
    border-color: #3a3a3a;
    outline: none;
  }

  .dark #price-summary-box .am-block {
    background: black !important;
    color: white !important;
  }

  .dark #price-summary-box h3 {
    background: black !important;
    color: white !important;
  }

  .dark #price-summary-box td {
    background: black !important;
    color: white !important;
  }

  .dark #duration-selector-box h3 {
    background: black !important;
    color: white !important;
  }

  .dark #duration-selector-box .duration-content {
    background: black !important;
    color: white !important;
  }

  .dark #duration-selector-box .duration-content .comment {
    background: #121214 !important;
    color: white !important;
  }

  .dark #duration-selector-box .duration-content .duration-option {
    background: #121214 !important;
    color: white !important;
  }

  .dark #duration-selector-box .duration-content .duration-option span {
    /*background: #121214 !important;*/
    color: white !important;
  }

  .dark .payment-options-grid label {
    background: #121214 !important;
    color: white !important;
  }

  .dark .payment-options-grid label:not(.am-el-checked) .am-paysystem-title {
    background-color: #121214;
    color: white !important;
  }

  /* Container */
  #row-attachments-0 .am-element {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
  }

  /* Upload button container */
  .upload-control {
    display: inline-block;
    position: relative;
  }

  /* Actual upload button */
  .upload-control-upload {
    background-color: #007bff;
    /* primary blue */
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  }

  .upload-control-upload:hover {
    background-color: #0056b3;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
  }

  .upload-control-upload span {
    pointer-events: none;
  }

  /* Make sure hidden inputs don’t affect layout */
  input[type="text"][disabled],
  input[name="_attachments"] {
    display: none !important;
  }

  .glyph {
    width: 16px;
    height: 16px;
    display: inline-block;
    background-image: url(../application/default/themes/default-theme/public/img/sprite/icon.png);
    background-repeat: no-repeat;
    background-position: left center;
  }

  td:has(.glyph) {
    padding-right: 2.5rem !important;
  }



  /*.am-helpdesk-ticket .am-helpdesk-reply-panel {*/
  /* display: none !important;*/
  /*}*/

  .am-helpdesk-message-outbound .am-helpdesk-reply-panel {
    display: none !important;
  }

  .am-helpdesk-message-outbound .am-helpdesk-message-actions {
    display: none !important;
  }

  .am-helpdesk-ticket .am-helpdesk-ticket-action-fold-all {
    display: none !important;
  }

  /*.am-helpdesk-ticket-actions-container {*/
  /* display: inline-block !important;*/
  /* background-color: #2b7fff !important;*/
  /* color: white !important;*/
  /* padding: 0.3rem !important;*/
  /*}*/

  /* Signup Form */
  .am-signup-form div.am-element {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .am-signup-form #row-product_id_page-0-0 div.am-element label.kt-label {
    border: 2px solid #e1e8ed !important;
    /* Better border */
    border-radius: 10px !important;
    /* Better radius */
    padding: 16px !important;
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease !important;
    /* Smooth transition */
    background: #fff !important;
  }

  /* Hover effect for labels */
  .am-signup-form #row-product_id_page-0-0 div.am-element label.kt-label:hover {
    border-color: #0066cc !important;
    background: #f8fbff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
  }

  /* Selected state */
  .am-signup-form #row-product_id_page-0-0 div.am-element label.kt-label:has(input:checked) {
    border-color: #27ae60 !important;
    background: #f0fdf9 !important;
  }

  .am-signup-form .am-product-wrapper {
    text-align: left;
  }

  .am-signup-form .am-product-title {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700 !important;
    color: #333 !important;
  }

  .am-signup-form .am-product-terms,
  .am-signup-form .am-product-desc {
    font-family: 'Inter', sans-serif !important;
    color: #777 !important;
    font-size: 14px !important;
  }

  .am-signup-form .am-element-title label {
    font-size: 1rem;
    font-weight: 600;
    color: #333 !important;
    letter-spacing: -0.01em;
    font-family: 'Inter', sans-serif !important;
  }

  /* Button styling */
  .am-signup-form .am-cta-signup {
    max-width: 150px !important;
    background: #0066cc !important;
    color: white !important;
    padding: 14px !important;
    border-radius: 10px !important;
    border: none !important;
    font-weight: 600 !important;
    font-family: 'Poppins', sans-serif !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2) !important;
  }

  .am-signup-form .am-cta-signup:hover {
    background: #004999 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.3) !important;
  }

  /* Input fields styling */
  .am-signup-form input[type="text"],
  .am-signup-form input[type="email"],
  .am-signup-form input[type="password"] {
    border: 2px solid #e1e8ed !important;
    border-radius: 8px !important;
    padding: 12px 14px !important;
    font-size: 15px !important;
    font-family: 'Inter', sans-serif !important;
    transition: all 0.3s ease !important;
  }

  .am-signup-form input:focus {
    border-color: #0066cc !important;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1) !important;
    outline: none !important;
  }

  /*for making first four as a combo (2 each row)*/
  .am-signup-form div.am-element {
    /* use 6 equal tracks so items can take 50% or 33.33% precisely */
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 5px !important;
    box-sizing: border-box;
  }

  /* labels are your cards — count labels only (nth-of-type) */
  .am-signup-form div.am-element>label.kt-label {
    grid-column: span 2;
    /* default: 2 of 6 => 33.33% (3 per row) */
    width: 100%;
    box-sizing: border-box;
  }

  /* Media Query for mobile devices (screens up to a certain width, e.g., 600px) */
  @media (max-width: 600px) {
    .am-signup-form div.am-element>label.kt-label {
      grid-column: span 3;
      /* Change to 2 per row for mobile */
    }
  }

  /* FIRST FOUR cards: Light grey background like in signup.phtml */
  .am-signup-form div.am-element>label.kt-label:nth-of-type(-n+4) {
    grid-column: span 6;
    border: 2px solid #e1e8ed !important;
    background: #fafbfc !important;
    /* Light grey background - SAME AS SIGNUP.PHTML */
    padding: 18px !important;
  }

  .am-signup-form div.am-element>label.kt-label:nth-of-type(-n+4):hover {
    border-color: #00b894 !important;
    background: #f0fdf9 !important;
    /* Light green on hover */
  }

  /* First 4 plan boxes - specific title styling */
  .am-signup-form #row-product_id_page-0-0 .am-element label:nth-of-type(-n+4) .am-product-title {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: -0.5px !important;
    color: #333 !important;
  }

  /* Custom aMember Pro Styling */
  body {
    font-family: 'Inter', sans-serif;
  }

  .kt-footer {
    background: #f1f1f2;
    margin-top: 40px;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-family: 'Inter';
  }

  .text-xl,
  h1 {
    font-weight: 800 !important;
  }

  .custom-alert .am-flash-content-message {
    padding: 10px 15px;
    margin: -10px 0 15px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid transparent;
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
  }

  .custom-alert-am-widget {
    padding: 0 1.3rem;
  }

  /* Payment History & Subscription Styling */

  /* Page titles */
  #am-block-active-subscriptions h1,
  #am-block-payments h1 {
    /*font-size: 1.875rem;*/
    font-size: 1.25rem;
    font-weight: 500;
    color: hsl(var(--mono));
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid hsl(var(--border));
  }

  /* Active subscription invoice cards - Premium Design */
  .am-active-invoice {
    background: hsl(var(--card));
    border: 1px solid #dddddd;
    border-radius: 0.75rem;
    padding: 0;
    margin-bottom: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
  }

  .am-active-invoice:hover {
    /*box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);*/
    /*transform: translateY(-2px);*/
    border-color: #c6c4c4;
  }

  /* Card header with gradient background */
  .am-active-invoice-header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 0.875rem 1.5rem;
    background: #f1f1f1;
    border-bottom: 1px solid hsl(var(--border));
    position: relative;
  }

  .am-active-invoice-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        hsl(var(--primary)) 0%,
        hsl(var(--primary) / 0.6) 50%,
        hsl(var(--primary)) 100%);
  }

  .am-active-invoice-header span {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
  }

  .am-active-invoice-date {
    color: hsl(var(--muted-foreground));
    position: relative;
    padding-left: 1.5rem;
  }

  .am-active-invoice-date::before {
    content: '📅';
    position: absolute;
    left: 0;
    top: 3px;
    font-size: 1rem;
  }

  .am-active-invoice-num {
    color: hsl(var(--primary));
    font-weight: 700;
    font-family: 'Courier New', monospace;
    background: hsl(var(--primary) / 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid hsl(var(--primary) / 0.2);
  }

  .am-active-invoice-paysys {
    color: hsl(var(--foreground));
    background: hsl(var(--muted));
    padding: 0.35rem 1rem;
    border-radius: 1rem;
    border: 1px solid hsl(var(--border));
    font-weight: 600;
    font-size: 0.8125rem;
  }

  .am-active-invoice-terms {
    color: hsl(var(--foreground));
    font-weight: 700;
    font-size: 0.9375rem;
    padding: 0.35rem 1rem;
    background: hsl(var(--success) / 0.1);
    border-radius: 1rem;
    border: 1px solid hsl(var(--success) / 0.2);
  }

  /* Product section */
  .am-active-invoice-product-list {
    list-style: none;
    padding: 1.25rem 1.75rem;
    margin: 0;
    background: hsl(var(--card));
  }

  .am-active-invoice-product {
    padding: 1rem 0;
    border-bottom: 1px solid hsl(var(--border));
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 2rem;
  }

  .am-active-invoice-product::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 1rem;
    width: 1.5rem;
    height: 1.5rem;
    background: hsl(var(--success) / 0.1);
    color: hsl(var(--success));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
  }

  .am-active-invoice-product:last-child {
    border-bottom: none;
  }

  .am-active-invoice-item-title {
    font-size: 1rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    letter-spacing: -0.01em;
  }

  /* Payment history table */
  .am-grid-container {
    background: hsl(var(--card));
    border: 1px solid #dddddd;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-top: 1.5rem;
  }

  .am-grid {
    width: 100%;
    border-collapse: collapse;
  }

  .am-grid th {
    background: linear-gradient(180deg, hsl(var(--muted)) 0%, hsl(var(--muted) / 0.95) 100%);
    padding: 1.25rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: hsl(var(--muted-foreground));
    border-bottom: 2px solid hsl(var(--border));
  }

  .am-grid th:first-child {
    padding-left: 2rem;
  }

  .am-grid th:last-child {
    padding-right: 2rem;
    text-align: right;
  }

  .am-grid td {
    padding: 1.25rem 1.5rem;
    font-size: 0.875rem;
    color: hsl(var(--foreground));
    border-bottom: 1px solid hsl(var(--border));
    transition: all 0.2s ease;
    vertical-align: middle;
  }

  .am-grid td:first-child {
    padding-left: 2rem;
  }

  .am-grid td:last-child {
    padding-right: 2rem;
    text-align: right;
    font-weight: 600;
  }

  .am-grid-row:hover td {
    background: hsl(var(--muted) / 0.3);
  }

  .am-grid-row:last-child td {
    border-bottom: none;
  }

  .am-grid-row.even td {
    background: hsl(var(--muted) / 0.2);
  }

  .am-grid-row.even:hover td {
    background: hsl(var(--muted) / 0.4);
  }

  /* Styling for specific columns */
  .am-member-payment-history-date {
    color: hsl(var(--muted-foreground));
    font-weight: 500;
  }

  .am-member-payment-history-invoice_id {
    font-family: 'Courier New', monospace;
    color: hsl(var(--primary));
    font-weight: 700;
    background: hsl(var(--primary) / 0.05);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
  }

  .am-member-payment-history-items {
    font-weight: 600;
    color: hsl(var(--foreground));
  }

  .am-member-payment-history-paysys {
    color: hsl(var(--muted-foreground));
    background: hsl(var(--muted));
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    display: inline-block;
  }

  .am-member-payment-history-amount {
    color: hsl(var(--success));
    font-weight: 700;
    font-size: 0.9375rem;
  }

  /* Cancel subscription popup */
  .cancel-subscription-popup {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 0.75rem;
    padding: 2.5rem;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  }

  .cancel-subscription-popup-text {
    font-size: 1.0625rem;
    margin-bottom: 2rem;
    color: hsl(var(--foreground));
    line-height: 1.6;
  }

  .cancel-subscription-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
  }

  .am-cta-cancel {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    background: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
    font-size: 0.9375rem;
  }

  .am-cta-cancel:hover {
    background: hsl(var(--destructive) / 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  }

  .am-popup-close {
    padding: 0.75rem 1.5rem;
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
  }

  .am-popup-close:hover {
    color: hsl(var(--foreground));
    background: hsl(var(--muted));
  }

  /* Signup Form Styling - nox Refined */
  .am-signup {
    /* max-width: 700px; */
    margin: 0 auto;
  }

  .am-info {
    background: hsl(var(--muted) / 0.5);
    border: 1px solid hsl(var(--border));
    border-radius: 0.5rem;
    padding: 0.875rem 1.125rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
  }

  .am-info strong {
    color: hsl(var(--foreground));
    font-weight: 600;
  }

  .am-info a {
    color: hsl(var(--primary));
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
  }

  .am-info a:hover {
    text-decoration: underline;
  }

  .am-form {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 0.5rem;
    /* padding: 1.5rem; */
  }

  .am-profile-form {
    width: 50%;
  }

  .am-profile-form .am-change-pass {
    width: 100% !important;
    padding: 5px 1rem;
    border: 1px solid #dddd;
    border-radius: 0.4rem;
    background: hsl(var(--background));
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
    color: hsl(var(--foreground));
    font-size: 0.875rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    line-height: 1.5;
    margin-bottom: 24px;
  }

  .am-profile-form .am-change-pass:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  }

  .am-profile-form .am-change-pass::placeholder {
    color: hsl(var(--muted-foreground));
  }

  .am-row {
    /*margin-bottom: 1.5rem;*/
    padding-bottom: 1.5rem;
    border-bottom: 1px solid hsl(var(--border));
  }

  .am-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .am-element-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 0.875rem;
  }

  .am-element-title .required {
    color: hsl(var(--destructive));
  }

  /* Checkbox and Radio Button Styling - Compact & Refined */
  .kt-label {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: hsl(var(--muted) / 0.3);
    border: 1px solid hsl(var(--border));
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .kt-label:hover {
    border-color: hsl(var(--primary));
    background: hsl(var(--muted) / 0.5);
  }

  .kt-label input[type="checkbox"],
  .kt-label input[type="radio"] {
    margin-right: 0.75rem;
    width: 1.125rem;
    height: 1.125rem;
    cursor: pointer;
    accent-color: hsl(var(--primary));
    flex-shrink: 0;
    margin-top: 0.125rem;
  }

  .kt-label input[type="checkbox"]:checked+span,
  .kt-label input[type="radio"]:checked+span {
    color: hsl(var(--foreground));
  }

  .am-product-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    display: block;
    margin-bottom: 0.25rem;
  }

  .am-product-terms {
    font-size: 0.8125rem;
    color: hsl(var(--success));
    font-weight: 600;
  }

  .am-product-desc {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    display: block;
    margin-top: 0.25rem;
  }

  .am-paysystem-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    display: block;
    margin-bottom: 0.125rem;
  }

  .am-paysystem-desc {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    display: block;
  }

  /* Selected state styling */
  .kt-label:has(input[type="checkbox"]:checked),
  .kt-label:has(input[type="radio"]:checked) {
    border-color: hsl(var(--primary));
    background: hsl(var(--primary) / 0.05);
  }

  /* Error styling */
  .am-error {
    color: hsl(var(--destructive));
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.5rem;
    display: block;
  }

  /* Submit button */
  .am-cta-signup {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: auto;
    min-width: 150px;
  }

  .am-cta-signup:hover {
    background: hsl(var(--primary) / 0.95);
  }

  .am-cta-signup:active {
    transform: scale(0.98);
  }

  .am-element.group {
    display: flex;
    justify-content: flex-start;
    padding-top: 1rem;
  }

  /* Dashboard Widgets - Subscriptions & Resources */
  .am-layout-two-coll {
    /*display: flex;*/
    /*gap: 1.5rem;*/
    /*flex-wrap: wrap;*/
  }

  .am-coll-left {
    flex: 2;
    min-width: 300px;
  }

  .am-coll-right {
    flex: 1;
    min-width: 250px;
  }

  .am-widget {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
  }

  .am-widget h2 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid hsl(var(--border));
  }

  .am-widget-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .subscription-item .statuspill {
    float: right !important;
  }

  #member-main-subscriptions {
    border: 1px solid #eaeaea;
    border-radius: 10px;
    overflow: hidden;
  }

  #toggle-subscriptions-div {
    cursor: pointer !important;
    font-size: 14px;
    font-weight: 500;
    color: #2b7fff;
  }

  /* Each subscription item block */
  #member-main-subscriptions .subscription-item {
    padding: 10px;
    transition: background-color 0.2s ease;
  }

  #member-main-subscriptions .subscription-item:hover {
    background-color: #f7f7f7;
  }

  #member-main-subscriptions .viewmore:hover {
    background-color: #f7f7f7;
  }

  /* Add border between items, except the last one */
  #member-main-subscriptions .subscription-item:not(:last-child) {
    border-bottom: 1px solid #eaeaea;
  }

  /* Style strong and span inside items */
  #member-main-subscriptions .subscription-item strong {
    display: inline-block;
    margin-right: 10px;
    font-weight: 500 !important;
    text-transform: capitalize;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  #member-main-subscriptions .subscription-item span {
    padding-right: 10px;
  }

  .am-paysystem-title {
    padding-top: 8px !important;
  }

  .am-paysystem-desc {
    padding-top: 8px !important;
  }


  #member-main-subscriptions span {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
  }

  /* Different colors for different states */
  #member-main-subscriptions .text-success {
    background-color: #d4edda;
    color: #155724;
  }

  #member-main-subscriptions .text-danger {
    background-color: #f8d7da;
    color: #721c24;
  }

  #member-main-subscriptions .text-muted {
    background-color: #e2e3e5;
    /* light gray background */
    color: #6c757d;
    /* muted text */
  }

  #member-main-subscriptions .text-warning {
    background-color: #fff3cd;
    /* light yellow background */
    color: #856404;
    /* dark yellow/brown text */
  }


  #profile #row-login-0 .am-element {
    padding-left: 0.9rem;
  }

  /* Active Resources List - Simple Links */
  .am-list-resources li {
    margin-bottom: 0.5rem;
  }

  .am-list-resources li:last-child {
    margin-bottom: 0;
  }

  .am-resource-page {
    display: block;
    padding: 0.625rem 0.875rem;
    background: hsl(var(--muted) / 0.3);
    border: 1px solid hsl(var(--border));
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    text-decoration: none;
    transition: all 0.2s ease;
  }

  .am-resource-page:hover {
    background: hsl(var(--primary) / 0.05);
    border-color: hsl(var(--primary));
    color: hsl(var(--primary));
  }

  /* Active Resources with Images - Card Layout */
  .service.product.card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.2s ease;
  }

  .service.product.card:hover {
    border-color: hsl(var(--primary));
    box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.1);
  }

  .service.product.card .card-body {
    padding: 0;
    display: block;
  }

  .service.product.card img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  .service.product.card .btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border: none;
    border-radius: 0;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: block;
    text-align: center;
  }

  .service.product.card .btn:hover {
    background: hsl(var(--primary) / 0.9);
  }

  .service.product.card .btn strong {
    font-weight: 600;
  }

  /* Hide Useful Links */
  #widget-member-main-links {
    display: none;
  }

  /* Resource Card Grid Layout with Images */
  .row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 0;
  }

  @media (max-width: 992px) {
    .row {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  @media (max-width: 768px) {
    .am-profile-form {
      width: 100%;
    }

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

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

  /* Resource Card Styling */
  .mb-4 {
    margin-bottom: 1.5rem;
  }

  .mt-2 {
    margin-top: 0.5rem;
  }

  .service.product.card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .service.product.card:hover {
    border-color: hsl(var(--primary));
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
  }

  .service.product.card .card-body {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 180px;
    background: hsl(var(--muted) / 0.3);
  }

  .service.product.card img {
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: contain;
  }

  .service.product.card .btn {
    width: 100%;
    padding: 0.875rem 1rem;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border: none;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: block;
    text-align: center;
  }

  .service.product.card .btn:hover {
    background: hsl(var(--primary) / 0.9);
  }

  .service.product.card .btn strong {
    font-weight: 600;
  }

  /* Legacy list styling for fallback */
  .am-list-resources {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }

  /* E-Mail Preferences Checkbox */
  .am-block label {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.875rem;
    color: hsl(var(--foreground));
    cursor: pointer;
  }

  .am-block input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    cursor: pointer;
    accent-color: hsl(var(--primary));
  }

  /* Responsive for two-column layout */
  @media (max-width: 1024px) {
    .am-layout-two-coll {
      flex-direction: column;
    }

    .am-coll-left,
    .am-coll-right {
      flex: 1;
    }
  }

  #am-block-active-subscriptions {
    margin-bottom: 4rem;
  }

  /* Responsive adjustments */
  @media (max-width: 768px) {

    #am-block-active-subscriptions h1,
    #am-block-payments h1 {
      font-size: 1.5rem;
    }

    .am-active-invoice-header {
      flex-direction: column;
      gap: 1rem;
      padding: 1.25rem 1.5rem;
    }

    .am-active-invoice-product {
      padding-left: 2.5rem;
    }

    .am-grid-container {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }

    .am-grid {
      min-width: 700px;
    }

    .am-grid th {
      padding: 1rem 1.25rem;
    }

    .am-grid td {
      padding: 1rem 1.25rem;
      font-size: 0.8125rem;
      border-right: 1px solid #dddd;
    }

    .am-grid td:last-child {
      border-right: 0;
    }

    .am-grid th:first-child,
    .am-grid td:first-child {
      padding-left: 1.5rem;
    }

    .am-grid th:last-child,
    .am-grid td:last-child {
      padding-right: 1.5rem;
    }
  }

  .am-info {
    display: none;
  }

  /* Help Desk Styling - nox Design */
  .am-grid-wrap {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 0.75rem;
    padding: 0;
    overflow: hidden;
  }

  .am-grid-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    /*padding: 1.25rem 1.5rem;*/
    margin: 0;
    border-bottom: 1px solid hsl(var(--border));
    background: hsl(var(--background));
  }

  #row-product_id_page-0-0 .kt-label {
    padding: 0 !important;
  }

  .am-grid-title-desc {
    font-size: 0.875rem;
    font-weight: 400;
    color: hsl(var(--muted-foreground));
    margin-left: 0.5rem;
  }

  .am-norecord-actions {
    /*padding: 0 1.5rem 1rem;*/
    margin-top: 1rem;
    text-align: right !important;
  }

  #row-paysys_id .am-element {
    display: flex !important;
  }

  .am-norecord-actions .button {
    background-color: #2b7fff !important;
    color: white !important;
  }

  .am-cta-signup {
    background-color: #2b7fff !important;
    color: white !important;
  }

  .am-element:has(> .am-cta-profile) {
    display: block;
    border-top: 1px solid #ddd;
    padding-top: 24px;
  }

  .am-cta-profile {
    background-color: #2b7fff !important;
    color: white !important;
    padding: 7px 10px;
    border-radius: 5px;
    cursor: pointer !important;
    font-size: 0.8125rem;
  }

  .am-aff-stats-export-report {
    background-color: #2b7fff !important;
    color: white !important;
    padding: 7px 10px;
    border-radius: 5px;
    cursor: pointer !important;
    font-size: 0.8125rem;
  }

  .am-aff-stats-export {
    margin-top: 1rem !important;
  }

  .am-cta-profile:hover {
    background-color: color-mix(in oklab, var(--primary) 90%, transparent) !important;
  }

  .am-change-pass-toggle {
    background-color: #2b7fff !important;
    color: white !important;
    padding: 7px 10px;
    border-radius: 5px;
    cursor: pointer !important;
    font-size: 0.8125rem;
    margin-bottom: 24px;
    display: inline-block;
  }

  .am-change-pass-toggle:hover {
    background-color: color-mix(in oklab, var(--primary) 90%, transparent) !important;
  }

  .comment {
    background: #f7f7f7;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    text-transform: capitalize;
  }

  #row-login-0 .am-element {
    background: #e6f0ff;
    padding: 5px;
    border-radius: 8px;
    margin-bottom: 24px;
    display: inline-block;
  }

  .am-grid-title-desc {
    display: none !important;
  }

  #profile .am-element.group {
    display: block !important;
    padding-top: 1px;
  }

  .am-norecord-actions .button,
  #am-grid-wrap-ticket-button {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
  }

  .am-norecord-actions .button:hover,
  #am-grid-wrap-ticket-button:hover {
    background: hsl(var(--primary) / 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  }

  /* Table Container */
  .am-grid-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Table Styling */
  .am-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: hsl(var(--card));
  }

  .am-grid thead {
    background: hsl(var(--muted) / 0.3);
  }

  .am-grid thead tr {
    border-bottom: 2px solid hsl(var(--border));
    background: #fafafa;
  }

  .am-grid tr {
    background: #f1f1f1;
  }

  .am-grid th {
    padding: 0.875rem 1.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8125rem;
    color: hsl(var(--foreground));
    text-transform: uppercase;
    letter-spacing: 0.025em;
    background: #f1f1f1;
    border: 0;
    border-radius: 0;
  }

  .am-grid th a {
    display: flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
    gap: 0.5rem;
  }

  .am-grid th a:hover {
    color: hsl(var(--primary));
  }

  .am-grid td {
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    color: hsl(var(--foreground));
    border-bottom: 1px solid hsl(var(--border));
    border-right: 1px solid #dddd;
    border-radius: 0;
  }

  .am-grid td:last-child {
    border-right: 0;
  }


  /*.am-grid tbody tr:hover {*/
  /* background: hsl(var(--muted) / 0.2);*/
  /*}*/

  .am-grid tbody tr.even {
    background: hsl(var(--muted) / 0.1);
  }

  .am-grid tbody tr.odd {
    background: #fafafa;
  }

  .am-grid tbody tr.even:hover {
    background: hsl(var(--muted) / 0.3);
  }

  /* Help Desk Specific Styling */
  .am-helpdesk-grid-subject {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
  }

  .am-helpdesk-grid-subject .link {
    color: hsl(var(--foreground));
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
  }

  .am-helpdesk-grid-subject .link:hover {
    color: hsl(var(--primary));
  }

  .am-helpdesk-grid-subject time {
    color: hsl(var(--muted-foreground));
    font-size: 0.8125rem;
  }

  .am-helpdesk-grid-msg-cnt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
  }

  .am-helpdesk-grid-msg {
    color: hsl(var(--muted-foreground));
    font-size: 0.8125rem;
  }

  /* Time Styling */
  time {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
  }

  /* Status Icon Styling */
  .glyph.sprite-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Responsive Design */
  @media (max-width: 768px) {
    .am-grid-title {
      font-size: 1rem;
      padding: 1rem;
    }

    .am-grid th,
    .am-grid td {
      padding: 0.75rem 1rem;
      font-size: 0.8125rem;
    }

    .am-helpdesk-grid-subject .link {
      font-size: 0.875rem;
    }
  }

  /* Help Desk Ticket Timeline Styling - nox Design */

  /* Ticket Header */
  .am-helpdesk>h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid hsl(var(--border));
  }

  .am-helpdesk-ticket-subject {
    color: hsl(var(--foreground));
  }

  .am-helpdesk-ticket-mask {
    color: hsl(var(--muted-foreground));
    font-weight: 500;
  }

  /* Ticket Container */
  .am-helpdesk {
    background: hsl(var(--background));
    border: 1px solid #dddddd;
    margin-top: 30px;
    border-radius: 0.75rem;
    padding: 1.5rem;
    overflow: hidden;
  }

  /* Ticket Header Info */
  .am-helpdesk-ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    background: hsl(var(--muted) / 0.2);
    border-bottom: 1px solid hsl(var(--border));
  }

  .am-helpdesk-ticket-info {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
  }

  .am-helpdesk-ticket-info strong {
    color: hsl(var(--foreground));
    font-weight: 600;
  }

  /* Action Buttons Container */
  .am-helpdesk-ticket-actions-container {
    padding: 1rem;
    margin: 0 0 1.5rem 0;
    border: 1px solid #dddddd;
    border-radius: 0.75rem;
  }

  .am-helpdesk-ticket-actions {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .am-helpdesk-ticket-action a,
  .am-helpdesk-message-action a {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: hsl(var(--muted));
    color: hsl(var(--foreground));
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid hsl(var(--border));
  }

  .am-helpdesk-ticket-action a:hover,
  .am-helpdesk-message-action a:hover {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--primary));
    transform: translateY(-1px);
  }

  .am-helpdesk-ticket-action a.local:before,
  .am-helpdesk-message-action a.local:before {
    content: '→';
    margin-right: 0.375rem;
  }

  /* Message Container - Individual Cards */
  .am-helpdesk-message {
    position: relative;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 0.75rem;
    transition: all 0.2s ease;
  }

  .am-helpdesk-message:last-child {
    margin-bottom: 0;
  }

  .am-helpdesk-message:hover {
    /*box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);*/
    /*transform: translateY(-1px);*/
  }

  /* Inbound vs Outbound Messages */
  .am-helpdesk-message-inbound {
    border: 1px solid #dddddd;
    border-left: 4px solid #404040;
    background: hsl(var(--card));
  }

  .am-helpdesk-message-outbound {
    border: 1px solid #dddddd;
    background: hsl(var(--muted) / 0.2);
    border-left: 4px solid #2b7fff;
  }

  .am-helpdesk-message-outbound:hover {
    background: hsl(var(--muted) / 0.3);
  }

  /* Message Header */
  .am-helpdesk-message-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
  }

  .am-helpdesk-message-action-fold a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    background: transparent;
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
  }

  .am-helpdesk-message-action-fold a:hover {
    background: hsl(var(--muted));
    color: hsl(var(--foreground));
  }

  .am-helpdesk-message-author {
    font-weight: 600;
    color: hsl(var(--foreground));
  }

  .am-helpdesk-message-date {
    color: hsl(var(--muted-foreground));
  }

  .am-helpdesk-message-preview-content {
    font-style: italic;
    color: hsl(var(--muted-foreground));
  }

  /* Message Content */
  .am-helpdesk-message-content {
    margin: 1rem 0;
  }

  .am-helpdesk-message-content pre {
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.875rem;
    line-height: 1.6;
    color: hsl(var(--foreground));
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;


    /**/
    padding-bottom: 0 !important;
  }

  /* Message Actions */
  .am-helpdesk-message-actions {
    margin-top: 1rem;
    /*padding-top: 1rem;*/
    border-top: 1px solid hsl(var(--border));
  }

  /* Reply Panel */
  .am-helpdesk-reply-panel {
    margin-top: 1rem;
    padding: 1rem;
    background: hsl(var(--muted) / 0.2);
    border-radius: 0.5rem;
    /*border: 1px solid #dddddd;*/
  }

  .am-helpdesk-reply-panel-tools {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }

  .am-helpdesk-reply-panel-tool-emoji {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .am-helpdesk-reply-panel-tool-emoji-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    font-size: 1.125rem;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
  }

  .am-helpdesk-reply-panel-tool-emoji-item:hover {
    background: hsl(var(--primary));
    transform: scale(1.1);
  }

  .am-helpdesk-reply-panel-content {
    min-height: 4rem;
  }

  .am-helpdesk-reply-panel-content #row-qfauto-1 {
    padding-bottom: 0 !important;
  }

  #toggle-subscriptions {
    cursor: pointer;
  }

  .subscription-item {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* Responsive Design */
  @media (max-width: 768px) {
    .am-helpdesk>h1 {
      font-size: 1.25rem;
      margin-bottom: 1rem;
      padding-bottom: 0.75rem;
    }

    .am-helpdesk-ticket-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.75rem;
      padding: 1rem;
    }

    .am-helpdesk-message {
      padding: 1rem;
    }

    .am-helpdesk-message-inbound,
    .am-helpdesk-message-outbound {
      padding-left: 1rem;
    }

    .am-helpdesk-ticket-actions {
      flex-direction: column;
      gap: 0.5rem;
    }

    .am-helpdesk-ticket-action a,
    .am-helpdesk-message-action a {
      width: 100%;
      justify-content: center;
    }
  }

  /* Dynamic Reply Form Styling - nox Design */
  .am-helpdesk-form {
    /*border: 1px solid #dddddd;*/
    margin-top: 30px;
    border-radius: 0.75rem;
    /*padding: 1.5rem;*/
    padding: 0.5rem;
    overflow: hidden;
  }

  .am-helpdesk-form .am-row.am-no-label {
    margin-bottom: 1rem;
  }

  .am-helpdesk-form .am-element {
    width: 100%;
  }

  .am-helpdesk-form textarea {
    width: 100% !important;
    padding: 0.875rem 1rem;
    border: 1px solid #dddd;
    border-radius: 0.5rem;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    font-size: 0.875rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    line-height: 1.5;
  }

  .am-helpdesk-form textarea:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
  }

  .am-helpdesk-form textarea::placeholder {
    color: hsl(var(--muted-foreground));
  }

  .am-helpdesk-form .am-el-wide {
    width: 100% !important;
    padding: 0.875rem 1rem;
    border: 1px solid #dddd;
    border-radius: 0.5rem;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    font-size: 0.875rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    line-height: 1.5;
  }

  .am-helpdesk-form .am-el-wide:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
  }

  .am-helpdesk-form .am-el-wide::placeholder {
    color: hsl(var(--muted-foreground));
  }

  /* Add Attachments Link */
  .am-helpdesk-form .am-helpdesk-attachment-expand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: hsl(var(--primary));
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
    cursor: pointer;
  }

  .am-helpdesk-form .am-helpdesk-attachment-expand:hover {
    color: hsl(var(--primary) / 0.8);
    text-decoration: underline;
  }

  .am-helpdesk-form .am-helpdesk-attachment-expand:before {
    content: '📎';
    font-size: 1rem;
  }

  /* Attachments Row - Hidden by default */
  .am-helpdesk-form #row-attachments-0 {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background: hsl(var(--muted) / 0.2);
    border-radius: 0.5rem;
    border: 1px solid hsl(var(--border));
  }

  /* Attachment Input Field */
  .am-helpdesk-form .custom-attachments-0 {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid hsl(var(--border));
    border-radius: 0.5rem;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
  }

  .am-helpdesk-form .custom-attachments-0:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
  }

  /* Form Buttons Container */
  .am-helpdesk-form .am-element.group {
    /*display: flex;*/
    display: ruby;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1.5rem;
  }

  /* Send Message Button - Already styled as .kt-btn-primary */
  .am-helpdesk-form .kt-btn-primary {
    flex: 1;
  }

  /* Discard Button */
  .am-helpdesk-form input[type="button"][name="discard"] {
    background: transparent;
    color: hsl(var(--muted-foreground));
    border: 1px solid hsl(var(--border));
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .am-helpdesk-form input[type="button"][name="discard"]:hover {
    background: hsl(var(--muted));
    color: hsl(var(--foreground));
    border-color: hsl(var(--border));
  }

  /* Attachment label styling */
  .am-helpdesk-form .am-element-title label {
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    margin-bottom: 0.5rem;
    display: block;
  }

  /* Hidden fields styling */
  .am-helpdesk-form input[type="hidden"] {
    display: none;
  }



  /*DARK CSS*/

  .dark .header h1 {
    color: white !important;
  }

  .dark .kt-footer {
    background: #09090b !important;
  }

  .dark .am-grid tbody tr.odd {
    background: black !important;
  }

  .dark .am-member-payment-history tr:first-child {
    background: #1e1e1e !important;
  }

  .dark .am-member-payment-history th {
    /* Your styles here */
    background: #1e1e1e !important;
    color: #fff;
    font-weight: 600;
  }

  .dark .am-grid-container {
    border: 1px solid #27272a !important;
  }

  .dark table th {
    background: #1e1e1e !important;
    color: #fff;
    font-weight: 600;

  }

  .kt-menu-item-accordion .kt-menu-title {
    padding-left: 4px !important;
  }

  .dark .am-grid-row:nth-child(even) {
    background: black !important;
    /* dark blackish */
  }

  .dark .am-grid-row:nth-child(odd) {
    background: #1e1e1e !important;
  }

  .dark #grid-user .am-grid-row:nth-child(even) {
    background: #1e1e1e !important;
  }

  .dark #grid-user .am-grid td {
    border-bottom: unset !important;
  }

  .dark #grid-user .am-grid-row:nth-child(odd) {
    background: black !important;
  }

  .dark .am-grid td:not(:last-child) {
    border-right: 1px solid #27272a !important;
  }

  .dark .am-helpdesk-message-outbound {
    border: 1px solid #2c2b2b !important;
  }

  .dark .am-helpdesk-ticket-actions-container {
    border: 1px solid #2c2b2b !important;
  }

  .dark .am-helpdesk {
    border: 1px solid #2c2b2b !important;
  }

  .dark .am-helpdesk-form .am-el-wide {
    border: 1px solid #2c2b2b !important;
  }

  .dark .am-signup-form #row-product_id_page-0-0 div.am-element label.kt-label {
    border: 1px solid #ccc !important;
  }

  .dark .comment {
    background: inherit !important;
  }

  .dark .am-element:has(> .am-cta-profile) {
    border-top: 1px solid #2c2b2b !important;
  }

  .dark #member-main-subscriptions .subscription-item:not(:last-child) {
    border-bottom: 3px solid #2c2b2b !important;
  }

  .dark #member-main-subscriptions {
    border: 1px solid #2c2b2b !important;
  }

  .dark #member-main-subscriptions .subscription-item:hover {
    background-color: #2a2a2a !important;
  }

  .dark #toggle-subscriptions-div:hover {
    background-color: #2a2a2a !important;
  }

  /* Default (light theme) */
  .price {
    color: #dc2626;
    font-weight: 800 !important;
    /* Extra bold */
  }

  /* Dark theme */
  .dark .price {
    color: #dc2626;
    font-weight: 800 !important;
    /* Extra bold */
  }

  /* Username color styling */
  .username-display {
    color: #2563eb;
    /* Blue color in light mode */
  }

  .dark .username-display {
    color: #ffffff;
    /* White color in dark mode */
  }

  /* =============================================
   AUTH PAGES - SPLIT SCREEN DESIGN (v23)
   ============================================= */

  /* Main Container */
  .auth-body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
    background: #ffffff;
  }

  .auth-container {
    display: flex;
    width: 100%;
    height: 100vh;
  }

  /* Left Side - Orange Gradient */
  .auth-left {
    width: 45%;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    position: relative;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    overflow: hidden;
  }

  /* Particles/Decorations */
  .auth-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.15) 2px, transparent 2px);
    background-size: 40px 40px;
    opacity: 0.5;
    pointer-events: none;
  }

  /* Auth Text Content */
  .auth-left h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .auth-left p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 400px;
    line-height: 1.6;
  }

  .app-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 2rem;
    color: white;
  }

  /* Right Side - Login Form Form */
  .auth-right {
    width: 55%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    position: relative;
  }

  /* Auth Card Wrapper */
  /* Auth Card Wrapper */
  .auth-box {
    width: 100%;
    padding: 10px;
    max-width: 460px;
    transition: max-width 0.3s ease;
  }

  .auth-logo {
    display: block;
    margin: 0 auto 1.5rem;
    max-height: 50px;
  }

  .auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    text-align: center;
  }

  .auth-subtitle {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    text-align: center;
  }

  /* Form Elements Overrides */
  .am-form input[type="text"],
  .am-form input[type="password"],
  .am-form input[type="email"] {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    font-size: 1rem;
    color: #334155;
    transition: all 0.2s;
  }

  .am-form input:focus {
    border-color: #f97316;
    background: white;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1);
    outline: none;
  }

  .am-form label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
    display: block;
  }

  /* Buttons */
  .auth-box button[type="submit"] {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    font-weight: 600;
    border-radius: 12px;
    font-size: 1rem;
    box-shadow: 0 8px 20px -6px rgba(249, 115, 22, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
  }

  .auth-box button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px -8px rgba(249, 115, 22, 0.5);
  }

  /* Responsive */
  @media (max-width: 1024px) {
    .auth-left {
      width: 40%;
      padding: 3rem;
    }

    .auth-right {
      width: 60%;
    }
  }

  @media (max-width: 768px) {
    .auth-body {
      height: auto;
      overflow-y: auto;
    }

    .auth-container {
      flex-direction: column;
      height: auto;
    }

    .auth-left {
      width: 100%;
      height: 300px;
      padding: 2rem;
      align-items: center;
      text-align: center;
    }

    .auth-left h1 {
      font-size: 2rem;
    }

    .auth-right {
      width: 100%;
      padding: 2rem;
      min-height: calc(100vh - 300px);
    }

    .auth-box {
      box-shadow: none;
      border: none;
      padding: 0;
    }
  }
/* =============================================
   PAYMENT HISTORY & GRID STYLES (Nox Theme)
   ============================================= */
.am-grid-container {
    width: 100%;
    margin-top: 1rem;
    overflow-x: auto;
}

table.am-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 600px; /* Ensure scrolling on mobile */
}

table.am-grid th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

table.am-grid td {
    padding: 1rem;
    color: #334155;
    font-size: 0.95rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

table.am-grid tr:last-child td {
    border-bottom: none;
}

table.am-grid tr:hover td {
    background-color: #f8fafc;
}

/* Dark Mode Grid */
.dark table.am-grid th {
    background: #1e293b;
    color: #94a3b8;
    border-color: #334155;
}

.dark table.am-grid td {
    color: #cbd5e1;
    border-color: #334155;
}

.dark table.am-grid tr:hover td {
    background-color: #1e293b;
}

/* Pagination */
.am-grid-footer {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e2e8f0;
}

.dark .am-grid-footer {
    border-color: #334155;
}
